[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
rjw
rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:38:54 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit c0278e38ecc4acc6ec83c1990873927ebe9307f1
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Apr 25 22:55:53 2003 +0000
WebKit:
Final API review changes.
WebFrame:
parent -> parentFrame
children -> childFrames
loadString:baseURL: -> loadHTMLString:baseURL:
laodData:encodingName:baseURL: -> loadData:MIMEType:textEncodingName:baseURL:
Reviewed by Chris.
* WebView.subproj/WebDataProtocol.h:
* WebView.subproj/WebDataProtocol.m:
(-[WebDataRequestParameters dealloc]):
(-[NSURLRequest _webDataRequestMIMEType]):
(-[NSURLRequest _webDataRequestSetMIMEType:]):
(-[WebDataProtocol startLoading]):
* WebView.subproj/WebDataSource.m:
(-[WebDataSource isLoading]):
* WebView.subproj/WebDataSourcePrivate.m:
(-[WebDataSource _recursiveStopLoading]):
(-[WebDataSource _layoutChildren]):
(-[WebDataSource _defersCallbacksChanged]):
* WebView.subproj/WebFrame.h:
* WebView.subproj/WebFrame.m:
(-[WebFrame loadHTMLString:baseURL:]):
(-[WebFrame findFrameNamed:]):
(-[WebFrame parentFrame]):
(-[WebFrame childFrames]):
* WebView.subproj/WebFramePrivate.m:
(-[WebFrame _createItem]):
(-[WebFrame _descendantFrameNamed:]):
(-[WebFrame _transitionToCommitted:]):
(-[WebFrame _isLoadComplete]):
(+[WebFrame _recursiveCheckCompleteFromFrame:]):
(-[WebFrame _textSizeMultiplierChanged]):
(-[WebFrame _viewWillMoveToHostWindow:]):
(-[WebFrame _viewDidMoveToHostWindow]):
(-[WebFrame _saveDocumentAndScrollState]):
(-[WebFrame _loadDataSource:withLoadType:formState:]):
* WebView.subproj/WebViewPrivate.m:
(-[WebViewPrivate _clearControllerReferences:]):
(-[WebView _frameForDataSource:fromFrame:]):
(-[WebView _frameForView:fromFrame:]):
WebBrowser:
Final API review changes.
WebFrame:
parent -> parentFrame
children -> childFrames
loadString:baseURL: -> loadHTMLString:baseURL:
laodData:encodingName:baseURL: -> loadData:MIMEType:textEncodingName:baseURL:
Reviewed by Chris.
* BrowserWebController.m:
(-[BrowserWebController _closeDataSources:]):
* BrowserWebFrameExtras.m:
(-[WebFrame _topFrame]):
* BrowserWebViewExtras.m:
(-[WebFrameView largestScrollableWebView]):
* Debug/SnippetController.m:
(-[SnippetController load]):
* LoadProgressMonitor.m:
(-[LoadProgressMonitor _monitorProvisionalDataSourceForFrame:]):
(-[LoadProgressMonitor titleChangedForFrame:]):
Tests:
Final API review changes.
WebFrame:
parent -> parentFrame
children -> childFrames
loadString:baseURL: -> loadHTMLString:baseURL:
laodData:encodingName:baseURL: -> loadData:MIMEType:textEncodingName:baseURL:
Reviewed by Chris.
* PictureBrowser/Document.m:
(-[Document readFromFile:ofType:]):
* SnippetEditor/SnippetController.m:
(-[SnippetController updateFromText:]):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@4192 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index a8eb5c4..98aa036 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,49 @@
+2003-04-25 Richard Williamson <rjw at apple.com>
+
+ Final API review changes.
+
+ WebFrame:
+ parent -> parentFrame
+ children -> childFrames
+ loadString:baseURL: -> loadHTMLString:baseURL:
+ laodData:encodingName:baseURL: -> loadData:MIMEType:textEncodingName:baseURL:
+
+ Reviewed by Chris.
+
+ * WebView.subproj/WebDataProtocol.h:
+ * WebView.subproj/WebDataProtocol.m:
+ (-[WebDataRequestParameters dealloc]):
+ (-[NSURLRequest _webDataRequestMIMEType]):
+ (-[NSURLRequest _webDataRequestSetMIMEType:]):
+ (-[WebDataProtocol startLoading]):
+ * WebView.subproj/WebDataSource.m:
+ (-[WebDataSource isLoading]):
+ * WebView.subproj/WebDataSourcePrivate.m:
+ (-[WebDataSource _recursiveStopLoading]):
+ (-[WebDataSource _layoutChildren]):
+ (-[WebDataSource _defersCallbacksChanged]):
+ * WebView.subproj/WebFrame.h:
+ * WebView.subproj/WebFrame.m:
+ (-[WebFrame loadHTMLString:baseURL:]):
+ (-[WebFrame findFrameNamed:]):
+ (-[WebFrame parentFrame]):
+ (-[WebFrame childFrames]):
+ * WebView.subproj/WebFramePrivate.m:
+ (-[WebFrame _createItem]):
+ (-[WebFrame _descendantFrameNamed:]):
+ (-[WebFrame _transitionToCommitted:]):
+ (-[WebFrame _isLoadComplete]):
+ (+[WebFrame _recursiveCheckCompleteFromFrame:]):
+ (-[WebFrame _textSizeMultiplierChanged]):
+ (-[WebFrame _viewWillMoveToHostWindow:]):
+ (-[WebFrame _viewDidMoveToHostWindow]):
+ (-[WebFrame _saveDocumentAndScrollState]):
+ (-[WebFrame _loadDataSource:withLoadType:formState:]):
+ * WebView.subproj/WebViewPrivate.m:
+ (-[WebViewPrivate _clearControllerReferences:]):
+ (-[WebView _frameForDataSource:fromFrame:]):
+ (-[WebView _frameForView:fromFrame:]):
+
2003-04-25 Chris Blumenberg <cblu at apple.com>
Don't do "@class WebDataSource" as that class isn't mentioned in this file.
diff --git a/WebKit/WebView.subproj/WebDataProtocol.h b/WebKit/WebView.subproj/WebDataProtocol.h
index d291030..c2b2683 100644
--- a/WebKit/WebView.subproj/WebDataProtocol.h
+++ b/WebKit/WebView.subproj/WebDataProtocol.h
@@ -23,6 +23,8 @@
- (void)_webDataRequestSetData:(NSData *)data;
- (NSString *)_webDataRequestEncoding;
- (void)_webDataRequestSetEncoding:(NSString *)encoding;
+- (NSString *)_webDataRequestMIMEType;
+- (void)_webDataRequestSetMIMEType:(NSString *)MIMEType;
- (NSURL *)_webDataRequestBaseURL;
- (void)_webDataRequestSetBaseURL:(NSURL *)baseURL;
- (NSMutableURLRequest *)_webDataRequestExternalRequest;
diff --git a/WebKit/WebView.subproj/WebDataProtocol.m b/WebKit/WebView.subproj/WebDataProtocol.m
index ed001ea..ae61f52 100644
--- a/WebKit/WebView.subproj/WebDataProtocol.m
+++ b/WebKit/WebView.subproj/WebDataProtocol.m
@@ -17,6 +17,7 @@ static NSString *WebDataRequestPropertyKey = @"WebDataRequest";
{
@public
NSData *data;
+ NSString *MIMEType;
NSString *encoding;
NSURL *baseURL;
}
@@ -36,6 +37,7 @@ static NSString *WebDataRequestPropertyKey = @"WebDataRequest";
- (void)dealloc
{
[data release];
+ [MIMEType release];
[encoding release];
[baseURL release];
[super dealloc];
@@ -103,6 +105,19 @@ static NSString *WebDataRequestPropertyKey = @"WebDataRequest";
parameters->encoding = [encoding retain];
}
+- (NSString *)_webDataRequestMIMEType
+{
+ WebDataRequestParameters *parameters = [self _webDataRequestParametersForReading];
+ return parameters ? parameters->MIMEType: nil;
+}
+
+- (void)_webDataRequestSetMIMEType:(NSString *)type
+{
+ WebDataRequestParameters *parameters = [self _webDataRequestParametersForWriting];
+ [parameters->MIMEType release];
+ parameters->MIMEType = [type retain];
+}
+
- (NSURL *)_webDataRequestBaseURL
{
WebDataRequestParameters *parameters = [self _webDataRequestParametersForReading];
@@ -168,7 +183,7 @@ static NSString *WebDataRequestPropertyKey = @"WebDataRequest";
if (data) {
NSURLResponse *response = [[NSURLResponse alloc] init];
[response setURL:[request URL]];
- [response setMIMEType:@"text/html"];
+ [response setMIMEType:[request _webDataRequestMIMEType]];
[response setTextEncodingName:[request _webDataRequestEncoding]];
[client URLProtocol:self didReceiveResponse:response cacheStoragePolicy:NSURLCacheStorageNotAllowed];
[client URLProtocol:self didLoadData:data];
diff --git a/WebKit/WebView.subproj/WebDataSource.m b/WebKit/WebView.subproj/WebDataSource.m
index e4ad98a..9c22849 100644
--- a/WebKit/WebView.subproj/WebDataSource.m
+++ b/WebKit/WebView.subproj/WebDataSource.m
@@ -103,7 +103,7 @@
// Put in the auto-release pool because it's common to call this from a run loop source,
// and then the entire list of frames lasts until the next autorelease.
NSAutoreleasePool *pool = [NSAutoreleasePool new];
- NSEnumerator *e = [[[self webFrame] children] objectEnumerator];
+ NSEnumerator *e = [[[self webFrame] childFrames] objectEnumerator];
WebFrame *childFrame;
while ((childFrame = [e nextObject])) {
if ([[childFrame dataSource] isLoading] || [[childFrame provisionalDataSource] isLoading]) {
diff --git a/WebKit/WebView.subproj/WebDataSourcePrivate.m b/WebKit/WebView.subproj/WebDataSourcePrivate.m
index 7390f8a..1d27d8f 100644
--- a/WebKit/WebView.subproj/WebDataSourcePrivate.m
+++ b/WebKit/WebView.subproj/WebDataSourcePrivate.m
@@ -262,7 +262,7 @@
// We depend on the controller in webFrame and we release it in _stopLoading,
// so call webFrame first so we don't send a message the released controller (3129503).
- [[[self webFrame] children] makeObjectsPerformSelector:@selector(stopLoading)];
+ [[[self webFrame] childFrames] makeObjectsPerformSelector:@selector(stopLoading)];
[self _stopLoadingInternal];
[self release];
@@ -426,7 +426,7 @@
- (void)_layoutChildren
{
- NSArray *subFrames = [[self webFrame] children];
+ NSArray *subFrames = [[self webFrame] childFrames];
if ([subFrames count]) {
WebFrame *subFrame;
unsigned int i;
@@ -670,7 +670,7 @@
[client setDefersCallbacks:defers];
}
- [[[self webFrame] children] makeObjectsPerformSelector:@selector(_defersCallbacksChanged)];
+ [[[self webFrame] childFrames] makeObjectsPerformSelector:@selector(_defersCallbacksChanged)];
}
- (NSURLRequest *)_originalRequest
diff --git a/WebKit/WebView.subproj/WebFrame.h b/WebKit/WebView.subproj/WebFrame.h
index 9a5a5e9..fc80299 100644
--- a/WebKit/WebView.subproj/WebFrame.h
+++ b/WebKit/WebView.subproj/WebFrame.h
@@ -62,19 +62,20 @@
- (void)loadRequest:(NSURLRequest *)request;
/*!
- @method loadData:encodingName:baseURL:
+ @method loadData:MIMEType:textEncodingName:baseURL:
@param data The data to use for the main page of the document.
+ @param MIMEType The MIME type of the data.
@param encodingName The encoding of the data.
@param URL The base URL to apply to relative URLs within the document.
*/
-- (void)loadData:(NSData *)data encodingName: (NSString *)encodingName baseURL:(NSURL *)URL;
+- (void)loadData:(NSData *)data MIMEType:(NSString *)MIMEType textEncodingName: (NSString *)encodingName baseURL:(NSURL *)URL;
/*!
- @method loadString:baseURL:
+ @method loadHTMLString:baseURL:
@param string The string to use for the main page of the document.
@param URL The base URL to apply to relative URLs within the document.
*/
-- (void)loadString:(NSString *)string baseURL:(NSURL *)URL;
+- (void)loadHTMLString:(NSString *)string baseURL:(NSURL *)URL;
/*!
@method dataSource
@@ -119,17 +120,17 @@
- (WebFrame *)findFrameNamed:(NSString *)name;
/*!
- @method parent
+ @method parentFrame
@result The frame containing this frame, or nil if this is a top level frame.
*/
-- (WebFrame *)parent;
+- (WebFrame *)parentFrame;
/*!
- @method children
+ @method childFrames
@discussion The frames in the array are associated with a frame set or iframe.
@result Returns an array of WebFrame.
*/
-- (NSArray *)children;
+- (NSArray *)childFrames;
/*!
@method registerViewClass:representationClass:forMIMEType:
diff --git a/WebKit/WebView.subproj/WebFrame.m b/WebKit/WebView.subproj/WebFrame.m
index 34023d8..3e53cf9 100644
--- a/WebKit/WebView.subproj/WebFrame.m
+++ b/WebKit/WebView.subproj/WebFrame.m
@@ -115,17 +115,18 @@
[newDataSource release];
}
-- (void)loadData:(NSData *)data encodingName: (NSString *)encodingName baseURL:(NSURL *)URL;
+- (void)loadData:(NSData *)data MIMEType:(NSString *)MIMEType textEncodingName: (NSString *)encodingName baseURL:(NSURL *)URL;
{
NSURL *fakeURL = [NSURLRequest _webDataRequestURLForData: data];
NSURLRequest *request = [[[NSURLRequest alloc] initWithURL: fakeURL] autorelease];
[request _webDataRequestSetData:data];
[request _webDataRequestSetEncoding:encodingName];
[request _webDataRequestSetBaseURL:URL];
+ [request _webDataRequestSetMIMEType:MIMEType?MIMEType:@"text/html"];
[self loadRequest:request];
}
-- (void)loadString:(NSString *)string baseURL:(NSURL *)URL
+- (void)loadHTMLString:(NSString *)string baseURL:(NSURL *)URL
{
CFStringEncoding cfencoding = CFStringGetFastestEncoding((CFStringRef)string);
NSStringEncoding nsencoding = CFStringConvertEncodingToNSStringEncoding(cfencoding);
@@ -133,11 +134,11 @@
if (!cfencodingName || nsencoding == kCFStringEncodingInvalidId){
NSData *data = [string dataUsingEncoding: NSUnicodeStringEncoding];
- [self loadData:data encodingName:@"utf-16" baseURL:URL];
+ [self loadData:data MIMEType:nil textEncodingName:@"utf-16" baseURL:URL];
}
else {
NSData *data = [string dataUsingEncoding: nsencoding];
- [self loadData:data encodingName:(NSString *)cfencodingName baseURL:URL];
+ [self loadData:data MIMEType:nil textEncodingName:(NSString *)cfencodingName baseURL:URL];
}
}
@@ -189,7 +190,7 @@
}
if ([name isEqualToString:@"_parent"]) {
- WebFrame *parent = [self parent];
+ WebFrame *parent = [self parentFrame];
return parent ? parent : self;
}
@@ -208,12 +209,12 @@
return frame;
}
-- (WebFrame *)parent
+- (WebFrame *)parentFrame
{
return [[_private->parent retain] autorelease];
}
-- (NSArray *)children
+- (NSArray *)childFrames
{
return [[_private->children copy] autorelease];
}
diff --git a/WebKit/WebView.subproj/WebFramePrivate.m b/WebKit/WebView.subproj/WebFramePrivate.m
index 4de115e..3b2db46 100644
--- a/WebKit/WebView.subproj/WebFramePrivate.m
+++ b/WebKit/WebView.subproj/WebFramePrivate.m
@@ -273,7 +273,7 @@ Repeat load of the same URL (by any other means of navigation other than the rel
NSURL *URL = [request URL];
WebHistoryItem *bfItem;
- bfItem = [[[WebHistoryItem alloc] initWithURL:URL target:[self name] parent:[[self parent] name] title:[dataSrc pageTitle]] autorelease];
+ bfItem = [[[WebHistoryItem alloc] initWithURL:URL target:[self name] parent:[[self parentFrame] name] title:[dataSrc pageTitle]] autorelease];
[bfItem setAnchor:[URL fragment]];
[dataSrc _addBackForwardItem:bfItem];
[bfItem setOriginalURLString:[[[dataSrc _originalRequest] URL] absoluteString]];
@@ -345,7 +345,7 @@ Repeat load of the same URL (by any other means of navigation other than the rel
return self;
}
- NSArray *children = [self children];
+ NSArray *children = [self childFrames];
WebFrame *frame;
unsigned i;
@@ -690,7 +690,7 @@ Repeat load of the same URL (by any other means of navigation other than the rel
case WebFrameLoadTypeInternal:
// Add an item to the item tree for this frame
ASSERT(![ds _isClientRedirect]);
- WebHistoryItem *parentItem = [[self parent]->_private currentItem];
+ WebHistoryItem *parentItem = [[self parentFrame]->_private currentItem];
// The only case where parentItem==nil should be when a parent frame loaded an
// empty URL, which doesn't set up a current item in that parent.
if (parentItem) {
@@ -936,9 +936,9 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
// Unfortunately we have to get our parent to adjust the frames in this
// frameset so this frame's geometry is set correctly. This should
// be a reasonably inexpensive operation.
- WebDataSource *parentDS = [[self parent] dataSource];
+ WebDataSource *parentDS = [[self parentFrame] dataSource];
if ([[parentDS _bridge] isFrameSet]){
- WebFrameView *parentWebFrameView = [[self parent] frameView];
+ WebFrameView *parentWebFrameView = [[self parentFrame] frameView];
if ([parentWebFrameView isDocumentHTML])
[(WebHTMLView *)[parentWebFrameView documentView] _adjustFrames];
}
@@ -1022,7 +1022,7 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
int i, count;
NSArray *childFrames;
- childFrames = [fromFrame children];
+ childFrames = [fromFrame childFrames];
count = [childFrames count];
for (i = 0; i < count; i++) {
WebFrame *childFrame;
@@ -1805,7 +1805,7 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
- (void)_textSizeMultiplierChanged
{
[_private->bridge setTextSizeMultiplier:[[self webView] textSizeMultiplier]];
- [[self children] makeObjectsPerformSelector:@selector(_textSizeMultiplierChanged)];
+ [[self childFrames] makeObjectsPerformSelector:@selector(_textSizeMultiplierChanged)];
}
- (void)_defersCallbacksChanged
@@ -1817,13 +1817,13 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
- (void)_viewWillMoveToHostWindow:(NSWindow *)hostWindow
{
[[[self frameView] documentView] viewWillMoveToHostWindow:hostWindow];
- [[self children] makeObjectsPerformSelector:@selector(_viewWillMoveToHostWindow:) withObject:hostWindow];
+ [[self childFrames] makeObjectsPerformSelector:@selector(_viewWillMoveToHostWindow:) withObject:hostWindow];
}
- (void)_viewDidMoveToHostWindow
{
[[[self frameView] documentView] viewDidMoveToHostWindow];
- [[self children] makeObjectsPerformSelector:@selector(_viewDidMoveToHostWindow)];
+ [[self childFrames] makeObjectsPerformSelector:@selector(_viewDidMoveToHostWindow)];
}
- (void)_reloadAllowingStaleDataWithOverrideEncoding:(NSString *)encoding
@@ -1951,7 +1951,7 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
[_private->bridge saveDocumentState];
[self _saveScrollPositionToItem:[_private currentItem]];
- NSArray *frames = [self children];
+ NSArray *frames = [self childFrames];
int count = [frames count];
int i;
for (i = 0; i < count; i++) {
@@ -2023,8 +2023,9 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
[self _setLoadType:loadType];
- if ([self parent]) {
- [newDataSource _setOverrideEncoding:[[[self parent] dataSource] _overrideEncoding]];
+ WebFrame *parentFrame = [self parentFrame];
+ if (parentFrame) {
+ [newDataSource _setOverrideEncoding:[[parentFrame dataSource] _overrideEncoding]];
}
[newDataSource _setController:[self webView]];
[newDataSource _setJustOpenedForTargetedLink:_private->justOpenedForTargetedLink];
diff --git a/WebKit/WebView.subproj/WebViewPrivate.m b/WebKit/WebView.subproj/WebViewPrivate.m
index 19f5451..01cf327 100644
--- a/WebKit/WebView.subproj/WebViewPrivate.m
+++ b/WebKit/WebView.subproj/WebViewPrivate.m
@@ -56,7 +56,7 @@
[aFrame _setController: nil];
// Walk the frame tree, niling the controller.
- frames = [aFrame children];
+ frames = [aFrame childFrames];
count = [frames count];
for (i = 0; i < count; i++){
nextFrame = [frames objectAtIndex: i];
@@ -515,7 +515,7 @@
if ([frame provisionalDataSource] == dataSource)
return frame;
- frames = [frame children];
+ frames = [frame childFrames];
count = [frames count];
for (i = 0; i < count; i++){
aFrame = [frames objectAtIndex: i];
@@ -545,7 +545,7 @@
if ([frame frameView] == aView)
return frame;
- frames = [frame children];
+ frames = [frame childFrames];
count = [frames count];
for (i = 0; i < count; i++){
aFrame = [frames objectAtIndex: i];
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list