Bug 1298588 part 6, gecko piece. Stop using initial_values when doing inheritance in Gecko glue code. r=bholley

This commit is contained in:
Boris Zbarsky 2017-01-04 14:52:27 -05:00
parent 9f8934b143
commit bd53996269
2 changed files with 3 additions and 2 deletions

View File

@ -161,6 +161,7 @@ SERVO_BINDING_FUNC(Servo_ComputedValues_GetForAnonymousBox,
ServoComputedValuesBorrowedOrNull parent_style_or_null,
nsIAtom* pseudoTag, RawServoStyleSetBorrowed set)
SERVO_BINDING_FUNC(Servo_ComputedValues_Inherit, ServoComputedValuesStrong,
RawServoStyleSetBorrowed set,
ServoComputedValuesBorrowedOrNull parent_style)
// Initialize Servo components. Should be called exactly once at startup.

View File

@ -184,7 +184,7 @@ ServoStyleSet::ResolveStyleForText(nsIContent* aTextNode,
const ServoComputedValues* parentComputedValues =
aParentContext->StyleSource().AsServoComputedValues();
RefPtr<ServoComputedValues> computedValues =
Servo_ComputedValues_Inherit(parentComputedValues).Consume();
Servo_ComputedValues_Inherit(mRawSet.get(), parentComputedValues).Consume();
return GetContext(computedValues.forget(), aParentContext,
nsCSSAnonBoxes::mozText, CSSPseudoElementType::AnonBox);
@ -198,7 +198,7 @@ ServoStyleSet::ResolveStyleForOtherNonElement(nsStyleContext* aParentContext)
const ServoComputedValues* parent =
aParentContext ? aParentContext->StyleSource().AsServoComputedValues() : nullptr;
RefPtr<ServoComputedValues> computedValues =
Servo_ComputedValues_Inherit(parent).Consume();
Servo_ComputedValues_Inherit(mRawSet.get(), parent).Consume();
MOZ_ASSERT(computedValues);
return GetContext(computedValues.forget(), aParentContext,