зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1344619 - Part 4: Add ServoStyleSet::ResolveStyleLazily(). r=heycam
MozReview-Commit-ID: GvlD6lQYBQ6 --HG-- extra : rebase_source : 73baac118a3de04d88b565c61f853ec145d3d1e7
This commit is contained in:
Родитель
394a4a9b12
Коммит
1761aeb22e
|
@ -140,8 +140,7 @@ ServoStyleSet::GetContext(nsIContent* aContent,
|
|||
ResolveMappedAttrDeclarationBlocks();
|
||||
RefPtr<ServoComputedValues> computedValues;
|
||||
if (aMayCompute == LazyComputeBehavior::Allow) {
|
||||
computedValues =
|
||||
Servo_ResolveStyleLazily(element, nullptr, mRawSet.get()).Consume();
|
||||
computedValues = ResolveStyleLazily(element, nullptr);
|
||||
} else {
|
||||
computedValues = ResolveServoStyle(element);
|
||||
}
|
||||
|
@ -336,7 +335,7 @@ ServoStyleSet::ResolveTransientStyle(Element* aElement, CSSPseudoElementType aTy
|
|||
}
|
||||
|
||||
RefPtr<ServoComputedValues> computedValues =
|
||||
Servo_ResolveStyleLazily(aElement, pseudoTag, mRawSet.get()).Consume();
|
||||
ResolveStyleLazily(aElement, pseudoTag);
|
||||
|
||||
return GetContext(computedValues.forget(), nullptr, pseudoTag, aType,
|
||||
nullptr);
|
||||
|
@ -705,4 +704,10 @@ ServoStyleSet::ClearNonInheritingStyleContexts()
|
|||
}
|
||||
}
|
||||
|
||||
already_AddRefed<ServoComputedValues>
|
||||
ServoStyleSet::ResolveStyleLazily(Element* aElement, nsIAtom* aPseudoTag)
|
||||
{
|
||||
return Servo_ResolveStyleLazily(aElement, aPseudoTag, mRawSet.get()).Consume();
|
||||
}
|
||||
|
||||
bool ServoStyleSet::sInServoTraversal = false;
|
||||
|
|
|
@ -270,6 +270,9 @@ private:
|
|||
*/
|
||||
void PreTraverse();
|
||||
|
||||
already_AddRefed<ServoComputedValues> ResolveStyleLazily(dom::Element* aElement,
|
||||
nsIAtom* aPseudoTag);
|
||||
|
||||
nsPresContext* mPresContext;
|
||||
UniquePtr<RawServoStyleSet> mRawSet;
|
||||
EnumeratedArray<SheetType, SheetType::Count,
|
||||
|
|
Загрузка…
Ссылка в новой задаче