Make window.showModalDialog configurable at runtime (issue 243473002)

0 views
Skip to first unread message

aba...@chromium.org

unread,
Apr 18, 2014, 2:01:12 PM4/18/14
to ese...@chromium.org, blink-...@chromium.org, sh...@chromium.org, apavlo...@chromium.org, loislo...@chromium.org, aandre...@chromium.org, di...@apple.com, caseq...@chromium.org, steve...@chromium.org, arv+...@chromium.org, alanc...@chromium.org, pfeldma...@chromium.org, malch...@chromium.org, yurys...@chromium.org, dstoc...@chromium.org, tim...@chromium.org, devtools...@chromium.org, ericwi...@chromium.org, rjwr...@chromium.org, lushnik...@chromium.org, eustas...@chromium.org, pauliris...@chromium.org, alexis...@intel.com, alph+...@chromium.org, vsevik...@chromium.org, mikel...@chromium.org, ch.d...@samsung.com, watchdog-bli...@google.com
Reviewers: eseidel,

Description:
Make window.showModalDialog configurable at runtime

This CL makes it possible to enable and disable showModalDialog with a
runtime
flag. Currently, the flag is enabled in stable, but we'll likely change
that at
some point soon.

BUG=345831

Please review this at https://codereview.chromium.org/243473002/

SVN Base: svn://svn.chromium.org/blink/trunk

Affected files (+14, -9 lines):
M
LayoutTests/fast/animation/request-animation-frame-during-modal-expected.txt
M LayoutTests/fast/dom/Window/open-window-min-size-expected.txt
M LayoutTests/fast/events/scroll-event-during-modal-dialog-expected.txt
M LayoutTests/fast/events/show-modal-dialog-onblur-onfocus-expected.txt
M LayoutTests/fast/harness/show-modal-dialog-expected.txt
M LayoutTests/inspector/console/console-long-eval-crash-expected.txt
M
LayoutTests/platform/mac/fast/dom/Window/open-window-min-size-expected.txt
M Source/core/frame/UseCounter.cpp
M Source/core/frame/Window.idl
M Source/platform/RuntimeEnabledFeatures.in


Index:
LayoutTests/fast/animation/request-animation-frame-during-modal-expected.txt
diff --git
a/LayoutTests/fast/animation/request-animation-frame-during-modal-expected.txt
b/LayoutTests/fast/animation/request-animation-frame-during-modal-expected.txt
index
4da7dbd7619dc348c3030ba610c854849c03c5b8..a2165787846fae530cad9a75b8baa21ab7ef1120
100644
---
a/LayoutTests/fast/animation/request-animation-frame-during-modal-expected.txt
+++
b/LayoutTests/fast/animation/request-animation-frame-during-modal-expected.txt
@@ -1,4 +1,4 @@
-CONSOLE WARNING: Chromium is considering deprecating showModalDialog.
Please use window.open and postMessage instead.
+CONSOLE WARNING: showModalDialog is deprecated. Please use window.open and
postMessage instead.
Tests that requestAnimationFrame callbacks are not invoked while modal
dialogs are displayed.

On success, you will see a series of "PASS" messages, followed by "TEST
COMPLETE".
Index: LayoutTests/fast/dom/Window/open-window-min-size-expected.txt
diff --git a/LayoutTests/fast/dom/Window/open-window-min-size-expected.txt
b/LayoutTests/fast/dom/Window/open-window-min-size-expected.txt
index
0e291775a53d51b28a1caac26ee2ea927e6a997f..fa3789354b0309217c57ca9b0b1c59c4c6ab2def
100644
--- a/LayoutTests/fast/dom/Window/open-window-min-size-expected.txt
+++ b/LayoutTests/fast/dom/Window/open-window-min-size-expected.txt
@@ -1,4 +1,4 @@
-CONSOLE WARNING: Chromium is considering deprecating showModalDialog.
Please use window.open and postMessage instead.
+CONSOLE WARNING: showModalDialog is deprecated. Please use window.open and
postMessage instead.
PASS successfullyParsed is true

TEST COMPLETE
Index: LayoutTests/fast/events/scroll-event-during-modal-dialog-expected.txt
diff --git
a/LayoutTests/fast/events/scroll-event-during-modal-dialog-expected.txt
b/LayoutTests/fast/events/scroll-event-during-modal-dialog-expected.txt
index
b45f43fa30f2899bb474e4f5f109f4e0dc9aae31..1ff90628c08c27e7c2964c36260da68f77492a32
100644
--- a/LayoutTests/fast/events/scroll-event-during-modal-dialog-expected.txt
+++ b/LayoutTests/fast/events/scroll-event-during-modal-dialog-expected.txt
@@ -1,4 +1,4 @@
-CONSOLE WARNING: Chromium is considering deprecating showModalDialog.
Please use window.open and postMessage instead.
+CONSOLE WARNING: showModalDialog is deprecated. Please use window.open and
postMessage instead.
Tests that scroll events are not fired while modal dialogs are displayed.

On success, you will see a series of "PASS" messages, followed by "TEST
COMPLETE".
Index: LayoutTests/fast/events/show-modal-dialog-onblur-onfocus-expected.txt
diff --git
a/LayoutTests/fast/events/show-modal-dialog-onblur-onfocus-expected.txt
b/LayoutTests/fast/events/show-modal-dialog-onblur-onfocus-expected.txt
index
ed9d6ef4ecef8f79a61f18d22d39a1c2ea449f5d..91f06764098cb20a558e4fd833926e159bcf220b
100644
--- a/LayoutTests/fast/events/show-modal-dialog-onblur-onfocus-expected.txt
+++ b/LayoutTests/fast/events/show-modal-dialog-onblur-onfocus-expected.txt
@@ -1,4 +1,4 @@
-CONSOLE WARNING: Chromium is considering deprecating showModalDialog.
Please use window.open and postMessage instead.
+CONSOLE WARNING: showModalDialog is deprecated. Please use window.open and
postMessage instead.
Pop up a modal dialog. Verifies that focus events are not fired while
inside the message loop.


Index: LayoutTests/fast/harness/show-modal-dialog-expected.txt
diff --git a/LayoutTests/fast/harness/show-modal-dialog-expected.txt
b/LayoutTests/fast/harness/show-modal-dialog-expected.txt
index
e0b8f30538cd222bdf589768be5f718acf5a0ba9..3fa756ebbe4b470239a2a1cbecd8a7a126dfb098
100644
--- a/LayoutTests/fast/harness/show-modal-dialog-expected.txt
+++ b/LayoutTests/fast/harness/show-modal-dialog-expected.txt
@@ -1,4 +1,4 @@
-CONSOLE WARNING: Chromium is considering deprecating showModalDialog.
Please use window.open and postMessage instead.
+CONSOLE WARNING: showModalDialog is deprecated. Please use window.open and
postMessage instead.
This test verifies that showModalDialog implementation in DRT works.

You need to disable pop-up blocker for this test to run successfully.
Index: LayoutTests/inspector/console/console-long-eval-crash-expected.txt
diff --git
a/LayoutTests/inspector/console/console-long-eval-crash-expected.txt
b/LayoutTests/inspector/console/console-long-eval-crash-expected.txt
index
865ffe2ebe8c5ebe7399d0ae0e3a24900db2eec8..4faae327c6b5931b092467382b60c5373cc56f9c
100644
--- a/LayoutTests/inspector/console/console-long-eval-crash-expected.txt
+++ b/LayoutTests/inspector/console/console-long-eval-crash-expected.txt
@@ -1,4 +1,4 @@
-CONSOLE WARNING: Chromium is considering deprecating showModalDialog.
Please use window.open and postMessage instead.
+CONSOLE WARNING: showModalDialog is deprecated. Please use window.open and
postMessage instead.
Test that any long api call from the frontend will not crash the inspected
page's renderer if the page is reloaded or frontend is closed in the middle.

https://bugs.webkit.org/show_bug.cgi?id=60616
Index:
LayoutTests/platform/mac/fast/dom/Window/open-window-min-size-expected.txt
diff --git
a/LayoutTests/platform/mac/fast/dom/Window/open-window-min-size-expected.txt
b/LayoutTests/platform/mac/fast/dom/Window/open-window-min-size-expected.txt
index
3b70a9496835755592bb801859cfce7013bd10ec..0ace78b5290a4c9a3c99056e352101e5585a5bd2
100644
---
a/LayoutTests/platform/mac/fast/dom/Window/open-window-min-size-expected.txt
+++
b/LayoutTests/platform/mac/fast/dom/Window/open-window-min-size-expected.txt
@@ -1,4 +1,4 @@
-CONSOLE WARNING: Chromium is considering deprecating showModalDialog.
Please use window.open and postMessage instead.
+CONSOLE WARNING: showModalDialog is deprecated. Please use window.open and
postMessage instead.
PASS successfullyParsed is true

TEST COMPLETE
Index: Source/core/frame/UseCounter.cpp
diff --git a/Source/core/frame/UseCounter.cpp
b/Source/core/frame/UseCounter.cpp
index
decf0a1c79281adf204f0eacade3e89615397dd2..d2dce20b1b4270cd89632c979074c06e2a7fade3
100644
--- a/Source/core/frame/UseCounter.cpp
+++ b/Source/core/frame/UseCounter.cpp
@@ -660,7 +660,7 @@ String UseCounter::deprecationMessage(Feature feature)
return "FileError is deprecated. Please use the 'name'
or 'message' attributes of DOMError rather than 'code'.";

case ShowModalDialog:
- return "Chromium is considering deprecating showModalDialog.
Please use window.open and postMessage instead.";
+ return "showModalDialog is deprecated. Please use window.open and
postMessage instead.";

case CSSStyleSheetInsertRuleOptionalArg:
return "Calling CSSStyleSheet.insertRule() with one argument is
deprecated. Please pass the index argument as well: insertRule(x, 0).";
Index: Source/core/frame/Window.idl
diff --git a/Source/core/frame/Window.idl b/Source/core/frame/Window.idl
index
77c6d97667138856a3c51af345e28d1c1f4b0f44..13c6af00f56103e267bad231df47e542b2cf2655
100644
--- a/Source/core/frame/Window.idl
+++ b/Source/core/frame/Window.idl
@@ -62,7 +62,7 @@
DOMString name,
optional DOMString options);

- [Custom] any showModalDialog(DOMString url,
+ [RuntimeEnabled=ShowModalDialog, Custom] any showModalDialog(DOMString
url,
optional any dialogArgs,
optional DOMString featureArgs);

Index: Source/platform/RuntimeEnabledFeatures.in
diff --git a/Source/platform/RuntimeEnabledFeatures.in
b/Source/platform/RuntimeEnabledFeatures.in
index
cb948292ed59fe161f6ac6ed4c413380c2077e2d..a23fc9e970a395b4e227c4b04a9943aa592eec87
100644
--- a/Source/platform/RuntimeEnabledFeatures.in
+++ b/Source/platform/RuntimeEnabledFeatures.in
@@ -109,6 +109,11 @@ ServiceWorker status=experimental
SessionStorage status=stable
SharedWorker status=stable
PictureSizes status=experimental
+
+// window.showModalDialog is deprecated and slated for removal from M36
+// Once this ships to stable supporting code can be
removed.crbug.com/345831
+ShowModalDialog status=stable
+
SpeechInput status=test
SpeechSynthesis status=stable
Stream status=experimental


ese...@chromium.org

unread,
Apr 18, 2014, 2:02:03 PM4/18/14
to aba...@chromium.org, blink-...@chromium.org, sh...@chromium.org, apavlo...@chromium.org, loislo...@chromium.org, aandre...@chromium.org, di...@apple.com, caseq...@chromium.org, steve...@chromium.org, arv+...@chromium.org, alanc...@chromium.org, pfeldma...@chromium.org, malch...@chromium.org, yurys...@chromium.org, dstoc...@chromium.org, tim...@chromium.org, devtools...@chromium.org, ericwi...@chromium.org, rjwr...@chromium.org, lushnik...@chromium.org, eustas...@chromium.org, pauliris...@chromium.org, alexis...@intel.com, alph+...@chromium.org, vsevik...@chromium.org, mikel...@chromium.org, ch.d...@samsung.com, watchdog-bli...@google.com

commi...@chromium.org

unread,
Apr 18, 2014, 2:02:16 PM4/18/14
to aba...@chromium.org, ese...@chromium.org, blink-...@chromium.org, sh...@chromium.org, apavlo...@chromium.org, loislo...@chromium.org, aandre...@chromium.org, di...@apple.com, caseq...@chromium.org, steve...@chromium.org, arv+...@chromium.org, alanc...@chromium.org, pfeldma...@chromium.org, malch...@chromium.org, yurys...@chromium.org, dstoc...@chromium.org, tim...@chromium.org, devtools...@chromium.org, ericwi...@chromium.org, rjwr...@chromium.org, lushnik...@chromium.org, eustas...@chromium.org, pauliris...@chromium.org, alexis...@intel.com, alph+...@chromium.org, vsevik...@chromium.org, mikel...@chromium.org, ch.d...@samsung.com, watchdog-bli...@google.com

commi...@chromium.org

unread,
Apr 18, 2014, 3:10:36 PM4/18/14
to aba...@chromium.org, ese...@chromium.org, blink-...@chromium.org, sh...@chromium.org, apavlo...@chromium.org, loislo...@chromium.org, aandre...@chromium.org, di...@apple.com, caseq...@chromium.org, steve...@chromium.org, arv+...@chromium.org, alanc...@chromium.org, pfeldma...@chromium.org, malch...@chromium.org, yurys...@chromium.org, dstoc...@chromium.org, tim...@chromium.org, devtools...@chromium.org, ericwi...@chromium.org, rjwr...@chromium.org, lushnik...@chromium.org, eustas...@chromium.org, pauliris...@chromium.org, alexis...@intel.com, alph+...@chromium.org, vsevik...@chromium.org, mikel...@chromium.org, ch.d...@samsung.com, watchdog-bli...@google.com
Change committed as 171964

https://codereview.chromium.org/243473002/
Reply all
Reply to author
Forward
0 new messages