зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1388298 - Add an API to process all invalidations on the main thread. r=emilio
MozReview-Commit-ID: I7rBwvPQykR --HG-- extra : rebase_source : 432210b2798c8b602fb7659e097721c6fbc1d60d
This commit is contained in:
Родитель
7d9019f3fd
Коммит
e55f4e59ec
|
@ -1103,6 +1103,17 @@ ServoRestyleManager::ProcessPendingRestyles()
|
|||
DoProcessPendingRestyles(ServoTraversalFlags::Empty);
|
||||
}
|
||||
|
||||
void
|
||||
ServoRestyleManager::ProcessAllPendingAttributeAndStateInvalidations()
|
||||
{
|
||||
AutoTimelineMarker marker(mPresContext->GetDocShell(),
|
||||
"ProcessAllPendingAttributeAndStateInvalidations");
|
||||
for (auto iter = mSnapshots.Iter(); !iter.Done(); iter.Next()) {
|
||||
Servo_ProcessInvalidations(StyleSet()->RawSet(), iter.Key(), &mSnapshots);
|
||||
}
|
||||
ClearSnapshots();
|
||||
}
|
||||
|
||||
void
|
||||
ServoRestyleManager::UpdateOnlyAnimationStyles()
|
||||
{
|
||||
|
|
|
@ -185,6 +185,7 @@ public:
|
|||
void PostRebuildAllStyleDataEvent(nsChangeHint aExtraHint,
|
||||
nsRestyleHint aRestyleHint);
|
||||
void ProcessPendingRestyles();
|
||||
void ProcessAllPendingAttributeAndStateInvalidations();
|
||||
|
||||
/**
|
||||
* Performs a Servo animation-only traversal to compute style for all nodes
|
||||
|
|
|
@ -624,6 +624,12 @@ SERVO_BINDING_FUNC(Servo_GetCustomPropertyNameAt, bool,
|
|||
nsAString* name)
|
||||
|
||||
|
||||
SERVO_BINDING_FUNC(Servo_ProcessInvalidations, void,
|
||||
RawServoStyleSetBorrowed set,
|
||||
RawGeckoElementBorrowed element,
|
||||
const mozilla::ServoElementSnapshotTable* snapshots)
|
||||
|
||||
|
||||
// AddRef / Release functions
|
||||
#define SERVO_ARC_TYPE(name_, type_) \
|
||||
SERVO_BINDING_FUNC(Servo_##name_##_AddRef, void, type_##Borrowed) \
|
||||
|
|
Загрузка…
Ссылка в новой задаче