Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1088)

Unified Diff: third_party/WebKit/Source/core/dom/Node.cpp

Issue 2088453002: Implement the inert attribute (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: esprehn comments round 2 Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 7a5eca1ad8e04ddf27f1747d56fa9275aeb5f0f8..c62031197711027a5f38624d53690c695fb812b5 100644
--- a/third_party/WebKit/Source/core/dom/Node.cpp
+++ b/third_party/WebKit/Source/core/dom/Node.cpp
@@ -779,6 +779,17 @@ bool Node::isInert() const {
(!canParticipateInFlatTree() ||
!FlatTreeTraversal::containsIncludingPseudoElement(*dialog, *this)))
return true;
+
+ if (RuntimeEnabledFeatures::inertAttributeEnabled()) {
+ const Node* node = this;
+ do {
+ if (node->isElementNode() &&
+ toElement(node)->hasAttribute(HTMLNames::inertAttr))
esprehn 2017/02/15 02:15:00 we often do using HTMLNames, that's actually at th
aboxhall 2017/02/15 04:01:32 Done.
+ return true;
+ node = FlatTreeTraversal::parentElement(*node);
+ } while (node);
+ }
+
return document().localOwner() && document().localOwner()->isInert();
}

Powered by Google App Engine
This is Rietveld 408576698