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

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: Trying to fix patch application problem 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..0f0abaf3a235b2f274e7b5abab4b38d7d5d50456 100644
--- a/third_party/WebKit/Source/core/html/HTMLDialogElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLDialogElement.cpp
@@ -81,6 +81,13 @@ static void SetFocusForDialog(HTMLDialogElement* dialog) {
}
static void InertSubtreesChanged(Document& document) {
+ // TODO(kenrb): Am I correct in thinking that this will never get called on
+ // and element that is in a frame that is already inert? If not, we
dmazzoni 2017/05/18 15:47:06 I don't see how we can know that. A page can alway
kenrb 2017/05/19 17:46:28 Done.
+ // need to get the embedding frame's inert value and use that instead of
+ // false.
+ if (document.GetFrame())
+ document.GetFrame()->SetIsInert(false);
aboxhall 2017/05/18 04:47:27 When does SetIsInert(true) get called? Also, you
kenrb 2017/05/18 12:21:49 See LocalFrame::SetIsInert(). I should probably ad
+
// 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 +189,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