Bug 1287049 - Only clear restyle flags in BindToTree if not using Servo-backed style system. r?emilio draft
authorCameron McCormack <cam@mcc.id.au>
Fri, 15 Jul 2016 15:21:38 +0800
changeset 387959 15a19524486bfb89ea72b177600ed5fa3633d352
parent 387919 5a9c26f8bb9d599e80c92f6a7f30ad91bd54a854
child 525495 f95d27ed9f8b8d91ddb0badfd41a79f8c114cc45
push id23118
push userbmo:cam@mcc.id.au
push dateFri, 15 Jul 2016 07:34:03 +0000
reviewersemilio
bugs1287049
milestone50.0a1
Bug 1287049 - Only clear restyle flags in BindToTree if not using Servo-backed style system. r?emilio MozReview-Commit-ID: 38cWUyAYEIt
dom/base/Element.cpp
--- a/dom/base/Element.cpp
+++ b/dom/base/Element.cpp
@@ -1526,29 +1526,29 @@ Element::BindToTree(nsIDocument* aDocume
     ClearSubtreeRootPointer();
 
     // Being added to a document.
     SetIsInDocument();
 
     // Unset this flag since we now really are in a document.
     UnsetFlags(NODE_FORCE_XBL_BINDINGS |
                // And clear the lazy frame construction bits.
-               NODE_NEEDS_FRAME | NODE_DESCENDANTS_NEED_FRAMES |
-               // And the restyle bits
-               ELEMENT_ALL_RESTYLE_FLAGS);
+               NODE_NEEDS_FRAME | NODE_DESCENDANTS_NEED_FRAMES);
+    // And the restyle bits
+    UnsetRestyleFlagsIfGecko();
   } else if (IsInShadowTree()) {
     // We're not in a document, but we did get inserted into a shadow tree.
     // Since we won't have any restyle data in the document's restyle trackers,
     // don't let us get inserted with restyle bits set incorrectly.
     //
     // Also clear all the other flags that are cleared above when we do get
     // inserted into a document.
     UnsetFlags(NODE_FORCE_XBL_BINDINGS |
-               NODE_NEEDS_FRAME | NODE_DESCENDANTS_NEED_FRAMES |
-               ELEMENT_ALL_RESTYLE_FLAGS);
+               NODE_NEEDS_FRAME | NODE_DESCENDANTS_NEED_FRAMES);
+    UnsetRestyleFlagsIfGecko();
   } else {
     // If we're not in the doc and not in a shadow tree,
     // update our subtree pointer.
     SetSubtreeRootPointer(aParent->SubtreeRoot());
   }
 
   nsIDocument* composedDoc = GetComposedDoc();
   if (composedDoc) {