Title: [96414] trunk/Tools
Revision
96414
Author
commit-qu...@webkit.org
Date
2011-09-30 12:34:33 -0700 (Fri, 30 Sep 2011)

Log Message

[EFL] Only save the current viewport in PixelDumpSupportEfl.
https://bugs.webkit.org/show_bug.cgi?id=68450

Patch by Raphael Kubo da Costa <k...@profusion.mobi> on 2011-09-30
Reviewed by Antonio Gomes.

The previous implementation saved the whole page contents in the final
PNG, however the baselines and expectations in the tree only want the
current viewport (with a scrollbar, if needed), so we now only save the
currently visible contents.

* DumpRenderTree/efl/PixelDumpSupportEfl.cpp:
(createBitmapContextFromWebView): Use
ewk_frame_visible_content_geometry_get instead of
ewk_frame_contents_size_get.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (96413 => 96414)


--- trunk/Tools/ChangeLog	2011-09-30 19:11:39 UTC (rev 96413)
+++ trunk/Tools/ChangeLog	2011-09-30 19:34:33 UTC (rev 96414)
@@ -1,5 +1,22 @@
 2011-09-30  Raphael Kubo da Costa  <k...@profusion.mobi>
 
+        [EFL] Only save the current viewport in PixelDumpSupportEfl.
+        https://bugs.webkit.org/show_bug.cgi?id=68450
+
+        Reviewed by Antonio Gomes.
+
+        The previous implementation saved the whole page contents in the final
+        PNG, however the baselines and expectations in the tree only want the
+        current viewport (with a scrollbar, if needed), so we now only save the
+        currently visible contents.
+
+        * DumpRenderTree/efl/PixelDumpSupportEfl.cpp:
+        (createBitmapContextFromWebView): Use
+        ewk_frame_visible_content_geometry_get instead of
+        ewk_frame_contents_size_get.
+
+2011-09-30  Raphael Kubo da Costa  <k...@profusion.mobi>
+
         [EFL] Support and keep track of extra windows (views).
         https://bugs.webkit.org/show_bug.cgi?id=68454
 

Modified: trunk/Tools/DumpRenderTree/efl/PixelDumpSupportEfl.cpp (96413 => 96414)


--- trunk/Tools/DumpRenderTree/efl/PixelDumpSupportEfl.cpp	2011-09-30 19:11:39 UTC (rev 96413)
+++ trunk/Tools/DumpRenderTree/efl/PixelDumpSupportEfl.cpp	2011-09-30 19:34:33 UTC (rev 96414)
@@ -41,15 +41,15 @@
     Ewk_View_Smart_Data* smartData = static_cast<Ewk_View_Smart_Data*>(evas_object_smart_data_get(browser));
     Ewk_View_Private_Data* privateData = static_cast<Ewk_View_Private_Data*>(smartData->_priv);
 
-    int width, height;
-    if (!ewk_frame_contents_size_get(mainFrame, &width, &height))
+    int x, y, width, height;
+    if (!ewk_frame_visible_content_geometry_get(mainFrame, EINA_TRUE, &x, &y, &width, &height))
         return 0;
 
     RefPtr<cairo_surface_t> surface = adoptRef(cairo_image_surface_create(CAIRO_FORMAT_ARGB32, width, height));
     RefPtr<cairo_t> context = adoptRef(cairo_create(surface.get()));
 
-    const Eina_Rectangle rect = { 0, 0, width, height };
-    if (!ewk_view_paint_contents(privateData, context.get(), &rect))
+    const Eina_Rectangle rect = { x, y, width, height };
+    if (!ewk_view_paint(privateData, context.get(), &rect))
         return 0;
 
     if (drawSelectionRect) {
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to