Changeset 142585 in webkit


Ignore:
Timestamp:
Feb 11, 2013 11:19:05 PM (11 years ago)
Author:
jochen@chromium.org
Message:

[chromium] move printPage() implementation to testRunner library
https://bugs.webkit.org/show_bug.cgi?id=109436

Reviewed by Adam Barth.

  • DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h:

(WebTestRunner::WebTestProxy::showContextMenu):
(WebTestRunner::WebTestProxy::printPage):

  • DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp:

(WebTestRunner):
(WebTestRunner::WebTestProxyBase::printPage):

  • DumpRenderTree/chromium/WebViewHost.cpp:
  • DumpRenderTree/chromium/WebViewHost.h:
Location:
trunk/Tools
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r142582 r142585  
     12013-02-11  Jochen Eisinger  <jochen@chromium.org>
     2
     3        [chromium] move printPage() implementation to testRunner library
     4        https://bugs.webkit.org/show_bug.cgi?id=109436
     5
     6        Reviewed by Adam Barth.
     7
     8        * DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h:
     9        (WebTestRunner::WebTestProxy::showContextMenu):
     10        (WebTestRunner::WebTestProxy::printPage):
     11        * DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp:
     12        (WebTestRunner):
     13        (WebTestRunner::WebTestProxyBase::printPage):
     14        * DumpRenderTree/chromium/WebViewHost.cpp:
     15        * DumpRenderTree/chromium/WebViewHost.h:
     16
    1172013-02-11  James Robinson  <jamesr@chromium.org>
    218
  • trunk/Tools/DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h

    r142549 r142585  
    126126    bool isSelectTrailingWhitespaceEnabled();
    127127    void showContextMenu(WebKit::WebFrame*, const WebKit::WebContextMenuData&);
     128    void printPage(WebKit::WebFrame*);
    128129
    129130    void willPerformClientRedirect(WebKit::WebFrame*, const WebKit::WebURL& from, const WebKit::WebURL& to, double interval, double fire_time);
     
    318319        return WebTestProxyBase::isSelectTrailingWhitespaceEnabled();
    319320    }
    320     void showContextMenu(WebKit::WebFrame* frame, const WebKit::WebContextMenuData& contextMenuData)
     321    virtual void showContextMenu(WebKit::WebFrame* frame, const WebKit::WebContextMenuData& contextMenuData)
    321322    {
    322323        WebTestProxyBase::showContextMenu(frame, contextMenuData);
    323324        Base::showContextMenu(frame, contextMenuData);
     325    }
     326    virtual void printPage(WebKit::WebFrame* frame)
     327    {
     328        WebTestProxyBase::printPage(frame);
    324329    }
    325330
  • trunk/Tools/DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp

    r142549 r142585  
    4848#include "WebNode.h"
    4949#include "WebPluginParams.h"
     50#include "WebPrintParams.h"
    5051#include "WebRange.h"
    5152#include "WebTestDelegate.h"
     
    593594{
    594595    m_testInterfaces->eventSender()->setContextMenuData(contextMenuData);
     596}
     597
     598// Simulate a print by going into print mode and then exit straight away.
     599void WebTestProxyBase::printPage(WebFrame* frame)
     600{
     601    WebSize pageSizeInPixels = m_testInterfaces->webView()->size();
     602    WebPrintParams printParams(pageSizeInPixels);
     603    frame->printBegin(printParams);
     604    frame->printEnd();
    595605}
    596606
  • trunk/Tools/DumpRenderTree/chromium/WebViewHost.cpp

    r142549 r142585  
    13201320    canvas()->drawARGB(167, 0, 0, 0);
    13211321}
    1322 
    1323 // Simulate a print by going into print mode and then exit straight away.
    1324 void WebViewHost::printPage(WebKit::WebFrame* frame)
    1325 {
    1326     WebSize pageSizeInPixels = webWidget()->size();
    1327     WebPrintParams printParams(pageSizeInPixels);
    1328     frame->printBegin(printParams);
    1329     frame->printEnd();
    1330 }
  • trunk/Tools/DumpRenderTree/chromium/WebViewHost.h

    r142549 r142585  
    220220    virtual WebKit::WebUserMediaClient* userMediaClient();
    221221#endif
    222     virtual void printPage(WebKit::WebFrame*);
    223222
    224223    // WebKit::WebWidgetClient
Note: See TracChangeset for help on using the changeset viewer.