Closed
Bug 1576899
Opened 6 years ago
Closed 6 years ago
Set output argument in `nsIContentSerializer::Init` instead of passing it to `nsIContentSerializer::Append*`
Categories
(Core :: DOM: Serializers, enhancement)
Core
DOM: Serializers
Tracking
()
RESOLVED
FIXED
mozilla70
| Tracking | Status | |
|---|---|---|
| firefox70 | --- | fixed |
People
(Reporter: mbrodesser, Assigned: mbrodesser)
Details
Attachments
(1 file)
No description provided.
| Assignee | ||
Updated•6 years ago
|
Assignee: nobody → mbrodesser
| Assignee | ||
Comment 1•6 years ago
|
||
Before, all nsIContentSerializer::Append* methods took an output
string. The state of nsPlainTextSerializer depended on the string
pointing to the same object.
Now, it's ensured that the same output string is used between
nsIContentSerializer::Init and nsIContentSerializer::Finish.
Moreover, nsHTMLCopyEncoder::EncodeToStringWithContext re-used
mSerializer without initializing it again. This was error-prone,
because after serializing with mSerializer, it's internal state might
have changed to an undesirable one (e.g.
nsPlainTextSerializer::mWrapColumn could've been modified).
Hence, it is now initialized again before serializing the common
ancestors.
Pushed by mbrodesser@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/10716060af24
change `nsIContentSerializer` to take output string as argument in `nsIContentSerializer::Init`. r=hsivonen
Comment 3•6 years ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox70:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
You need to log in
before you can comment on or make changes to this bug.
Description
•