Changeset 84507 in webkit


Ignore:
Timestamp:
Apr 21, 2011 9:24:21 AM (13 years ago)
Author:
Philippe Normand
Message:

2011-04-21 Philippe Normand <pnormand@igalia.com>

Reviewed by Martin Robinson.

[GTK] DRT: implement eventSender.scalePageBy
https://bugs.webkit.org/show_bug.cgi?id=59082

Unskipped tests that should pass now that
eventSender.scalePageBy() is supported in GTK.

  • platform/gtk/Skipped:
  • platform/gtk/fast/repaint/scale-page-shrink-expected.checksum: Added.
  • platform/gtk/fast/repaint/scale-page-shrink-expected.png: Added.
  • platform/gtk/fast/repaint/scale-page-shrink-expected.txt: Added.
  • WebCoreSupport/DumpRenderTreeSupportGtk.cpp: (DumpRenderTreeSupportGtk::scalePageBy):
  • WebCoreSupport/DumpRenderTreeSupportGtk.h:
  • DumpRenderTree/gtk/EventSender.cpp: (scalePageByCallback): scalePageBy() support.
Location:
trunk
Files:
3 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r84506 r84507  
     12011-04-21  Philippe Normand  <pnormand@igalia.com>
     2
     3        Reviewed by Martin Robinson.
     4
     5        [GTK] DRT: implement eventSender.scalePageBy
     6        https://bugs.webkit.org/show_bug.cgi?id=59082
     7
     8        Unskipped tests that should pass now that
     9        eventSender.scalePageBy() is supported in GTK.
     10
     11        * platform/gtk/Skipped:
     12        * platform/gtk/fast/repaint/scale-page-shrink-expected.checksum: Added.
     13        * platform/gtk/fast/repaint/scale-page-shrink-expected.png: Added.
     14        * platform/gtk/fast/repaint/scale-page-shrink-expected.txt: Added.
     15
    1162011-04-21  Adam Barth  <abarth@webkit.org>
    217
  • trunk/LayoutTests/platform/gtk/Skipped

    r84477 r84507  
    266266transforms/3d
    267267compositing
     268fast/transforms/selection-bounds-in-transformed-view.html
    268269
    269270# These tests require touch support
     
    13751376fast/text/justify-ideograph-leading-expansion.html
    13761377
    1377 # scalePage is currently Mac-specific WebKit API.
    1378 # https://bugs.webkit.org/show_bug.cgi?id=59082
    1379 fast/dom/Element/scale-page-bounding-client-rect.html
    1380 fast/dom/Element/scale-page-client-rects.html
    1381 fast/dom/Range/scale-page-bounding-client-rect.html
    1382 fast/dom/Range/scale-page-client-rects.html
    1383 fast/repaint/scale-page-shrink.html
    1384 fast/transforms/selection-bounds-in-transformed-view.html
    1385 
    13861378# https://bugs.webkit.org/show_bug.cgi?id=58020
    13871379fast/forms/input-number-large-padding.html
  • trunk/Source/WebKit/gtk/ChangeLog

    r84472 r84507  
     12011-04-21  Philippe Normand  <pnormand@igalia.com>
     2
     3        Reviewed by Martin Robinson.
     4
     5        [GTK] DRT: implement eventSender.scalePageBy
     6        https://bugs.webkit.org/show_bug.cgi?id=59082
     7
     8        Added support in DRT for webview scaling.
     9
     10        * WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
     11        (DumpRenderTreeSupportGtk::scalePageBy):
     12        * WebCoreSupport/DumpRenderTreeSupportGtk.h:
     13
    1142011-04-20  Dominic Cooney  <dominicc@chromium.org>
    215
  • trunk/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp

    r84472 r84507  
    784784    rectangle->height = bounds.height();
    785785}
     786
     787void DumpRenderTreeSupportGtk::scalePageBy(WebKitWebView* webView, float scaleFactor, float x, float y)
     788{
     789    Frame* coreFrame = core(webView)->mainFrame();
     790    if (!coreFrame)
     791        return;
     792
     793    coreFrame->scalePage(scaleFactor, IntPoint(x, y));
     794}
  • trunk/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h

    r84472 r84507  
    103103    static void setMinimumTimerInterval(WebKitWebView*, double);
    104104    static void rectangleForSelection(WebKitWebFrame*, GdkRectangle*);
     105    static void scalePageBy(WebKitWebView*, float, float, float);
    105106
    106107    // Accessibility
  • trunk/Tools/ChangeLog

    r84472 r84507  
     12011-04-21  Philippe Normand  <pnormand@igalia.com>
     2
     3        Reviewed by Martin Robinson.
     4
     5        [GTK] DRT: implement eventSender.scalePageBy
     6        https://bugs.webkit.org/show_bug.cgi?id=59082
     7
     8        * DumpRenderTree/gtk/EventSender.cpp:
     9        (scalePageByCallback): scalePageBy() support.
     10
    1112011-04-20  Dominic Cooney  <dominicc@chromium.org>
    212
  • trunk/Tools/DumpRenderTree/gtk/EventSender.cpp

    r80243 r84507  
    788788}
    789789
     790static JSValueRef scalePageByCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
     791{
     792    if (argumentCount < 3)
     793        return JSValueMakeUndefined(context);
     794
     795    float scaleFactor = JSValueToNumber(context, arguments[0], exception);
     796    float x = JSValueToNumber(context, arguments[1], exception);
     797    float y = JSValueToNumber(context, arguments[2], exception);
     798
     799    WebKitWebView* view = webkit_web_frame_get_web_view(mainFrame);
     800    if (!view)
     801        return JSValueMakeUndefined(context);
     802
     803    DumpRenderTreeSupportGtk::scalePageBy(view, scaleFactor, x, y);
     804
     805    return JSValueMakeUndefined(context);
     806}
     807
    790808static JSStaticFunction staticFunctions[] = {
    791809    { "mouseScrollBy", mouseScrollByCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
     
    803821    { "zoomPageOut", zoomPageOutCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
    804822    { "scheduleAsynchronousClick", scheduleAsynchronousClickCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
     823    { "scalePageBy", scalePageByCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
     824
    805825    { 0, 0, 0 }
    806826};
Note: See TracChangeset for help on using the changeset viewer.