Backed out changeset 454d7232178d (bug 1380133) for bustage at mozilla/KeyframeUtils.h: no 'object' file generated. r=backout on a CLOSED TREE
authorSebastian Hengst <archaeopteryx@coole-files.de>
Thu, 20 Jul 2017 15:41:12 +0200
changeset 418595 79ce273e2150149fade852d483d34691e479e465
parent 418594 f2298180d46791f41f6073f3a51480f172e903b3
child 418596 4df8bfcb4e9f1c64e99e04cb0d54376dae98b2de
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)
reviewersbackout
bugs1380133
milestone56.0a1
backs out454d7232178da36dea2e8b9124864a9c369e2715
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 454d7232178d (bug 1380133) for bustage at mozilla/KeyframeUtils.h: no 'object' file generated. r=backout on a CLOSED TREE
layout/style/ServoBindings.cpp
layout/style/ServoStyleContext.cpp
layout/style/ServoStyleContext.h
layout/style/ServoTypes.h
layout/style/nsAnimationManager.h
--- a/layout/style/ServoBindings.cpp
+++ b/layout/style/ServoBindings.cpp
@@ -204,37 +204,31 @@ Gecko_GetAnonymousContentForElement(RawG
 void
 Gecko_DestroyAnonymousContentList(nsTArray<nsIContent*>* aAnonContent)
 {
   MOZ_ASSERT(aAnonContent);
   delete aAnonContent;
 }
 
 void
-Gecko_ServoStyleContext_Init(
-    ServoStyleContext* aContext,
-    const ServoStyleContext* aParentContext,
-    RawGeckoPresContextBorrowed aPresContext,
-    const ServoComputedValues* aValues,
-    mozilla::CSSPseudoElementType aPseudoType,
-    nsIAtom* aPseudoTag)
+Gecko_ServoStyleContext_Init(ServoStyleContext* aContext,
+                             const ServoStyleContext* aParentContext,
+                             RawGeckoPresContextBorrowed aPresContext, const ServoComputedValues* aValues,
+                             mozilla::CSSPseudoElementType aPseudoType, nsIAtom* aPseudoTag)
 {
   // because it is within an Arc it is unsafe for the Rust side to ever
   // carry around a mutable non opaque reference to the context, so we
   // cast it here.
-  auto parent = const_cast<ServoStyleContext*>(aParentContext);
-  auto presContext = const_cast<nsPresContext*>(aPresContext);
-  new (KnownNotNull, aContext) ServoStyleContext(
-      parent, presContext, aPseudoTag, aPseudoType,
-      ServoComputedValuesForgotten(aValues));
+  ServoStyleContext* parent = const_cast<ServoStyleContext*>(aParentContext);
+  nsPresContext* pres = const_cast<nsPresContext*>(aPresContext);
+  new (KnownNotNull, aContext) ServoStyleContext(parent, pres, aPseudoTag,
+                                                 aPseudoType, ServoComputedValuesForgotten(aValues));
 }
 
-ServoComputedValues::ServoComputedValues(
-    const ServoComputedValuesForgotten aValue)
-{
+ServoComputedValues::ServoComputedValues(const ServoComputedValuesForgotten aValue) {
   PodAssign(this, aValue.mPtr);
 }
 
 const nsStyleVariables* ServoComputedValues::GetStyleVariables() const
 {
   return Servo_GetEmptyVariables();
 }
 
--- a/layout/style/ServoStyleContext.cpp
+++ b/layout/style/ServoStyleContext.cpp
@@ -8,26 +8,25 @@
 #include "nsStyleConsts.h"
 #include "nsStyleStruct.h"
 #include "nsPresContext.h"
 #include "nsCSSRuleProcessor.h"
 #include "mozilla/dom/HTMLBodyElement.h"
 
 #include "mozilla/ServoBindings.h"
 
-namespace mozilla {
+using namespace mozilla;
 
-ServoStyleContext::ServoStyleContext(
-    nsStyleContext* aParent,
-    nsPresContext* aPresContext,
-    nsIAtom* aPseudoTag,
-    CSSPseudoElementType aPseudoType,
-    ServoComputedValuesForgotten aComputedValues)
-  : nsStyleContext(aParent, aPseudoTag, aPseudoType)
-  , mSource(aComputedValues)
+ServoStyleContext::ServoStyleContext(nsStyleContext* aParent,
+                               nsPresContext* aPresContext,
+                               nsIAtom* aPseudoTag,
+                               CSSPseudoElementType aPseudoType,
+                              ServoComputedValuesForgotten aComputedValues)
+  : nsStyleContext(aParent, aPseudoTag, aPseudoType),
+    mSource(aComputedValues)
 {
   mPresContext = aPresContext;
   AddStyleBit(Servo_ComputedValues_GetStyleBits(&mSource));
 
   FinishConstruction();
 
   // No need to call ApplyStyleFixups here, since fixups are handled by Servo when
   // producing the ServoComputedValues.
@@ -64,11 +63,9 @@ ServoStyleContext::UpdateWithElementStat
       GetPseudoType() == CSSPseudoElementType::NotPseudo &&
       mPresContext->CompatibilityMode() == eCompatibility_NavQuirks) {
     nsIDocument* doc = aElementForAnimation->GetUncomposedDoc();
     if (doc && doc->GetBodyElement() == aElementForAnimation) {
       // Update the prescontext's body color
       mPresContext->SetBodyTextColor(StyleColor()->mColor);
     }
   }
-}
-
-} // namespace mozilla
+}
\ No newline at end of file
--- a/layout/style/ServoStyleContext.h
+++ b/layout/style/ServoStyleContext.h
@@ -7,50 +7,55 @@
 #ifndef mozilla_ServoStyleContext_h
 #define mozilla_ServoStyleContext_h
 
 #include "nsStyleContext.h"
 
 namespace mozilla {
 
 namespace dom {
-class Element;
-} // namespace dom
+  class Element;
+}
 
-class ServoStyleContext final : public nsStyleContext
-{
+class ServoStyleContext final : public nsStyleContext {
 public:
   ServoStyleContext(nsStyleContext* aParent,
                     nsPresContext* aPresContext,
                     nsIAtom* aPseudoTag,
                     CSSPseudoElementType aPseudoType,
                     ServoComputedValuesForgotten aComputedValues);
 
-  nsPresContext* PresContext() const { return mPresContext; }
-  const ServoComputedValues* ComputedValues() const { return &mSource; }
+  nsPresContext* PresContext() const {
+    return mPresContext;
+  }
+
+  const ServoComputedValues* ComputedValues() const {
+    return &mSource;
+  }
 
-  void AddRef() { Servo_StyleContext_AddRef(this); }
-  void Release() { Servo_StyleContext_Release(this); }
+  void AddRef() {
+    Servo_StyleContext_AddRef(this);
+  }
 
-  ServoStyleContext* GetStyleIfVisited() const
-  {
-    return ComputedValues()->visited_style.mPtr;
+  void Release() {
+    Servo_StyleContext_Release(this);
   }
 
+  ServoStyleContext* GetStyleIfVisited() const { return ComputedValues()->visited_style.mPtr; }
+
   // 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(nsPresContext* aPresContext,
-                                   const ServoStyleContext* aOther);
+  inline void ResolveSameStructsAs(nsPresContext* aPresContext, const ServoStyleContext* aOther);
 
 private:
   nsPresContext* mPresContext;
   ServoComputedValues mSource;
 };
 
-} // namespace mozilla
+}
 
 #endif // mozilla_ServoStyleContext_h
--- a/layout/style/ServoTypes.h
+++ b/layout/style/ServoTypes.h
@@ -175,49 +175,40 @@ struct ServoComputedValueFlags {
 #define STYLE_STRUCT(name_, checkdata_cb_) struct Gecko##name_;
 #define STYLE_STRUCT_LIST_IGNORE_VARIABLES
 #include "nsStyleStructList.h"
 #undef STYLE_STRUCT
 #undef STYLE_STRUCT_LIST_IGNORE_VARIABLES
 
 } // namespace mozilla
 
-class ServoComputedValues;
 
-struct ServoComputedValuesForgotten
-{
+struct ServoComputedValues;
+struct ServoComputedValuesForgotten {
   // Make sure you manually mem::forget the backing ServoComputedValues
   // after calling this
   explicit ServoComputedValuesForgotten(const ServoComputedValues* aValue) : mPtr(aValue) {}
   const ServoComputedValues* mPtr;
 };
 
 /**
- * We want C++ to be able to read the style struct fields of ComputedValues
+ * We want C++ to be abe to read the style struct fields of ComputedValues
  * so we define this type on the C++ side and use the bindgenned version
  * on the Rust side.
+ *
  */
-class ServoComputedValues
-{
-  friend class mozilla::ServoStyleContext;
-
-public:
-  // Constructs via memcpy.  Will not move out of aValue.
-  explicit ServoComputedValues(const ServoComputedValuesForgotten aValue);
-
+struct ServoComputedValues {
 #define STYLE_STRUCT(name_, checkdata_cb_)                 \
   mozilla::ServoRawOffsetArc<mozilla::Gecko##name_> name_; \
   inline const nsStyle##name_* GetStyle##name_() const;
   #define STYLE_STRUCT_LIST_IGNORE_VARIABLES
 #include "nsStyleStructList.h"
 #undef STYLE_STRUCT
 #undef STYLE_STRUCT_LIST_IGNORE_VARIABLES
   const nsStyleVariables* GetStyleVariables() const;
-
-private:
   mozilla::ServoCustomPropertiesMap custom_properties;
   mozilla::ServoWritingMode writing_mode;
   mozilla::ServoFontComputationData font_computation_data;
   /// The rule node representing the ordered list of rules matched for this
   /// node.  Can be None for default values and text nodes.  This is
   /// essentially an optimization to avoid referencing the root rule node.
   mozilla::ServoRuleNode rules;
   /// The element's computed values if visited, only computed if there's a
@@ -232,11 +223,16 @@ private:
   //
   // We remove the move ctor/assignment operator as well, because
   // moves in C++ don't prevent destructors from being called,
   // which will lead to double frees.
   ServoComputedValues& operator=(const ServoComputedValues&) = delete;
   ServoComputedValues(const ServoComputedValues&) = delete;
   ServoComputedValues&& operator=(const ServoComputedValues&&) = delete;
   ServoComputedValues(const ServoComputedValues&&) = delete;
+
+  // Constructs via memcpy. Will not invalidate old struct
+  explicit ServoComputedValues(const ServoComputedValuesForgotten aValue);
 };
 
+
+
 #endif // mozilla_ServoTypes_h
--- a/layout/style/nsAnimationManager.h
+++ b/layout/style/nsAnimationManager.h
@@ -12,32 +12,33 @@
 #include "mozilla/dom/Animation.h"
 #include "mozilla/Keyframe.h"
 #include "mozilla/MemoryReporting.h"
 #include "mozilla/TimeStamp.h"
 #include "nsRFPService.h"
 
 class nsIGlobalObject;
 class nsStyleContext;
-class ServoComputedValues;
 struct nsStyleDisplay;
+struct ServoComputedValues;
 
 namespace mozilla {
 namespace css {
 class Declaration;
 } /* namespace css */
 namespace dom {
 class KeyframeEffectReadOnly;
 class Promise;
 } /* namespace dom */
 
+enum class CSSPseudoElementType : uint8_t;
+struct NonOwningAnimationTarget;
+
 class GeckoStyleContext;
 class ServoStyleContext;
-enum class CSSPseudoElementType : uint8_t;
-struct NonOwningAnimationTarget;
 
 struct AnimationEventInfo {
   RefPtr<dom::Element> mElement;
   RefPtr<dom::Animation> mAnimation;
   InternalAnimationEvent mEvent;
   TimeStamp mTimeStamp;
 
   AnimationEventInfo(dom::Element* aElement,