[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
darin
darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 05:59:45 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 6a5921ac1cbd48e7bf494d78390fd534ece26953
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Sun Mar 31 01:02:48 2002 +0000
* prepare-ChangeLog: Added a new "--open" option, which opens the
ChangeLog files for you.
WebCore:
* src/kdelibs/khtml/xml/dom_docimpl.cpp: (DocumentImpl::setTitle):
Call through to a new KHTMLPart::setTitle instead of the old
setWindowCaption. We want to skip the special logic for using
the URL if the title is blank, and for squeezing the title into
a smaller string, because those are handled at a higher level.
* src/kwq/KWQKHTMLPart.h: Add setTitle. Also clean up ifdefs.
* src/kwq/KWQKHTMLPart.mm: (KHTMLPart::setTitle): New. Calls
[IFWebDataSource _setTitle].
* src/kwq/kparts/part.h: Removed setWindowCaption.
* src/kwq/KWQPart.mm: Removed setWindowCaption.
* src/kwq/external.h: Add [IFWebDataSource _setTitle].
WebKit:
* WebView.subproj/IFBaseWebController.mm:
(-[IFBaseWebController receivedPageTitle:forDataSource:]):
Remove the exception from here. This is really a "do nothing,
subclasses override me" method.
* WebView.subproj/IFWebDataSource.mm:
(-[IFWebDataSource pageTitle]): Implement.
* WebView.subproj/IFWebDataSourcePrivate.h: Add pageTitle
and [IFWebDataSource _setTitle].
* WebView.subproj/IFWebDataSourcePrivate.mm:
(-[IFWebDataSourcePrivate dealloc]): autorelease pageTitle.
(-[IFWebDataSource _setTitle:]): Update the title, trimming
whitespace and using nil, rather than empty string, to mean
no title at all. Call [receivedPageTitle: forDataSource:]
as necessary too.
* WebView.subproj/IFMainURLHandleClient.mm: Did a gratuitious
whitespace edit to force this file to recompile so everyone
doesn't have to "make clean".
WebBrowser:
* BrowserDocument.m: (-[BrowserDocument currentTitle]): New.
(-[BrowserDocument displayName]): Pass the title into the
[AppController menuTitleForURL: withTitle:] method.
(-[BrowserDocument addHistoryEntryForCurrentPage]): Pass the
title into [IFURIEntry initWithURL: title:]. This isn't quite
right, because we want to update the title later in case we
add this history entry before the title is parsed.
(-[BrowserDocument receivedPageTitle:forDataSource:]): If a
new title arrives for the main frame's dataSource, then tell
all the window controllser to synchronize their window titles
with the document name. I stole this code from NSDocument.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@908 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index 7e16e32..71ae462 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,20 @@
+2002-03-30 Darin Adler <darin at apple.com>
+
+ * src/kdelibs/khtml/xml/dom_docimpl.cpp: (DocumentImpl::setTitle):
+ Call through to a new KHTMLPart::setTitle instead of the old
+ setWindowCaption. We want to skip the special logic for using
+ the URL if the title is blank, and for squeezing the title into
+ a smaller string, because those are handled at a higher level.
+
+ * src/kwq/KWQKHTMLPart.h: Add setTitle. Also clean up ifdefs.
+ * src/kwq/KWQKHTMLPart.mm: (KHTMLPart::setTitle): New. Calls
+ [IFWebDataSource _setTitle].
+
+ * src/kwq/kparts/part.h: Removed setWindowCaption.
+ * src/kwq/KWQPart.mm: Removed setWindowCaption.
+
+ * src/kwq/external.h: Add [IFWebDataSource _setTitle].
+
2002-03-30 Richard Williamson <rjw at apple.com>
Added support for scrolling to anchor points.
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 7e16e32..71ae462 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,20 @@
+2002-03-30 Darin Adler <darin at apple.com>
+
+ * src/kdelibs/khtml/xml/dom_docimpl.cpp: (DocumentImpl::setTitle):
+ Call through to a new KHTMLPart::setTitle instead of the old
+ setWindowCaption. We want to skip the special logic for using
+ the URL if the title is blank, and for squeezing the title into
+ a smaller string, because those are handled at a higher level.
+
+ * src/kwq/KWQKHTMLPart.h: Add setTitle. Also clean up ifdefs.
+ * src/kwq/KWQKHTMLPart.mm: (KHTMLPart::setTitle): New. Calls
+ [IFWebDataSource _setTitle].
+
+ * src/kwq/kparts/part.h: Removed setWindowCaption.
+ * src/kwq/KWQPart.mm: Removed setWindowCaption.
+
+ * src/kwq/external.h: Add [IFWebDataSource _setTitle].
+
2002-03-30 Richard Williamson <rjw at apple.com>
Added support for scrolling to anchor points.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 7e16e32..71ae462 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,20 @@
+2002-03-30 Darin Adler <darin at apple.com>
+
+ * src/kdelibs/khtml/xml/dom_docimpl.cpp: (DocumentImpl::setTitle):
+ Call through to a new KHTMLPart::setTitle instead of the old
+ setWindowCaption. We want to skip the special logic for using
+ the URL if the title is blank, and for squeezing the title into
+ a smaller string, because those are handled at a higher level.
+
+ * src/kwq/KWQKHTMLPart.h: Add setTitle. Also clean up ifdefs.
+ * src/kwq/KWQKHTMLPart.mm: (KHTMLPart::setTitle): New. Calls
+ [IFWebDataSource _setTitle].
+
+ * src/kwq/kparts/part.h: Removed setWindowCaption.
+ * src/kwq/KWQPart.mm: Removed setWindowCaption.
+
+ * src/kwq/external.h: Add [IFWebDataSource _setTitle].
+
2002-03-30 Richard Williamson <rjw at apple.com>
Added support for scrolling to anchor points.
diff --git a/WebCore/khtml/xml/dom_docimpl.cpp b/WebCore/khtml/xml/dom_docimpl.cpp
index 22eea8b..616445d 100644
--- a/WebCore/khtml/xml/dom_docimpl.cpp
+++ b/WebCore/khtml/xml/dom_docimpl.cpp
@@ -441,6 +441,9 @@ void DocumentImpl::setTitle(DOMString _title)
{
m_title = _title;
+#ifdef APPLE_CHANGES
+ view()->part()->setTitle(_title);
+#else
QString titleStr = m_title.string();
titleStr.compose();
if ( !view()->part()->parentPart() ) {
@@ -454,6 +457,7 @@ void DocumentImpl::setTitle(DOMString _title)
emit view()->part()->setWindowCaption( KStringHandler::csqueeze( titleStr, 128 ) );
}
+#endif
}
DOMString DocumentImpl::nodeName() const
diff --git a/WebCore/kwq/KWQKHTMLPart.mm b/WebCore/kwq/KWQKHTMLPart.mm
index 48ff0b0..57bc0ff 100644
--- a/WebCore/kwq/KWQKHTMLPart.mm
+++ b/WebCore/kwq/KWQKHTMLPart.mm
@@ -426,7 +426,7 @@ DOM::DocumentImpl *KHTMLPart::xmlDocImpl() const
return 0;
}
-void KHTMLPart::slotData(id handle, const char *bytes, int length)
+void KHTMLPart::slotData(IFURLHandle *handle, const char *bytes, int length)
{
// NOTE: This code emulates the interface used by the original khtml part
NSString *encoding;
@@ -1585,3 +1585,8 @@ void KHTMLPart::stopAutoScroll()
{
_logNeverImplemented();
}
+
+void KHTMLPart::setTitle(const DOMString &title)
+{
+ [dataSource _setTitle:(NSString *)title.string().getCFMutableString()];
+}
diff --git a/WebCore/kwq/KWQKHTMLPartImpl.mm b/WebCore/kwq/KWQKHTMLPartImpl.mm
index 48ff0b0..57bc0ff 100644
--- a/WebCore/kwq/KWQKHTMLPartImpl.mm
+++ b/WebCore/kwq/KWQKHTMLPartImpl.mm
@@ -426,7 +426,7 @@ DOM::DocumentImpl *KHTMLPart::xmlDocImpl() const
return 0;
}
-void KHTMLPart::slotData(id handle, const char *bytes, int length)
+void KHTMLPart::slotData(IFURLHandle *handle, const char *bytes, int length)
{
// NOTE: This code emulates the interface used by the original khtml part
NSString *encoding;
@@ -1585,3 +1585,8 @@ void KHTMLPart::stopAutoScroll()
{
_logNeverImplemented();
}
+
+void KHTMLPart::setTitle(const DOMString &title)
+{
+ [dataSource _setTitle:(NSString *)title.string().getCFMutableString()];
+}
diff --git a/WebCore/kwq/KWQKPartsPart.h b/WebCore/kwq/KWQKPartsPart.h
index 6a2381b..68f142f 100644
--- a/WebCore/kwq/KWQKPartsPart.h
+++ b/WebCore/kwq/KWQKPartsPart.h
@@ -67,7 +67,6 @@ public:
// member functions --------------------------------------------------------
QWidget *widget();
- void setWindowCaption(const QString &);
// operators ---------------------------------------------------------------
diff --git a/WebCore/kwq/KWQPart.mm b/WebCore/kwq/KWQPart.mm
index b56e03c..ac316b1 100644
--- a/WebCore/kwq/KWQPart.mm
+++ b/WebCore/kwq/KWQPart.mm
@@ -55,12 +55,6 @@ QWidget *KParts::Part::widget()
}
-void KParts::Part::setWindowCaption(const QString &)
-{
- _logNotYetImplemented();
-}
-
-
// class ReadOnlyPart ==================================================================
KParts::ReadOnlyPart::ReadOnlyPart()
diff --git a/WebCore/kwq/external.h b/WebCore/kwq/external.h
index aeb7486..ffcbdb6 100644
--- a/WebCore/kwq/external.h
+++ b/WebCore/kwq/external.h
@@ -58,6 +58,7 @@
- (void)_removeURLHandle: (IFURLHandle *)handle;
- controller;
- (KHTMLPart *)_part;
+- (void)_setTitle: (NSString *)title;
@end
// This should not be allowed here. data source should not reference view
diff --git a/WebCore/kwq/kparts/part.h b/WebCore/kwq/kparts/part.h
index 6a2381b..68f142f 100644
--- a/WebCore/kwq/kparts/part.h
+++ b/WebCore/kwq/kparts/part.h
@@ -67,7 +67,6 @@ public:
// member functions --------------------------------------------------------
QWidget *widget();
- void setWindowCaption(const QString &);
// operators ---------------------------------------------------------------
diff --git a/WebCore/src/kdelibs/khtml/xml/dom_docimpl.cpp b/WebCore/src/kdelibs/khtml/xml/dom_docimpl.cpp
index 22eea8b..616445d 100644
--- a/WebCore/src/kdelibs/khtml/xml/dom_docimpl.cpp
+++ b/WebCore/src/kdelibs/khtml/xml/dom_docimpl.cpp
@@ -441,6 +441,9 @@ void DocumentImpl::setTitle(DOMString _title)
{
m_title = _title;
+#ifdef APPLE_CHANGES
+ view()->part()->setTitle(_title);
+#else
QString titleStr = m_title.string();
titleStr.compose();
if ( !view()->part()->parentPart() ) {
@@ -454,6 +457,7 @@ void DocumentImpl::setTitle(DOMString _title)
emit view()->part()->setWindowCaption( KStringHandler::csqueeze( titleStr, 128 ) );
}
+#endif
}
DOMString DocumentImpl::nodeName() const
diff --git a/WebCore/src/kwq/KWQKHTMLPart.h b/WebCore/src/kwq/KWQKHTMLPart.h
index 79f4dc6..75a23d7 100644
--- a/WebCore/src/kwq/KWQKHTMLPart.h
+++ b/WebCore/src/kwq/KWQKHTMLPart.h
@@ -44,8 +44,14 @@ class KJavaAppletContext;
class KJSProxy;
class KHTMLPartPrivate;
-#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
+#ifdef APPLE_CHANGES
+#ifdef __OBJC__
+ at class IFURLHandle;
@class IFWebDataSource;
+#else
+typedef void IFURLHandle;
+typedef void IFWebDataSource;
+#endif
#endif
namespace DOM
@@ -591,31 +597,23 @@ public:
void khtmlMouseReleaseEvent( khtml::MouseReleaseEvent *event );
void khtmlDrawContentsEvent( khtml::DrawContentsEvent * );
-
-#ifdef _KWQ_
+#ifdef APPLE_CHANGES
QString documentSource();
void init();
-#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
- void slotData(id handle, const char *bytes, int length);
-#else
- void slotData(void *handle, const char *bytes, int length);
-#endif
+ void slotData(IFURLHandle *handle, const char *bytes, int length);
#endif
// this function checks to see whether a base URI and all its
// associated sub-URIs have loaded
void checkCompleted();
-#ifdef _KWQ_
-#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
+#ifdef APPLE_CHANGES
// Not retained.
void setDataSource(IFWebDataSource *d) { dataSource = d; }
IFWebDataSource *getDataSource() { return dataSource; }
-#else
- void setDataSource(void *d) { dataSource = d; }
- void *getDataSource() { return dataSource; }
-#endif
+
+ void setTitle(const DOM::DOMString &);
#endif
private:
@@ -624,13 +622,9 @@ private:
// DUBIOUS, why are impls being referenced?
DOM::HTMLDocumentImpl *docImpl() const;
-#ifdef _KWQ_
-#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
+#ifdef APPLE_CHANGES
IFWebDataSource *dataSource;
QValueList<QString> plugins;
-#else
- void *dataSource;
-#endif
#endif
};
diff --git a/WebCore/src/kwq/KWQKHTMLPart.mm b/WebCore/src/kwq/KWQKHTMLPart.mm
index 48ff0b0..57bc0ff 100644
--- a/WebCore/src/kwq/KWQKHTMLPart.mm
+++ b/WebCore/src/kwq/KWQKHTMLPart.mm
@@ -426,7 +426,7 @@ DOM::DocumentImpl *KHTMLPart::xmlDocImpl() const
return 0;
}
-void KHTMLPart::slotData(id handle, const char *bytes, int length)
+void KHTMLPart::slotData(IFURLHandle *handle, const char *bytes, int length)
{
// NOTE: This code emulates the interface used by the original khtml part
NSString *encoding;
@@ -1585,3 +1585,8 @@ void KHTMLPart::stopAutoScroll()
{
_logNeverImplemented();
}
+
+void KHTMLPart::setTitle(const DOMString &title)
+{
+ [dataSource _setTitle:(NSString *)title.string().getCFMutableString()];
+}
diff --git a/WebCore/src/kwq/KWQPart.mm b/WebCore/src/kwq/KWQPart.mm
index b56e03c..ac316b1 100644
--- a/WebCore/src/kwq/KWQPart.mm
+++ b/WebCore/src/kwq/KWQPart.mm
@@ -55,12 +55,6 @@ QWidget *KParts::Part::widget()
}
-void KParts::Part::setWindowCaption(const QString &)
-{
- _logNotYetImplemented();
-}
-
-
// class ReadOnlyPart ==================================================================
KParts::ReadOnlyPart::ReadOnlyPart()
diff --git a/WebCore/src/kwq/external.h b/WebCore/src/kwq/external.h
index aeb7486..ffcbdb6 100644
--- a/WebCore/src/kwq/external.h
+++ b/WebCore/src/kwq/external.h
@@ -58,6 +58,7 @@
- (void)_removeURLHandle: (IFURLHandle *)handle;
- controller;
- (KHTMLPart *)_part;
+- (void)_setTitle: (NSString *)title;
@end
// This should not be allowed here. data source should not reference view
diff --git a/WebCore/src/kwq/kparts/part.h b/WebCore/src/kwq/kparts/part.h
index 6a2381b..68f142f 100644
--- a/WebCore/src/kwq/kparts/part.h
+++ b/WebCore/src/kwq/kparts/part.h
@@ -67,7 +67,6 @@ public:
// member functions --------------------------------------------------------
QWidget *widget();
- void setWindowCaption(const QString &);
// operators ---------------------------------------------------------------
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 652392e..5b8dc69 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,26 @@
+2002-03-30 Darin Adler <darin at apple.com>
+
+ * WebView.subproj/IFBaseWebController.mm:
+ (-[IFBaseWebController receivedPageTitle:forDataSource:]):
+ Remove the exception from here. This is really a "do nothing,
+ subclasses override me" method.
+
+ * WebView.subproj/IFWebDataSource.mm:
+ (-[IFWebDataSource pageTitle]): Implement.
+
+ * WebView.subproj/IFWebDataSourcePrivate.h: Add pageTitle
+ and [IFWebDataSource _setTitle].
+ * WebView.subproj/IFWebDataSourcePrivate.mm:
+ (-[IFWebDataSourcePrivate dealloc]): autorelease pageTitle.
+ (-[IFWebDataSource _setTitle:]): Update the title, trimming
+ whitespace and using nil, rather than empty string, to mean
+ no title at all. Call [receivedPageTitle: forDataSource:]
+ as necessary too.
+
+ * WebView.subproj/IFMainURLHandleClient.mm: Did a gratuitious
+ whitespace edit to force this file to recompile so everyone
+ doesn't have to "make clean".
+
2002-03-30 Richard Williamson <rjw at apple.com>
Added support for scrolling to anchor points.
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 652392e..5b8dc69 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,26 @@
+2002-03-30 Darin Adler <darin at apple.com>
+
+ * WebView.subproj/IFBaseWebController.mm:
+ (-[IFBaseWebController receivedPageTitle:forDataSource:]):
+ Remove the exception from here. This is really a "do nothing,
+ subclasses override me" method.
+
+ * WebView.subproj/IFWebDataSource.mm:
+ (-[IFWebDataSource pageTitle]): Implement.
+
+ * WebView.subproj/IFWebDataSourcePrivate.h: Add pageTitle
+ and [IFWebDataSource _setTitle].
+ * WebView.subproj/IFWebDataSourcePrivate.mm:
+ (-[IFWebDataSourcePrivate dealloc]): autorelease pageTitle.
+ (-[IFWebDataSource _setTitle:]): Update the title, trimming
+ whitespace and using nil, rather than empty string, to mean
+ no title at all. Call [receivedPageTitle: forDataSource:]
+ as necessary too.
+
+ * WebView.subproj/IFMainURLHandleClient.mm: Did a gratuitious
+ whitespace edit to force this file to recompile so everyone
+ doesn't have to "make clean".
+
2002-03-30 Richard Williamson <rjw at apple.com>
Added support for scrolling to anchor points.
diff --git a/WebKit/WebView.subproj/IFBaseWebController.mm b/WebKit/WebView.subproj/IFBaseWebController.mm
index 13caacb..922ac26 100644
--- a/WebKit/WebView.subproj/IFBaseWebController.mm
+++ b/WebKit/WebView.subproj/IFBaseWebController.mm
@@ -193,7 +193,7 @@
- (void)receivedPageTitle: (NSString *)title forDataSource: (IFWebDataSource *)dataSource
{
- [NSException raise:IFMethodNotYetImplemented format:@"IFBaseWebController::receivedPageTitle:forDataSource: is not implemented"];
+ // Do nothing. Subclasses typically override this method.
}
diff --git a/WebKit/WebView.subproj/IFMainURLHandleClient.mm b/WebKit/WebView.subproj/IFMainURLHandleClient.mm
index 512d94b..66b8353 100644
--- a/WebKit/WebView.subproj/IFMainURLHandleClient.mm
+++ b/WebKit/WebView.subproj/IFMainURLHandleClient.mm
@@ -54,6 +54,7 @@
- (void)IFURLHandle:(IFURLHandle *)sender resourceDataDidBecomeAvailable:(NSData *)data
{
WEBKITDEBUGLEVEL3 (WEBKIT_LOG_LOADING, "url = %s, data = 0x%08x, length %d\n", [[[sender url] absoluteString] cString], data, [data length]);
+
part->slotData(sender, (const char *)[data bytes], [data length]);
IFLoadProgress *loadProgress = [[IFLoadProgress alloc] init];
diff --git a/WebKit/WebView.subproj/IFWebDataSource.mm b/WebKit/WebView.subproj/IFWebDataSource.mm
index 82a8cc9..054799d 100644
--- a/WebKit/WebView.subproj/IFWebDataSource.mm
+++ b/WebKit/WebView.subproj/IFWebDataSource.mm
@@ -330,8 +330,7 @@ static id IFWebDataSourceMake(void *url)
// Returns nil or the page title.
- (NSString *)pageTitle
{
- [NSException raise:IFMethodNotYetImplemented format:@"IFWebDataSource::pageTitle is not implemented"];
- return nil;
+ return ((IFWebDataSourcePrivate *)_dataSourcePrivate)->pageTitle;
}
diff --git a/WebKit/WebView.subproj/IFWebDataSourcePrivate.h b/WebKit/WebView.subproj/IFWebDataSourcePrivate.h
index 63f8c12..3ba37a6 100644
--- a/WebKit/WebView.subproj/IFWebDataSourcePrivate.h
+++ b/WebKit/WebView.subproj/IFWebDataSourcePrivate.h
@@ -48,6 +48,8 @@
bool primaryLoadComplete;
bool stopping;
+
+ NSString *pageTitle;
}
- init;
@@ -68,4 +70,5 @@
- (void)_removeURLHandle: (IFURLHandle *)handle;
- (void)_setPrimaryLoadComplete: (BOOL)flag;
- (double)_loadingStartedTime;
+- (void)_setTitle: (NSString *)title;
@end
diff --git a/WebKit/WebView.subproj/IFWebDataSourcePrivate.mm b/WebKit/WebView.subproj/IFWebDataSourcePrivate.mm
index aa0fe2d..0622e95 100644
--- a/WebKit/WebView.subproj/IFWebDataSourcePrivate.mm
+++ b/WebKit/WebView.subproj/IFWebDataSourcePrivate.mm
@@ -40,6 +40,7 @@
[urlHandles release];
[mainHandle release];
[mainURLHandleClient release];
+ [pageTitle autorelease];
delete part;
@@ -191,5 +192,24 @@
return data->loadingStartedTime;
}
+- (void)_setTitle:(NSString *)title
+{
+ IFWebDataSourcePrivate *data = (IFWebDataSourcePrivate *)_dataSourcePrivate;
+
+ NSMutableString *trimmed = [title mutableCopy];
+ CFStringTrimWhitespace((CFMutableStringRef) trimmed);
+ if ([trimmed length] == 0) {
+ trimmed = nil;
+ if (data->pageTitle == nil)
+ return;
+ } else {
+ if ([data->pageTitle isEqualToString:trimmed])
+ return;
+ }
+
+ [data->pageTitle autorelease];
+ data->pageTitle = [[NSString stringWithString:trimmed] retain];
+ [data->controller receivedPageTitle:data->pageTitle forDataSource:self];
+}
@end
diff --git a/WebKit/WebView.subproj/WebDataSource.m b/WebKit/WebView.subproj/WebDataSource.m
index 82a8cc9..054799d 100644
--- a/WebKit/WebView.subproj/WebDataSource.m
+++ b/WebKit/WebView.subproj/WebDataSource.m
@@ -330,8 +330,7 @@ static id IFWebDataSourceMake(void *url)
// Returns nil or the page title.
- (NSString *)pageTitle
{
- [NSException raise:IFMethodNotYetImplemented format:@"IFWebDataSource::pageTitle is not implemented"];
- return nil;
+ return ((IFWebDataSourcePrivate *)_dataSourcePrivate)->pageTitle;
}
diff --git a/WebKit/WebView.subproj/WebDataSourcePrivate.h b/WebKit/WebView.subproj/WebDataSourcePrivate.h
index 63f8c12..3ba37a6 100644
--- a/WebKit/WebView.subproj/WebDataSourcePrivate.h
+++ b/WebKit/WebView.subproj/WebDataSourcePrivate.h
@@ -48,6 +48,8 @@
bool primaryLoadComplete;
bool stopping;
+
+ NSString *pageTitle;
}
- init;
@@ -68,4 +70,5 @@
- (void)_removeURLHandle: (IFURLHandle *)handle;
- (void)_setPrimaryLoadComplete: (BOOL)flag;
- (double)_loadingStartedTime;
+- (void)_setTitle: (NSString *)title;
@end
diff --git a/WebKit/WebView.subproj/WebDataSourcePrivate.m b/WebKit/WebView.subproj/WebDataSourcePrivate.m
index aa0fe2d..0622e95 100644
--- a/WebKit/WebView.subproj/WebDataSourcePrivate.m
+++ b/WebKit/WebView.subproj/WebDataSourcePrivate.m
@@ -40,6 +40,7 @@
[urlHandles release];
[mainHandle release];
[mainURLHandleClient release];
+ [pageTitle autorelease];
delete part;
@@ -191,5 +192,24 @@
return data->loadingStartedTime;
}
+- (void)_setTitle:(NSString *)title
+{
+ IFWebDataSourcePrivate *data = (IFWebDataSourcePrivate *)_dataSourcePrivate;
+
+ NSMutableString *trimmed = [title mutableCopy];
+ CFStringTrimWhitespace((CFMutableStringRef) trimmed);
+ if ([trimmed length] == 0) {
+ trimmed = nil;
+ if (data->pageTitle == nil)
+ return;
+ } else {
+ if ([data->pageTitle isEqualToString:trimmed])
+ return;
+ }
+
+ [data->pageTitle autorelease];
+ data->pageTitle = [[NSString stringWithString:trimmed] retain];
+ [data->controller receivedPageTitle:data->pageTitle forDataSource:self];
+}
@end
diff --git a/WebKit/WebView.subproj/WebMainResourceClient.m b/WebKit/WebView.subproj/WebMainResourceClient.m
index 512d94b..66b8353 100644
--- a/WebKit/WebView.subproj/WebMainResourceClient.m
+++ b/WebKit/WebView.subproj/WebMainResourceClient.m
@@ -54,6 +54,7 @@
- (void)IFURLHandle:(IFURLHandle *)sender resourceDataDidBecomeAvailable:(NSData *)data
{
WEBKITDEBUGLEVEL3 (WEBKIT_LOG_LOADING, "url = %s, data = 0x%08x, length %d\n", [[[sender url] absoluteString] cString], data, [data length]);
+
part->slotData(sender, (const char *)[data bytes], [data length]);
IFLoadProgress *loadProgress = [[IFLoadProgress alloc] init];
diff --git a/WebKit/WebView.subproj/WebMainResourceLoader.m b/WebKit/WebView.subproj/WebMainResourceLoader.m
index 512d94b..66b8353 100644
--- a/WebKit/WebView.subproj/WebMainResourceLoader.m
+++ b/WebKit/WebView.subproj/WebMainResourceLoader.m
@@ -54,6 +54,7 @@
- (void)IFURLHandle:(IFURLHandle *)sender resourceDataDidBecomeAvailable:(NSData *)data
{
WEBKITDEBUGLEVEL3 (WEBKIT_LOG_LOADING, "url = %s, data = 0x%08x, length %d\n", [[[sender url] absoluteString] cString], data, [data length]);
+
part->slotData(sender, (const char *)[data bytes], [data length]);
IFLoadProgress *loadProgress = [[IFLoadProgress alloc] init];
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list