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

Unified Diff: third_party/WebKit/Source/core/html/HTMLDialogElement.cpp

Issue 2883033003: Propagate inert state to OOPIFs when a modal dialog is active (Closed)
Patch Set: Rebase only Created 3 years, 7 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/html/HTMLDialogElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLDialogElement.cpp b/third_party/WebKit/Source/core/html/HTMLDialogElement.cpp
index f5af85eb93c424bada4d34ff2055adb825e80561..2c47af973670a7604984efb8023d4b9ad0848aeb 100644
--- a/third_party/WebKit/Source/core/html/HTMLDialogElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLDialogElement.cpp
@@ -33,6 +33,7 @@
#include "core/frame/FrameView.h"
#include "core/frame/UseCounter.h"
#include "core/html/HTMLFormControlElement.h"
+#include "core/html/HTMLFrameOwnerElement.h"
#include "core/style/ComputedStyle.h"
namespace blink {
@@ -81,6 +82,11 @@ static void SetFocusForDialog(HTMLDialogElement* dialog) {
}
static void InertSubtreesChanged(Document& document) {
+ if (document.GetFrame()) {
dmazzoni 2017/05/19 18:58:19 Perhaps this deserves a comment saying that this i
kenrb 2017/05/31 18:32:00 Done.
+ document.GetFrame()->SetIsInert(document.LocalOwner() &&
+ document.LocalOwner()->IsInert());
+ }
+
// When a modal dialog opens or closes, nodes all over the accessibility
// tree can change inertness which means they must be added or removed from
// the tree. The most foolproof way is to clear the entire tree and rebuild
@@ -182,7 +188,7 @@ void HTMLDialogElement::showModal(ExceptionState& exception_state) {
void HTMLDialogElement::RemovedFrom(ContainerNode* insertion_point) {
HTMLElement::RemovedFrom(insertion_point);
SetNotCentered();
- // FIXME: We should call inertSubtreesChanged() here.
+ InertSubtreesChanged(GetDocument());
}
void HTMLDialogElement::SetCentered(LayoutUnit centered_position) {

Powered by Google App Engine
This is Rietveld 408576698