Title: [145341] trunk/Source/WebKit2
Revision
145341
Author
timothy_hor...@apple.com
Date
2013-03-10 23:29:59 -0700 (Sun, 10 Mar 2013)

Log Message

WebPage::scaledSnapshotWithOptions returns a corrupt snapshot if you request a rect larger than the FrameView’s size
https://bugs.webkit.org/show_bug.cgi?id=111820
<rdar://problem/13375785>

Reviewed by Simon Fraser.

We have to clear the image - there could be area that won’t be painted by the FrameView,
or the FrameView could have a transparent background.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::scaledSnapshotWithOptions):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (145340 => 145341)


--- trunk/Source/WebKit2/ChangeLog	2013-03-11 06:13:05 UTC (rev 145340)
+++ trunk/Source/WebKit2/ChangeLog	2013-03-11 06:29:59 UTC (rev 145341)
@@ -1,5 +1,19 @@
 2013-03-10  Tim Horton  <timothy_hor...@apple.com>
 
+        WebPage::scaledSnapshotWithOptions returns a corrupt snapshot if you request a rect larger than the FrameView’s size
+        https://bugs.webkit.org/show_bug.cgi?id=111820
+        <rdar://problem/13375785>
+
+        Reviewed by Simon Fraser.
+
+        We have to clear the image - there could be area that won’t be painted by the FrameView,
+        or the FrameView could have a transparent background.
+
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::scaledSnapshotWithOptions):
+
+2013-03-10  Tim Horton  <timothy_hor...@apple.com>
+
         Fix a typo in http://trac.webkit.org/changeset/145332.
 
         Unreviewed.

Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (145340 => 145341)


--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2013-03-11 06:13:05 UTC (rev 145340)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2013-03-11 06:29:59 UTC (rev 145341)
@@ -1414,6 +1414,9 @@
         return 0;
 
     OwnPtr<WebCore::GraphicsContext> graphicsContext = snapshot->bitmap()->createGraphicsContext();
+
+    graphicsContext->clearRect(IntRect(IntPoint(), bitmapSize));
+
     graphicsContext->applyDeviceScaleFactor(combinedScaleFactor);
     graphicsContext->translate(-rect.x(), -rect.y());
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to