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:
Emilio Cobos Álvarez 2017-08-31 21:37:50 +02:00
Родитель bf24bd8bc9
Коммит 6c5e58f954
2 изменённых файлов: 8 добавлений и 11 удалений

Просмотреть файл

@ -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