[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 07:27:06 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit d5323a31ed8e698a1b9bb560a10deadb9644477b
Author: mjs <mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Mar 4 01:29:30 2003 +0000
WebCore:
Reviewed by Darin.
- fixed 3163855 - Need control over certain potential dialogs/sheets
* khtml/rendering/render_form.cpp:
(RenderFileButton::RenderFileButton): Pass the part to KWQFileButton.
* kwq/KWQFileButton.h:
* kwq/KWQFileButton.mm:
(KWQFileButton::KWQFileButton): Go through the bridge for the view,
not the view factory.
* kwq/KWQKHTMLPart.h:
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::runJavaScriptAlert): Go through the bridge for the panel,
not the view factory.
(KWQKHTMLPart::runJavaScriptConfirm): Likewise.
(KWQKHTMLPart::runJavaScriptPrompt): Likewise.
* kwq/WebCoreViewFactory.h: Move methods from here...
* kwq/WebCoreBridge.h: ...to here.
WebKit:
Reviewed by Darin.
- fixed 3163855 - Need control over certain potential dialogs/sheets
* WebCoreSupport.subproj/WebBridge.h:
* WebCoreSupport.subproj/WebBridge.m:
(-[WebBridge runJavaScriptAlertPanelWithMessage:]): Moved here from
view factory. Call the bridge instead of popping up the dialog.
(-[WebBridge runJavaScriptConfirmPanelWithMessage:]): Likewise.
(-[WebBridge runJavaScriptTextInputPanelWithPrompt:defaultText:returningText:]):
Likewise.
(-[WebBridge fileButton]): Moved here from view factory, so we can
pass the bridge to the button.
(-[WebBridge runOpenPanelForFileButtonWithResultListener:]): Call the delegate.
* WebCoreSupport.subproj/WebFileButton.h:
* WebCoreSupport.subproj/WebFileButton.m:
(-[WebFileButton initWithBridge:]): New method so this object knows about the bridge.
(-[WebFileButton beginSheet]): Instead of popping up the sheet directly,
call the bridge (which will call the delegate).
(-[WebFileButton chooseFilename:]): Update for the new filename.
(-[WebFileButton cancel]): Do nothing.
* WebCoreSupport.subproj/WebViewFactory.m: Removed some methods.
* WebKit.exp: Export .objc_class_WebJavaScriptTextInputPanel (for now).
* WebKit.pbproj/project.pbxproj: Export WebJavaScriptTextInputPanel.h (for now).
* WebView.subproj/WebWindowOperationsDelegate.h: Added new methods.
WebBrowser:
Reviewed by Darin.
Implemented new window delegate methods. Moving the code here is
temporary until we make the window operations delegate an informal
protocol or else provide a default implementation to subclass.
* BrowserWebController.m:
(-[BrowserWebController setResizable:]):
(-[BrowserWebController runJavaScriptAlertPanelWithMessage:]):
(-[BrowserWebController runJavaScriptConfirmPanelWithMessage:]):
(-[BrowserWebController runJavaScriptTextInputPanelWithPrompt:defaultText:]):
(-[BrowserWebController runOpenPanelForFileButtonWithResultListener:]):
(-[BrowserWebController openPanelDidEnd:returnCode:contextInfo:]):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3737 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 640beeb..9140262 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,24 @@
+2003-03-01 Maciej Stachowiak <mjs at apple.com>
+
+ Reviewed by Darin.
+
+ - fixed 3163855 - Need control over certain potential dialogs/sheets
+
+ * khtml/rendering/render_form.cpp:
+ (RenderFileButton::RenderFileButton): Pass the part to KWQFileButton.
+ * kwq/KWQFileButton.h:
+ * kwq/KWQFileButton.mm:
+ (KWQFileButton::KWQFileButton): Go through the bridge for the view,
+ not the view factory.
+ * kwq/KWQKHTMLPart.h:
+ * kwq/KWQKHTMLPart.mm:
+ (KWQKHTMLPart::runJavaScriptAlert): Go through the bridge for the panel,
+ not the view factory.
+ (KWQKHTMLPart::runJavaScriptConfirm): Likewise.
+ (KWQKHTMLPart::runJavaScriptPrompt): Likewise.
+ * kwq/WebCoreViewFactory.h: Move methods from here...
+ * kwq/WebCoreBridge.h: ...to here.
+
2003-03-02 Maciej Stachowiak <mjs at apple.com>
Reviewed by Trey.
@@ -68,6 +89,7 @@
a bit of overhead.
(WindowQObject::installTimeout): Change parameter to UString, not Identifier.
+>>>>>>> 1.1469
2003-03-03 David Hyatt <hyatt at apple.com>
I messed up when i merged Lars' quirks color patch for CSS with
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 640beeb..9140262 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,24 @@
+2003-03-01 Maciej Stachowiak <mjs at apple.com>
+
+ Reviewed by Darin.
+
+ - fixed 3163855 - Need control over certain potential dialogs/sheets
+
+ * khtml/rendering/render_form.cpp:
+ (RenderFileButton::RenderFileButton): Pass the part to KWQFileButton.
+ * kwq/KWQFileButton.h:
+ * kwq/KWQFileButton.mm:
+ (KWQFileButton::KWQFileButton): Go through the bridge for the view,
+ not the view factory.
+ * kwq/KWQKHTMLPart.h:
+ * kwq/KWQKHTMLPart.mm:
+ (KWQKHTMLPart::runJavaScriptAlert): Go through the bridge for the panel,
+ not the view factory.
+ (KWQKHTMLPart::runJavaScriptConfirm): Likewise.
+ (KWQKHTMLPart::runJavaScriptPrompt): Likewise.
+ * kwq/WebCoreViewFactory.h: Move methods from here...
+ * kwq/WebCoreBridge.h: ...to here.
+
2003-03-02 Maciej Stachowiak <mjs at apple.com>
Reviewed by Trey.
@@ -68,6 +89,7 @@
a bit of overhead.
(WindowQObject::installTimeout): Change parameter to UString, not Identifier.
+>>>>>>> 1.1469
2003-03-03 David Hyatt <hyatt at apple.com>
I messed up when i merged Lars' quirks color patch for CSS with
diff --git a/WebCore/khtml/rendering/render_form.cpp b/WebCore/khtml/rendering/render_form.cpp
index f97aa4d..4b209d1 100644
--- a/WebCore/khtml/rendering/render_form.cpp
+++ b/WebCore/khtml/rendering/render_form.cpp
@@ -556,7 +556,7 @@ RenderFileButton::RenderFileButton(HTMLInputElementImpl *element)
: RenderFormElement(element)
{
#if APPLE_CHANGES
- KWQFileButton *w = new KWQFileButton;
+ KWQFileButton *w = new KWQFileButton(view()->part());
connect(w, SIGNAL(textChanged(const QString &)),this,SLOT(slotTextChanged(const QString &)));
setQWidget(w);
#else
diff --git a/WebCore/kwq/KWQFileButton.h b/WebCore/kwq/KWQFileButton.h
index fb134dd..a742d5f 100644
--- a/WebCore/kwq/KWQFileButton.h
+++ b/WebCore/kwq/KWQFileButton.h
@@ -27,6 +27,7 @@
#define KWQFILEBUTTON_H
#include "KWQWidget.h"
+#include "khtml_part.h"
#ifdef __OBJC__
@class KWQFileButtonAdapter;
@@ -36,7 +37,7 @@ class KWQFileButtonAdapter;
class KWQFileButton : public QWidget {
public:
- KWQFileButton();
+ KWQFileButton(KHTMLPart *part);
~KWQFileButton();
void setFilename(const QString &);
diff --git a/WebCore/kwq/KWQFileButton.mm b/WebCore/kwq/KWQFileButton.mm
index 992be44..2fe333e 100644
--- a/WebCore/kwq/KWQFileButton.mm
+++ b/WebCore/kwq/KWQFileButton.mm
@@ -26,7 +26,8 @@
#import "KWQFileButton.h"
#import "KWQAssertions.h"
-#import "WebCoreViewFactory.h"
+#import "KWQKHTMLPart.h"
+#import "WebCoreBridge.h"
@interface KWQFileButtonAdapter : NSObject
{
@@ -37,8 +38,8 @@
@end
-KWQFileButton::KWQFileButton()
- : QWidget([[WebCoreViewFactory sharedFactory] fileButton])
+KWQFileButton::KWQFileButton(KHTMLPart *part)
+ : QWidget([KWQ(part)->bridge() fileButton])
, _textChanged(this, SIGNAL(textChanged(const QString &)))
, _adapter([[KWQFileButtonAdapter alloc] initWithKWQFileButton:this])
{
diff --git a/WebCore/kwq/KWQKHTMLPart.h b/WebCore/kwq/KWQKHTMLPart.h
index 5466f6d..5cb89c1 100644
--- a/WebCore/kwq/KWQKHTMLPart.h
+++ b/WebCore/kwq/KWQKHTMLPart.h
@@ -130,9 +130,9 @@ public:
static void setDocumentFocus(QWidget *);
static void clearDocumentFocus(QWidget *);
- static void runJavaScriptAlert(const QString &message);
- static bool runJavaScriptConfirm(const QString &message);
- static bool runJavaScriptPrompt(const QString &message, const QString &defaultValue, QString &result);
+ void runJavaScriptAlert(const QString &message);
+ bool runJavaScriptConfirm(const QString &message);
+ bool runJavaScriptPrompt(const QString &message, const QString &defaultValue, QString &result);
using KHTMLPart::xmlDocImpl;
khtml::RenderObject *renderer();
diff --git a/WebCore/kwq/KWQKHTMLPart.mm b/WebCore/kwq/KWQKHTMLPart.mm
index b64d5e1..3a4c7de 100644
--- a/WebCore/kwq/KWQKHTMLPart.mm
+++ b/WebCore/kwq/KWQKHTMLPart.mm
@@ -826,18 +826,18 @@ void KWQKHTMLPart::forceLayout()
void KWQKHTMLPart::runJavaScriptAlert(const QString &message)
{
- [[WebCoreViewFactory sharedFactory] runJavaScriptAlertPanelWithMessage:message.getNSString()];
+ [_bridge runJavaScriptAlertPanelWithMessage:message.getNSString()];
}
bool KWQKHTMLPart::runJavaScriptConfirm(const QString &message)
{
- return [[WebCoreViewFactory sharedFactory] runJavaScriptConfirmPanelWithMessage:message.getNSString()];
+ return [_bridge runJavaScriptConfirmPanelWithMessage:message.getNSString()];
}
bool KWQKHTMLPart::runJavaScriptPrompt(const QString &prompt, const QString &defaultValue, QString &result)
{
NSString *returnedText;
- bool ok = [[WebCoreViewFactory sharedFactory] runJavaScriptTextInputPanelWithPrompt:prompt.getNSString()
+ bool ok = [_bridge runJavaScriptTextInputPanelWithPrompt:prompt.getNSString()
defaultText:defaultValue.getNSString() returningText:&returnedText];
if (ok)
result = QString::fromNSString(returnedText);
diff --git a/WebCore/kwq/WebCoreBridge.h b/WebCore/kwq/WebCoreBridge.h
index d56366c..9a4a0af 100644
--- a/WebCore/kwq/WebCoreBridge.h
+++ b/WebCore/kwq/WebCoreBridge.h
@@ -55,6 +55,7 @@ typedef khtml::RenderPart KHTMLRenderPart;
@protocol WebCoreRenderTreeCopier;
@protocol WebCoreResourceHandle;
@protocol WebCoreResourceLoader;
+ at protocol WebCoreFileButton;
@protocol WebDOMDocument;
@protocol WebDOMNode;
@protocol WebDOMElement;
@@ -240,6 +241,10 @@ enum FrameBorderStyle {
- (NSWindow *)window;
- (void)setWindowFrame:(NSRect)frame;
+- (void)runJavaScriptAlertPanelWithMessage:(NSString *)message;
+- (BOOL)runJavaScriptConfirmPanelWithMessage:(NSString *)message;
+- (BOOL)runJavaScriptTextInputPanelWithPrompt:(NSString *)prompt defaultText:(NSString *)defaultText returningText:(NSString **)result;
+
- (id <WebCoreResourceHandle>)startLoadingResource:(id <WebCoreResourceLoader>)loader withURL:(NSString *)URL;
- (void)objectLoadedFromCacheWithURL:(NSString *)URL response:(id)response size:(unsigned)bytes;
- (BOOL)isReloading;
@@ -294,6 +299,8 @@ enum FrameBorderStyle {
- (BOOL)control:(NSControl *)control isValidObject:(id)obj;
- (BOOL)control:(NSControl *)control textView:(NSTextView *)textView doCommandBySelector:(SEL)commandSelector;
+- (NSView <WebCoreFileButton> *)fileButton;
+
@end
// This interface definition allows those who hold a WebCoreBridge * to call all the methods
@@ -310,3 +317,14 @@ enum FrameBorderStyle {
@protocol WebCoreRenderTreeCopier <NSObject>
- (NSObject *)nodeWithName:(NSString *)name position:(NSPoint)p rect:(NSRect)rect view:(NSView *)view children:(NSArray *)children;
@end
+
+ at protocol WebCoreFileButton <NSObject>
+- (void)setFilename:(NSString *)filename;
+- (NSString *)filename;
+- (float)baseline;
+- (void)setVisualFrame:(NSRect)rect;
+- (NSRect)visualFrame;
+- (NSSize)bestVisualFrameSizeForCharacterCount:(int)count;
+ at end
+
+extern NSString *WebCoreFileButtonFilenameChanged;
diff --git a/WebCore/kwq/WebCoreViewFactory.h b/WebCore/kwq/WebCoreViewFactory.h
index f77ee6f..33e1cd4 100644
--- a/WebCore/kwq/WebCoreViewFactory.h
+++ b/WebCore/kwq/WebCoreViewFactory.h
@@ -28,16 +28,8 @@
@class NSString;
@class NSView;
- at protocol WebCoreFileButton;
-
@protocol WebCoreViewFactory
-- (NSView <WebCoreFileButton> *)fileButton;
-
-- (void)runJavaScriptAlertPanelWithMessage:(NSString *)message;
-- (BOOL)runJavaScriptConfirmPanelWithMessage:(NSString *)message;
-- (BOOL)runJavaScriptTextInputPanelWithPrompt:(NSString *)prompt defaultText:(NSString *)defaultText returningText:(NSString **)result;
-
- (NSArray *)pluginsInfo; // array of id <WebCorePluginInfo>
- (NSString *)inputElementAltText;
@@ -69,13 +61,3 @@
- (NSArray *)extensionsForMIMEType:(NSString *)MIMEType;
@end
- at protocol WebCoreFileButton <NSObject>
-- (void)setFilename:(NSString *)filename;
-- (NSString *)filename;
-- (float)baseline;
-- (void)setVisualFrame:(NSRect)rect;
-- (NSRect)visualFrame;
-- (NSSize)bestVisualFrameSizeForCharacterCount:(int)count;
- at end
-
-extern NSString *WebCoreFileButtonFilenameChanged;
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 48a3606..cf77a6c 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,31 @@
+2003-03-01 Maciej Stachowiak <mjs at apple.com>
+
+ Reviewed by Darin.
+
+ - fixed 3163855 - Need control over certain potential dialogs/sheets
+
+ * WebCoreSupport.subproj/WebBridge.h:
+ * WebCoreSupport.subproj/WebBridge.m:
+ (-[WebBridge runJavaScriptAlertPanelWithMessage:]): Moved here from
+ view factory. Call the bridge instead of popping up the dialog.
+ (-[WebBridge runJavaScriptConfirmPanelWithMessage:]): Likewise.
+ (-[WebBridge runJavaScriptTextInputPanelWithPrompt:defaultText:returningText:]):
+ Likewise.
+ (-[WebBridge fileButton]): Moved here from view factory, so we can
+ pass the bridge to the button.
+ (-[WebBridge runOpenPanelForFileButtonWithResultListener:]): Call the delegate.
+ * WebCoreSupport.subproj/WebFileButton.h:
+ * WebCoreSupport.subproj/WebFileButton.m:
+ (-[WebFileButton initWithBridge:]): New method so this object knows about the bridge.
+ (-[WebFileButton beginSheet]): Instead of popping up the sheet directly,
+ call the bridge (which will call the delegate).
+ (-[WebFileButton chooseFilename:]): Update for the new filename.
+ (-[WebFileButton cancel]): Do nothing.
+ * WebCoreSupport.subproj/WebViewFactory.m: Removed some methods.
+ * WebKit.exp: Export .objc_class_WebJavaScriptTextInputPanel (for now).
+ * WebKit.pbproj/project.pbxproj: Export WebJavaScriptTextInputPanel.h (for now).
+ * WebView.subproj/WebWindowOperationsDelegate.h: Added new methods.
+
2003-03-01 Richard Williamson <rjw at apple.com>
Reviewed by Chris & Darin.
diff --git a/WebKit/WebCoreSupport.subproj/WebBridge.h b/WebKit/WebCoreSupport.subproj/WebBridge.h
index 70b3d92..b3d6b48 100644
--- a/WebKit/WebCoreSupport.subproj/WebBridge.h
+++ b/WebKit/WebCoreSupport.subproj/WebBridge.h
@@ -9,6 +9,7 @@
#import <WebCore/WebCoreBridge.h>
#import <WebKit/WebDataSource.h>
+#import <WebKit/WebWindowOperationsDelegate.h>
@interface WebBridge : WebCoreBridge <WebCoreBridge>
{
@@ -18,5 +19,6 @@
- (void)receivedData:(NSData *)data withDataSource:(WebDataSource *)dataSource;
- (void)setFrame:(WebFrame *)webFrame;
+- (void)runOpenPanelForFileButtonWithResultListener:(id<WebOpenPanelResultListener>)resultListener;
@end
diff --git a/WebKit/WebCoreSupport.subproj/WebBridge.m b/WebKit/WebCoreSupport.subproj/WebBridge.m
index 4d1cda4..b4c6a15 100644
--- a/WebKit/WebCoreSupport.subproj/WebBridge.m
+++ b/WebKit/WebCoreSupport.subproj/WebBridge.m
@@ -34,6 +34,8 @@
#import <WebKit/WebViewPrivate.h>
#import <WebKit/WebWindowOperationsDelegate.h>
#import <WebKit/WebFormDelegate.h>
+#import <WebKit/WebFileButton.h>
+#import <WebKit/WebJavaScriptTextInputPanel.h>
#import <WebFoundation/WebAssertions.h>
#import <WebFoundation/WebError.h>
@@ -45,6 +47,7 @@
#import <WebFoundation/WebResponse.h>
#import <WebFoundation/WebSystemBits.h>
#import <WebFoundation/WebFileTypeMappings.h>
+#import <WebFoundation/WebLocalizableStrings.h>
@interface NSApplication (DeclarationStolenFromAppKit)
@@ -169,6 +172,34 @@
return [[frame webView] window];
}
+- (void)runJavaScriptAlertPanelWithMessage:(NSString *)message
+{
+ [[[frame controller] windowOperationsDelegate] runJavaScriptAlertPanelWithMessage:message];
+}
+
+- (BOOL)runJavaScriptConfirmPanelWithMessage:(NSString *)message
+{
+ return [[[frame controller] windowOperationsDelegate] runJavaScriptConfirmPanelWithMessage:message];
+}
+
+- (BOOL)runJavaScriptTextInputPanelWithPrompt:(NSString *)prompt defaultText:(NSString *)defaultText returningText:(NSString **)result
+{
+ *result = [[[frame controller] windowOperationsDelegate] runJavaScriptTextInputPanelWithPrompt:prompt defaultText:defaultText];
+
+ return *result != nil;
+}
+
+- (NSView <WebCoreFileButton> *)fileButton
+{
+ return [[WebFileButton alloc] initWithBridge:self];
+}
+
+- (void)runOpenPanelForFileButtonWithResultListener:(id<WebOpenPanelResultListener>)resultListener
+{
+ [[[frame controller] windowOperationsDelegate] runOpenPanelForFileButtonWithResultListener:resultListener];
+}
+
+
- (WebDataSource *)dataSource
{
ASSERT(frame != nil);
diff --git a/WebKit/WebCoreSupport.subproj/WebFileButton.h b/WebKit/WebCoreSupport.subproj/WebFileButton.h
index 6ac1a30..b95cd41 100644
--- a/WebKit/WebCoreSupport.subproj/WebFileButton.h
+++ b/WebKit/WebCoreSupport.subproj/WebFileButton.h
@@ -9,12 +9,16 @@
#import <Cocoa/Cocoa.h>
@protocol WebCoreFileButton;
+ at protocol WebOpenPanelResultListener;
+ at class WebBridge;
- at interface WebFileButton : NSView <WebCoreFileButton>
+ at interface WebFileButton : NSView <WebCoreFileButton, WebOpenPanelResultListener>
{
NSString *_filename;
NSButton *_button;
NSImage *_icon;
NSString *_label;
+ WebBridge *_bridge;
}
+- (id)initWithBridge:(WebBridge *)bridge;
@end
diff --git a/WebKit/WebCoreSupport.subproj/WebFileButton.m b/WebKit/WebCoreSupport.subproj/WebFileButton.m
index 1943f45..a46b57b 100644
--- a/WebKit/WebCoreSupport.subproj/WebFileButton.m
+++ b/WebKit/WebCoreSupport.subproj/WebFileButton.m
@@ -10,7 +10,7 @@
#import <WebFoundation/WebAssertions.h>
#import <WebFoundation/WebLocalizableStrings.h>
-#import <WebCore/WebCoreViewFactory.h>
+#import <WebKit/WebBridge.h>
#import <WebKit/WebStringTruncator.h>
#define NO_FILE_SELECTED
@@ -38,6 +38,15 @@
[_button setFrameOrigin:NSMakePoint(0, 0)];
}
+- (id)initWithBridge:(WebBridge *)bridge
+{
+ self = [super init];
+ if (self) {
+ _bridge = bridge; // Don't retain to avoid cycle
+ }
+ return self;
+}
+
- (id)initWithFrame:(NSRect)frame
{
self = [super initWithFrame:frame];
@@ -191,33 +200,31 @@
- (void)beginSheet
{
- [self retain];
-
- NSOpenPanel *sheet = [NSOpenPanel openPanel];
- [sheet setPrompt:UI_STRING("Choose", "title for button in open panel from file button used in HTML forms")];
- [sheet beginSheetForDirectory:@"~" file:@"" types:nil
- modalForWindow:[self window] modalDelegate:self
- didEndSelector:@selector(openPanelDidEnd:returnCode:contextInfo:)
- contextInfo:nil];
+ [_bridge retain];
+ [_bridge runOpenPanelForFileButtonWithResultListener:self];
}
-- (void)chooseButtonPressed:(id)sender
+- (void)chooseFilename:(NSString *)fileName
{
- [self beginSheet];
+ [self setFilename:fileName];
+ [[NSNotificationCenter defaultCenter] postNotificationName:WebCoreFileButtonFilenameChanged object:self];
+ [_bridge release];
}
-- (void)mouseDown:(NSEvent *)event
+- (void)cancel
+{
+ [_bridge release];
+}
+
+
+- (void)chooseButtonPressed:(id)sender
{
[self beginSheet];
}
-- (void)openPanelDidEnd:(NSOpenPanel *)sheet returnCode:(int)returnCode contextInfo:(void *)contextInfo
+- (void)mouseDown:(NSEvent *)event
{
- if (returnCode == NSOKButton && [[sheet filenames] count] == 1) {
- [self setFilename:[[sheet filenames] objectAtIndex:0]];
- [[NSNotificationCenter defaultCenter] postNotificationName:WebCoreFileButtonFilenameChanged object:self];
- }
- [self release];
+ [self beginSheet];
}
@end
diff --git a/WebKit/WebCoreSupport.subproj/WebViewFactory.m b/WebKit/WebCoreSupport.subproj/WebViewFactory.m
index 41da289..a0c19f6 100644
--- a/WebKit/WebCoreSupport.subproj/WebViewFactory.m
+++ b/WebKit/WebCoreSupport.subproj/WebViewFactory.m
@@ -11,8 +11,6 @@
#import <WebFoundation/WebAssertions.h>
#import <WebFoundation/WebLocalizableStrings.h>
-#import <WebKit/WebFileButton.h>
-#import <WebKit/WebJavaScriptTextInputPanel.h>
#import <WebKit/WebPluginDatabase.h>
@implementation WebViewFactory
@@ -25,35 +23,6 @@
ASSERT([[self sharedFactory] isKindOfClass:self]);
}
-- (void)runJavaScriptAlertPanelWithMessage:(NSString *)message
-{
- NSRunAlertPanel(UI_STRING("JavaScript", "title of JavaScript alert panel"), @"%@", nil, nil, nil, message);
-}
-
-- (BOOL)runJavaScriptConfirmPanelWithMessage:(NSString *)message
-{
- return NSRunAlertPanel(UI_STRING("JavaScript", "title of JavaScript alert panel"), @"%@", nil,
- UI_STRING("Cancel", "standard button label"), nil, message) == NSAlertDefaultReturn;
-}
-
-- (BOOL)runJavaScriptTextInputPanelWithPrompt:(NSString *)prompt defaultText:(NSString *)defaultText returningText:(NSString **)result
-{
- WebJavaScriptTextInputPanel *panel = [[WebJavaScriptTextInputPanel alloc] initWithPrompt:prompt text:defaultText];
- [panel showWindow:nil];
- BOOL OK = [NSApp runModalForWindow:[panel window]];
- if (OK) {
- *result = [panel text];
- }
- [[panel window] close];
- [panel release];
- return OK;
-}
-
-- (NSView <WebCoreFileButton> *)fileButton
-{
- return [[WebFileButton alloc] init];
-}
-
- (NSArray *)pluginsInfo
{
return [[WebPluginDatabase installedPlugins] plugins];
diff --git a/WebKit/WebKit.exp b/WebKit/WebKit.exp
index fd9124f..58b955f 100644
--- a/WebKit/WebKit.exp
+++ b/WebKit/WebKit.exp
@@ -17,6 +17,7 @@
.objc_class_name_WebHistoryItem
.objc_class_name_WebIconDatabase
.objc_class_name_WebIconLoader
+.objc_class_name_WebJavaScriptTextInputPanel
.objc_class_name_WebKitStatistics
.objc_class_name_WebLocationChangeDelegate
.objc_class_name_WebPreferences
diff --git a/WebKit/WebKit.pbproj/project.pbxproj b/WebKit/WebKit.pbproj/project.pbxproj
index 869d741..d7c74f0 100644
--- a/WebKit/WebKit.pbproj/project.pbxproj
+++ b/WebKit/WebKit.pbproj/project.pbxproj
@@ -1497,6 +1497,9 @@
fileRef = 9345D4EA0365C5B2008635CE;
isa = PBXBuildFile;
settings = {
+ ATTRIBUTES = (
+ Private,
+ );
};
};
65490EC903666E30000CED4B = {
diff --git a/WebKit/WebView.subproj/WebUIDelegate.h b/WebKit/WebView.subproj/WebUIDelegate.h
index 4e58bb0..dcbd145 100644
--- a/WebKit/WebView.subproj/WebUIDelegate.h
+++ b/WebKit/WebView.subproj/WebUIDelegate.h
@@ -6,6 +6,30 @@
*/
#import <Cocoa/Cocoa.h>
+#import <WebFoundation/WebRequest.h>
+
+/*!
+ @protocol WebOpenPanelResultListener
+ @discussion This protocol is used to call back with the results of
+ the file open panel requested by runOpenPanelForFileButtonWithResultListener:
+*/
+
+ at protocol WebOpenPanelResultListener <NSObject>
+
+/*!
+ @method chooseFilename:
+ @abstract Call this method to return a filename from the file open panel.
+ @param fileName
+*/
+- (void)chooseFilename:(NSString *)fileName;
+
+/*!
+ @method cancel
+ @abstract Call this method to indicate that the file open panel was cancelled.
+*/
+- (void)cancel;
+
+ at end
@class WebController;
@@ -175,7 +199,7 @@
have have their own separate resize controls and this may need to
be handled specially.
*/
-- (void)setResizbale:(BOOL)resizable;
+- (void)setResizable:(BOOL)resizable;
/*!
@method setFrame:
@@ -193,5 +217,46 @@
@discussion
*/
- (NSRect)frame;
+
+/*!
+ @method runJavaScriptAlertPanelWithMessage:
+ @abstract Display a JavaScript alert panel
+ @param message The message to display
+ @discussion Clients should visually indicate that this panel comes
+ from JavaScript. The panel should have a single OK button.
+*/
+- (void)runJavaScriptAlertPanelWithMessage:(NSString *)message;
+
+/*!
+ @method runJavaScriptAlertPanelWithMessage:
+ @abstract Display a JavaScript confirm panel
+ @param message The message to display
+ @result YES if the user hit OK, no if the user chose Cancel.
+ @discussion Clients should visually indicate that this panel comes
+ from JavaScript. The panel should have two buttons, e.g. "OK" and
+ "Cancel".
+*/
+- (BOOL)runJavaScriptConfirmPanelWithMessage:(NSString *)message;
+
+/*!
+ @method runJavaScriptTextInputPanelWithPrompt:defaultText:
+ @abstract Display a JavaScript text input panel
+ @param message The message to display
+ @param defaultText The initial text for the text entry area.
+ @result The typed text if the user hit OK, otherwise nil.
+ @discussion Clients should visually indicate that this panel comes
+ from JavaScript. The panel should have two buttons, e.g. "OK" and
+ "Cancel", and an area to type text.
+*/
+- (NSString *)runJavaScriptTextInputPanelWithPrompt:(NSString *)prompt defaultText:(NSString *)defaultText;
+
+/*!
+ @message runOpenPanelForFileButtonWithResultListener:
+ @abstract Display a file open panel for a file input control.
+ @param resultListener The object to call back with the results.
+ @discussion This method is passed a callback object instead of giving a return
+ value so that it can be handled with a sheet.
+*/
+- (void)runOpenPanelForFileButtonWithResultListener:(id<WebOpenPanelResultListener>)resultListener;
@end
diff --git a/WebKit/WebView.subproj/WebWindowOperationsDelegate.h b/WebKit/WebView.subproj/WebWindowOperationsDelegate.h
index 4e58bb0..dcbd145 100644
--- a/WebKit/WebView.subproj/WebWindowOperationsDelegate.h
+++ b/WebKit/WebView.subproj/WebWindowOperationsDelegate.h
@@ -6,6 +6,30 @@
*/
#import <Cocoa/Cocoa.h>
+#import <WebFoundation/WebRequest.h>
+
+/*!
+ @protocol WebOpenPanelResultListener
+ @discussion This protocol is used to call back with the results of
+ the file open panel requested by runOpenPanelForFileButtonWithResultListener:
+*/
+
+ at protocol WebOpenPanelResultListener <NSObject>
+
+/*!
+ @method chooseFilename:
+ @abstract Call this method to return a filename from the file open panel.
+ @param fileName
+*/
+- (void)chooseFilename:(NSString *)fileName;
+
+/*!
+ @method cancel
+ @abstract Call this method to indicate that the file open panel was cancelled.
+*/
+- (void)cancel;
+
+ at end
@class WebController;
@@ -175,7 +199,7 @@
have have their own separate resize controls and this may need to
be handled specially.
*/
-- (void)setResizbale:(BOOL)resizable;
+- (void)setResizable:(BOOL)resizable;
/*!
@method setFrame:
@@ -193,5 +217,46 @@
@discussion
*/
- (NSRect)frame;
+
+/*!
+ @method runJavaScriptAlertPanelWithMessage:
+ @abstract Display a JavaScript alert panel
+ @param message The message to display
+ @discussion Clients should visually indicate that this panel comes
+ from JavaScript. The panel should have a single OK button.
+*/
+- (void)runJavaScriptAlertPanelWithMessage:(NSString *)message;
+
+/*!
+ @method runJavaScriptAlertPanelWithMessage:
+ @abstract Display a JavaScript confirm panel
+ @param message The message to display
+ @result YES if the user hit OK, no if the user chose Cancel.
+ @discussion Clients should visually indicate that this panel comes
+ from JavaScript. The panel should have two buttons, e.g. "OK" and
+ "Cancel".
+*/
+- (BOOL)runJavaScriptConfirmPanelWithMessage:(NSString *)message;
+
+/*!
+ @method runJavaScriptTextInputPanelWithPrompt:defaultText:
+ @abstract Display a JavaScript text input panel
+ @param message The message to display
+ @param defaultText The initial text for the text entry area.
+ @result The typed text if the user hit OK, otherwise nil.
+ @discussion Clients should visually indicate that this panel comes
+ from JavaScript. The panel should have two buttons, e.g. "OK" and
+ "Cancel", and an area to type text.
+*/
+- (NSString *)runJavaScriptTextInputPanelWithPrompt:(NSString *)prompt defaultText:(NSString *)defaultText;
+
+/*!
+ @message runOpenPanelForFileButtonWithResultListener:
+ @abstract Display a file open panel for a file input control.
+ @param resultListener The object to call back with the results.
+ @discussion This method is passed a callback object instead of giving a return
+ value so that it can be handled with a sheet.
+*/
+- (void)runOpenPanelForFileButtonWithResultListener:(id<WebOpenPanelResultListener>)resultListener;
@end
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list