зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1321284 - Part 3: Make Servo-based styling use the "flattened tree parent for style". r=bholley
MozReview-Commit-ID: BnW5VZ3xLpG --HG-- extra : rebase_source : 2315408fb39fc52f272731ce0e936ec6ba4ea195
This commit is contained in:
Родитель
a72478f6c9
Коммит
bd110300be
|
@ -8,6 +8,7 @@
|
|||
#define mozilla_dom_ElementInlines_h
|
||||
|
||||
#include "mozilla/dom/Element.h"
|
||||
#include "mozilla/ServoBindings.h"
|
||||
#include "nsIContentInlines.h"
|
||||
#include "nsIDocument.h"
|
||||
|
||||
|
@ -54,7 +55,7 @@ Element::NoteDirtyDescendantsForServo()
|
|||
Element* curr = this;
|
||||
while (curr && !curr->HasDirtyDescendantsForServo()) {
|
||||
curr->SetHasDirtyDescendantsForServo();
|
||||
curr = curr->GetFlattenedTreeParentElement();
|
||||
curr = curr->GetFlattenedTreeParentElementForStyle();
|
||||
}
|
||||
|
||||
MOZ_ASSERT(DirtyDescendantsBitIsPropagatedForServo());
|
||||
|
@ -70,8 +71,10 @@ Element::DirtyDescendantsBitIsPropagatedForServo()
|
|||
return false;
|
||||
}
|
||||
nsINode* parentNode = curr->GetParentNode();
|
||||
curr = curr->GetFlattenedTreeParentElement();
|
||||
MOZ_ASSERT_IF(!curr, parentNode == OwnerDoc());
|
||||
curr = curr->GetFlattenedTreeParentElementForStyle();
|
||||
MOZ_ASSERT_IF(!curr,
|
||||
parentNode == OwnerDoc() ||
|
||||
parentNode == parentNode->OwnerDoc()->GetRootElement());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -62,7 +62,7 @@ Gecko_NodeIsElement(RawGeckoNodeBorrowed aNode)
|
|||
RawGeckoNodeBorrowedOrNull
|
||||
Gecko_GetParentNode(RawGeckoNodeBorrowed aNode)
|
||||
{
|
||||
return aNode->GetFlattenedTreeParentNode();
|
||||
return aNode->GetFlattenedTreeParentNodeForStyle();
|
||||
}
|
||||
|
||||
RawGeckoNodeBorrowedOrNull
|
||||
|
@ -92,7 +92,7 @@ Gecko_GetNextSibling(RawGeckoNodeBorrowed aNode)
|
|||
RawGeckoElementBorrowedOrNull
|
||||
Gecko_GetParentElement(RawGeckoElementBorrowed aElement)
|
||||
{
|
||||
return aElement->GetFlattenedTreeParentElement();
|
||||
return aElement->GetFlattenedTreeParentElementForStyle();
|
||||
}
|
||||
|
||||
RawGeckoElementBorrowedOrNull
|
||||
|
|
Загрузка…
Ссылка в новой задаче