Bug 59082

Summary: [GTK] DRT: implement eventSender.scalePageBy
Product: WebKit Reporter: Philippe Normand <pnormand>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, eric, mrobinson, rniwa, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
proposed patch
mrobinson: review+
updated patch
none
updated patch mrobinson: review+

Description Philippe Normand 2011-04-21 01:05:14 PDT
Needed for these tests:

fast/dom/Element/scale-page-bounding-client-rect.html
fast/dom/Element/scale-page-client-rects.html
fast/dom/Range/scale-page-bounding-client-rect.html
fast/dom/Range/scale-page-client-rects.html
fast/repaint/scale-page-shrink.html
fast/transforms/selection-bounds-in-transformed-view.html
Comment 1 Philippe Normand 2011-04-21 02:24:04 PDT
Created attachment 90504 [details]
proposed patch
Comment 2 Martin Robinson 2011-04-21 08:59:57 PDT
Comment on attachment 90504 [details]
proposed patch

View in context: https://bugs.webkit.org/attachment.cgi?id=90504&action=review

Awesome! Thanks for implementing this.

> Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp:787
> +void DumpRenderTreeSupportGtk::scale(WebKitWebView* webView, float scaleFactor, float x, float y)

Please name this method scalePageBy to match the name of the callback in DRT. This will make it more obvious why this is needed above the scaling options we already have in our API.
Comment 3 Philippe Normand 2011-04-21 09:25:06 PDT
Committed r84507: <http://trac.webkit.org/changeset/84507>
Comment 4 WebKit Review Bot 2011-04-21 10:46:12 PDT
http://trac.webkit.org/changeset/84507 might have broken GTK Linux 32-bit Release
Comment 5 Martin Robinson 2011-04-21 12:36:27 PDT
Committed r84540: <http://trac.webkit.org/changeset/84540>
Comment 6 Philippe Normand 2011-04-22 05:28:22 PDT
Created attachment 90694 [details]
updated patch
Comment 7 Philippe Normand 2011-04-22 05:29:54 PDT
Sorry for the trouble :(
The first patch didn't reset the view scale to 1 in DRT's resetDefaultsToConsistentValues... hence the massive breakage.
Comment 8 Philippe Normand 2011-04-22 05:35:34 PDT
Created attachment 90695 [details]
updated patch

Renamed scale to scalePageBy
Comment 9 Martin Robinson 2011-04-22 06:52:11 PDT
Comment on attachment 90695 [details]
updated patch

View in context: https://bugs.webkit.org/attachment.cgi?id=90695&action=review

Thanks for the fix!

> Tools/DumpRenderTree/gtk/DumpRenderTree.cpp:443
> +    DumpRenderTreeSupportGtk::scalePageBy(webView, 1.0f, 0.0f, 0.0f);

The WebKit style guidelines say these numbers should just be 1, 0,  and 0 respectively (no .0f). Please fix before landing!
Comment 10 Eric Seidel (no email) 2011-04-22 09:13:12 PDT
(In reply to comment #9)
> (From update of attachment 90695 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=90695&action=review
> 
> Thanks for the fix!
> 
> > Tools/DumpRenderTree/gtk/DumpRenderTree.cpp:443
> > +    DumpRenderTreeSupportGtk::scalePageBy(webView, 1.0f, 0.0f, 0.0f);
> 
> The WebKit style guidelines say these numbers should just be 1, 0,  and 0 respectively (no .0f). Please fix before landing!

Seems we need a bug against check-webkit-style.
Comment 11 Eric Seidel (no email) 2011-04-22 09:14:46 PDT
file bug 59203 about check-webkit-style.
Comment 12 Philippe Normand 2011-04-22 09:47:39 PDT
Committed r84637: <http://trac.webkit.org/changeset/84637>
Comment 13 Martin Robinson 2011-06-15 09:08:08 PDT
*** Bug 61396 has been marked as a duplicate of this bug. ***