Bug 1380133 - Part 6: Remove FakeStyleContext. r=emilio
MozReview-Commit-ID: EDPXdzmE37Y
---
layout/style/nsStyleContext.cpp | 31 -------------------------------
1 file changed, 31 deletions(-)
--- 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.