Changeset 83139 in webkit


Ignore:
Timestamp:
Apr 6, 2011 8:59:58 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2011-04-06 Chang Shu <cshu@webkit.org>

Reviewed by Darin Adler.

WebKitTestRunner needs layoutTestController.pageSizeAndMarginsInPixels
https://bugs.webkit.org/show_bug.cgi?id=57984

Unskip passed tests.

  • platform/mac-wk2/Skipped:

2011-04-06 Chang Shu <cshu@webkit.org>

Reviewed by Darin Adler.

WebKitTestRunner needs layoutTestController.pageSizeAndMarginsInPixels
https://bugs.webkit.org/show_bug.cgi?id=57984

  • WebProcess/InjectedBundle/API/c/WKBundle.cpp: (WKBundlePageSizeAndMarginsInPixels):
  • WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
  • WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::pageSizeAndMarginsInPixels):
  • WebProcess/InjectedBundle/InjectedBundle.h:

2011-04-06 Chang Shu <cshu@webkit.org>

Reviewed by Darin Adler.

WebKitTestRunner needs layoutTestController.pageSizeAndMarginsInPixels
https://bugs.webkit.org/show_bug.cgi?id=57984

  • WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl:
  • WebKitTestRunner/InjectedBundle/LayoutTestController.cpp: (WTR::LayoutTestController::pageSizeAndMarginsInPixels):
  • WebKitTestRunner/InjectedBundle/LayoutTestController.h:
Location:
trunk
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r83137 r83139  
     12011-04-06  Chang Shu  <cshu@webkit.org>
     2
     3        Reviewed by Darin Adler.
     4
     5        WebKitTestRunner needs layoutTestController.pageSizeAndMarginsInPixels
     6        https://bugs.webkit.org/show_bug.cgi?id=57984
     7
     8        Unskip passed tests.
     9
     10        * platform/mac-wk2/Skipped:
     11
    1122011-04-06  Benjamin Poulain  <benjamin.poulain@nokia.com>
    213
  • trunk/LayoutTests/platform/mac-wk2/Skipped

    r83071 r83139  
    16551655fast/spatial-navigation
    16561656
    1657 # WebKitTestRunner needs layoutTestController.pageSizeAndMarginsInPixels
    1658 printing/page-format-data-display-none.html
    1659 
    16601657# WebKitTestRunner needs layoutTestController.dumpUserGestureInFrameLoadCallbacks
    16611658fast/frames/location-redirect-user-gesture.html
  • trunk/Source/WebKit2/ChangeLog

    r83116 r83139  
     12011-04-06  Chang Shu  <cshu@webkit.org>
     2
     3        Reviewed by Darin Adler.
     4
     5        WebKitTestRunner needs layoutTestController.pageSizeAndMarginsInPixels
     6        https://bugs.webkit.org/show_bug.cgi?id=57984
     7
     8        * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
     9        (WKBundlePageSizeAndMarginsInPixels):
     10        * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
     11        * WebProcess/InjectedBundle/InjectedBundle.cpp:
     12        (WebKit::InjectedBundle::pageSizeAndMarginsInPixels):
     13        * WebProcess/InjectedBundle/InjectedBundle.h:
     14
    1152011-04-06  Siddharth Mathur  <siddharth.mathur@nokia.com>
    216
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp

    r83071 r83139  
    163163    return toImpl(bundleRef)->pageNumberForElementById(toImpl(frameRef), toImpl(idRef)->string(), pageWidthInPixels, pageHeightInPixels);
    164164}
     165
     166WKStringRef WKBundlePageSizeAndMarginsInPixels(WKBundleRef bundleRef, WKBundleFrameRef frameRef, int pageIndex, int width, int height, int marginTop, int marginRight, int marginBottom, int marginLeft)
     167{
     168    return toCopiedAPI(toImpl(bundleRef)->pageSizeAndMarginsInPixels(toImpl(frameRef), pageIndex, width, height, marginTop, marginRight, marginBottom, marginLeft));
     169}
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h

    r83071 r83139  
    7272WK_EXPORT int WKBundleNumberOfPages(WKBundleRef bundle, WKBundleFrameRef frameRef, double pageWidthInPixels, double pageHeightInPixels);
    7373WK_EXPORT int WKBundlePageNumberForElementById(WKBundleRef bundle, WKBundleFrameRef frameRef, WKStringRef idRef, double pageWidthInPixels, double pageHeightInPixels);
     74WK_EXPORT WKStringRef WKBundlePageSizeAndMarginsInPixels(WKBundleRef bundle, WKBundleFrameRef frameRef, int, int, int, int, int, int, int);
    7475
    7576#ifdef __cplusplus
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp

    r83071 r83139  
    177177}
    178178
     179String InjectedBundle::pageSizeAndMarginsInPixels(WebFrame* frame, int pageIndex, int width, int height, int marginTop, int marginRight, int marginBottom, int marginLeft)
     180{
     181    Frame* coreFrame = frame ? frame->coreFrame() : 0;
     182    if (!coreFrame)
     183        return String();
     184
     185    return PrintContext::pageSizeAndMarginsInPixels(coreFrame, pageIndex, width, height, marginTop, marginRight, marginBottom, marginLeft);
     186}
     187
    179188static PassOwnPtr<Vector<String> > toStringVector(ImmutableArray* patterns)
    180189{
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h

    r83071 r83139  
    9696    int numberOfPages(WebFrame*, double, double);
    9797    int pageNumberForElementById(WebFrame*, const String&, double, double);
     98    String pageSizeAndMarginsInPixels(WebFrame*, int, int, int, int, int, int, int);
    9899
    99100    // UserContent API
  • trunk/Tools/ChangeLog

    r83138 r83139  
     12011-04-06  Chang Shu  <cshu@webkit.org>
     2
     3        Reviewed by Darin Adler.
     4
     5        WebKitTestRunner needs layoutTestController.pageSizeAndMarginsInPixels
     6        https://bugs.webkit.org/show_bug.cgi?id=57984
     7
     8        * WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl:
     9        * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
     10        (WTR::LayoutTestController::pageSizeAndMarginsInPixels):
     11        * WebKitTestRunner/InjectedBundle/LayoutTestController.h:
     12
    1132011-04-06  Chris Rogers  <crogers@google.com>
    214
  • trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl

    r83071 r83139  
    6868        int numberOfPages(in double pageWidthInPixels, in double pageHeightInPixels);
    6969        int pageNumberForElementById(in DOMString id, in double pageWidthInPixels, in double pageHeightInPixels);
     70        DOMString pageSizeAndMarginsInPixels(in int pageIndex, in int width, in int height, in int marginTop, in int marginRight, in int marginBottom, in int marginLeft);
    7071
    7172        // Animation testing.
  • trunk/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp

    r83071 r83139  
    338338}
    339339
     340JSRetainPtr<JSStringRef> LayoutTestController::pageSizeAndMarginsInPixels(int pageIndex, int width, int height, int marginTop, int marginRight, int marginBottom, int marginLeft)
     341{
     342    WKBundleFrameRef mainFrame = WKBundlePageGetMainFrame(InjectedBundle::shared().page()->page());
     343    return toJS(WKBundlePageSizeAndMarginsInPixels(InjectedBundle::shared().bundle(), mainFrame, pageIndex, width, height, marginTop, marginRight, marginBottom, marginLeft));
     344}
     345
    340346unsigned LayoutTestController::windowCount()
    341347{
  • trunk/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.h

    r83071 r83139  
    116116    int numberOfPages(double pageWidthInPixels, double pageHeightInPixels);
    117117    int pageNumberForElementById(JSStringRef, double pageWidthInPixels, double pageHeightInPixels);
     118    JSRetainPtr<JSStringRef> pageSizeAndMarginsInPixels(int pageIndex, int width, int height, int marginTop, int marginRight, int marginBottom, int marginLeft);
    118119
    119120    enum WhatToDump { RenderTree, MainFrameText, AllFramesText };
Note: See TracChangeset for help on using the changeset viewer.