зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1392863 - Clean up DoProcessPendingRestyles. r=emilio
MozReview-Commit-ID: 4JhWFNPVvGn
This commit is contained in:
Родитель
1ad4801a38
Коммит
7174bd25c7
|
@ -1012,16 +1012,7 @@ ServoRestyleManager::DoProcessPendingRestyles(ServoTraversalFlags aFlags)
|
|||
aFlags |= ServoTraversalFlags::ForCSSRuleChanges;
|
||||
}
|
||||
|
||||
while (doc->GetServoRestyleRoot()) {
|
||||
// Do the servo traversal.
|
||||
bool needsPostTraversal = styleSet->StyleDocument(aFlags);
|
||||
|
||||
// If we don't need a post-traversal, we're done.
|
||||
if (!needsPostTraversal) {
|
||||
doc->ClearServoRestyleRoot();
|
||||
break;
|
||||
}
|
||||
|
||||
while (styleSet->StyleDocument(aFlags)) {
|
||||
ClearSnapshots();
|
||||
|
||||
nsStyleChangeList currentChanges(StyleBackendType::Servo);
|
||||
|
@ -1086,6 +1077,8 @@ ServoRestyleManager::DoProcessPendingRestyles(ServoTraversalFlags aFlags)
|
|||
}
|
||||
}
|
||||
|
||||
doc->ClearServoRestyleRoot();
|
||||
|
||||
FlushOverflowChangedTracker();
|
||||
|
||||
ClearSnapshots();
|
||||
|
|
|
@ -858,6 +858,11 @@ ServoStyleSet::HasStateDependentStyle(dom::Element* aElement,
|
|||
bool
|
||||
ServoStyleSet::StyleDocument(ServoTraversalFlags aBaseFlags)
|
||||
{
|
||||
nsIDocument* doc = mPresContext->Document();
|
||||
if (!doc->GetServoRestyleRoot()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
PreTraverse(aBaseFlags);
|
||||
AutoPrepareTraversal guard(this);
|
||||
const SnapshotTable& snapshots = Snapshots();
|
||||
|
@ -866,7 +871,6 @@ ServoStyleSet::StyleDocument(ServoTraversalFlags aBaseFlags)
|
|||
// NAC subtree roots.
|
||||
bool postTraversalRequired = false;
|
||||
|
||||
nsIDocument* doc = mPresContext->Document();
|
||||
Element* rootElement = doc->GetRootElement();
|
||||
// NB: We distinguish between the main document and document-level NAC here.
|
||||
const bool isInitialForMainDoc = rootElement && !rootElement->HasServoData();
|
||||
|
|
Загрузка…
Ссылка в новой задаче