[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
mjs
mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:12:45 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 9f463fca7ca0cffd754a31b63470e9e3e85dbd3c
Author: mjs <mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Nov 17 09:29:57 2003 +0000
WebCore:
Reviewed by Dave.
<rdar://problem/3131664>: add support for the window.print() command used for "print this page" buttons
* khtml/ecma/kjs_window.cpp:
(Window::get): add support for window.print (Apple-only)
(WindowFunc::tryCall): ditto
* khtml/ecma/kjs_window.h: Add Print to enum
* khtml/ecma/kjs_window.lut.h: Regenerated
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::print): Call bridge.
* kwq/KWQKHTMLPart.h: Declare above.
* kwq/WebCoreBridge.h: prototype print method for other side of bridge.
WebKit:
Reviewed by Dave.
WebKit part of fix for:
<rdar://problem/3131664>: add support for the window.print() command used for "print this page" buttons
* WebCoreSupport.subproj/WebBridge.m:
(-[WebBridge print]): Call delegate.
* WebView.subproj/WebDefaultUIDelegate.m:
(-[WebDefaultUIDelegate webViewPrint:]): Implemented (do nothing).
* WebView.subproj/WebUIDelegatePrivate.h: Added. Add extra SPI method webViewPrint:
for UI delegate.
* WebKit.pbproj/project.pbxproj: Install WebUIDelegatePrivate.h as private header
WebBrowser:
Reviewed by Dave.
WebBrowser part of fix for:
<rdar://problem/3131664>: add support for the window.print() command used for "print this page" buttons
* BrowserWebController.m:
(-[BrowserWebView webViewPrint:]): Call printDocument: on the document.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@5535 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index c012c62..239d13a 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,5 +1,21 @@
2003-11-16 Maciej Stachowiak <mjs at apple.com>
+ Reviewed by Dave.
+
+ <rdar://problem/3131664>: add support for the window.print() command used for "print this page" buttons
+
+ * khtml/ecma/kjs_window.cpp:
+ (Window::get): add support for window.print (Apple-only)
+ (WindowFunc::tryCall): ditto
+ * khtml/ecma/kjs_window.h: Add Print to enum
+ * khtml/ecma/kjs_window.lut.h: Regenerated
+ * kwq/KWQKHTMLPart.mm:
+ (KWQKHTMLPart::print): Call bridge.
+ * kwq/KWQKHTMLPart.h: Declare above.
+ * kwq/WebCoreBridge.h: prototype print method for other side of bridge.
+
+2003-11-16 Maciej Stachowiak <mjs at apple.com>
+
Reviewed by Darin.
* kwq/KWQKHTMLPartBrowserExtension.mm:
diff --git a/WebCore/khtml/ecma/kjs_window.cpp b/WebCore/khtml/ecma/kjs_window.cpp
index 0ac73b6..983db16 100644
--- a/WebCore/khtml/ecma/kjs_window.cpp
+++ b/WebCore/khtml/ecma/kjs_window.cpp
@@ -175,7 +175,7 @@ Value Screen::getValueProperty(ExecState *exec, int token) const
const ClassInfo Window::info = { "Window", 0, &WindowTable, 0 };
/*
- at begin WindowTable 89
+ at begin WindowTable 90
closed Window::Closed DontDelete|ReadOnly
crypto Window::Crypto DontDelete|ReadOnly
defaultStatus Window::DefaultStatus DontDelete
@@ -231,6 +231,7 @@ const ClassInfo Window::info = { "Window", 0, &WindowTable, 0 };
confirm Window::Confirm DontDelete|Function 1
prompt Window::Prompt DontDelete|Function 2
open Window::Open DontDelete|Function 3
+ print Window::Print DontDelete|Function 2
setTimeout Window::SetTimeout DontDelete|Function 2
clearTimeout Window::ClearTimeout DontDelete|Function 1
focus Window::Focus DontDelete|Function 0
@@ -544,6 +545,9 @@ Value Window::get(ExecState *exec, const Identifier &p) const
case Confirm:
case Prompt:
case Open:
+#if APPLE_CHANGES
+ case Print:
+#endif
case Focus:
case Blur:
case Close:
@@ -1327,6 +1331,11 @@ Value WindowFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
return Undefined();
}
}
+#if APPLE_CHANGES
+ case Window::Print:
+ KWQ(part)->print();
+ return Undefined();
+#endif
case Window::ScrollBy:
window->updateLayout();
if(args.size() == 2 && widget)
diff --git a/WebCore/khtml/ecma/kjs_window.h b/WebCore/khtml/ecma/kjs_window.h
index da0ace5..1bf6077 100644
--- a/WebCore/khtml/ecma/kjs_window.h
+++ b/WebCore/khtml/ecma/kjs_window.h
@@ -118,7 +118,7 @@ namespace KJS {
Parent, Personalbar, ScreenX, ScreenY, Scrollbars, Scroll, ScrollBy,
ScreenTop, ScreenLeft,
ScrollTo, ScrollX, ScrollY, MoveBy, MoveTo, ResizeBy, ResizeTo, Self, _Window, Top, _Screen,
- Image, Option, Alert, Confirm, Prompt, Open, SetTimeout, ClearTimeout,
+ Image, Option, Alert, Confirm, Prompt, Open, Print, SetTimeout, ClearTimeout,
Focus, GetSelection, Blur, Close, SetInterval, ClearInterval, CaptureEvents,
ReleaseEvents, AddEventListener, RemoveEventListener, Onabort, Onblur,
Onchange, Onclick, Ondblclick, Ondragdrop, Onerror, Onfocus,
diff --git a/WebCore/khtml/ecma/kjs_window.lut.h b/WebCore/khtml/ecma/kjs_window.lut.h
index 9aefec9..17c0a66 100644
--- a/WebCore/khtml/ecma/kjs_window.lut.h
+++ b/WebCore/khtml/ecma/kjs_window.lut.h
@@ -22,132 +22,127 @@ const struct HashTable ScreenTable = { 2, 10, ScreenTableEntries, 7 };
namespace KJS {
const struct HashEntry WindowTableEntries[] = {
- { "close", Window::Close, DontDelete|Function, 0, 0 },
- { 0, 0, 0, 0, 0 },
- { "alert", Window::Alert, DontDelete|Function, 1, 0 },
- { "outerHeight", Window::OuterHeight, DontDelete|ReadOnly, 0, &WindowTableEntries[92] },
- { "ondragdrop", Window::Ondragdrop, DontDelete, 0, 0 },
- { 0, 0, 0, 0, 0 },
- { "offscreenBuffering", Window::OffscreenBuffering, DontDelete|ReadOnly, 0, 0 },
- { "setTimeout", Window::SetTimeout, DontDelete|Function, 2, 0 },
- { "getSelection", Window::GetSelection, DontDelete|Function, 0, 0 },
+ { "onkeydown", Window::Onkeydown, DontDelete, 0, 0 },
{ 0, 0, 0, 0, 0 },
- { "DOMException", Window::DOMException, DontDelete, 0, &WindowTableEntries[103] },
- { "closed", Window::Closed, DontDelete|ReadOnly, 0, &WindowTableEntries[96] },
- { "event", Window::Event, DontDelete, 0, &WindowTableEntries[108] },
+ { "clearTimeout", Window::ClearTimeout, DontDelete|Function, 1, 0 },
+ { "Option", Window::Option, DontDelete|ReadOnly, 0, 0 },
+ { "closed", Window::Closed, DontDelete|ReadOnly, 0, &WindowTableEntries[94] },
{ 0, 0, 0, 0, 0 },
- { "onload", Window::Onload, DontDelete, 0, 0 },
- { "frames", Window::Frames, DontDelete|ReadOnly, 0, 0 },
- { "screenX", Window::ScreenX, DontDelete|ReadOnly, 0, &WindowTableEntries[105] },
- { "clientInformation", Window::ClientInformation, DontDelete|ReadOnly, 0, &WindowTableEntries[94] },
+ { "event", Window::Event, DontDelete, 0, &WindowTableEntries[104] },
+ { "personalbar", Window::Personalbar, DontDelete|ReadOnly, 0, &WindowTableEntries[111] },
+ { "frames", Window::Frames, DontDelete|ReadOnly, 0, &WindowTableEntries[92] },
+ { "screenY", Window::ScreenY, DontDelete|ReadOnly, 0, 0 },
+ { "screen", Window::_Screen, DontDelete|ReadOnly, 0, 0 },
{ "CSSRule", Window::CSSRule, DontDelete, 0, 0 },
- { "length", Window::Length, DontDelete|ReadOnly, 0, &WindowTableEntries[91] },
- { "personalbar", Window::Personalbar, DontDelete|ReadOnly, 0, 0 },
- { "clearInterval", Window::ClearInterval, DontDelete|Function, 1, 0 },
- { 0, 0, 0, 0, 0 },
- { 0, 0, 0, 0, 0 },
+ { "length", Window::Length, DontDelete|ReadOnly, 0, 0 },
{ "onmouseup", Window::Onmouseup, DontDelete, 0, 0 },
{ "NodeFilter", Window::NodeFilter, DontDelete, 0, 0 },
- { "opener", Window::Opener, DontDelete|ReadOnly, 0, 0 },
- { "parent", Window::Parent, DontDelete|ReadOnly, 0, &WindowTableEntries[113] },
- { 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0 },
+ { "releaseEvents", Window::ReleaseEvents, DontDelete|Function, 0, 0 },
+ { "print", Window::Print, DontDelete|Function, 2, 0 },
{ 0, 0, 0, 0, 0 },
- { "scrollX", Window::ScrollX, DontDelete|ReadOnly, 0, &WindowTableEntries[110] },
- { "scroll", Window::Scroll, DontDelete|Function, 2, &WindowTableEntries[98] },
+ { "opener", Window::Opener, DontDelete|ReadOnly, 0, &WindowTableEntries[108] },
+ { "parent", Window::Parent, DontDelete|ReadOnly, 0, 0 },
{ 0, 0, 0, 0, 0 },
- { "Node", Window::Node, DontDelete, 0, &WindowTableEntries[112] },
- { "onblur", Window::Onblur, DontDelete, 0, 0 },
{ 0, 0, 0, 0, 0 },
- { "onmove", Window::Onmove, DontDelete, 0, 0 },
- { "Image", Window::Image, DontDelete|ReadOnly, 0, &WindowTableEntries[104] },
+ { "scrollX", Window::ScrollX, DontDelete|ReadOnly, 0, 0 },
+ { "scrollY", Window::ScrollY, DontDelete|ReadOnly, 0, 0 },
+ { "scroll", Window::Scroll, DontDelete|Function, 2, &WindowTableEntries[107] },
+ { "removeEventListener", Window::RemoveEventListener, DontDelete|Function, 3, 0 },
{ "onkeypress", Window::Onkeypress, DontDelete, 0, 0 },
+ { "onblur", Window::Onblur, DontDelete, 0, 0 },
+ { "addEventListener", Window::AddEventListener, DontDelete|Function, 3, 0 },
+ { "Node", Window::Node, DontDelete, 0, &WindowTableEntries[99] },
{ 0, 0, 0, 0, 0 },
- { "scrollBy", Window::ScrollBy, DontDelete|Function, 2, &WindowTableEntries[101] },
- { 0, 0, 0, 0, 0 },
- { 0, 0, 0, 0, 0 },
- { "resizeBy", Window::ResizeBy, DontDelete|Function, 2, 0 },
- { "onabort", Window::Onabort, DontDelete, 0, 0 },
+ { "scrollBy", Window::ScrollBy, DontDelete|Function, 2, 0 },
+ { "Image", Window::Image, DontDelete|ReadOnly, 0, 0 },
+ { "window", Window::_Window, DontDelete|ReadOnly, 0, 0 },
+ { "defaultStatus", Window::DefaultStatus, DontDelete, 0, &WindowTableEntries[95] },
+ { "pageXOffset", Window::PageXOffset, DontDelete|ReadOnly, 0, 0 },
+ { "pageYOffset", Window::PageYOffset, DontDelete|ReadOnly, 0, &WindowTableEntries[106] },
+ { "onmouseout", Window::Onmouseout, DontDelete, 0, 0 },
{ 0, 0, 0, 0, 0 },
- { "addEventListener", Window::AddEventListener, DontDelete|Function, 3, 0 },
- { "Range", Window::Range, DontDelete, 0, &WindowTableEntries[93] },
- { "pageYOffset", Window::PageYOffset, DontDelete|ReadOnly, 0, &WindowTableEntries[97] },
- { "crypto", Window::Crypto, DontDelete|ReadOnly, 0, &WindowTableEntries[89] },
- { "prompt", Window::Prompt, DontDelete|Function, 2, 0 },
- { "resizeTo", Window::ResizeTo, DontDelete|Function, 2, 0 },
- { "status", Window::Status, DontDelete, 0, &WindowTableEntries[114] },
+ { "scrollTo", Window::ScrollTo, DontDelete|Function, 2, 0 },
{ 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0 },
- { "location", Window::_Location, DontDelete, 0, &WindowTableEntries[95] },
- { "screenTop", Window::ScreenTop, DontDelete|ReadOnly, 0, &WindowTableEntries[116] },
+ { "crypto", Window::Crypto, DontDelete|ReadOnly, 0, &WindowTableEntries[90] },
+ { "prompt", Window::Prompt, DontDelete|Function, 2, &WindowTableEntries[112] },
+ { "screenLeft", Window::ScreenLeft, DontDelete|ReadOnly, 0, &WindowTableEntries[110] },
+ { "status", Window::Status, DontDelete, 0, 0 },
+ { "location", Window::_Location, DontDelete, 0, &WindowTableEntries[93] },
+ { "onmouseover", Window::Onmouseover, DontDelete, 0, &WindowTableEntries[115] },
{ 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0 },
{ "onselect", Window::Onselect, DontDelete, 0, 0 },
- { "name", Window::Name, DontDelete, 0, &WindowTableEntries[119] },
+ { 0, 0, 0, 0, 0 },
{ "document", Window::Document, DontDelete|ReadOnly, 0, 0 },
- { "onerror", Window::Onerror, DontDelete, 0, &WindowTableEntries[122] },
+ { "onunload", Window::Onunload, DontDelete, 0, 0 },
+ { "ondblclick", Window::Ondblclick, DontDelete, 0, &WindowTableEntries[109] },
{ 0, 0, 0, 0, 0 },
+ { "name", Window::Name, DontDelete, 0, 0 },
{ 0, 0, 0, 0, 0 },
- { "ondblclick", Window::Ondblclick, DontDelete, 0, 0 },
{ "onkeyup", Window::Onkeyup, DontDelete, 0, 0 },
{ 0, 0, 0, 0, 0 },
- { "Event", Window::EventCtor, DontDelete, 0, 0 },
- { "self", Window::Self, DontDelete|ReadOnly, 0, 0 },
- { 0, 0, 0, 0, 0 },
- { "top", Window::Top, DontDelete|ReadOnly, 0, 0 },
- { "innerHeight", Window::InnerHeight, DontDelete|ReadOnly, 0, &WindowTableEntries[90] },
- { "history", Window::_History, DontDelete|ReadOnly, 0, 0 },
+ { "innerHeight", Window::InnerHeight, DontDelete|ReadOnly, 0, 0 },
+ { "innerWidth", Window::InnerWidth, DontDelete|ReadOnly, 0, 0 },
{ 0, 0, 0, 0, 0 },
+ { "Event", Window::EventCtor, DontDelete, 0, 0 },
{ 0, 0, 0, 0, 0 },
+ { "history", Window::_History, DontDelete|ReadOnly, 0, &WindowTableEntries[97] },
+ { "defaultstatus", Window::DefaultStatus, DontDelete, 0, 0 },
{ 0, 0, 0, 0, 0 },
- { "open", Window::Open, DontDelete|Function, 3, &WindowTableEntries[121] },
+ { "top", Window::Top, DontDelete|ReadOnly, 0, &WindowTableEntries[116] },
{ 0, 0, 0, 0, 0 },
- { "onsubmit", Window::Onsubmit, DontDelete, 0, 0 },
- { "navigator", Window::_Navigator, DontDelete|ReadOnly, 0, &WindowTableEntries[107] },
- { "defaultstatus", Window::DefaultStatus, DontDelete, 0, 0 },
+ { "navigator", Window::_Navigator, DontDelete|ReadOnly, 0, &WindowTableEntries[117] },
{ 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0 },
+ { "open", Window::Open, DontDelete|Function, 3, 0 },
+ { "offscreenBuffering", Window::OffscreenBuffering, DontDelete|ReadOnly, 0, 0 },
{ 0, 0, 0, 0, 0 },
+ { "blur", Window::Blur, DontDelete|Function, 0, 0 },
{ 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0 },
+ { "outerHeight", Window::OuterHeight, DontDelete|ReadOnly, 0, 0 },
+ { "outerWidth", Window::OuterWidth, DontDelete|ReadOnly, 0, 0 },
+ { "ondragdrop", Window::Ondragdrop, DontDelete, 0, 0 },
{ 0, 0, 0, 0, 0 },
- { "defaultStatus", Window::DefaultStatus, DontDelete, 0, &WindowTableEntries[109] },
- { "innerWidth", Window::InnerWidth, DontDelete|ReadOnly, 0, 0 },
- { "konqueror", Window::_Konqueror, DontDelete|ReadOnly, 0, 0 },
- { "outerWidth", Window::OuterWidth, DontDelete|ReadOnly, 0, &WindowTableEntries[99] },
- { "pageXOffset", Window::PageXOffset, DontDelete|ReadOnly, 0, &WindowTableEntries[111] },
- { "screenY", Window::ScreenY, DontDelete|ReadOnly, 0, &WindowTableEntries[102] },
- { "screenLeft", Window::ScreenLeft, DontDelete|ReadOnly, 0, &WindowTableEntries[117] },
- { "scrollbars", Window::Scrollbars, DontDelete|ReadOnly, 0, &WindowTableEntries[100] },
- { "scrollTo", Window::ScrollTo, DontDelete|Function, 2, 0 },
- { "scrollY", Window::ScrollY, DontDelete|ReadOnly, 0, 0 },
- { "moveBy", Window::MoveBy, DontDelete|Function, 2, 0 },
- { "moveTo", Window::MoveTo, DontDelete|Function, 2, &WindowTableEntries[115] },
- { "window", Window::_Window, DontDelete|ReadOnly, 0, 0 },
- { "screen", Window::_Screen, DontDelete|ReadOnly, 0, 0 },
- { "Option", Window::Option, DontDelete|ReadOnly, 0, &WindowTableEntries[106] },
- { "confirm", Window::Confirm, DontDelete|Function, 1, 0 },
- { "clearTimeout", Window::ClearTimeout, DontDelete|Function, 1, 0 },
+ { "getSelection", Window::GetSelection, DontDelete|Function, 0, &WindowTableEntries[102] },
+ { "setTimeout", Window::SetTimeout, DontDelete|Function, 2, 0 },
+ { "moveBy", Window::MoveBy, DontDelete|Function, 2, &WindowTableEntries[98] },
+ { "DOMException", Window::DOMException, DontDelete, 0, &WindowTableEntries[91] },
+ { 0, 0, 0, 0, 0 },
+ { "scrollbars", Window::Scrollbars, DontDelete|ReadOnly, 0, &WindowTableEntries[103] },
+ { "Range", Window::Range, DontDelete, 0, &WindowTableEntries[96] },
+ { "clientInformation", Window::ClientInformation, DontDelete|ReadOnly, 0, 0 },
+ { "konqueror", Window::_Konqueror, DontDelete|ReadOnly, 0, &WindowTableEntries[100] },
+ { "screenTop", Window::ScreenTop, DontDelete|ReadOnly, 0, 0 },
+ { "moveTo", Window::MoveTo, DontDelete|Function, 2, &WindowTableEntries[101] },
+ { "resizeBy", Window::ResizeBy, DontDelete|Function, 2, &WindowTableEntries[105] },
+ { "resizeTo", Window::ResizeTo, DontDelete|Function, 2, &WindowTableEntries[113] },
+ { "self", Window::Self, DontDelete|ReadOnly, 0, 0 },
+ { "alert", Window::Alert, DontDelete|Function, 1, 0 },
+ { "confirm", Window::Confirm, DontDelete|Function, 1, &WindowTableEntries[114] },
+ { "screenX", Window::ScreenX, DontDelete|ReadOnly, 0, 0 },
{ "focus", Window::Focus, DontDelete|Function, 0, 0 },
- { "blur", Window::Blur, DontDelete|Function, 0, 0 },
+ { "close", Window::Close, DontDelete|Function, 0, 0 },
{ "setInterval", Window::SetInterval, DontDelete|Function, 2, 0 },
- { "captureEvents", Window::CaptureEvents, DontDelete|Function, 0, &WindowTableEntries[118] },
- { "releaseEvents", Window::ReleaseEvents, DontDelete|Function, 0, 0 },
- { "removeEventListener", Window::RemoveEventListener, DontDelete|Function, 3, 0 },
+ { "clearInterval", Window::ClearInterval, DontDelete|Function, 1, 0 },
+ { "captureEvents", Window::CaptureEvents, DontDelete|Function, 0, 0 },
+ { "onabort", Window::Onabort, DontDelete, 0, 0 },
{ "onchange", Window::Onchange, DontDelete, 0, 0 },
{ "onclick", Window::Onclick, DontDelete, 0, 0 },
+ { "onerror", Window::Onerror, DontDelete, 0, 0 },
{ "onfocus", Window::Onfocus, DontDelete, 0, 0 },
- { "onkeydown", Window::Onkeydown, DontDelete, 0, 0 },
+ { "onload", Window::Onload, DontDelete, 0, 0 },
{ "onmousedown", Window::Onmousedown, DontDelete, 0, 0 },
- { "onmousemove", Window::Onmousemove, DontDelete, 0, &WindowTableEntries[120] },
- { "onmouseout", Window::Onmouseout, DontDelete, 0, 0 },
- { "onmouseover", Window::Onmouseover, DontDelete, 0, 0 },
+ { "onmousemove", Window::Onmousemove, DontDelete, 0, 0 },
+ { "onmove", Window::Onmove, DontDelete, 0, 0 },
{ "onreset", Window::Onreset, DontDelete, 0, 0 },
{ "onresize", Window::Onresize, DontDelete, 0, 0 },
- { "onunload", Window::Onunload, DontDelete, 0, 0 }
+ { "onsubmit", Window::Onsubmit, DontDelete, 0, 0 }
};
-const struct HashTable WindowTable = { 2, 123, WindowTableEntries, 89 };
+const struct HashTable WindowTable = { 2, 118, WindowTableEntries, 90 };
} // namespace
diff --git a/WebCore/kwq/KWQKHTMLPart.h b/WebCore/kwq/KWQKHTMLPart.h
index 337e113..d62a07d 100644
--- a/WebCore/kwq/KWQKHTMLPart.h
+++ b/WebCore/kwq/KWQKHTMLPart.h
@@ -246,6 +246,7 @@ public:
void didTellBridgeAboutLoad(const QString &urlString);
bool haveToldBridgeAboutLoad(const QString &urlString);
+ void print();
private:
virtual void khtmlMousePressEvent(khtml::MousePressEvent *);
diff --git a/WebCore/kwq/KWQKHTMLPart.mm b/WebCore/kwq/KWQKHTMLPart.mm
index 0a934b1..c5f1aa0 100644
--- a/WebCore/kwq/KWQKHTMLPart.mm
+++ b/WebCore/kwq/KWQKHTMLPart.mm
@@ -2792,3 +2792,8 @@ void KWQKHTMLPart::clear()
urlsBridgeKnowsAbout.clear();
KHTMLPart::clear();
}
+
+void KWQKHTMLPart::print()
+{
+ [_bridge print];
+}
diff --git a/WebCore/kwq/WebCoreBridge.h b/WebCore/kwq/WebCoreBridge.h
index 4523fe7..c676f7b 100644
--- a/WebCore/kwq/WebCoreBridge.h
+++ b/WebCore/kwq/WebCoreBridge.h
@@ -360,6 +360,8 @@ typedef enum {
- (NSFileWrapper *)fileWrapperForURL:(NSURL *)URL;
+- (void)print;
+
@end
// This interface definition allows those who hold a WebCoreBridge * to call all the methods
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 5a87570..8fe6581 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,19 @@
+2003-11-16 Maciej Stachowiak <mjs at apple.com>
+
+ Reviewed by Dave.
+
+ WebKit part of fix for:
+
+ <rdar://problem/3131664>: add support for the window.print() command used for "print this page" buttons
+
+ * WebCoreSupport.subproj/WebBridge.m:
+ (-[WebBridge print]): Call delegate.
+ * WebView.subproj/WebDefaultUIDelegate.m:
+ (-[WebDefaultUIDelegate webViewPrint:]): Implemented (do nothing).
+ * WebView.subproj/WebUIDelegatePrivate.h: Added. Add extra SPI method webViewPrint:
+ for UI delegate.
+ * WebKit.pbproj/project.pbxproj: Install WebUIDelegatePrivate.h as private header
+
2003-11-15 Darin Adler <darin at apple.com>
Reviewed by John.
diff --git a/WebKit/WebCoreSupport.subproj/WebBridge.m b/WebKit/WebCoreSupport.subproj/WebBridge.m
index 69e2f6a..6a89f96 100644
--- a/WebKit/WebCoreSupport.subproj/WebBridge.m
+++ b/WebKit/WebCoreSupport.subproj/WebBridge.m
@@ -39,7 +39,7 @@
#import <WebKit/WebResourceLoadDelegate.h>
#import <WebKit/WebSubresourceClient.h>
#import <WebKit/WebViewPrivate.h>
-#import <WebKit/WebUIDelegate.h>
+#import <WebKit/WebUIDelegatePrivate.h>
#import <Foundation/NSURLRequest.h>
#import <Foundation/NSURLRequestPrivate.h>
@@ -1035,4 +1035,15 @@ static id <WebFormDelegate> formDelegate(WebBridge *self)
return [[_frame webView] _fileWrapperForURL:URL];
}
+- (void)print
+{
+ id wd = [[_frame webView] UIDelegate];
+
+ if ([wd respondsToSelector:@selector(webViewPrint:)]) {
+ [wd webViewPrint:[_frame webView]];
+ } else {
+ [[WebDefaultUIDelegate sharedUIDelegate] webViewPrint:[_frame webView]];
+ }
+}
+
@end
diff --git a/WebKit/WebKit.pbproj/project.pbxproj b/WebKit/WebKit.pbproj/project.pbxproj
index 2b55ef6..3cd7239 100644
--- a/WebKit/WebKit.pbproj/project.pbxproj
+++ b/WebKit/WebKit.pbproj/project.pbxproj
@@ -325,6 +325,7 @@
833987820543012D00EE146E,
BE26F18F05517E0800BFA0C3,
BECD142B0565830A005BB09C,
+ 65A7D44B0568AB2600E70EF6,
);
isa = PBXHeadersBuildPhase;
runOnlyForDeploymentPostprocessing = 0;
@@ -1727,6 +1728,23 @@
settings = {
};
};
+ 65A7D44A0568AB2600E70EF6 = {
+ expectedFileType = sourcecode.c.h;
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ path = WebUIDelegatePrivate.h;
+ refType = 4;
+ sourceTree = "<group>";
+ };
+ 65A7D44B0568AB2600E70EF6 = {
+ fileRef = 65A7D44A0568AB2600E70EF6;
+ isa = PBXBuildFile;
+ settings = {
+ ATTRIBUTES = (
+ Private,
+ );
+ };
+ };
65CBE7AA04B53388006ACFE6 = {
buildActionMask = 2147483647;
files = (
@@ -2534,6 +2552,7 @@
9CAE9D070252A4130ECA16EA,
513D422E034CF55A00CA2ACD,
515E27CC0458C86500CA2D3A,
+ 65A7D44A0568AB2600E70EF6,
51A8B579042834F700CA2D3A,
51A8B57A042834F700CA2D3A,
51A8B57D0428353A00CA2D3A,
diff --git a/WebKit/WebView.subproj/WebDefaultUIDelegate.m b/WebKit/WebView.subproj/WebDefaultUIDelegate.m
index fdae7a3..34e0293 100644
--- a/WebKit/WebView.subproj/WebDefaultUIDelegate.m
+++ b/WebKit/WebView.subproj/WebDefaultUIDelegate.m
@@ -9,7 +9,7 @@
#import <WebKit/WebDefaultUIDelegate.h>
#import <WebKit/WebJavaScriptTextInputPanel.h>
#import <WebKit/WebView.h>
-#import <WebKit/WebUIDelegate.h>
+#import <WebKit/WebUIDelegatePrivate.h>
@interface NSApplication (DeclarationStolenFromAppKit)
- (void)_cycleWindowsReversed:(BOOL)reversed;
@@ -164,4 +164,8 @@ static WebDefaultUIDelegate *sharedDelegate = nil;
// FIXME: We want a default here, but that would add localized strings.
}
+- (void)webViewPrint:(WebView *)sender
+{
+}
+
@end
diff --git a/WebKit/WebView.subproj/WebUIDelegatePrivate.h b/WebKit/WebView.subproj/WebUIDelegatePrivate.h
new file mode 100644
index 0000000..01ef814
--- /dev/null
+++ b/WebKit/WebView.subproj/WebUIDelegatePrivate.h
@@ -0,0 +1,12 @@
+/*
+ WebUIDelegatePrivate.h
+ Copyright (C) 2003 Apple Computer, Inc. All rights reserved.
+*/
+
+#import <WebKit/WebUIDelegate.h>
+
+ at interface NSObject (WebUIDelegatePrivate)
+
+- (void)webViewPrint:(WebView *)sender;
+
+ at end
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list