Title: [140793] trunk/Source/WebKit/mac
- Revision
- 140793
- Author
- [email protected]
- Date
- 2013-01-25 00:21:37 -0800 (Fri, 25 Jan 2013)
Log Message
WebNavigationData does not distinguish between an empty title and a missing title
https://bugs.webkit.org/show_bug.cgi?id=107917
Reviewed by Andy Estes.
* WebCoreSupport/WebFrameLoaderClient.mm:
(nilOrNSString): Added this helper function.
(WebFrameLoaderClient::updateGlobalHistory): Initialize the WebNavigationData with a nil
title, rather than the empty string, if the document does not have a title.
Modified Paths
Diff
Modified: trunk/Source/WebKit/mac/ChangeLog (140792 => 140793)
--- trunk/Source/WebKit/mac/ChangeLog 2013-01-25 08:12:15 UTC (rev 140792)
+++ trunk/Source/WebKit/mac/ChangeLog 2013-01-25 08:21:37 UTC (rev 140793)
@@ -1,3 +1,15 @@
+2013-01-24 Dan Bernstein <[email protected]>
+
+ WebNavigationData does not distinguish between an empty title and a missing title
+ https://bugs.webkit.org/show_bug.cgi?id=107917
+
+ Reviewed by Andy Estes.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (nilOrNSString): Added this helper function.
+ (WebFrameLoaderClient::updateGlobalHistory): Initialize the WebNavigationData with a nil
+ title, rather than the empty string, if the document does not have a title.
+
2013-01-24 Mark Hahnenberg <[email protected]>
Objective-C API: Rename JSValue.h/APIJSValue.h to JSCJSValue.h/JSValue.h
Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm (140792 => 140793)
--- trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm 2013-01-25 08:12:15 UTC (rev 140792)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm 2013-01-25 08:21:37 UTC (rev 140793)
@@ -851,6 +851,13 @@
[dataSource(loader) _finishedLoading];
}
+static inline NSString *nilOrNSString(const String& string)
+{
+ if (string.isNull())
+ return nil;
+ return string;
+}
+
void WebFrameLoaderClient::updateGlobalHistory()
{
WebView* view = getWebView(m_webFrame.get());
@@ -860,7 +867,7 @@
WebHistoryDelegateImplementationCache* implementations = WebViewGetHistoryDelegateImplementations(view);
if (implementations->navigatedFunc) {
WebNavigationData *data = "" alloc] initWithURLString:loader->urlForHistory()
- title:loader->title().string()
+ title:nilOrNSString(loader->title().string())
originalRequest:loader->originalRequestCopy().nsURLRequest()
response:loader->response().nsURLResponse()
hasSubstituteData:loader->substituteData().isValid()
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes