Closed Bug 1373744 Opened 7 years ago Closed 7 years ago

Change nsGenericHTMLElement::CopyInnerTo to call SetParsedAttr instead of SetInlineStyleDeclaration

Categories

(Core :: DOM: Core & HTML, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla56
Tracking Status
firefox56 --- fixed

People

(Reporter: bytesized, Assigned: bytesized)

References

Details

Attachments

(1 file)

Currently, nsGenericHTMLElement::CopyInnerTo uses SetInlineStyleDeclaration to clone CSS attributes. However, if we used SetParsedAttr instead, the declaration block would be addref'ed instead of being cloned. The only hangup is that we need to mark the declaration block as immutable in that situation so that the attribute is copied on write.
Comment on attachment 8878690 [details] Bug 1373744 - Change nsGenericHTMLElement::CopyInnerTo to call SetParsedAttr instead of SetInlineStyleDeclaration https://reviewboard.mozilla.org/r/150000/#review155248 r=me. I guess it's hard to common up with the other SetParsedAttr codepath while we want different behavior in the "reparse" case...
Attachment #8878690 - Flags: review?(bzbarsky) → review+
Pushed by ksteuber@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6d7315535184 Change nsGenericHTMLElement::CopyInnerTo to call SetParsedAttr instead of SetInlineStyleDeclaration r=bz
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: