| Index: third_party/WebKit/Source/core/dom/Document.cpp
|
| diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
|
| index f8d81f74113d91ab2d04a58971a36c4c6f6bf22a..aced0508376b5041f43a6e4feea9be65fbfd17bb 100644
|
| --- a/third_party/WebKit/Source/core/dom/Document.cpp
|
| +++ b/third_party/WebKit/Source/core/dom/Document.cpp
|
| @@ -1992,7 +1992,11 @@ PassRefPtr<ComputedStyle> Document::styleForElementIgnoringPendingStylesheets(El
|
| {
|
| DCHECK_EQ(element->document(), this);
|
| StyleEngine::IgnoringPendingStylesheet ignoring(styleEngine());
|
| - return ensureStyleResolver().styleForElement(element, element->parentNode() ? element->parentNode()->ensureComputedStyle() : 0);
|
| + if (!element->canParticipateInFlatTree())
|
| + return ensureStyleResolver().styleForElement(element, nullptr);
|
| + ContainerNode* parent = LayoutTreeBuilderTraversal::parent(*element);
|
| + return ensureStyleResolver().styleForElement(element, parent ? parent->ensureComputedStyle() : nullptr);
|
| +
|
| }
|
|
|
| PassRefPtr<ComputedStyle> Document::styleForPage(int pageIndex)
|
|
|