Bug 1382017 part 4 Gecko piece - Remove usage of ServoComputedValues from most Gecko code; r=xidorn

MozReview-Commit-ID: 2NB4DgxMrL3
This commit is contained in:
Manish Goregaokar 2017-07-20 17:27:05 -07:00
Родитель 9e805b0538
Коммит 26f3a98f78
8 изменённых файлов: 3 добавлений и 31 удалений

Просмотреть файл

@ -16,7 +16,6 @@ struct JSContext;
class JSObject;
class nsIDocument;
class nsStyleContext;
class ServoComputedValues;
struct RawServoDeclarationBlock;
namespace mozilla {
@ -82,7 +81,7 @@ public:
*
* @param aKeyframes The input keyframes.
* @param aElement The context element.
* @param aStyleType The |ServoComputedValues| or |nsStyleContext| to use
* @param aStyleType The |ServoStyleContext| or |GeckoStyleContext| to use
* when computing values.
* @param aEffectComposite The composite operation specified on the effect.
* For any keyframes in |aKeyframes| that do not specify a composite

Просмотреть файл

@ -567,7 +567,7 @@ ServoRestyleManager::ProcessPostTraversal(
}
// TODO(emilio): We could avoid some refcount traffic here, specially in the
// ServoComputedValues case, which uses atomic refcounting.
// ServoStyleContext case, which uses atomic refcounting.
//
// Hold the old style context alive, because it could become a dangling
// pointer during the replacement. In practice it's not a huge deal, but

Просмотреть файл

@ -108,7 +108,6 @@ typedef mozilla::dom::StyleChildrenIterator RawGeckoStyleChildrenIterator;
typedef mozilla::ServoStyleContext const* ServoStyleContextBorrowed;
typedef mozilla::ServoStyleContext const* ServoStyleContextBorrowedOrNull;
typedef ServoComputedValues const* ServoComputedValuesBorrowed;
typedef ServoComputedValues const* ServoComputedValuesBorrowedOrNull;
struct MOZ_MUST_USE_TYPE ServoStyleContextStrong
{

Просмотреть файл

@ -416,12 +416,6 @@ Gecko_CalcStyleDifference(const ServoStyleContext* aOldStyle,
&equalStructs,
&samePointerStructs,
relevantStructs);
uint32_t equalStructs, samePointerStructs;
nsChangeHint result =
aOldStyleContext->CalcStyleDifference(aComputedValues,
&equalStructs,
&samePointerStructs);
*aAnyStyleChanged = equalStructs != NS_STYLE_INHERIT_MASK;
return result;
}

Просмотреть файл

@ -249,7 +249,6 @@ whitelist-types = [
"ServoBundledURI",
"ServoComputedValues",
"ServoComputedValuesBorrowed",
"ServoComputedValuesBorrowedOrNull",
"ServoElementSnapshot",
"ServoStyleContextStrong",
"ServoStyleContextBorrowed",
@ -348,7 +347,6 @@ raw-lines = [
"pub type ServoStyleContextBorrowed<'a> = &'a ::properties::ComputedValues;",
"pub type ServoStyleContextBorrowedOrNull<'a> = Option<&'a ::properties::ComputedValues>;",
"pub type ServoComputedValuesBorrowed<'a> = &'a ServoComputedValues;",
"pub type ServoComputedValuesBorrowedOrNull<'a> = Option<&'a ServoComputedValues>;",
]
whitelist-functions = ["Servo_.*", "Gecko_.*"]
structs-types = [

Просмотреть файл

@ -234,7 +234,7 @@ nsStyleContext::CalcStyleDifference(nsStyleContext* aNewContext,
}
} else {
if (Servo_ComputedValues_EqualCustomProperties(
ComputedValues(),
AsServo()->ComputedValues(),
aNewContext->ComputedValues())) {
*aEqualStructs |= NS_STYLE_INHERIT_BIT(Variables);
}

Просмотреть файл

@ -343,8 +343,6 @@ protected:
void SetStyleBits();
inline const void* StyleStructFromServoComputedValues(nsStyleStructID aSID);
// Helper functions for GetStyle* and PeekStyle*
#define STYLE_STRUCT_INHERITED(name_, checkdata_cb_) \
template<bool aComputeData> \

Просмотреть файл

@ -216,20 +216,4 @@ nsStyleContext::StartBackgroundImageLoads()
StyleBackground();
}
const void*
nsStyleContext::StyleStructFromServoComputedValues(nsStyleStructID aSID)
{
switch (aSID) {
#define STYLE_STRUCT(name_, checkdata_cb_) \
case eStyleStruct_##name_: \
return ComputedValues()->GetStyle##name_();
#include "nsStyleStructList.h"
#undef STYLE_STRUCT
default:
MOZ_ASSERT_UNREACHABLE("unexpected nsStyleStructID value");
return nullptr;
}
}
#endif // nsStyleContextInlines_h