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.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@24330
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2007-07-16 Adam Roben <aroben@apple.com>
+
+ 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.
+
2007-07-16 Adele Peterson <adele@apple.com>
Reviewed by Brady.
return Window::retrieve(frame); // global object
}
case Window::Print:
- frame->print();
+ if (Page* page = frame->page())
+ page->chrome()->print(frame);
return jsUndefined();
case Window::ScrollBy:
window->updateLayout();
{
}
-void Frame::print()
-{
- if (d->m_page)
- d->m_page->chrome()->print();
-}
-
} // namespace WebCore
bool execPrint(Frame* frame, bool, const String&)
{
- frame->print();
+ if (Page* page = frame->page())
+ page->chrome()->print(frame);
return true;
}
m_client->setToolTip(toolTip);
}
-void Chrome::print()
+void Chrome::print(Frame* frame)
{
- m_client->print();
+ m_client->print(frame);
}
PageGroupLoadDeferrer::PageGroupLoadDeferrer(Page* page, bool deferSelf)
void setToolTip(const HitTestResult&);
- void print();
+ void print(Frame*);
#if PLATFORM(MAC)
void focusNSView(NSView*);
virtual void setToolTip(const String&) = 0;
- virtual void print() = 0;
+ virtual void print(Frame*) = 0;
};
}
public:
void focusWindow();
void unfocusWindow();
- void print();
bool shouldClose();
void scheduleClose();
return result;
}
-void Frame::print()
-{
- [d->m_bridge print];
-}
-
void Frame::issuePasteCommand()
{
[d->m_bridge issuePasteCommand];
- (ObjectElementType)determineObjectFromMIMEType:(NSString*)MIMEType URL:(NSURL*)URL;
-- (void)print;
-
- (jobject)getAppletInView:(NSView *)view;
// Deprecated, use getAppletInView: instead.
notImplemented();
}
-void Frame::print()
-{
- notImplemented();
-}
-
KJS::Bindings::Instance* Frame::createScriptInstanceForWidget(WebCore::Widget* widget)
{
return 0;
}
}
-void Frame::print()
-{
- notImplemented();
-}
-
void Frame::issueTransposeCommand()
{
notImplemented();
notImplemented();
}
-void ChromeClientGdk::print()
+void ChromeClientGdk::print(Frame*)
{
notImplemented();
}
virtual void setToolTip(const String&) { }
- virtual void print() { }
+ virtual void print(Frame*) { }
};
class SVGEmptyFrameLoaderClient : public FrameLoaderClient {
+2007-07-16 Adam Roben <aroben@apple.com>
+
+ 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.
+
2007-07-16 Darin Adler <darin@apple.com>
* StringsNotToBeLocalized.txt: Update for recent changes.
virtual void setToolTip(const WebCore::String&);
- virtual void print();
+ virtual void print(WebCore::Frame*);
private:
WebView *m_webView;
};
[(WebHTMLView *)[[[m_webView mainFrame] frameView] documentView] _setToolTip:toolTip];
}
-void WebChromeClient::print()
+void WebChromeClient::print(Frame* frame)
{
- // FIXME: printing is still handled via WebFrameBridge
+ WebFrameView* frameView = [kit(frame) frameView];
+ id wd = [m_webView UIDelegate];
+ if ([wd respondsToSelector:@selector(webView:printFrameView:)])
+ [wd webView:m_webView printFrameView:frameView];
+ else
+ [[WebDefaultUIDelegate sharedUIDelegate] webView:m_webView printFrameView:frameView];
}
return ObjectElementNone;
}
-- (void)print
-{
- id wd = [[self webView] UIDelegate];
- if ([wd respondsToSelector:@selector(webView:printFrameView:)])
- [wd webView:[self webView] printFrameView:[_frame frameView]];
- else
- [[WebDefaultUIDelegate sharedUIDelegate] webView:[self webView] printFrameView:[_frame frameView]];
-}
-
- (jobject)getAppletInView:(NSView *)view
{
if ([view respondsToSelector:@selector(webPlugInGetApplet)])
+2007-07-16 Adam Roben <aroben@apple.com>
+
+ Updated WebChromeClient for ChromeClient changes.
+
+ Reviewed by Darin.
+
+ * WebChromeClient.cpp:
+ (WebChromeClient::print): Added a Frame* parameter.
+ * WebChromeClient.h: Ditto.
+
2007-07-16 Oliver Hunt <oliver@apple.com>
Reviewed by Steve.
m_webView->setToolTip(toolTip);
}
-void WebChromeClient::print()
+void WebChromeClient::print(Frame*)
{
COMPtr<IWebUIDelegate> uiDelegate;
COMPtr<IWebUIDelegate2> uiDelegate2;
virtual void setToolTip(const WebCore::String&);
- virtual void print();
+ virtual void print(WebCore::Frame*);
private:
WebView* m_webView;
+2007-07-16 Adam Roben <aroben@apple.com>
+
+ Updated ChromeClientQt for ChromeClient changes.
+
+ Reviewed by Darin.
+
+ * WebCoreSupport/ChromeClientQt.cpp:
+ (WebCore::ChromeClientQt::print): Added a Frame* parameter.
+ * WebCoreSupport/ChromeClientQt.h: Ditto.
+
2007-07-13 Mark Rowe <mrowe@apple.com>
Reviewed by Mitz.
notImplemented();
}
-void ChromeClientQt::print()
+void ChromeClientQt::print(Frame*)
{
notImplemented();
}
virtual void setToolTip(const String&);
- virtual void print();
+ virtual void print(Frame*);
QWebPage* m_webPage;
};