Bug 1274539 - Use GetParentCrossingShadowRoot() instead of GetParent() in GetStyleContextInMap when looking up undisplayed nodes. r=dbaron

--HG--
extra : rebase_source : 99e0430bf0450047a18ee4e6376360a201b53a25
This commit is contained in:
William Chen 2016-05-26 19:52:11 -07:00
parent faf4b58dd6
commit eaa69e20b2

View File

@ -216,7 +216,8 @@ nsFrameManager::GetStyleContextInMap(UndisplayedMap* aMap, nsIContent* aContent)
if (!aContent) {
return nullptr;
}
nsIContent* parent = aContent->GetParent();
nsIContent* parent = aContent->GetParentElementCrossingShadowRoot();
MOZ_ASSERT(parent || !aContent->GetParent(), "no non-elements");
for (UndisplayedNode* node = aMap->GetFirstNode(parent);
node; node = node->mNext) {
if (node->mContent == aContent)