Commit Graph

20 Commits

Author SHA1 Message Date
Kirk Steuber
6684b17554 Bug 1365092 - Move side effects of SetAttr, UnsetAttr, and ParseAttribute functions to BeforeSetAttr and AfterSetAttr r=bz
This is necessary to facilitate the transition to cloning attributes instead of reparsing them.

MozReview-Commit-ID: Gyd1tD6ldly
2017-06-07 10:28:20 -07:00
Kirk Steuber
e2ea33731f Bug 1363481 - Add the old attribute value as a parameter to Element::AfterSetAttr r=bz
In order to facilitate the movement of code with side-effects called by Element::SetAttr to Element::BeforeSetAttr and Element::AfterSetAttr, Element::AfterSetAttr should have access to the old value of the attribute. This includes information about whether there was previously a value set or not.

Accomplishing this involved passing an additional argument through functions that find and change the old attribute value in order to ensure that we can differentiate between an empty old value and an absent old value (attribute was not set).

Note that while I tried to ensure that accurate values (and their absence) are reported to Element::AfterSetAttr, I largely ignored SVG. While the old value reported for SVG values should be however accurate the value already being reported to SetAttrAndNotify was, SVG elements do not currently report unset values properly because they will never pass a null pointer to SetAttrAndNotify.

MozReview-Commit-ID: K1mha8CNFZP
2017-05-18 14:09:01 -07:00
Olli Pettay
1ea6ce17c0 Bug 1352389, don't push extra script blocker on stack when setting attributes, r=bz 2017-03-31 22:54:41 -04:00
Olli Pettay
36866509cd backout Bug 1352389, r=backout 2017-03-31 16:59:06 -04:00
Olli Pettay
b9520e8c63 Bug 1352389, don't push extra script blocker on stack when setting attributes, r=bz 2017-03-31 13:13:52 -04:00
Manish Goregaokar
cbde7ac997 Bug 1330051; Reparse style attribute when adopting across style backends; r=bz
MozReview-Commit-ID: LWN57KApiMu
2017-03-24 15:28:19 -07:00
Xidorn Quan
dd7595af14 Bug 1340341 - Set immutablity in GetCSSDeclaration instead of ToString. r=bz
MozReview-Commit-ID: 2aDsVJMJG8T
2017-02-24 22:06:07 +11:00
Boris Zbarsky
b159c3dbc3 Bug 1330060 part 1. Move GetInlineStyleDeclaration up to Element so it doesn't have to be virtual. r=bkelly 2017-01-11 19:03:16 -05:00
Xidorn Quan
3b2cf2153e Bug 1309109 part 5 - Store ServoDeclarationBlock rather than RawServoDeclarationBlock in nsAttrValue. r=heycam
MozReview-Commit-ID: HWqgjwif1qF
2016-10-18 15:29:03 +11:00
Edgar Chen
ed60153843 Bug 1281670 - Keep reparsing style attribute if we had parsed it once. r=bz
MozReview-Commit-ID: 4TeWC3Oepe4
2016-08-08 18:29:11 +08:00
Boris Zbarsky
8d301497f6 Bug 824592 part 2. Give nsStyledElement an IID. r=peterv 2016-08-02 11:05:38 -07:00
Boris Zbarsky
ccc1d2d0fb Bug 824592 part 1. Get rid of nsStyledElementNotElementCSSInlineStyle, since quickstubs are long-since gone. r=peterv 2016-08-02 11:05:38 -07:00
Cameron McCormack
fc907fc428 Bug 1280772 - Part 3: Store Servo-parsed style="" attributes in nsAttrValues. r=bholley 2016-06-24 13:35:12 +10:00
Cameron McCormack
28b8179a42 Bug 1280772 - Part 2: Rename eCSSDeclaration to eGeckoCSSDeclaration. r=bholley 2016-06-24 13:35:12 +10:00
Jonathan Watt
d714197cfc Bug 1263782 - Kill off the deprecated nsINode::IsInDoc(). r=baku 2016-03-31 11:58:25 +01:00
L. David Baron
e4cee74a1d Bug 1221436 patch 2 - For style attributes, only store a css::Declaration instead of a css::StyleRule. r=heycam
Now that Declaration implements nsIStyleRule, we don't need the memory
overhead of storing a StyleRule object for style attributes.

We also need to change this prior to patch 5, because the changes in
patch 5 that will allow rules to change (but declarations not) would
otherwise break due to style attribute object merging done by
nsAttrValue::ParseStyleAttribute.
2015-11-09 15:57:16 +08:00
Ehsan Akhgari
e34f1dc3fb Bug 1185351 - Don't force inline style CSP checks on native anonymous content; r=ckerschb 2015-08-21 17:53:34 -04:00
Robert O'Callahan
04b3027303 Bug 1184842. Change nsAttrAndChildArray::SetAndTakeAttr to nsAttrAndChildArray::SetAndSwapAttr. r=peterv 2015-07-22 14:09:41 +12:00
Andrew McCreight
92010d3e4c Bug 1152551, part 2 - Fix mode lines in dom/. r=jst 2015-05-03 15:32:37 -04:00
Birunthan Mohanathas
e9068bbc4f Bug 946065 - Part 12: Move content/base/ to dom/ and flatten subdirectories. r=peterv 2014-10-25 20:25:22 +03:00