Changeset 140793 in webkit


Ignore:
Timestamp:
Jan 25, 2013, 12:21:37 AM (12 years ago)
Author:
mitz@apple.com
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.

Location:
trunk/Source/WebKit/mac
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/mac/ChangeLog

    r140718 r140793  
     12013-01-24  Dan Bernstein  <mitz@apple.com>
     2
     3        WebNavigationData does not distinguish between an empty title and a missing title
     4        https://bugs.webkit.org/show_bug.cgi?id=107917
     5
     6        Reviewed by Andy Estes.
     7
     8        * WebCoreSupport/WebFrameLoaderClient.mm:
     9        (nilOrNSString): Added this helper function.
     10        (WebFrameLoaderClient::updateGlobalHistory): Initialize the WebNavigationData with a nil
     11        title, rather than the empty string, if the document does not have a title.
     12
    1132013-01-24  Mark Hahnenberg  <mhahnenberg@apple.com>
    214
  • trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm

    r139000 r140793  
    852852}
    853853
     854static inline NSString *nilOrNSString(const String& string)
     855{
     856    if (string.isNull())
     857        return nil;
     858    return string;
     859}
     860
    854861void WebFrameLoaderClient::updateGlobalHistory()
    855862{
     
    861868        if (implementations->navigatedFunc) {
    862869            WebNavigationData *data = [[WebNavigationData alloc] initWithURLString:loader->urlForHistory()
    863                                                                              title:loader->title().string()
     870                                                                             title:nilOrNSString(loader->title().string())
    864871                                                                   originalRequest:loader->originalRequestCopy().nsURLRequest()
    865872                                                                          response:loader->response().nsURLResponse()
Note: See TracChangeset for help on using the changeset viewer.