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

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

Issue 133393002: Make ancestors of modal <dialog> inert (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: save a tree walk if able Created 6 years, 11 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: Source/core/dom/Node.cpp
diff --git a/Source/core/dom/Node.cpp b/Source/core/dom/Node.cpp
index 39c1c7e0b6e200cad91a51bc9fc980174a3df429..e46cbab9413e30a2ec5a4e428dcf01336c02b1f7 100644
--- a/Source/core/dom/Node.cpp
+++ b/Source/core/dom/Node.cpp
@@ -798,7 +798,7 @@ bool Node::shouldHaveFocusAppearance() const
bool Node::isInert() const
{
const HTMLDialogElement* dialog = document().activeModalDialog();
- if (dialog && !containsIncludingShadowDOM(dialog) && !dialog->containsIncludingShadowDOM(this))
+ if (dialog && this != document() && !dialog->containsIncludingShadowDOM(this))
return true;
return document().ownerElement() && document().ownerElement()->isInert();
}

Powered by Google App Engine
This is Rietveld 408576698