зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1403028: Ensure the parent is in the composed doc before marking it as dirty. r=heycam
We could do the check earlier, but the end result is effectively the same, and this makes it easier to remove. MozReview-Commit-ID: 5c8TFHK1ciD
This commit is contained in:
Родитель
135f2e07c7
Коммит
4b5023d5d3
|
@ -1053,8 +1053,14 @@ ServoRestyleManager::SnapshotFor(Element* aElement)
|
|||
if (aElement->GetNextElementSibling()) {
|
||||
Element* parent = aElement->GetFlattenedTreeParentElementForStyle();
|
||||
MOZ_ASSERT(parent);
|
||||
parent->NoteDirtyForServo();
|
||||
parent->SetHasDirtyDescendantsForServo();
|
||||
// The parent will only be outside of the composed doc if we're mid-unbind.
|
||||
//
|
||||
// FIXME(emilio): Make the traversal lazily mark the parent as dirty if
|
||||
// needed to avoid this problem altogether, plus being better perf-wise.
|
||||
if (parent->IsInComposedDoc()) {
|
||||
parent->NoteDirtyForServo();
|
||||
parent->SetHasDirtyDescendantsForServo();
|
||||
}
|
||||
} else {
|
||||
aElement->NoteDirtyForServo();
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче