Changeset 24330 in webkit


Ignore:
Timestamp:
Jul 16, 2007 3:01:23 PM (17 years ago)
Author:
aroben
Message:

Replace Frame::print with Chrome::print and remove -[WebFrameBridge print]

WebCore:

Replace Frame::print with Chrome::print

This also adds a Frame* parameter to Chrome::print and
ChromeClient::print so that it knows which Frame to print.

Reviewed by Darin.

All tests pass.

  • bindings/js/kjs_window.cpp: (KJS::WindowFunc::callAsFunction): Call Chrome::print.
  • editing/JSEditor.cpp: Ditto.
  • bridge/win/FrameWin.cpp: Removed Frame::print.
  • page/Frame.h: Ditto.
  • page/mac/FrameMac.mm: Ditto.
  • page/qt/FrameQt.cpp: Ditto.
  • platform/gdk/FrameGdk.cpp: Ditto.
  • page/mac/WebCoreFrameBridge.h: Removed -print.
  • page/Chrome.cpp: Added Frame* parameter to Chrome::print and pass it up to the ChromeClient.
  • page/Chrome.h: Ditto.
  • page/ChromeClient.h: Ditto.
  • platform/gdk/TemporaryLinkStubs.cpp: Ditto.
  • platform/graphics/svg/SVGImageEmptyClients.h: Ditto.

WebKit:

Move printing from WebFrameBridge to WebChromeClient

Reviewed by Darin.

  • WebCoreSupport/WebChromeClient.h: Updated for ChromeClient changes.
  • WebCoreSupport/WebChromeClient.mm: (WebChromeClient::print): Moved code from WebFrameBridge.
  • WebCoreSupport/WebFrameBridge.mm: Removed -print.

WebKit/win:

Updated WebChromeClient for ChromeClient changes.

Reviewed by Darin.

  • WebChromeClient.cpp: (WebChromeClient::print): Added a Frame* parameter.
  • WebChromeClient.h: Ditto.

WebKitQt:

Updated ChromeClientQt for ChromeClient changes.

Reviewed by Darin.

  • WebCoreSupport/ChromeClientQt.cpp: (WebCore::ChromeClientQt::print): Added a Frame* parameter.
  • WebCoreSupport/ChromeClientQt.h: Ditto.
Location:
trunk
Files:
24 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r24327 r24330  
     12007-07-16  Adam Roben  <aroben@apple.com>
     2
     3        Replace Frame::print with Chrome::print
     4
     5        This also adds a Frame* parameter to Chrome::print and
     6        ChromeClient::print so that it knows which Frame to print.
     7
     8        Reviewed by Darin.
     9
     10        All tests pass.
     11
     12        * bindings/js/kjs_window.cpp:
     13        (KJS::WindowFunc::callAsFunction): Call Chrome::print.
     14        * editing/JSEditor.cpp: Ditto.
     15
     16        * bridge/win/FrameWin.cpp: Removed Frame::print.
     17        * page/Frame.h: Ditto.
     18        * page/mac/FrameMac.mm: Ditto.
     19        * page/qt/FrameQt.cpp: Ditto.
     20        * platform/gdk/FrameGdk.cpp: Ditto.
     21        * page/mac/WebCoreFrameBridge.h: Removed -print.
     22
     23        * page/Chrome.cpp: Added Frame* parameter to Chrome::print and pass it
     24        up to the ChromeClient.
     25        * page/Chrome.h: Ditto.
     26        * page/ChromeClient.h: Ditto.
     27        * platform/gdk/TemporaryLinkStubs.cpp: Ditto.
     28        * platform/graphics/svg/SVGImageEmptyClients.h: Ditto.
     29
    1302007-07-16  Adele Peterson  <adele@apple.com>
    231
  • trunk/WebCore/bindings/js/kjs_window.cpp

    r24300 r24330  
    13711371  }
    13721372  case Window::Print:
    1373     frame->print();
     1373    if (Page* page = frame->page())
     1374        page->chrome()->print(frame);
    13741375    return jsUndefined();
    13751376  case Window::ScrollBy:
  • trunk/WebCore/bridge/win/FrameWin.cpp

    r24252 r24330  
    192192}
    193193
    194 void Frame::print()
    195 {
    196     if (d->m_page)
    197         d->m_page->chrome()->print();
    198 }
    199 
    200194} // namespace WebCore
  • trunk/WebCore/editing/JSEditor.cpp

    r21749 r24330  
    412412bool execPrint(Frame* frame, bool, const String&)
    413413{
    414     frame->print();
     414    if (Page* page = frame->page())
     415        page->chrome()->print(frame);
    415416    return true;
    416417}
  • trunk/WebCore/page/Chrome.cpp

    r24252 r24330  
    336336}
    337337
    338 void Chrome::print()
    339 {
    340     m_client->print();
     338void Chrome::print(Frame* frame)
     339{
     340    m_client->print(frame);
    341341}
    342342
  • trunk/WebCore/page/Chrome.h

    r24252 r24330  
    124124        void setToolTip(const HitTestResult&);
    125125
    126         void print();
     126        void print(Frame*);
    127127
    128128#if PLATFORM(MAC)
  • trunk/WebCore/page/ChromeClient.h

    r24252 r24330  
    102102        virtual void setToolTip(const String&) = 0;
    103103
    104         virtual void print() = 0;
     104        virtual void print(Frame*) = 0;
    105105};
    106106
  • trunk/WebCore/page/Frame.h

    r24222 r24330  
    246246    void focusWindow();
    247247    void unfocusWindow();
    248     void print();
    249248    bool shouldClose();
    250249    void scheduleClose();
  • trunk/WebCore/page/mac/FrameMac.mm

    r24085 r24330  
    492492}
    493493
    494 void Frame::print()
    495 {
    496     [d->m_bridge print];
    497 }
    498 
    499494void Frame::issuePasteCommand()
    500495{
  • trunk/WebCore/page/mac/WebCoreFrameBridge.h

    r24085 r24330  
    279279- (ObjectElementType)determineObjectFromMIMEType:(NSString*)MIMEType URL:(NSURL*)URL;
    280280
    281 - (void)print;
    282 
    283281- (jobject)getAppletInView:(NSView *)view;
    284282
  • trunk/WebCore/page/qt/FrameQt.cpp

    r23988 r24330  
    102102}
    103103
    104 void Frame::print()
    105 {
    106     notImplemented();
    107 }
    108 
    109104KJS::Bindings::Instance* Frame::createScriptInstanceForWidget(WebCore::Widget* widget)
    110105{
  • trunk/WebCore/platform/gdk/FrameGdk.cpp

    r24322 r24330  
    232232}
    233233
    234 void Frame::print()
    235 {
    236     notImplemented();
    237 }
    238 
    239234void Frame::issueTransposeCommand()
    240235{
  • trunk/WebCore/platform/gdk/TemporaryLinkStubs.cpp

    r24322 r24330  
    179179}
    180180
    181 void ChromeClientGdk::print()
     181void ChromeClientGdk::print(Frame*)
    182182{
    183183    notImplemented();
  • trunk/WebCore/platform/graphics/svg/SVGImageEmptyClients.h

    r24253 r24330  
    115115    virtual void setToolTip(const String&) { }
    116116
    117     virtual void print() { }
     117    virtual void print(Frame*) { }
    118118};
    119119
  • trunk/WebKit/ChangeLog

    r24328 r24330  
     12007-07-16  Adam Roben  <aroben@apple.com>
     2
     3        Move printing from WebFrameBridge to WebChromeClient
     4
     5        Reviewed by Darin.
     6
     7        * WebCoreSupport/WebChromeClient.h: Updated for ChromeClient changes.
     8        * WebCoreSupport/WebChromeClient.mm:
     9        (WebChromeClient::print): Moved code from WebFrameBridge.
     10        * WebCoreSupport/WebFrameBridge.mm: Removed -print.
     11
    1122007-07-16  Darin Adler  <darin@apple.com>
    213
  • trunk/WebKit/WebCoreSupport/WebChromeClient.h

    r24253 r24330  
    100100    virtual void setToolTip(const WebCore::String&);
    101101
    102     virtual void print();
     102    virtual void print(WebCore::Frame*);
    103103private:
    104104    WebView *m_webView;
  • trunk/WebKit/WebCoreSupport/WebChromeClient.mm

    r24253 r24330  
    384384}
    385385
    386 void WebChromeClient::print()
    387 {
    388     // FIXME: printing is still handled via WebFrameBridge
    389 }
     386void WebChromeClient::print(Frame* frame)
     387{
     388    WebFrameView* frameView = [kit(frame) frameView];
     389    id wd = [m_webView UIDelegate];
     390    if ([wd respondsToSelector:@selector(webView:printFrameView:)])
     391        [wd webView:m_webView printFrameView:frameView];
     392    else
     393        [[WebDefaultUIDelegate sharedUIDelegate] webView:m_webView printFrameView:frameView];
     394}
  • trunk/WebKit/WebCoreSupport/WebFrameBridge.mm

    r23559 r24330  
    631631}
    632632
    633 - (void)print
    634 {
    635     id wd = [[self webView] UIDelegate];   
    636     if ([wd respondsToSelector:@selector(webView:printFrameView:)])
    637         [wd webView:[self webView] printFrameView:[_frame frameView]];
    638     else
    639         [[WebDefaultUIDelegate sharedUIDelegate] webView:[self webView] printFrameView:[_frame frameView]];
    640 }
    641 
    642633- (jobject)getAppletInView:(NSView *)view
    643634{
  • trunk/WebKit/win/ChangeLog

    r24326 r24330  
     12007-07-16  Adam Roben  <aroben@apple.com>
     2
     3        Updated WebChromeClient for ChromeClient changes.
     4
     5        Reviewed by Darin.
     6
     7        * WebChromeClient.cpp:
     8        (WebChromeClient::print): Added a Frame* parameter.
     9        * WebChromeClient.h: Ditto.
     10
    1112007-07-16  Oliver Hunt  <oliver@apple.com>
    212
  • trunk/WebKit/win/WebChromeClient.cpp

    r24252 r24330  
    444444}
    445445
    446 void WebChromeClient::print()
     446void WebChromeClient::print(Frame*)
    447447{
    448448    COMPtr<IWebUIDelegate> uiDelegate;
  • trunk/WebKit/win/WebChromeClient.h

    r24252 r24330  
    9393    virtual void setToolTip(const WebCore::String&);
    9494
    95     virtual void print();
     95    virtual void print(WebCore::Frame*);
    9696
    9797private:
  • trunk/WebKitQt/ChangeLog

    r24253 r24330  
     12007-07-16  Adam Roben  <aroben@apple.com>
     2
     3        Updated ChromeClientQt for ChromeClient changes.
     4
     5        Reviewed by Darin.
     6
     7        * WebCoreSupport/ChromeClientQt.cpp:
     8        (WebCore::ChromeClientQt::print): Added a Frame* parameter.
     9        * WebCoreSupport/ChromeClientQt.h: Ditto.
     10
    1112007-07-13  Mark Rowe  <mrowe@apple.com>
    212
  • trunk/WebKitQt/WebCoreSupport/ChromeClientQt.cpp

    r24253 r24330  
    306306}
    307307
    308 void ChromeClientQt::print()
    309 {
    310     notImplemented();
    311 }
    312 
    313 }
    314 
    315 
     308void ChromeClientQt::print(Frame*)
     309{
     310    notImplemented();
     311}
     312
     313}
     314
     315
  • trunk/WebKitQt/WebCoreSupport/ChromeClientQt.h

    r24253 r24330  
    107107        virtual void setToolTip(const String&);
    108108
    109         virtual void print();
     109        virtual void print(Frame*);
    110110
    111111        QWebPage* m_webPage;
Note: See TracChangeset for help on using the changeset viewer.