Bug 1354975 - Let the frame handles attribute change in ServoRestyleManager::AttributeChanged(). r=heycam

MozReview-Commit-ID: EdvgBnPlP9Y

--HG--
extra : rebase_source : 23acb09872d97f29354f5cac0a0485d88ef13bea
This commit is contained in:
Ting-Yu Lin 2017-04-07 16:41:33 +08:00
parent 770832b7d3
commit 919df843aa
5 changed files with 41 additions and 35 deletions

View File

@ -525,6 +525,12 @@ ServoRestyleManager::AttributeChanged(Element* aElement, int32_t aNameSpaceID,
ServoElementSnapshot* snapshot = Servo_Element_GetSnapshot(aElement); ServoElementSnapshot* snapshot = Servo_Element_GetSnapshot(aElement);
MOZ_ASSERT_IF(snapshot, snapshot->HasAttrs()); MOZ_ASSERT_IF(snapshot, snapshot->HasAttrs());
#endif #endif
nsIFrame* primaryFrame = aElement->GetPrimaryFrame();
if (primaryFrame) {
primaryFrame->AttributeChanged(aNameSpaceID, aAttribute, aModType);
}
if (aAttribute == nsGkAtoms::style) { if (aAttribute == nsGkAtoms::style) {
PostRestyleEvent(aElement, eRestyle_StyleAttribute, nsChangeHint(0)); PostRestyleEvent(aElement, eRestyle_StyleAttribute, nsChangeHint(0));
} }

View File

@ -656,7 +656,7 @@ fails == 372037-1.html 372037-1.html
== 372323-1.xhtml 372323-1.xhtml == 372323-1.xhtml 372323-1.xhtml
== 372553-1.html 372553-1.html == 372553-1.html 372553-1.html
== 372632-1.html 372632-1.html == 372632-1.html 372632-1.html
fails == 372768-1.html 372768-1.html == 372768-1.html 372768-1.html
== 373295-1.html 373295-1.html == 373295-1.html 373295-1.html
== 373298-1.html 373298-1.html == 373298-1.html 373298-1.html
== 373381-1.html 373381-1.html == 373381-1.html 373381-1.html
@ -989,8 +989,8 @@ fails == 416106-1.xhtml 416106-1.xhtml
== 417178-1.html 417178-1.html == 417178-1.html 417178-1.html
== 417246-1.html 417246-1.html == 417246-1.html 417246-1.html
== 417676.html 417676.html == 417676.html 417676.html
fails asserts(1) == 418574-1.html 418574-1.html asserts-if(stylo,1-2) == 418574-1.html 418574-1.html # bug 478135
fails asserts(1) == 418574-2.html 418574-2.html asserts-if(stylo,1-2) == 418574-2.html 418574-2.html # bug 478135
== 418766-1a.html 418766-1a.html == 418766-1a.html 418766-1a.html
== 418766-1b.html 418766-1b.html == 418766-1b.html 418766-1b.html
== 419060.html 419060.html == 419060.html 419060.html
@ -1678,7 +1678,7 @@ fails == 645647-1.html 645647-1.html
needs-focus == 652301-1a.html 652301-1a.html needs-focus == 652301-1a.html 652301-1a.html
needs-focus == 652301-1b.html 652301-1b.html needs-focus == 652301-1b.html 652301-1b.html
fails == 652775-1.html 652775-1.html fails == 652775-1.html 652775-1.html
fails == 653930-1.html 653930-1.html == 653930-1.html 653930-1.html
HTTP(..) == 654057-1.html 654057-1.html HTTP(..) == 654057-1.html 654057-1.html
fails == 654950-1.html 654950-1.html fails == 654950-1.html 654950-1.html
== 655549-1.html 655549-1.html == 655549-1.html 655549-1.html

View File

@ -23,7 +23,7 @@ fails == transformations.html transformations.html # Bug 1341785
include default-style/reftest-stylo.list include default-style/reftest-stylo.list
# Tests for bugs: # Tests for bugs:
fails == block-invalidate.html block-invalidate.html == block-invalidate.html block-invalidate.html
== in-cells.html in-cells.html == in-cells.html in-cells.html
fails == max-height.html max-height.html fails == max-height.html max-height.html

View File

@ -4,7 +4,7 @@
== numbering-3.html numbering-3.html == numbering-3.html numbering-3.html
== numbering-4.html numbering-4.html == numbering-4.html numbering-4.html
== ol-reversed-1a.html ol-reversed-1a.html == ol-reversed-1a.html ol-reversed-1a.html
fails asserts(1) == ol-reversed-1b.html ol-reversed-1b.html asserts-if(stylo,1-2) == ol-reversed-1b.html ol-reversed-1b.html # bug 478135
== ol-reversed-1c.html ol-reversed-1c.html == ol-reversed-1c.html ol-reversed-1c.html
== ol-reversed-2.html ol-reversed-2.html == ol-reversed-2.html ol-reversed-2.html
== ol-reversed-3.html ol-reversed-3.html == ol-reversed-3.html ol-reversed-3.html

View File

@ -185,16 +185,16 @@ fails == mtable-columnalign-multi-mtable.html mtable-columnalign-multi-mtable.ht
fails == mtable-columnalign-multi-mtable-dynamic.html mtable-columnalign-multi-mtable-dynamic.html fails == mtable-columnalign-multi-mtable-dynamic.html mtable-columnalign-multi-mtable-dynamic.html
fails == maction-selection.html maction-selection.html fails == maction-selection.html maction-selection.html
== maction-dynamic-embellished-op.html maction-dynamic-embellished-op.html == maction-dynamic-embellished-op.html maction-dynamic-embellished-op.html
fails == maction-dynamic-1.html maction-dynamic-1.html == maction-dynamic-1.html maction-dynamic-1.html
fails == maction-dynamic-2.html maction-dynamic-2.html == maction-dynamic-2.html maction-dynamic-2.html
== mo-lspace-rspace.html mo-lspace-rspace.html == mo-lspace-rspace.html mo-lspace-rspace.html
fails == mo-lspace-rspace-2.html mo-lspace-rspace-2.html fails == mo-lspace-rspace-2.html mo-lspace-rspace-2.html
fails == mo-lspace-rspace-3.html mo-lspace-rspace-3.html == mo-lspace-rspace-3.html mo-lspace-rspace-3.html
fails == mo-lspace-rspace-4.html mo-lspace-rspace-4.html fails == mo-lspace-rspace-4.html mo-lspace-rspace-4.html
== mo-invisibleoperators.html mo-invisibleoperators.html == mo-invisibleoperators.html mo-invisibleoperators.html
== mo-invisibleoperators-2.html mo-invisibleoperators-2.html == mo-invisibleoperators-2.html mo-invisibleoperators-2.html
fails == mo-glyph-size.html mo-glyph-size.html fails == mo-glyph-size.html mo-glyph-size.html
fails == maction-dynamic-3.html maction-dynamic-3.html == maction-dynamic-3.html maction-dynamic-3.html
== whitespace-trim-1.html whitespace-trim-1.html == whitespace-trim-1.html whitespace-trim-1.html
== whitespace-trim-2.html whitespace-trim-2.html == whitespace-trim-2.html whitespace-trim-2.html
== whitespace-trim-3.html whitespace-trim-3.html == whitespace-trim-3.html whitespace-trim-3.html
@ -228,19 +228,19 @@ fails == multiscripts-1.html multiscripts-1.html
random-if(gtkWidget) == menclose-2-actuarial.html menclose-2-actuarial.html random-if(gtkWidget) == menclose-2-actuarial.html menclose-2-actuarial.html
random-if(gtkWidget) == menclose-2-bottom.html menclose-2-bottom.html random-if(gtkWidget) == menclose-2-bottom.html menclose-2-bottom.html
random-if(gtkWidget) == menclose-2-box.html menclose-2-box.html random-if(gtkWidget) == menclose-2-box.html menclose-2-box.html
fails == menclose-2-circle.html menclose-2-circle.html == menclose-2-circle.html menclose-2-circle.html
fails == menclose-2-downdiagonalstrike.html menclose-2-downdiagonalstrike.html == menclose-2-downdiagonalstrike.html menclose-2-downdiagonalstrike.html
fails == menclose-2-horizontalstrike.html menclose-2-horizontalstrike.html == menclose-2-horizontalstrike.html menclose-2-horizontalstrike.html
fails == menclose-2-left.html menclose-2-left.html == menclose-2-left.html menclose-2-left.html
fails == menclose-2-longdiv.html menclose-2-longdiv.html == menclose-2-longdiv.html menclose-2-longdiv.html
random-if(gtkWidget) == menclose-2-right.html menclose-2-right.html random-if(gtkWidget) == menclose-2-right.html menclose-2-right.html
random-if(gtkWidget) == menclose-2-roundedbox.html menclose-2-roundedbox.html random-if(gtkWidget) == menclose-2-roundedbox.html menclose-2-roundedbox.html
fails == menclose-2-top.html menclose-2-top.html == menclose-2-top.html menclose-2-top.html
random-if(gtkWidget) == menclose-2-updiagonalarrow.html menclose-2-updiagonalarrow.html random-if(gtkWidget) == menclose-2-updiagonalarrow.html menclose-2-updiagonalarrow.html
fails == menclose-2-updiagonalstrike.html menclose-2-updiagonalstrike.html == menclose-2-updiagonalstrike.html menclose-2-updiagonalstrike.html
fails == menclose-2-verticalstrike.html menclose-2-verticalstrike.html == menclose-2-verticalstrike.html menclose-2-verticalstrike.html
random-if(gtkWidget) == menclose-2-roundedbox.html menclose-2-roundedbox.html random-if(gtkWidget) == menclose-2-roundedbox.html menclose-2-roundedbox.html
fails == menclose-2-phasorangle.html menclose-2-phasorangle.html == menclose-2-phasorangle.html menclose-2-phasorangle.html
fails == menclose-3-box.html menclose-3-box.html fails == menclose-3-box.html menclose-3-box.html
== menclose-3-madruwb.html menclose-3-madruwb.html == menclose-3-madruwb.html menclose-3-madruwb.html
== menclose-3-radical.html menclose-3-radical.html == menclose-3-radical.html menclose-3-radical.html
@ -249,23 +249,23 @@ fails == menclose-3-invalid.html menclose-3-invalid.html
== menclose-3-multiple.html menclose-3-multiple.html == menclose-3-multiple.html menclose-3-multiple.html
fails == menclose-3-unknown.html menclose-3-unknown.html fails == menclose-3-unknown.html menclose-3-unknown.html
== menclose-4.html menclose-4.html == menclose-4.html menclose-4.html
fails == menclose-5-actuarial.html menclose-5-actuarial.html == menclose-5-actuarial.html menclose-5-actuarial.html
fails == menclose-5-bottom.html menclose-5-bottom.html == menclose-5-bottom.html menclose-5-bottom.html
fails == menclose-5-box.html menclose-5-box.html == menclose-5-box.html menclose-5-box.html
fails == menclose-5-circle.html menclose-5-circle.html == menclose-5-circle.html menclose-5-circle.html
fails == menclose-5-downdiagonalstrike.html menclose-5-downdiagonalstrike.html == menclose-5-downdiagonalstrike.html menclose-5-downdiagonalstrike.html
fails == menclose-5-horizontalstrike.html menclose-5-horizontalstrike.html == menclose-5-horizontalstrike.html menclose-5-horizontalstrike.html
fails == menclose-5-left.html menclose-5-left.html == menclose-5-left.html menclose-5-left.html
== menclose-5-longdiv.html menclose-5-longdiv.html == menclose-5-longdiv.html menclose-5-longdiv.html
fails == menclose-5-madruwb.html menclose-5-madruwb.html == menclose-5-madruwb.html menclose-5-madruwb.html
fails == menclose-5-radical.html menclose-5-radical.html == menclose-5-radical.html menclose-5-radical.html
fails == menclose-5-right.html menclose-5-right.html == menclose-5-right.html menclose-5-right.html
fails == menclose-5-roundedbox.html menclose-5-roundedbox.html == menclose-5-roundedbox.html menclose-5-roundedbox.html
fails == menclose-5-top.html menclose-5-top.html == menclose-5-top.html menclose-5-top.html
fails == menclose-5-updiagonalarrow.html menclose-5-updiagonalarrow.html == menclose-5-updiagonalarrow.html menclose-5-updiagonalarrow.html
fails == menclose-5-updiagonalstrike.html menclose-5-updiagonalstrike.html == menclose-5-updiagonalstrike.html menclose-5-updiagonalstrike.html
fails == menclose-5-verticalstrike.html menclose-5-verticalstrike.html == menclose-5-verticalstrike.html menclose-5-verticalstrike.html
fails == menclose-5-phasorangle.html menclose-5-phasorangle.html == menclose-5-phasorangle.html menclose-5-phasorangle.html
fails == menclose-6-actuarial.html menclose-6-actuarial.html fails == menclose-6-actuarial.html menclose-6-actuarial.html
fails == menclose-6-bottom.html menclose-6-bottom.html fails == menclose-6-bottom.html menclose-6-bottom.html
fails == menclose-6-box.html menclose-6-box.html fails == menclose-6-box.html menclose-6-box.html