Bug 1340593 - Set NS_STYLE_HAS_CHILD_THAT_USES_RESET_STYLE from the WalkRuleTree codepath too. r=heycam a=jcristau FIREFOX_52_0b8_BUILD1 FIREFOX_52_0b8_RELEASE
authorL. David Baron <dbaron@dbaron.org>
Sun, 19 Feb 2017 23:10:42 -0800
changeset 369410 3b31bcb88fe341172e93cc8b1143e617c0988694
parent 369409 7084f0d7a43e3485bda9cb790346ce2cdb95d2ea
child 369411 482e65e3b6e06f0ce0b9ce363e79cd9060c3a628
push id1369
push userjlorenzo@mozilla.com
push dateMon, 27 Feb 2017 14:59:41 +0000
treeherdermozilla-release@d75a1dba431f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersheycam, jcristau
bugs1340593
milestone52.0
Bug 1340593 - Set NS_STYLE_HAS_CHILD_THAT_USES_RESET_STYLE from the WalkRuleTree codepath too. r=heycam a=jcristau
layout/style/nsRuleNode.cpp
--- a/layout/style/nsRuleNode.cpp
+++ b/layout/style/nsRuleNode.cpp
@@ -2594,16 +2594,19 @@ nsRuleNode::WalkRuleTree(const nsStyleSt
     if (parentContext) {
       // We have a parent, and so we should just inherit from the parent.
       // Set the inherit bits on our context.  These bits tell the style context that
       // it never has to go back to the rule tree for data.  Instead the style context tree
       // should be walked to find the data.
       const void* parentStruct = parentContext->StyleData(aSID);
       aContext->AddStyleBit(bit); // makes const_cast OK.
       aContext->SetStyle(aSID, const_cast<void*>(parentStruct));
+      if (isReset) {
+        parentContext->AddStyleBit(NS_STYLE_HAS_CHILD_THAT_USES_RESET_STYLE);
+      }
       return parentStruct;
     }
     else
       // We are the root.  In the case of fonts, the default values just
       // come from the pres context.
       return SetDefaultOnRoot(aSID, aContext);
   }