[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:26 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit e26a6f477435611f8a8198f4c35027b23a615e67
Author: mjs <mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Mar 5 07:05:54 2003 +0000
Tests:
Reviewed by Trey.
Updated for WebKit API change.
* DumpBackForward/main.m:
(main):
(-[CheapWindowOpsDelegate createWindowWithRequest:]):
* DumpRenderTree/main.m:
(main):
* PDFViewer/DocumentController.m:
(-[DocumentController loadURL:]):
* SimpleViewer/DocumentController.m:
(-[DocumentController loadURL:]):
* SnippetEditor/SnippetController.m:
(-[SnippetController _resetViews]):
WebKit:
Reviewed by Trey.
Added the ability to set the top-level frame name via the
WebController initializer. Also made [[controller mainFrame]
frameName] return the true top-level frame name instead of "_top",
since that is already special-cased anywhere it needs to be.
* WebView.subproj/WebController.h:
* WebView.subproj/WebController.m:
(-[WebController init]): Update for change to designated initializer.
(-[WebController initWithView:]): New convenience initializer.
(-[WebController initWithView:frameName:setName:]): Added ability to set
top-level frame name.
* WebView.subproj/WebControllerPrivate.h:
* WebView.subproj/WebControllerPrivate.m:
(-[WebControllerPrivate dealloc]): Remove topLevelFrameNAme field.
(-[WebController _setTopLevelFrameName:]): Actually set it
on the top level frame, no point to keeping it here.
(-[WebController _findFrameInThisWindowNamed:]): No more need to
special-case top-level frame name.
* WebView.subproj/WebFrame.m:
(-[WebFrame initWithName:webView:controller:]): call [self _setName:] instead
of [_private setName:]
* WebView.subproj/WebFramePrivate.h:
* WebView.subproj/WebFramePrivate.m:
(-[WebFrame _setName:]): Don't let the name get set to _blank.
WebBrowser:
Reviewed by Trey.
Updated for WebKit API change.
* BrowserWebController.m:
(-[BrowserWebController initWithDocument:request:]):
* BrowserWindowController.m:
(-[BrowserWindowController setUpFavoritesBar]):
* Debug/SnippetController.m:
(-[SnippetController load]):
* DownloadProgressEntry.m:
(-[DownloadProgressEntry reload]):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3749 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 627c9ae..6da8a7a 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,32 @@
+2003-03-04 Maciej Stachowiak <mjs at apple.com>
+
+ Reviewed by Trey.
+
+ Added the ability to set the top-level frame name via the
+ WebController initializer. Also made [[controller mainFrame]
+ frameName] return the true top-level frame name instead of "_top",
+ since that is already special-cased anywhere it needs to be.
+
+ * WebView.subproj/WebController.h:
+ * WebView.subproj/WebController.m:
+ (-[WebController init]): Update for change to designated initializer.
+ (-[WebController initWithView:]): New convenience initializer.
+ (-[WebController initWithView:frameName:setName:]): Added ability to set
+ top-level frame name.
+ * WebView.subproj/WebControllerPrivate.h:
+ * WebView.subproj/WebControllerPrivate.m:
+ (-[WebControllerPrivate dealloc]): Remove topLevelFrameNAme field.
+ (-[WebController _setTopLevelFrameName:]): Actually set it
+ on the top level frame, no point to keeping it here.
+ (-[WebController _findFrameInThisWindowNamed:]): No more need to
+ special-case top-level frame name.
+ * WebView.subproj/WebFrame.m:
+ (-[WebFrame initWithName:webView:controller:]): call [self _setName:] instead
+ of [_private setName:]
+ * WebView.subproj/WebFramePrivate.h:
+ * WebView.subproj/WebFramePrivate.m:
+ (-[WebFrame _setName:]): Don't let the name get set to _blank.
+
2003-03-04 John Sullivan <sullivan at apple.com>
Reviewed by Darin
diff --git a/WebKit/WebView.subproj/WebController.h b/WebKit/WebView.subproj/WebController.h
index ef11400..d5a708a 100644
--- a/WebKit/WebView.subproj/WebController.h
+++ b/WebKit/WebView.subproj/WebController.h
@@ -46,7 +46,7 @@ extern NSString *WebElementLinkLabelKey; // NSString of the text within the anch
WebController *webController;
WebFrame *mainFrame;
- webController = [[WebController alloc] initWithView: webView controllerSetName: nil];
+ webController = [[WebController alloc] initWithView: webView];
mainFrame = [webController mainFrame];
[mainFrame loadRequest:request];
</pre>
@@ -94,15 +94,25 @@ extern NSString *WebElementLinkLabelKey; // NSString of the text within the anch
+ (BOOL)canShowFile:(NSString *)path;
/*!
- @method initWithView:controllerSetName:
+ @method initWithView:
+ @abstract This method is a convenience equivalent to initWithView:view frameName:nil setName:nil
+ @param view The view to use.
+*/
+- initWithView: (WebView *)view;
+
+/*!
+ @method initWithView:frameName:setName:
@abstract The designated initializer for WebController.
- @discussion Initialize a WebController with the supplied parameters. This method
- will create a main WebFrame with the view. The frame will be named "_top".
+ @discussion Initialize a WebController with the supplied parameters. This method will
+ create a main WebFrame with the view. Passing a top level frame name is useful if you
+ handle a targetted frame navigation that would normally open a window in some other
+ way that still ends up creating a new WebController.
@param view The main view to be associated with the controller. May be nil.
- @param name The name of the controller set to which this controller will be added. May be nil.
+ @param frameName The name to use for the top level frame. May be nil.
+ @param setName The name of the controller set to which this controller will be added. May be nil.
@result Returns an initialized WebController.
*/
-- initWithView: (WebView *)view controllerSetName: (NSString *)name;
+- initWithView: (WebView *)view frameName: (NSString *)frameName setName: (NSString *)name ;
/*!
@method setWindowOperationsDelegate:
diff --git a/WebKit/WebView.subproj/WebController.m b/WebKit/WebView.subproj/WebController.m
index 574436a..06994ce 100644
--- a/WebKit/WebView.subproj/WebController.m
+++ b/WebKit/WebView.subproj/WebController.m
@@ -59,16 +59,22 @@ NSString *WebElementLinkTitleKey = @"WebElementLinkTitle";
- init
{
- return [self initWithView: nil controllerSetName: nil];
+ return [self initWithView: nil frameName: nil setName: nil];
}
-- initWithView: (WebView *)view controllerSetName: (NSString *)name;
+- initWithView: (WebView *)view
+{
+ return [self initWithView: view frameName: nil setName: nil];
+}
+
+
+- initWithView: (WebView *)view frameName: (NSString *)frameName setName: (NSString *)setName;
{
[super init];
_private = [[WebControllerPrivate alloc] init];
- _private->mainFrame = [[WebFrame alloc] initWithName: @"_top" webView: view controller: self];
- _private->controllerSetName = [name retain];
+ _private->mainFrame = [[WebFrame alloc] initWithName: frameName webView: view controller: self];
+ _private->controllerSetName = [setName retain];
if (_private->controllerSetName != nil) {
[WebControllerSets addController:self toSetNamed:_private->controllerSetName];
}
diff --git a/WebKit/WebView.subproj/WebControllerPrivate.h b/WebKit/WebView.subproj/WebControllerPrivate.h
index 4aabba5..4fa6afb 100644
--- a/WebKit/WebView.subproj/WebControllerPrivate.h
+++ b/WebKit/WebView.subproj/WebControllerPrivate.h
@@ -44,7 +44,6 @@ enum { NumUserAgentStringTypes = WinIE + 1 };
BOOL defersCallbacks;
NSString *controllerSetName;
- NSString *topLevelFrameName;
WebPreferences *preferences;
WebCoreSettings *settings;
diff --git a/WebKit/WebView.subproj/WebControllerPrivate.m b/WebKit/WebView.subproj/WebControllerPrivate.m
index 99358a7..03727f8 100644
--- a/WebKit/WebView.subproj/WebControllerPrivate.m
+++ b/WebKit/WebView.subproj/WebControllerPrivate.m
@@ -81,7 +81,6 @@
}
[controllerSetName release];
- [topLevelFrameName release];
[preferences release];
[settings release];
@@ -259,20 +258,12 @@
- (void)_setTopLevelFrameName:(NSString *)name
{
- // It's wrong to name a frame "_blank".
- if(![name isEqualToString:@"_blank"]){
- [_private->topLevelFrameName release];
- _private->topLevelFrameName = [name retain];
- }
+ [[self mainFrame] _setName:name];
}
- (WebFrame *)_findFrameInThisWindowNamed: (NSString *)name
{
- if ([_private->topLevelFrameName isEqualToString:name]) {
- return [self mainFrame];
- } else {
- return [[self mainFrame] _descendantFrameNamed:name];
- }
+ return [[self mainFrame] _descendantFrameNamed:name];
}
- (WebFrame *)_findFrameNamed: (NSString *)name
diff --git a/WebKit/WebView.subproj/WebFrame.m b/WebKit/WebView.subproj/WebFrame.m
index 4f0f850..e3c1313 100644
--- a/WebKit/WebView.subproj/WebFrame.m
+++ b/WebKit/WebView.subproj/WebFrame.m
@@ -46,7 +46,7 @@
[_private->bridge setWebFrame:self];
[_private->bridge setName:n];
- [_private setName:n];
+ [self _setName:n];
if (v)
[self setWebView:v];
diff --git a/WebKit/WebView.subproj/WebFramePrivate.h b/WebKit/WebView.subproj/WebFramePrivate.h
index c6ce4be..3383d3d 100644
--- a/WebKit/WebView.subproj/WebFramePrivate.h
+++ b/WebKit/WebView.subproj/WebFramePrivate.h
@@ -99,6 +99,7 @@ typedef enum {
@end
@interface WebFrame (WebPrivate)
+- (void)_setName:(NSString *)name;
- (WebFrame *)_descendantFrameNamed:(NSString *)name;
- (void)_controllerWillBeDeallocated;
- (void)_detachFromParent;
diff --git a/WebKit/WebView.subproj/WebFramePrivate.m b/WebKit/WebView.subproj/WebFramePrivate.m
index 0ca43ab..f039ebb 100644
--- a/WebKit/WebView.subproj/WebFramePrivate.m
+++ b/WebKit/WebView.subproj/WebFramePrivate.m
@@ -302,6 +302,7 @@ Repeat load of the same URL (by any other means of navigation other than the rel
return nil;
}
+
- (WebFrame *)_descendantFrameNamed:(NSString *)name
{
if ([[self name] isEqualToString: name]){
diff --git a/WebKit/WebView.subproj/WebView.h b/WebKit/WebView.subproj/WebView.h
index ef11400..d5a708a 100644
--- a/WebKit/WebView.subproj/WebView.h
+++ b/WebKit/WebView.subproj/WebView.h
@@ -46,7 +46,7 @@ extern NSString *WebElementLinkLabelKey; // NSString of the text within the anch
WebController *webController;
WebFrame *mainFrame;
- webController = [[WebController alloc] initWithView: webView controllerSetName: nil];
+ webController = [[WebController alloc] initWithView: webView];
mainFrame = [webController mainFrame];
[mainFrame loadRequest:request];
</pre>
@@ -94,15 +94,25 @@ extern NSString *WebElementLinkLabelKey; // NSString of the text within the anch
+ (BOOL)canShowFile:(NSString *)path;
/*!
- @method initWithView:controllerSetName:
+ @method initWithView:
+ @abstract This method is a convenience equivalent to initWithView:view frameName:nil setName:nil
+ @param view The view to use.
+*/
+- initWithView: (WebView *)view;
+
+/*!
+ @method initWithView:frameName:setName:
@abstract The designated initializer for WebController.
- @discussion Initialize a WebController with the supplied parameters. This method
- will create a main WebFrame with the view. The frame will be named "_top".
+ @discussion Initialize a WebController with the supplied parameters. This method will
+ create a main WebFrame with the view. Passing a top level frame name is useful if you
+ handle a targetted frame navigation that would normally open a window in some other
+ way that still ends up creating a new WebController.
@param view The main view to be associated with the controller. May be nil.
- @param name The name of the controller set to which this controller will be added. May be nil.
+ @param frameName The name to use for the top level frame. May be nil.
+ @param setName The name of the controller set to which this controller will be added. May be nil.
@result Returns an initialized WebController.
*/
-- initWithView: (WebView *)view controllerSetName: (NSString *)name;
+- initWithView: (WebView *)view frameName: (NSString *)frameName setName: (NSString *)name ;
/*!
@method setWindowOperationsDelegate:
diff --git a/WebKit/WebView.subproj/WebView.m b/WebKit/WebView.subproj/WebView.m
index 574436a..06994ce 100644
--- a/WebKit/WebView.subproj/WebView.m
+++ b/WebKit/WebView.subproj/WebView.m
@@ -59,16 +59,22 @@ NSString *WebElementLinkTitleKey = @"WebElementLinkTitle";
- init
{
- return [self initWithView: nil controllerSetName: nil];
+ return [self initWithView: nil frameName: nil setName: nil];
}
-- initWithView: (WebView *)view controllerSetName: (NSString *)name;
+- initWithView: (WebView *)view
+{
+ return [self initWithView: view frameName: nil setName: nil];
+}
+
+
+- initWithView: (WebView *)view frameName: (NSString *)frameName setName: (NSString *)setName;
{
[super init];
_private = [[WebControllerPrivate alloc] init];
- _private->mainFrame = [[WebFrame alloc] initWithName: @"_top" webView: view controller: self];
- _private->controllerSetName = [name retain];
+ _private->mainFrame = [[WebFrame alloc] initWithName: frameName webView: view controller: self];
+ _private->controllerSetName = [setName retain];
if (_private->controllerSetName != nil) {
[WebControllerSets addController:self toSetNamed:_private->controllerSetName];
}
diff --git a/WebKit/WebView.subproj/WebViewPrivate.h b/WebKit/WebView.subproj/WebViewPrivate.h
index 4aabba5..4fa6afb 100644
--- a/WebKit/WebView.subproj/WebViewPrivate.h
+++ b/WebKit/WebView.subproj/WebViewPrivate.h
@@ -44,7 +44,6 @@ enum { NumUserAgentStringTypes = WinIE + 1 };
BOOL defersCallbacks;
NSString *controllerSetName;
- NSString *topLevelFrameName;
WebPreferences *preferences;
WebCoreSettings *settings;
diff --git a/WebKit/WebView.subproj/WebViewPrivate.m b/WebKit/WebView.subproj/WebViewPrivate.m
index 99358a7..03727f8 100644
--- a/WebKit/WebView.subproj/WebViewPrivate.m
+++ b/WebKit/WebView.subproj/WebViewPrivate.m
@@ -81,7 +81,6 @@
}
[controllerSetName release];
- [topLevelFrameName release];
[preferences release];
[settings release];
@@ -259,20 +258,12 @@
- (void)_setTopLevelFrameName:(NSString *)name
{
- // It's wrong to name a frame "_blank".
- if(![name isEqualToString:@"_blank"]){
- [_private->topLevelFrameName release];
- _private->topLevelFrameName = [name retain];
- }
+ [[self mainFrame] _setName:name];
}
- (WebFrame *)_findFrameInThisWindowNamed: (NSString *)name
{
- if ([_private->topLevelFrameName isEqualToString:name]) {
- return [self mainFrame];
- } else {
- return [[self mainFrame] _descendantFrameNamed:name];
- }
+ return [[self mainFrame] _descendantFrameNamed:name];
}
- (WebFrame *)_findFrameNamed: (NSString *)name
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list