Bug 1380133 - Part 6: Remove FakeStyleContext. r=emilio
authorCameron McCormack <cam@mcc.id.au>
Fri, 21 Jul 2017 11:42:44 +0800
changeset 418834 f9b6904e3e1071f868efc335d9139e082a31a9f1
parent 418833 f499740afbed4743448fe9a281d5a51c8f0df2b2
child 418835 c72f3f8c9c60e299e962c56f429dc8a0058c0c90
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)
reviewersemilio
bugs1380133
milestone56.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 1380133 - Part 6: Remove FakeStyleContext. r=emilio MozReview-Commit-ID: EDPXdzmE37Y --- layout/style/nsStyleContext.cpp | 31 ------------------------------- 1 file changed, 31 deletions(-)
layout/style/nsStyleContext.cpp
--- a/layout/style/nsStyleContext.cpp
+++ b/layout/style/nsStyleContext.cpp
@@ -454,47 +454,16 @@ nsStyleContext::CalcStyleDifference(nsSt
                                     uint32_t aRelevantStructs)
 {
   return CalcStyleDifferenceInternal(aNewContext,
                                      aEqualStructs,
                                      aSamePointerStructs,
                                      aRelevantStructs);
 }
 
-class MOZ_STACK_CLASS FakeStyleContext
-{
-public:
-  explicit FakeStyleContext(const ServoComputedValues* aComputedValues)
-    : mComputedValues(aComputedValues) {}
-
-  nsStyleContext* GetStyleIfVisited() {
-    // Bug 1364484: Figure out what to do here for Stylo visited values.  We can
-    // get the visited computed values:
-    // RefPtr<ServoComputedValues> visitedComputedValues =
-    //   Servo_ComputedValues_GetVisitedStyle(mComputedValues).Consume();
-    // But what's the best way to create the nsStyleContext?
-    return nullptr;
-  }
-
-  #define STYLE_STRUCT(name_, checkdata_cb_)                                  \
-  const nsStyle##name_ * Style##name_() {                                     \
-    return mComputedValues->GetStyle##name_();                                \
-  }                                                                           \
-  const nsStyle##name_ * ThreadsafeStyle##name_() {                           \
-    return mComputedValues->GetStyle##name_();                                \
-  }
-  #include "nsStyleStructList.h"
-  #undef STYLE_STRUCT
-
-  const ServoComputedValues* ComputedValues() { return mComputedValues; }
-
-private:
-  const ServoComputedValues* MOZ_NON_OWNING_REF mComputedValues;
-};
-
 namespace mozilla {
 
 void
 GeckoStyleContext::EnsureSameStructsCached(nsStyleContext* aOldContext)
 {
   // NOTE(emilio): We could do better here for stylo, where we only call
   // Style##name_() because we need to run FinishStyle, but otherwise this
   // is only a bitwise or.