Chromium Code Reviews| Index: third_party/WebKit/Source/core/dom/Node.cpp |
| diff --git a/third_party/WebKit/Source/core/dom/Node.cpp b/third_party/WebKit/Source/core/dom/Node.cpp |
| index a7f51f704a679c10db793f474762e3b0348a759a..72a7872e7328c1fd068f6eaa6c02680dcb7b828a 100644 |
| --- a/third_party/WebKit/Source/core/dom/Node.cpp |
| +++ b/third_party/WebKit/Source/core/dom/Node.cpp |
| @@ -770,6 +770,16 @@ bool Node::isInert() const |
| const HTMLDialogElement* dialog = document().activeModalDialog(); |
| if (dialog && this != document() && (!canParticipateInFlatTree() || !FlatTreeTraversal::containsIncludingPseudoElement(*dialog, *this))) |
| return true; |
| + |
| + if (RuntimeEnabledFeatures::inertAttributeEnabled()) { |
| + const Node* n = this; |
|
esprehn
2016/06/27 22:27:15
node, don't abbreviate
aboxhall
2016/06/29 00:13:12
Done.
|
| + do { |
| + if (n->isElementNode() && toElement(n)->hasAttribute(HTMLNames::inertAttr)) |
|
esprehn
2016/06/27 22:27:15
I think you want instead use node.parentOrShadowHo
aboxhall
2016/06/27 23:59:22
Where do I want to do that, sorry?
esprehn
2016/06/28 18:55:07
Your loop should be over parentOrShadowHostElement
aboxhall
2016/06/29 00:13:12
Done.
|
| + return true; |
| + n = n->parentOrShadowHostNode(); |
| + } while (n); |
| + } |
| + |
| return document().localOwner() && document().localOwner()->isInert(); |
| } |