Title: [290351] trunk
Revision
290351
Author
[email protected]
Date
2022-02-22 23:23:15 -0800 (Tue, 22 Feb 2022)

Log Message

Use of showModalDialog should appear as a warning in WI console
https://bugs.webkit.org/show_bug.cgi?id=237046

Reviewed by Devin Rousso and Darin Adler.

Source/WebCore:

* page/DOMWindow.cpp:
(WebCore::DOMWindow::showModalDialog):

LayoutTests:

Test gardening to take in account new console warning.

* fast/animation/request-animation-frame-during-modal-expected.txt:
* fast/dom/Window/open-window-min-size-expected.txt:
* fast/events/show-modal-dialog-onblur-onfocus-expected.txt:
* http/tests/cookies/document-cookie-after-showModalDialog-expected.txt:
* http/tests/security/navigate-when-restoring-cached-page-expected.txt:
* http/tests/security/showModalDialog-sync-cross-origin-page-load2-expected.txt:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (290350 => 290351)


--- trunk/LayoutTests/ChangeLog	2022-02-23 07:18:50 UTC (rev 290350)
+++ trunk/LayoutTests/ChangeLog	2022-02-23 07:23:15 UTC (rev 290351)
@@ -1,3 +1,19 @@
+2022-02-22  Tim Nguyen  <[email protected]>
+
+        Use of showModalDialog should appear as a warning in WI console
+        https://bugs.webkit.org/show_bug.cgi?id=237046
+
+        Reviewed by Devin Rousso and Darin Adler.
+
+        Test gardening to take in account new console warning.
+
+        * fast/animation/request-animation-frame-during-modal-expected.txt:
+        * fast/dom/Window/open-window-min-size-expected.txt:
+        * fast/events/show-modal-dialog-onblur-onfocus-expected.txt:
+        * http/tests/cookies/document-cookie-after-showModalDialog-expected.txt:
+        * http/tests/security/navigate-when-restoring-cached-page-expected.txt:
+        * http/tests/security/showModalDialog-sync-cross-origin-page-load2-expected.txt:
+
 2022-02-22  Ryan Haddad  <[email protected]>
 
         Unreviewed test gardening for rdar://86037417.

Modified: trunk/LayoutTests/fast/animation/request-animation-frame-during-modal-expected.txt (290350 => 290351)


--- trunk/LayoutTests/fast/animation/request-animation-frame-during-modal-expected.txt	2022-02-23 07:18:50 UTC (rev 290350)
+++ trunk/LayoutTests/fast/animation/request-animation-frame-during-modal-expected.txt	2022-02-23 07:23:15 UTC (rev 290351)
@@ -1,3 +1,4 @@
+CONSOLE MESSAGE: showModalDialog() is deprecated and will be removed. Please use the <dialog> element 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".

Modified: trunk/LayoutTests/fast/dom/Window/open-window-min-size-expected.txt (290350 => 290351)


--- trunk/LayoutTests/fast/dom/Window/open-window-min-size-expected.txt	2022-02-23 07:18:50 UTC (rev 290350)
+++ trunk/LayoutTests/fast/dom/Window/open-window-min-size-expected.txt	2022-02-23 07:23:15 UTC (rev 290351)
@@ -1,3 +1,4 @@
+CONSOLE MESSAGE: showModalDialog() is deprecated and will be removed. Please use the <dialog> element instead.
 PASS successfullyParsed is true
 
 TEST COMPLETE

Modified: trunk/LayoutTests/fast/events/show-modal-dialog-onblur-onfocus-expected.txt (290350 => 290351)


--- trunk/LayoutTests/fast/events/show-modal-dialog-onblur-onfocus-expected.txt	2022-02-23 07:18:50 UTC (rev 290350)
+++ trunk/LayoutTests/fast/events/show-modal-dialog-onblur-onfocus-expected.txt	2022-02-23 07:23:15 UTC (rev 290351)
@@ -1,3 +1,4 @@
+CONSOLE MESSAGE: showModalDialog() is deprecated and will be removed. Please use the <dialog> element instead.
 Pop up a modal dialog. Verifies that focus events are not fired while inside the message loop.
 
 

Modified: trunk/LayoutTests/http/tests/cookies/document-cookie-after-showModalDialog-expected.txt (290350 => 290351)


--- trunk/LayoutTests/http/tests/cookies/document-cookie-after-showModalDialog-expected.txt	2022-02-23 07:18:50 UTC (rev 290350)
+++ trunk/LayoutTests/http/tests/cookies/document-cookie-after-showModalDialog-expected.txt	2022-02-23 07:23:15 UTC (rev 290351)
@@ -1,3 +1,4 @@
+CONSOLE MESSAGE: showModalDialog() is deprecated and will be removed. Please use the <dialog> element instead.
 Tests that document.cookie returns the right value after a showModalDialog() call
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".

Modified: trunk/LayoutTests/http/tests/security/navigate-when-restoring-cached-page-expected.txt (290350 => 290351)


--- trunk/LayoutTests/http/tests/security/navigate-when-restoring-cached-page-expected.txt	2022-02-23 07:18:50 UTC (rev 290350)
+++ trunk/LayoutTests/http/tests/security/navigate-when-restoring-cached-page-expected.txt	2022-02-23 07:23:15 UTC (rev 290351)
@@ -1 +1,3 @@
+CONSOLE MESSAGE: showModalDialog() is deprecated and will be removed. Please use the <dialog> element instead.
+CONSOLE MESSAGE: showModalDialog() is deprecated and will be removed. Please use the <dialog> element instead.
 This test passes if it does not print an ALERT with "secret data".

Modified: trunk/LayoutTests/http/tests/security/showModalDialog-sync-cross-origin-page-load2-expected.txt (290350 => 290351)


--- trunk/LayoutTests/http/tests/security/showModalDialog-sync-cross-origin-page-load2-expected.txt	2022-02-23 07:18:50 UTC (rev 290350)
+++ trunk/LayoutTests/http/tests/security/showModalDialog-sync-cross-origin-page-load2-expected.txt	2022-02-23 07:23:15 UTC (rev 290351)
@@ -1,2 +1,3 @@
+CONSOLE MESSAGE: showModalDialog() is deprecated and will be removed. Please use the <dialog> element instead.
 This test passes if it does not alert the fail.html's content when clicking the button.
 

Modified: trunk/Source/WebCore/ChangeLog (290350 => 290351)


--- trunk/Source/WebCore/ChangeLog	2022-02-23 07:18:50 UTC (rev 290350)
+++ trunk/Source/WebCore/ChangeLog	2022-02-23 07:23:15 UTC (rev 290351)
@@ -1,3 +1,13 @@
+2022-02-22  Tim Nguyen  <[email protected]>
+
+        Use of showModalDialog should appear as a warning in WI console
+        https://bugs.webkit.org/show_bug.cgi?id=237046
+
+        Reviewed by Devin Rousso and Darin Adler.
+
+        * page/DOMWindow.cpp:
+        (WebCore::DOMWindow::showModalDialog):
+
 2022-02-22  Chris Dumez  <[email protected]>
 
         Add a URL constructor that takes a String

Modified: trunk/Source/WebCore/page/DOMWindow.cpp (290350 => 290351)


--- trunk/Source/WebCore/page/DOMWindow.cpp	2022-02-23 07:18:50 UTC (rev 290350)
+++ trunk/Source/WebCore/page/DOMWindow.cpp	2022-02-23 07:23:15 UTC (rev 290351)
@@ -2677,6 +2677,8 @@
 
 void DOMWindow::showModalDialog(const String& urlString, const String& dialogFeaturesString, DOMWindow& activeWindow, DOMWindow& firstWindow, const Function<void(DOMWindow&)>& prepareDialogFunction)
 {
+    printWarningMessage("showModalDialog() is deprecated and will be removed. Please use the <dialog> element instead."_s);
+
     if (!isCurrentlyDisplayedInFrame())
         return;
     if (!activeWindow.frame())
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to