Bug 1340593 - Set NS_STYLE_HAS_CHILD_THAT_USES_RESET_STYLE from the WalkRuleTree codepath too. r=heycam a=jcristau
authorL. David Baron <dbaron@dbaron.org>
Sun, 19 Feb 2017 23:10:42 -0800
changeset 376305 d5727ae5c683f17949ce046f45b1c85ee707c523
parent 376304 1c4be61b3b4998588525b3c9c6c760d4e32458e1
child 376306 2855f42b1787077bbe65b200e4524e7c9037eaaa
push id6996
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 20:48:21 +0000
treeherdermozilla-beta@d89512dab048 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersheycam, jcristau
bugs1340593
milestone53.0a2
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
@@ -2629,16 +2629,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);
   }