Closed Bug 1577487 Opened 1 year ago Closed 1 year ago

Remove misleading comments about `nsPlainTextSerializer::mLineBreaker`

Categories

(Core :: DOM: Serializers, enhancement)

enhancement
Not set

Tracking

()

RESOLVED FIXED
mozilla70
Tracking Status
firefox70 --- fixed

People

(Reporter: mbrodesser, Assigned: mbrodesser)

Details

Attachments

(1 file)

The class is already confusing enough.

Assignee: nobody → mbrodesser

LineBreaker splits sequences of characters not containing whitespaces,
which is undesirable for CJK-strings. In that case, LineBreaker is
deliberately not used and lines are only broken at ASCII-whitespace
characters.

Maybe extend the comment:
In this case we don't want strings, especially CJK-ones, to be split. We still need to break lines at simple white-space for formatted output.

(In reply to Jorg K (GMT+2) from comment #2)

Maybe extend the comment:
In this case we don't want strings, especially CJK-ones, to be split. We still need to break lines at simple white-space for formatted output.

I prefer leaving it in the current state, because the Serializer could be used with OutputWrap and OutputDisallowLineBreaking, ending up at the same code path. When the whole file is cleaned up more, this part of the code hopefully becomes clearer too.

Pushed by mbrodesser@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c2a5945163a9
remove misleading comments about `nsPlainTextSerializer::mLineBreaker`. r=hsivonen
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
You need to log in before you can comment on or make changes to this bug.