зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1390694
- Part 1: Add ServoStyleSet function for checking document state dependencies. r=emilio
MozReview-Commit-ID: G8Ju8yHtYx6 --HG-- extra : rebase_source : fc55dfaa52acf490b65650a7101188115a6e4f18
This commit is contained in:
Родитель
be0c3c9792
Коммит
2559396ff5
|
@ -158,6 +158,9 @@ SERVO_BINDING_FUNC(Servo_StyleSet_HasStateDependency, bool,
|
|||
RawServoStyleSetBorrowed set,
|
||||
RawGeckoElementBorrowed element,
|
||||
uint64_t state)
|
||||
SERVO_BINDING_FUNC(Servo_StyleSet_HasDocumentStateDependency, bool,
|
||||
RawServoStyleSetBorrowed set,
|
||||
uint64_t state)
|
||||
|
||||
// CSSRuleList
|
||||
SERVO_BINDING_FUNC(Servo_CssRules_ListTypes, void,
|
||||
|
|
|
@ -1582,6 +1582,13 @@ ServoStyleSet::HasStateDependency(const Element& aElement,
|
|||
mRawSet.get(), &aElement, aState.ServoValue());
|
||||
}
|
||||
|
||||
bool
|
||||
ServoStyleSet::HasDocumentStateDependency(EventStates aState) const
|
||||
{
|
||||
return Servo_StyleSet_HasDocumentStateDependency(
|
||||
mRawSet.get(), aState.ServoValue());
|
||||
}
|
||||
|
||||
already_AddRefed<ServoStyleContext>
|
||||
ServoStyleSet::ReparentStyleContext(ServoStyleContext* aStyleContext,
|
||||
ServoStyleContext* aNewParent,
|
||||
|
|
|
@ -477,6 +477,12 @@ public:
|
|||
bool HasStateDependency(const dom::Element& aElement,
|
||||
EventStates aState) const;
|
||||
|
||||
/**
|
||||
* Returns true if a change in document state might require us to restyle the
|
||||
* document.
|
||||
*/
|
||||
bool HasDocumentStateDependency(EventStates aState) const;
|
||||
|
||||
/**
|
||||
* Get a new style context that uses the same rules as the given style context
|
||||
* but has a different parent.
|
||||
|
|
Загрузка…
Ссылка в новой задаче