mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-13 18:27:35 +00:00
Bug 1418867 - Pass element or pseudo element to Servo_StyleSet_GetBaseComputedValuesForElement(). r=emilio
MozReview-Commit-ID: Ae3iZ6g3x3c --HG-- extra : rebase_source : 8d07ac08d63cfdb96cb07a73ed86b268d6b5026e
This commit is contained in:
parent
1646278bfe
commit
33e7b8838f
@ -560,11 +560,13 @@ KeyframeEffectReadOnly::EnsureBaseStyle(
|
||||
}
|
||||
|
||||
if (!aBaseStyleContext) {
|
||||
Element* animatingElement =
|
||||
EffectCompositor::GetElementToRestyle(mTarget->mElement,
|
||||
mTarget->mPseudoType);
|
||||
aBaseStyleContext =
|
||||
aPresContext->StyleSet()->AsServo()->GetBaseContextForElement(
|
||||
mTarget->mElement,
|
||||
animatingElement,
|
||||
aPresContext,
|
||||
mTarget->mPseudoType,
|
||||
aComputedStyle);
|
||||
}
|
||||
RefPtr<RawServoAnimationValue> baseValue =
|
||||
|
@ -694,8 +694,7 @@ SERVO_BINDING_FUNC(Servo_StyleSet_GetBaseComputedValuesForElement,
|
||||
RawServoStyleSetBorrowed set,
|
||||
RawGeckoElementBorrowed element,
|
||||
ServoStyleContextBorrowed existing_style,
|
||||
const mozilla::ServoElementSnapshotTable* snapshots,
|
||||
mozilla::CSSPseudoElementType pseudo_type)
|
||||
const mozilla::ServoElementSnapshotTable* snapshots)
|
||||
// Returns computed values for the given element by adding an animation value.
|
||||
SERVO_BINDING_FUNC(Servo_StyleSet_GetComputedValuesByAddingAnimation,
|
||||
ServoStyleContextStrong,
|
||||
|
@ -1109,14 +1109,12 @@ already_AddRefed<ServoStyleContext>
|
||||
ServoStyleSet::GetBaseContextForElement(
|
||||
Element* aElement,
|
||||
nsPresContext* aPresContext,
|
||||
CSSPseudoElementType aPseudoType,
|
||||
const ServoStyleContext* aStyle)
|
||||
{
|
||||
return Servo_StyleSet_GetBaseComputedValuesForElement(mRawSet.get(),
|
||||
aElement,
|
||||
aStyle,
|
||||
&Snapshots(),
|
||||
aPseudoType).Consume();
|
||||
&Snapshots()).Consume();
|
||||
}
|
||||
|
||||
already_AddRefed<ServoStyleContext>
|
||||
|
@ -392,7 +392,6 @@ public:
|
||||
already_AddRefed<ServoStyleContext>
|
||||
GetBaseContextForElement(dom::Element* aElement,
|
||||
nsPresContext* aPresContext,
|
||||
CSSPseudoElementType aPseudoType,
|
||||
const ServoStyleContext* aStyle);
|
||||
|
||||
// Get a style context that represents |aStyle|, but as though
|
||||
|
@ -749,8 +749,9 @@ nsComputedDOMStyle::DoGetStyleContextNoFlush(Element* aElement,
|
||||
return nullptr;
|
||||
}
|
||||
return presContext->StyleSet()->AsServo()->
|
||||
GetBaseContextForElement(aElement, presContext,
|
||||
pseudoType, result->AsServo());
|
||||
GetBaseContextForElement(elementOrPseudoElement,
|
||||
presContext,
|
||||
result->AsServo());
|
||||
}
|
||||
}
|
||||
|
||||
@ -787,8 +788,9 @@ nsComputedDOMStyle::DoGetStyleContextNoFlush(Element* aElement,
|
||||
if (!elementOrPseudoElement) {
|
||||
return nullptr;
|
||||
}
|
||||
return servoSet->GetBaseContextForElement(aElement, presContext,
|
||||
pseudoType, result);
|
||||
return servoSet->GetBaseContextForElement(elementOrPseudoElement,
|
||||
presContext,
|
||||
result);
|
||||
}
|
||||
|
||||
RefPtr<GeckoStyleContext> parentContext;
|
||||
|
Loading…
Reference in New Issue
Block a user