Title: [274509] trunk/Source/WebCore
Revision
274509
Author
[email protected]
Date
2021-03-16 13:05:17 -0700 (Tue, 16 Mar 2021)

Log Message

Web Automation: Web Share menu being open causes hang in `Automation.isShowingJavaScriptDialog`
https://bugs.webkit.org/show_bug.cgi?id=223267

Reviewed by BJ Burg.

The Web Share menu should automatically resolve if the page is being controlled by automation and all other
conditions for display are met (we have no reason to reject the promise) in order to prevent hanging an
automation session on a menu that can not be interacted with.

* page/Navigator.cpp:
(WebCore::Navigator::showShareData):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (274508 => 274509)


--- trunk/Source/WebCore/ChangeLog	2021-03-16 19:47:43 UTC (rev 274508)
+++ trunk/Source/WebCore/ChangeLog	2021-03-16 20:05:17 UTC (rev 274509)
@@ -1,3 +1,17 @@
+2021-03-16  Patrick Angle  <[email protected]>
+
+        Web Automation: Web Share menu being open causes hang in `Automation.isShowingJavaScriptDialog`
+        https://bugs.webkit.org/show_bug.cgi?id=223267
+
+        Reviewed by BJ Burg.
+
+        The Web Share menu should automatically resolve if the page is being controlled by automation and all other
+        conditions for display are met (we have no reason to reject the promise) in order to prevent hanging an
+        automation session on a menu that can not be interacted with.
+
+        * page/Navigator.cpp:
+        (WebCore::Navigator::showShareData):
+
 2021-03-16  Megan Gardner  <[email protected]>
 
         Attempt to restore highlights after paint to account for newly loaded content.

Modified: trunk/Source/WebCore/page/Navigator.cpp (274508 => 274509)


--- trunk/Source/WebCore/page/Navigator.cpp	2021-03-16 19:47:43 UTC (rev 274508)
+++ trunk/Source/WebCore/page/Navigator.cpp	2021-03-16 20:05:17 UTC (rev 274509)
@@ -186,6 +186,11 @@
     auto* frame = this->frame();
     if (!frame || !frame->page())
         return;
+
+    if (frame->page()->isControlledByAutomation()) {
+        promise->resolve();
+        return;
+    }
     
     m_hasPendingShare = true;
     auto shareData = readData.returnValue();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to