Title: [221246] trunk/Source/WebKit
Revision
221246
Author
[email protected]
Date
2017-08-28 05:32:34 -0700 (Mon, 28 Aug 2017)

Log Message

Automation: takeScreenshot should use the visible content rect not the document rect
https://bugs.webkit.org/show_bug.cgi?id=175665

Reviewed by Brian Burg.

According to the spec, we should get the toplevel browsing context document rectangle and take a screenshot of
it using the current viewport width and height. We are currently using the document size.

19. Screen Capture.
https://w3c.github.io/webdriver/webdriver-spec.html#dfn-draw-a-bounding-box-from-the-framebuffer

* WebProcess/Automation/WebAutomationSessionProxy.cpp:
(WebKit::WebAutomationSessionProxy::takeScreenshot): Use FrameView::visibleContentRect().

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (221245 => 221246)


--- trunk/Source/WebKit/ChangeLog	2017-08-28 12:07:03 UTC (rev 221245)
+++ trunk/Source/WebKit/ChangeLog	2017-08-28 12:32:34 UTC (rev 221246)
@@ -1,5 +1,21 @@
 2017-08-28  Carlos Garcia Campos  <[email protected]>
 
+        Automation: takeScreenshot should use the visible content rect not the document rect
+        https://bugs.webkit.org/show_bug.cgi?id=175665
+
+        Reviewed by Brian Burg.
+
+        According to the spec, we should get the toplevel browsing context document rectangle and take a screenshot of
+        it using the current viewport width and height. We are currently using the document size.
+
+        19. Screen Capture.
+        https://w3c.github.io/webdriver/webdriver-spec.html#dfn-draw-a-bounding-box-from-the-framebuffer
+
+        * WebProcess/Automation/WebAutomationSessionProxy.cpp:
+        (WebKit::WebAutomationSessionProxy::takeScreenshot): Use FrameView::visibleContentRect().
+
+2017-08-28  Carlos Garcia Campos  <[email protected]>
+
         [GTK][WPE] ASSERTION FAILED: !isOpen() in WebKit::IconDatabase::~IconDatabase()
         https://bugs.webkit.org/show_bug.cgi?id=175719
 

Modified: trunk/Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.cpp (221245 => 221246)


--- trunk/Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.cpp	2017-08-28 12:07:03 UTC (rev 221245)
+++ trunk/Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.cpp	2017-08-28 12:32:34 UTC (rev 221246)
@@ -650,7 +650,7 @@
         return;
     }
 
-    WebCore::IntRect snapshotRect = WebCore::IntRect(WebCore::IntPoint(0, 0), frameView->contentsSize());
+    WebCore::IntRect snapshotRect = frameView->visibleContentRect();
     if (snapshotRect.isEmpty()) {
         WebProcess::singleton().parentProcessConnection()->send(Messages::WebAutomationSession::DidTakeScreenshot(callbackID, handle, String()), 0);
         return;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to