Bug 1267833 - Pass the RawServoStyleSet to Servo_GetComputedValuesForAnonymousBox. r=heycam

This commit is contained in:
Bobby Holley 2016-04-26 14:09:03 -07:00
Родитель fe62fd9efa
Коммит 70f077146d
3 изменённых файлов: 6 добавлений и 3 удалений

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

@ -254,7 +254,8 @@ Servo_GetComputedValues(RawGeckoElement* element)
ServoComputedValues*
Servo_GetComputedValuesForAnonymousBox(ServoComputedValues* parentStyleOrNull,
nsIAtom* pseudoTag)
nsIAtom* pseudoTag,
RawServoStyleSet* set)
{
MOZ_CRASH("stylo: shouldn't be calling Servo_GetComputedValuesForAnonymousBox in a "
"non-MOZ_STYLO build");

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

@ -78,7 +78,8 @@ void Servo_DropStyleSet(RawServoStyleSet* set);
// Computed style data.
ServoComputedValues* Servo_GetComputedValues(RawGeckoElement* element);
ServoComputedValues* Servo_GetComputedValuesForAnonymousBox(ServoComputedValues* parentStyleOrNull,
nsIAtom* pseudoTag);
nsIAtom* pseudoTag,
RawServoStyleSet* set);
void Servo_AddRefComputedValues(ServoComputedValues*);
void Servo_ReleaseComputedValues(ServoComputedValues*);

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

@ -130,7 +130,8 @@ ServoStyleSet::ResolveAnonymousBoxStyle(nsIAtom* aPseudoTag,
aParentContext ? aParentContext->StyleSource().AsServoComputedValues()
: nullptr;
RefPtr<ServoComputedValues> computedValues =
dont_AddRef(Servo_GetComputedValuesForAnonymousBox(parentStyle, aPseudoTag));
dont_AddRef(Servo_GetComputedValuesForAnonymousBox(parentStyle, aPseudoTag,
mRawSet.get()));
MOZ_ASSERT(computedValues);
return NS_NewStyleContext(aParentContext, mPresContext, nullptr,