Bug 1292662 - Temporarily switch off frame reconstruction hints for native anonymous nodes. r=heycam
authorBobby Holley <bobbyholley@gmail.com>
Wed, 24 Aug 2016 15:38:49 -0700
changeset 311363 98ab62940ffc281f28e67d91d27bf6a9c004c9f1
parent 311362 e1bf16ffab2f0e20a1263cd36615766663aa500c
child 311364 45d015eed45fd657128f84ae9598c3ee7c6d24a2
push id30607
push userryanvm@gmail.com
push dateFri, 26 Aug 2016 13:37:16 +0000
treeherdermozilla-central@a65b35c8e5b1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersheycam
bugs1292662
milestone51.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1292662 - Temporarily switch off frame reconstruction hints for native anonymous nodes. r=heycam
layout/style/ServoBindings.cpp
--- a/layout/style/ServoBindings.cpp
+++ b/layout/style/ServoBindings.cpp
@@ -293,16 +293,24 @@ Gecko_StoreStyleDifference(RawGeckoNode*
   nsIFrame* primaryFrame = aElement->GetPrimaryFrame();
   if (!primaryFrame) {
     // TODO: Pick the undisplayed content map from the frame-constructor, and
     // stick it there. For now we're generating ReconstructFrame
     // unconditionally, which is suboptimal.
     return;
   }
 
+  if ((aChangeHintToStore & nsChangeHint_ReconstructFrame) &&
+      aNode->IsInNativeAnonymousSubtree())
+  {
+    NS_WARNING("stylo: Removing forbidden frame reconstruction hint on native "
+               "anonymous content. Fix this in bug 1297857!");
+    aChangeHintToStore &= ~nsChangeHint_ReconstructFrame;
+  }
+
   primaryFrame->StyleContext()->StoreChangeHint(aChangeHintToStore);
 #else
   MOZ_CRASH("stylo: Shouldn't call Gecko_StoreStyleDifference in "
             "non-stylo build");
 #endif
 }
 
 ServoDeclarationBlock*