Backed out changeset 22dabf04e560 (bug 1380133)
authorSebastian Hengst <archaeopteryx@coole-files.de>
Thu, 20 Jul 2017 15:40:12 +0200
changeset 418593 1470d246276f52545d124105ffc16d21ff144981
parent 418592 8e48ee4ce7d4e8ab0a57668ea334fadd5dff31a6
child 418594 f2298180d46791f41f6073f3a51480f172e903b3
push id7566
push usermtabara@mozilla.com
push dateWed, 02 Aug 2017 08:25:16 +0000
treeherdermozilla-beta@86913f512c3c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1380133
milestone56.0a1
backs out22dabf04e5603fbd71a14b26d98fe4392cf06be2
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
Backed out changeset 22dabf04e560 (bug 1380133)
layout/base/ServoRestyleManager.cpp
layout/generic/ViewportFrame.cpp
layout/style/ServoStyleContext.h
layout/style/ServoStyleContextInlines.h
--- a/layout/base/ServoRestyleManager.cpp
+++ b/layout/base/ServoRestyleManager.cpp
@@ -553,17 +553,17 @@ ServoRestyleManager::ProcessPostTraversa
     MOZ_ASSERT(styleFrame || displayContentsNode);
     RefPtr<ServoStyleContext> currentContext =
       aRestyleState.StyleSet().ResolveServoStyle(aElement, aRestyleBehavior);
     MOZ_ASSERT(oldStyleContext->ComputedValues() != currentContext->ComputedValues());
 
     newContext = currentContext;
     newContext->UpdateWithElementState(aElement);
 
-    newContext->ResolveSameStructsAs(oldStyleContext);
+    newContext->ResolveSameStructsAs(PresContext(), oldStyleContext);
 
     // We want to walk all the continuations here, even the ones with different
     // styles.  In practice, the only reason we get continuations with different
     // styles here is ::first-line (::first-letter never affects element
     // styles).  But in that case, newContext is the right context for the
     // _later_ continuations anyway (the ones not affected by ::first-line), not
     // the earlier ones, so there is no point stopping right at the point when
     // we'd actually be setting the right style context.
--- a/layout/generic/ViewportFrame.cpp
+++ b/layout/generic/ViewportFrame.cpp
@@ -423,17 +423,17 @@ ViewportFrame::UpdateStyle(ServoRestyleS
   nsIAtom* pseudo = oldContext->GetPseudo();
   RefPtr<ServoStyleContext> newContext =
     aRestyleState.StyleSet().ResolveInheritingAnonymousBoxStyle(pseudo, nullptr);
 
   // We're special because we have a null GetContent(), so don't call things
   // like UpdateStyleOfOwnedChildFrame that try to append changes for the
   // content to the change list.  Nor do we computed a changehint, since we have
   // no way to apply it anyway.
-  newContext->ResolveSameStructsAs(oldContext);
+  newContext->ResolveSameStructsAs(PresContext(), oldContext);
 
   MOZ_ASSERT(!GetNextContinuation(), "Viewport has continuations?");
   SetStyleContext(newContext);
 
   UpdateStyleOfOwnedAnonBoxes(aRestyleState);
 }
 
 void
--- a/layout/style/ServoStyleContext.h
+++ b/layout/style/ServoStyleContext.h
@@ -38,17 +38,18 @@ public:
   // Update visited state for a given element, and set the prescontext's
   // body text color if applicable.
   void UpdateWithElementState(dom::Element* aElement);
 
   /**
    * Makes this context match |aOther| in terms of which style structs have
    * been resolved.
    */
-  inline void ResolveSameStructsAs(const ServoStyleContext* aOther);
+  inline void ResolveSameStructsAs(nsPresContext* aPresContext,
+                                   const ServoStyleContext* aOther);
 
 private:
   nsPresContext* mPresContext;
   ServoComputedValues mSource;
 };
 
 } // namespace mozilla
 
--- a/layout/style/ServoStyleContextInlines.h
+++ b/layout/style/ServoStyleContextInlines.h
@@ -10,29 +10,29 @@
 
 #include "nsStyleStruct.h"
 #include "ServoBindings.h"
 #include "mozilla/ServoStyleContext.h"
 
 namespace mozilla {
 
 void
-ServoStyleContext::ResolveSameStructsAs(const ServoStyleContext* aOther)
+ServoStyleContext::ResolveSameStructsAs(nsPresContext* aPresContext, const ServoStyleContext* aOther)
 {
   // Only resolve structs that are not already resolved in this struct.
   uint64_t ourBits = mBits & NS_STYLE_INHERIT_MASK;
   uint64_t otherBits = aOther->mBits & NS_STYLE_INHERIT_MASK;
   uint64_t newBits = otherBits & ~ourBits & NS_STYLE_INHERIT_MASK;
 
 #define STYLE_STRUCT(name_, checkdata_cb)                                           \
   if (nsStyle##name_::kHasFinishStyle && newBits & NS_STYLE_INHERIT_BIT(name_)) {   \
     const nsStyle##name_* data = ComputedValues()->GetStyle##name_();               \
-    const_cast<nsStyle##name_*>(data)->FinishStyle(mPresContext);                   \
+    const_cast<nsStyle##name_*>(data)->FinishStyle(aPresContext);                   \
   }
 #include "nsStyleStructList.h"
 #undef STYLE_STRUCT
 
   mBits |= newBits;
 }
 
 } // namespace mozilla
 
-#endif // mozilla_ContextInlines_h
+#endif // mozilla_ContextInlines_h
\ No newline at end of file