Changeset 83010 in webkit


Ignore:
Timestamp:
Apr 5, 2011 8:05:04 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

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

Reviewed by Darin Adler.

WebKitTestRunner needs layoutTestController.numberOfPages
https://bugs.webkit.org/show_bug.cgi?id=42694

Unskip passed tests.

  • platform/mac-wk2/Skipped:
  • platform/qt-wk2/Skipped:

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

Reviewed by Darin Adler.

WebKitTestRunner needs layoutTestController.numberOfPages
https://bugs.webkit.org/show_bug.cgi?id=42694

  • WebProcess/InjectedBundle/API/c/WKBundle.cpp: (WKBundleNumberOfPages):
  • WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
  • WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::numberOfPages):
  • WebProcess/InjectedBundle/InjectedBundle.h:

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

Reviewed by Darin Adler.

WebKitTestRunner needs layoutTestController.numberOfPages
https://bugs.webkit.org/show_bug.cgi?id=42694

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

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r83003 r83010  
     12011-04-05  Chang Shu  <cshu@webkit.org>
     2
     3        Reviewed by Darin Adler.
     4
     5        WebKitTestRunner needs layoutTestController.numberOfPages
     6        https://bugs.webkit.org/show_bug.cgi?id=42694
     7
     8        Unskip passed tests.
     9
     10        * platform/mac-wk2/Skipped:
     11        * platform/qt-wk2/Skipped:
     12
    1132011-04-05  Adrienne Walker  <enne@google.com>
    214
  • trunk/LayoutTests/platform/mac-wk2/Skipped

    r82848 r83010  
    14481448printing/simultaneous-position-float-change.html
    14491449
    1450 # WebKitTestRunner needs layoutTestController.numberOfPages
    1451 # <https://bugs.webkit.org/show_bug.cgi?id=42694>
    1452 printing/numberOfPages.html
    1453 printing/stretch-to-view-height.html
    1454 
    14551450# WebKitTestRunner needs layoutTestController.isPageBoxVisible
    14561451# <https://bugs.webkit.org/show_bug.cgi?id=42695>
  • trunk/LayoutTests/platform/qt-wk2/Skipped

    r82937 r83010  
    18351835printing/setPrinting.html
    18361836
    1837 # WebKitTestRunner needs layoutTestController.numberOfPages
    1838 # <https://bugs.webkit.org/show_bug.cgi?id=42694>
    1839 printing/numberOfPages.html
    1840 printing/stretch-to-view-height.html
    1841 
    18421837# WebKitTestRunner needs layoutTestController.isPageBoxVisible
    18431838# <https://bugs.webkit.org/show_bug.cgi?id=42695>
  • trunk/Source/WebKit2/ChangeLog

    r83004 r83010  
     12011-04-05  Chang Shu  <cshu@webkit.org>
     2
     3        Reviewed by Darin Adler.
     4
     5        WebKitTestRunner needs layoutTestController.numberOfPages
     6        https://bugs.webkit.org/show_bug.cgi?id=42694
     7
     8        * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
     9        (WKBundleNumberOfPages):
     10        * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
     11        * WebProcess/InjectedBundle/InjectedBundle.cpp:
     12        (WebKit::InjectedBundle::numberOfPages):
     13        * WebProcess/InjectedBundle/InjectedBundle.h:
     14
    1152011-04-05  Darin Adler  <darin@apple.com>
    216
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp

    r82848 r83010  
    153153    toImpl(bundleRef)->setDatabaseQuota(quota);
    154154}
     155
     156int WKBundleNumberOfPages(WKBundleRef bundleRef, WKBundleFrameRef frameRef, double pageWidthInPixels, double pageHeightInPixels)
     157{
     158    return toImpl(bundleRef)->numberOfPages(toImpl(frameRef), pageWidthInPixels, pageHeightInPixels);
     159}
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h

    r82848 r83010  
    7070WK_EXPORT void WKBundleClearAllDatabases(WKBundleRef bundle);
    7171WK_EXPORT void WKBundleSetDatabaseQuota(WKBundleRef bundle, uint64_t);
     72WK_EXPORT int WKBundleNumberOfPages(WKBundleRef bundle, WKBundleFrameRef frameRef, double pageWidthInPixels, double pageHeightInPixels);
    7273
    7374#ifdef __cplusplus
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp

    r82848 r83010  
    3737#include "WebCoreArgumentCoders.h"
    3838#include "WebDatabaseManager.h"
     39#include "WebFrame.h"
    3940#include "WebPage.h"
    4041#include "WebPreferencesStore.h"
     
    4243#include <JavaScriptCore/APICast.h>
    4344#include <JavaScriptCore/JSLock.h>
     45#include <WebCore/Frame.h>
     46#include <WebCore/FrameView.h>
    4447#include <WebCore/GCController.h>
    4548#include <WebCore/JSDOMWindow.h>
    4649#include <WebCore/Page.h>
    4750#include <WebCore/PageGroup.h>
     51#include <WebCore/PrintContext.h>
    4852#include <WebCore/Settings.h>
    4953#include <wtf/OwnArrayPtr.h>
     
    140144{
    141145    WebDatabaseManager::shared().setQuotaForOrigin("file:///", quota);
     146}
     147
     148int InjectedBundle::numberOfPages(WebFrame* frame, double pageWidthInPixels, double pageHeightInPixels)
     149{
     150    Frame* coreFrame = frame ? frame->coreFrame() : 0;
     151    if (!coreFrame)
     152        return -1;
     153    if (!pageWidthInPixels)
     154        pageWidthInPixels = coreFrame->view()->width();
     155    if (!pageHeightInPixels)
     156        pageHeightInPixels = coreFrame->view()->height();
     157
     158    return PrintContext::numberOfPages(coreFrame, FloatSize(pageWidthInPixels, pageHeightInPixels));
    142159}
    143160
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h

    r82848 r83010  
    6161class InjectedBundleScriptWorld;
    6262class WebCertificateInfo;
     63class WebFrame;
    6364class WebPage;
    6465class WebPageGroupProxy;
     
    9394    void overrideAllowUniversalAccessFromFileURLsForTestRunner(WebPageGroupProxy*, bool);
    9495    void setAllowFileAccessFromFileURLs(WebPageGroupProxy*, bool);
     96    int numberOfPages(WebFrame*, double, double);
    9597
    9698    // UserContent API
  • trunk/Tools/ChangeLog

    r83009 r83010  
     12011-04-05  Chang Shu  <cshu@webkit.org>
     2
     3        Reviewed by Darin Adler.
     4
     5        WebKitTestRunner needs layoutTestController.numberOfPages
     6        https://bugs.webkit.org/show_bug.cgi?id=42694
     7
     8        * WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl:
     9        * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
     10        (WTR::LayoutTestController::numberOfPages):
     11        * WebKitTestRunner/InjectedBundle/LayoutTestController.h:
     12
    1132011-04-05  Tony Chang  <tony@chromium.org>
    214
  • trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl

    r82848 r83010  
    6565        void display();
    6666
     67        // Printing
     68        int numberOfPages(in double pageWidthInPixels, in double pageHeightInPixels);
     69
    6770        // Animation testing.
    6871        int numberOfActiveAnimations();
  • trunk/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp

    r82848 r83010  
    3030#include "InjectedBundlePage.h"
    3131#include "JSLayoutTestController.h"
     32#include "PlatformWebView.h"
    3233#include "StringFunctions.h"
     34#include "TestController.h"
    3335#include <WebKit2/WKBundleBackForwardList.h>
    3436#include <WebKit2/WKBundleFrame.h>
     
    324326}
    325327
     328int LayoutTestController::numberOfPages(double pageWidthInPixels, double pageHeightInPixels)
     329{
     330    WKBundleFrameRef mainFrame = WKBundlePageGetMainFrame(InjectedBundle::shared().page()->page());
     331    return WKBundleNumberOfPages(InjectedBundle::shared().bundle(), mainFrame, pageWidthInPixels, pageHeightInPixels);
     332}
     333
    326334unsigned LayoutTestController::windowCount()
    327335{
  • trunk/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.h

    r82848 r83010  
    113113    void setDatabaseQuota(uint64_t);
    114114
     115    // Printing
     116    int numberOfPages(double pageWidthInPixels, double pageHeightInPixels);
     117
    115118    enum WhatToDump { RenderTree, MainFrameText, AllFramesText };
    116119    WhatToDump whatToDump() const { return m_whatToDump; }
Note: See TracChangeset for help on using the changeset viewer.