Closed
Bug 56921
Opened 24 years ago
Closed 16 years ago
HTML output makes lines too long
Categories
(Core :: DOM: Serializers, defect, P2)
Core
DOM: Serializers
Tracking
()
RESOLVED
FIXED
mozilla1.2alpha
People
(Reporter: akkzilla, Assigned: t_mutreja)
References
Details
(Keywords: helpwanted, Whiteboard: [correctness][serializer])
Split off from bug 56833: The nsHTMLContentSerializer makes its lines too long
-- set the wrap column to 72, and make some output, and observe that almost all
lines are longer than 72 columns.
The old code, in nsHTMLContentSinkStream, was at least closer to right (there
were no known bugs filed against it).
Comment 1•24 years ago
|
||
Akkana, this bug should be assigned to whomever owns the serializers, and that
isn't me.
Assignee: jst → akkana
Reporter | ||
Comment 2•24 years ago
|
||
Anthony owns them now.
Johnny, it was assigned to you because you replaced the old wrapping code with
new code, and I thought maybe you had a reason for that. If not, maybe we can
just plug the old code from nsHTMLContentSinkStream.cpp back in, since it
wrapped at the right place.
Assignee: akkana → anthonyd
Comment 3•24 years ago
|
||
Vidur wrote the new code and IIRC the reason for changing the linewrapping code
was due to performance problems in the old code combined with the fact that the
new code needed to use the new string API's (nsAWritableString n' friends) in
stead of nsString.
If it's possible to lift code from the old code with todays nsAxxxString API's
then do so, but the change was sertainly done for a reason...
setting to 0.9.
anthonyd
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.9
Comment 5•24 years ago
|
||
does this affect mail compose?
Reporter | ||
Comment 6•24 years ago
|
||
It affects all html source that's saved, including html mail compose. It
doesn't affect how the html renders, only the source.
Comment 7•24 years ago
|
||
pushing off so anthony has realistic moz 0.9 buglist
Target Milestone: mozilla0.9 → mozilla0.9.1
Comment 8•24 years ago
|
||
moving to mozilla 1.0 milestone
resetting to platform/OS All
Comment 10•23 years ago
|
||
--> DOM to Text Conversion default owner
Assignee: kin → harishd
Priority: P3 → --
Target Milestone: mozilla1.0 → ---
Updated•23 years ago
|
Priority: -- → P2
Target Milestone: --- → mozilla0.9.9
Comment 12•23 years ago
|
||
-> tanu who is helping out on serializer bug fixing.
Assignee: peterv → tmutreja
Reporter | ||
Comment 13•23 years ago
|
||
While reviewing the fix for bug 85184 I noticed the problem that causes this
bug: this line (line 581 after the patch in 85184):
indx = aStr.FindChar(PRUnichar(' '), strOffset + leftInLine);
starts at the character of the input string that would match the wrap column in
the output string, then searches forward from there to find the next space. So
of course the lines are always longer than the wrap column. It needs to start
at the wrap column and search backward for the next space (with error clauses to
search forward only in the case where there is no space and it has to make its
lines too long).
Also, it should probably use the nsLineBreaker class rather than just looking
for spaces.
For examples that do the right thing (and unfortunately have much more
complicated code) see nsPlainTextSerializer.cpp starting at line 1180, or the
rewrap code in nsInternetCiter. (nsPlainTextSerializer is probably the better
example and has been much more thoroughly tested.)
Assignee | ||
Updated•23 years ago
|
Status: NEW → ASSIGNED
Target Milestone: mozilla1.1 → mozilla1.0
Comment 15•23 years ago
|
||
Moving Netscape owned 0.9.9 and 1.0 bugs that don't have an nsbeta1, nsbeta1+,
topembed, topembed+, Mozilla0.9.9+ or Mozilla1.0+ keyword. Please send any
questions or feedback about this to adt@netscape.com. You can search for
"Moving bugs not scheduled for a project" to quickly delete this bugmail.
Target Milestone: mozilla1.0 → mozilla1.2
Reporter | ||
Comment 16•22 years ago
|
||
See also bug 200582, which covers a similar problem in the same code when
wrapping japanese or other non-ascii text.
Comment 17•16 years ago
|
||
My current patch for bug 422403 (not yet landed) provides a better wrapping.
Comment 18•16 years ago
|
||
The issue is almost fixed by bug 422403. There are still some case where we cannot wrap at the specified column number. However I think we can close this bug since the serializer do a better job.
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•