Title: [221364] releases/WebKitGTK/webkit-2.18/Source/WebKit
Revision
221364
Author
carlo...@webkit.org
Date
2017-08-30 03:15:26 -0700 (Wed, 30 Aug 2017)

Log Message

Merge r221246 - 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: releases/WebKitGTK/webkit-2.18/Source/WebKit/ChangeLog (221363 => 221364)


--- releases/WebKitGTK/webkit-2.18/Source/WebKit/ChangeLog	2017-08-30 10:14:47 UTC (rev 221363)
+++ releases/WebKitGTK/webkit-2.18/Source/WebKit/ChangeLog	2017-08-30 10:15:26 UTC (rev 221364)
@@ -1,5 +1,21 @@
 2017-08-28  Carlos Garcia Campos  <cgar...@igalia.com>
 
+        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  <cgar...@igalia.com>
+
         [GTK][WPE] ASSERTION FAILED: !isOpen() in WebKit::IconDatabase::~IconDatabase()
         https://bugs.webkit.org/show_bug.cgi?id=175719
 

Modified: releases/WebKitGTK/webkit-2.18/Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.cpp (221363 => 221364)


--- releases/WebKitGTK/webkit-2.18/Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.cpp	2017-08-30 10:14:47 UTC (rev 221363)
+++ releases/WebKitGTK/webkit-2.18/Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.cpp	2017-08-30 10:15:26 UTC (rev 221364)
@@ -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
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to