Bug 1380133 - Part 2: Take a ServoStyleContext* in Gecko_CalcStyleDifference. r=emilio draft
authorCameron McCormack <cam@mcc.id.au>
Fri, 21 Jul 2017 11:42:42 +0800
changeset 612841 c4df8f13546511b504aefb0fa481d5f4171955ee
parent 612840 150278b5f7429986e79976ec9faf290db6de86c0
child 612842 63e1e4fba69c587f7eb403efd7d8dd98214c86ac
push id69614
push userbmo:cam@mcc.id.au
push dateFri, 21 Jul 2017 03:44:21 +0000
reviewersemilio
bugs1380133
milestone56.0a1
Bug 1380133 - Part 2: Take a ServoStyleContext* in Gecko_CalcStyleDifference. r=emilio MozReview-Commit-ID: DJnuUAmm1Fh --- layout/style/ServoBindings.cpp | 14 +++++++------- layout/style/ServoBindings.h | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-)
layout/style/ServoBindings.cpp
layout/style/ServoBindings.h
--- a/layout/style/ServoBindings.cpp
+++ b/layout/style/ServoBindings.cpp
@@ -393,28 +393,28 @@ Gecko_GetStyleContext(RawGeckoElementBor
 
 CSSPseudoElementType
 Gecko_GetImplementedPseudo(RawGeckoElementBorrowed aElement)
 {
   return aElement->GetPseudoElementType();
 }
 
 nsChangeHint
-Gecko_CalcStyleDifference(nsStyleContext* aOldStyleContext,
-                          ServoComputedValuesBorrowed aComputedValues,
+Gecko_CalcStyleDifference(nsStyleContext* aOldStyleFromFrame,
+                          const ServoStyleContext* aNewStyle,
                           bool* aAnyStyleChanged)
 {
-  MOZ_ASSERT(aOldStyleContext);
-  MOZ_ASSERT(aComputedValues);
+  MOZ_ASSERT(aOldStyleFromFrame);
+  MOZ_ASSERT(aNewStyle);
 
   uint32_t equalStructs, samePointerStructs;
   nsChangeHint result =
-    aOldStyleContext->CalcStyleDifference(aComputedValues,
-                                          &equalStructs,
-                                          &samePointerStructs);
+    aOldStyleFromFrame->CalcStyleDifference(aNewStyle->ComputedValues(),
+                                            &equalStructs,
+                                            &samePointerStructs);
   *aAnyStyleChanged = equalStructs != NS_STYLE_INHERIT_MASK;
   return result;
 }
 
 nsChangeHint
 Gecko_HintsHandledForDescendants(nsChangeHint aHint)
 {
   return aHint & ~NS_HintsNotHandledForDescendantsIn(aHint);
--- a/layout/style/ServoBindings.h
+++ b/layout/style/ServoBindings.h
@@ -373,18 +373,18 @@ void Gecko_UnsetNodeFlags(RawGeckoNodeBo
 void Gecko_SetOwnerDocumentNeedsStyleFlush(RawGeckoElementBorrowed element);
 
 // Incremental restyle.
 // Also, we might want a ComputedValues to ComputedValues API for animations?
 // Not if we do them in Gecko...
 nsStyleContext* Gecko_GetStyleContext(RawGeckoElementBorrowed element,
                                       nsIAtom* aPseudoTagOrNull);
 mozilla::CSSPseudoElementType Gecko_GetImplementedPseudo(RawGeckoElementBorrowed element);
-nsChangeHint Gecko_CalcStyleDifference(nsStyleContext* oldstyle,
-                                       ServoComputedValuesBorrowed newstyle,
+nsChangeHint Gecko_CalcStyleDifference(nsStyleContext* old_style_from_frame,
+                                       const mozilla::ServoStyleContext* new_style,
                                        bool* any_style_changed);
 nsChangeHint Gecko_HintsHandledForDescendants(nsChangeHint aHint);
 
 // Get an element snapshot for a given element from the table.
 const ServoElementSnapshot*
 Gecko_GetElementSnapshot(const mozilla::ServoElementSnapshotTable* table,
                          RawGeckoElementBorrowed element);