Bug 1354975 - Let the frame handles attribute change in ServoRestyleManager::AttributeChanged().
MozReview-Commit-ID: EdvgBnPlP9Y
--- a/layout/base/ServoRestyleManager.cpp
+++ b/layout/base/ServoRestyleManager.cpp
@@ -520,16 +520,22 @@ void
ServoRestyleManager::AttributeChanged(Element* aElement, int32_t aNameSpaceID,
nsIAtom* aAttribute, int32_t aModType,
const nsAttrValue* aOldValue)
{
#ifdef DEBUG
ServoElementSnapshot* snapshot = Servo_Element_GetSnapshot(aElement);
MOZ_ASSERT_IF(snapshot, snapshot->HasAttrs());
#endif
+
+ nsIFrame* primaryFrame = aElement->GetPrimaryFrame();
+ if (primaryFrame) {
+ primaryFrame->AttributeChanged(aNameSpaceID, aAttribute, aModType);
+ }
+
if (aAttribute == nsGkAtoms::style) {
PostRestyleEvent(aElement, eRestyle_StyleAttribute, nsChangeHint(0));
}
// <td> is affected by the cellpadding on its ancestor table,
// so we should restyle the whole subtree
if (aAttribute == nsGkAtoms::cellpadding && aElement->IsHTMLElement(nsGkAtoms::table)) {
PostRestyleEvent(aElement, eRestyle_Subtree, nsChangeHint(0));
}
--- a/layout/reftests/bugs/reftest-stylo.list
+++ b/layout/reftests/bugs/reftest-stylo.list
@@ -651,17 +651,17 @@ fails == 371043-1.html 371043-1.html
== 371925-1a.html 371925-1a.html
== 371925-1b.html 371925-1b.html
fails == 372037-1.html 372037-1.html
== 372062-1.html 372062-1.html
== 372063-1.html 372063-1.html
== 372323-1.xhtml 372323-1.xhtml
== 372553-1.html 372553-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
== 373298-1.html 373298-1.html
== 373381-1.html 373381-1.html
== 373381-2.html 373381-2.html
fails-if(Android) random-if(d2d) == 373381-3.html 373381-3.html
== 373381-4.html 373381-4.html
== 373383-1.html 373383-1.html
fails == 373433-1.html 373433-1.html
@@ -984,18 +984,18 @@ fails == 413840-pushed-line-bullet.html
fails == 414123.xhtml 414123.xhtml
== 414638.html 414638.html
fails == 414851-1.html 414851-1.html
fails == 416106-1.xhtml 416106-1.xhtml
== 416752-1.html 416752-1.html
== 417178-1.html 417178-1.html
== 417246-1.html 417246-1.html
== 417676.html 417676.html
-fails asserts(1) == 418574-1.html 418574-1.html
-fails asserts(1) == 418574-2.html 418574-2.html
+asserts-if(stylo,1-2) == 418574-1.html 418574-1.html # bug 478135
+asserts-if(stylo,1-2) == 418574-2.html 418574-2.html # bug 478135
== 418766-1a.html 418766-1a.html
== 418766-1b.html 418766-1b.html
== 419060.html 419060.html
== 419285-1.html 419285-1.html
== 419531-1.html 419531-1.html
== 420069-1.html 420069-1.html
== 420069-2.html 420069-2.html
== 420351-1.html 420351-1.html
@@ -1673,17 +1673,17 @@ fails == 641770-1.html 641770-1.html
fails == 645491-1.html 645491-1.html
fails == 645647-1.html 645647-1.html
== 645647-2.html 645647-2.html
== 645768-1.html 645768-1.html
== 650228-1.html 650228-1.html
needs-focus == 652301-1a.html 652301-1a.html
needs-focus == 652301-1b.html 652301-1b.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
fails == 654950-1.html 654950-1.html
== 655549-1.html 655549-1.html
== 655836-1.html 655836-1.html
fails == 656875.html 656875.html
== 658952.html 658952.html
== 660682-1.html 660682-1.html
fuzzy-if(d2d,1,256) skip-if(Android) fuzzy-if(skiaContent,1,68000) == 664127-1.xul 664127-1.xul
--- a/layout/reftests/forms/meter/reftest-stylo.list
+++ b/layout/reftests/forms/meter/reftest-stylo.list
@@ -18,17 +18,17 @@ fails == bar-pseudo-element-vertical.htm
# transformations will not behave exactly the same for <meter> and two divs.
# However, it would be possible to manually check those.
fails == transformations.html transformations.html # Bug 1341785
# default style
include default-style/reftest-stylo.list
# Tests for bugs:
-fails == block-invalidate.html block-invalidate.html
+== block-invalidate.html block-invalidate.html
== in-cells.html in-cells.html
fails == max-height.html max-height.html
# Tests for block and inline orientation in combination with writing-mode
== meter-orient-vertical.html meter-orient-vertical.html
== meter-orient-horizontal.html meter-orient-horizontal.html
== meter-orient-block.html meter-orient-block.html
== meter-orient-inline.html meter-orient-inline.html
--- a/layout/reftests/list-item/reftest-stylo.list
+++ b/layout/reftests/list-item/reftest-stylo.list
@@ -1,14 +1,14 @@
# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing
== numbering-1.html numbering-1.html
== numbering-2.html numbering-2.html
== numbering-3.html numbering-3.html
== numbering-4.html numbering-4.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-2.html ol-reversed-2.html
== ol-reversed-3.html ol-reversed-3.html
== bullet-space-1.html bullet-space-1.html
== bullet-space-2.html bullet-space-2.html
== bullet-intrinsic-isize-1.html bullet-intrinsic-isize-1.html
fails == bullet-intrinsic-isize-2.html bullet-intrinsic-isize-2.html
--- a/layout/reftests/mathml/reftest-stylo.list
+++ b/layout/reftests/mathml/reftest-stylo.list
@@ -180,26 +180,26 @@ fails == mtable-columnalign-single-mtr-d
fails == mtable-columnalign-single-mtable.html mtable-columnalign-single-mtable.html
fails == mtable-columnalign-single-mtable-dynamic.html mtable-columnalign-single-mtable-dynamic.html
fails == mtable-columnalign-multi-mtr.html mtable-columnalign-multi-mtr.html
fails == mtable-columnalign-multi-mtr-dynamic.html mtable-columnalign-multi-mtr-dynamic.html
fails == mtable-columnalign-multi-mtable.html mtable-columnalign-multi-mtable.html
fails == mtable-columnalign-multi-mtable-dynamic.html mtable-columnalign-multi-mtable-dynamic.html
fails == maction-selection.html maction-selection.html
== maction-dynamic-embellished-op.html maction-dynamic-embellished-op.html
-fails == maction-dynamic-1.html maction-dynamic-1.html
-fails == maction-dynamic-2.html maction-dynamic-2.html
+== maction-dynamic-1.html maction-dynamic-1.html
+== maction-dynamic-2.html maction-dynamic-2.html
== mo-lspace-rspace.html mo-lspace-rspace.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
== mo-invisibleoperators.html mo-invisibleoperators.html
== mo-invisibleoperators-2.html mo-invisibleoperators-2.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-2.html whitespace-trim-2.html
== whitespace-trim-3.html whitespace-trim-3.html
== whitespace-trim-4.html whitespace-trim-4.html
== whitespace-trim-5.html whitespace-trim-5.html
fails == opentype-stretchy.html opentype-stretchy.html
fails == opentype-fraction-dynamic-linethickness.html opentype-fraction-dynamic-linethickness.html
== operator-1.xhtml operator-1.xhtml
@@ -223,54 +223,54 @@ fails == multiscripts-1.html multiscript
== menclose-1m.html menclose-1m.html
== menclose-1n.html menclose-1n.html
== menclose-1o.html menclose-1o.html
== menclose-1p.html menclose-1p.html
== menclose-1q.html menclose-1q.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-box.html menclose-2-box.html
-fails == menclose-2-circle.html menclose-2-circle.html
-fails == menclose-2-downdiagonalstrike.html menclose-2-downdiagonalstrike.html
-fails == menclose-2-horizontalstrike.html menclose-2-horizontalstrike.html
-fails == menclose-2-left.html menclose-2-left.html
-fails == menclose-2-longdiv.html menclose-2-longdiv.html
+== menclose-2-circle.html menclose-2-circle.html
+== menclose-2-downdiagonalstrike.html menclose-2-downdiagonalstrike.html
+== menclose-2-horizontalstrike.html menclose-2-horizontalstrike.html
+== menclose-2-left.html menclose-2-left.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-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
-fails == menclose-2-updiagonalstrike.html menclose-2-updiagonalstrike.html
-fails == menclose-2-verticalstrike.html menclose-2-verticalstrike.html
+== menclose-2-updiagonalstrike.html menclose-2-updiagonalstrike.html
+== menclose-2-verticalstrike.html menclose-2-verticalstrike.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
== menclose-3-madruwb.html menclose-3-madruwb.html
== menclose-3-radical.html menclose-3-radical.html
== menclose-3-default.html menclose-3-default.html
fails == menclose-3-invalid.html menclose-3-invalid.html
== menclose-3-multiple.html menclose-3-multiple.html
fails == menclose-3-unknown.html menclose-3-unknown.html
== menclose-4.html menclose-4.html
-fails == menclose-5-actuarial.html menclose-5-actuarial.html
-fails == menclose-5-bottom.html menclose-5-bottom.html
-fails == menclose-5-box.html menclose-5-box.html
-fails == menclose-5-circle.html menclose-5-circle.html
-fails == menclose-5-downdiagonalstrike.html menclose-5-downdiagonalstrike.html
-fails == menclose-5-horizontalstrike.html menclose-5-horizontalstrike.html
-fails == menclose-5-left.html menclose-5-left.html
+== menclose-5-actuarial.html menclose-5-actuarial.html
+== menclose-5-bottom.html menclose-5-bottom.html
+== menclose-5-box.html menclose-5-box.html
+== menclose-5-circle.html menclose-5-circle.html
+== menclose-5-downdiagonalstrike.html menclose-5-downdiagonalstrike.html
+== menclose-5-horizontalstrike.html menclose-5-horizontalstrike.html
+== menclose-5-left.html menclose-5-left.html
== menclose-5-longdiv.html menclose-5-longdiv.html
-fails == menclose-5-madruwb.html menclose-5-madruwb.html
-fails == menclose-5-radical.html menclose-5-radical.html
-fails == menclose-5-right.html menclose-5-right.html
-fails == menclose-5-roundedbox.html menclose-5-roundedbox.html
-fails == menclose-5-top.html menclose-5-top.html
-fails == menclose-5-updiagonalarrow.html menclose-5-updiagonalarrow.html
-fails == menclose-5-updiagonalstrike.html menclose-5-updiagonalstrike.html
-fails == menclose-5-verticalstrike.html menclose-5-verticalstrike.html
-fails == menclose-5-phasorangle.html menclose-5-phasorangle.html
+== menclose-5-madruwb.html menclose-5-madruwb.html
+== menclose-5-radical.html menclose-5-radical.html
+== menclose-5-right.html menclose-5-right.html
+== menclose-5-roundedbox.html menclose-5-roundedbox.html
+== menclose-5-top.html menclose-5-top.html
+== menclose-5-updiagonalarrow.html menclose-5-updiagonalarrow.html
+== menclose-5-updiagonalstrike.html menclose-5-updiagonalstrike.html
+== menclose-5-verticalstrike.html menclose-5-verticalstrike.html
+== menclose-5-phasorangle.html menclose-5-phasorangle.html
fails == menclose-6-actuarial.html menclose-6-actuarial.html
fails == menclose-6-bottom.html menclose-6-bottom.html
fails == menclose-6-box.html menclose-6-box.html
fails == menclose-6-circle.html menclose-6-circle.html
fails == menclose-6-downdiagonalstrike.html menclose-6-downdiagonalstrike.html
fails == menclose-6-horizontalstrike.html menclose-6-horizontalstrike.html
fails == menclose-6-left.html menclose-6-left.html
fails == menclose-6-longdiv.html menclose-6-longdiv.html