Title: [228434] trunk/Source/WebKit
Revision
228434
Author
bb...@apple.com
Date
2018-02-13 14:36:15 -0800 (Tue, 13 Feb 2018)

Log Message

Web Automation: don't return an error if resizing/moving a window has no effect
https://bugs.webkit.org/show_bug.cgi?id=182742

Reviewed by Tim Horton.

* UIProcess/Automation/WebAutomationSession.cpp:
(WebKit::WebAutomationSession::resizeWindowOfBrowsingContext):
(WebKit::WebAutomationSession::moveWindowOfBrowsingContext):
Unify the behavior for all ports. Don't raise an error if the command was
idempotent (by mistake or not). It should not be an error to re-maximize a window.

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (228433 => 228434)


--- trunk/Source/WebKit/ChangeLog	2018-02-13 22:17:29 UTC (rev 228433)
+++ trunk/Source/WebKit/ChangeLog	2018-02-13 22:36:15 UTC (rev 228434)
@@ -1,3 +1,16 @@
+2018-02-13  Brian Burg  <bb...@apple.com>
+
+        Web Automation: don't return an error if resizing/moving a window has no effect
+        https://bugs.webkit.org/show_bug.cgi?id=182742
+
+        Reviewed by Tim Horton.
+
+        * UIProcess/Automation/WebAutomationSession.cpp:
+        (WebKit::WebAutomationSession::resizeWindowOfBrowsingContext):
+        (WebKit::WebAutomationSession::moveWindowOfBrowsingContext):
+        Unify the behavior for all ports. Don't raise an error if the command was
+        idempotent (by mistake or not). It should not be an error to re-maximize a window.
+
 2018-02-13  Don Olmstead  <don.olmst...@sony.com>
 
         [CMake] Make WebCore headers copies

Modified: trunk/Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp (228433 => 228434)


--- trunk/Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp	2018-02-13 22:17:29 UTC (rev 228433)
+++ trunk/Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp	2018-02-13 22:36:15 UTC (rev 228434)
@@ -344,19 +344,7 @@
             return callback->sendSuccess();
 
         page->setWindowFrame(newFrame);
-
-#if PLATFORM(GTK)
         callback->sendSuccess();
-#else
-        // If nothing changed at all, it's probably fair to report that something went wrong.
-        // (We can't assume that the requested frame size will be honored exactly, however.)
-        page->getWindowFrameWithCallback([callback = WTFMove(callback), originalFrame](WebCore::FloatRect updatedFrame) {
-            if (originalFrame == updatedFrame)
-                callback->sendFailure(STRING_FOR_PREDEFINED_ERROR_NAME_AND_DETAILS(InternalError, "The window size was expected to have changed, but did not."));
-            else
-                callback->sendSuccess();
-        });
-#endif
     });
 #endif
 }
@@ -392,19 +380,7 @@
             return callback->sendSuccess();
 
         page->setWindowFrame(newFrame);
-
-#if PLATFORM(GTK)
         callback->sendSuccess();
-#else
-        // If nothing changed at all, it's probably fair to report that something went wrong.
-        // (We can't assume that the requested frame size will be honored exactly, however.)
-        page->getWindowFrameWithCallback([callback = WTFMove(callback), originalFrame](WebCore::FloatRect updatedFrame) {
-            if (originalFrame == updatedFrame)
-                callback->sendFailure(STRING_FOR_PREDEFINED_ERROR_NAME_AND_DETAILS(InternalError, "The window position was expected to have changed, but did not."));
-            else
-                callback->sendSuccess();
-        });
-#endif
     });
 #endif
 }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to