зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1395351: Don't clobber restyle root flags from frame construction. r=bholley
MozReview-Commit-ID: EsXKiLbYQsY --HG-- extra : rebase_source : ef87462e8495670b6e0fcfbdfc9f3b511f5f57bc
This commit is contained in:
Родитель
bf24bd8bc9
Коммит
6c5e58f954
|
@ -64,10 +64,7 @@ nsIDocument::SetServoRestyleRoot(nsINode* aRoot, uint32_t aDirtyBits)
|
|||
MOZ_ASSERT(aRoot);
|
||||
MOZ_ASSERT(aDirtyBits);
|
||||
MOZ_ASSERT((aDirtyBits & ~Element::kAllServoDescendantBits) == 0);
|
||||
// FIXME(emilio): This should hold, but we're clobbering it from
|
||||
// nsCSSFrameConstructor::ConstructDocElementFrame, which is wrong!
|
||||
//
|
||||
// MOZ_ASSERT((aDirtyBits & mServoRestyleRootDirtyBits) == mServoRestyleRootDirtyBits);
|
||||
MOZ_ASSERT((aDirtyBits & mServoRestyleRootDirtyBits) == mServoRestyleRootDirtyBits);
|
||||
|
||||
MOZ_ASSERT(!mServoRestyleRoot ||
|
||||
mServoRestyleRoot == aRoot ||
|
||||
|
|
|
@ -2549,13 +2549,13 @@ nsCSSFrameConstructor::ConstructDocElementFrame(Element* aDocEle
|
|||
|
||||
// --------- CREATE AREA OR BOX FRAME -------
|
||||
if (ServoStyleSet* set = mPresShell->StyleSet()->GetAsServo()) {
|
||||
// We need to explicitly set a restyle root for the first traversal.
|
||||
aDocElement->OwnerDoc()->SetServoRestyleRoot(aDocElement->OwnerDocAsNode(),
|
||||
ELEMENT_HAS_DIRTY_DESCENDANTS_FOR_SERVO);
|
||||
// NOTE(emilio): If the root has a non-null binding, we'll stop at the
|
||||
// document element and won't process any children, loading the bindings (or
|
||||
// failing to do so) will take care of the rest.
|
||||
set->StyleDocument(ServoTraversalFlags::Empty);
|
||||
// Ensure the document element is styled at this point.
|
||||
if (!aDocElement->HasServoData()) {
|
||||
// NOTE(emilio): If the root has a non-null binding, we'll stop at the
|
||||
// document element and won't process any children, loading the bindings
|
||||
// (or failing to do so) will take care of the rest.
|
||||
set->StyleNewSubtree(aDocElement);
|
||||
}
|
||||
}
|
||||
|
||||
// FIXME: Should this use ResolveStyleContext? (The calls in this
|
||||
|
|
Загрузка…
Ссылка в новой задаче