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

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

Issue 139183002: Reland r165040 "Make ancestors of modal <dialog> inert" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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
« no previous file with comments | « LayoutTests/fast/dom/HTMLDialogElement/modal-dialog-blocks-mouse-events-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Node.cpp
diff --git a/Source/core/dom/Node.cpp b/Source/core/dom/Node.cpp
index 2c1dc4c1baf841dd990e8fe7c0838f2d70b72a92..5e1deff6b7f1d6b202f20602df3b04450f146514 100644
--- a/Source/core/dom/Node.cpp
+++ b/Source/core/dom/Node.cpp
@@ -792,7 +792,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();
}
« no previous file with comments | « LayoutTests/fast/dom/HTMLDialogElement/modal-dialog-blocks-mouse-events-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698