Changeset 86279 in webkit


Ignore:
Timestamp:
May 11, 2011 3:58:41 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2011-05-11 Tao Bai <michaelbai@chromium.org>

Reviewed by David Kilzer.

Return empty Favicon URL instead of default one when the frame isn't top level one
https://bugs.webkit.org/show_bug.cgi?id=60527
This issue was discovered by chromium browser test.

  • dom/Document.cpp: (WebCore::Document::setIconURL): Restored original logic which was inadvertently flipped by http://trac.webkit.org/changeset/85785.
  • loader/FrameLoader.cpp: (WebCore::FrameLoader::iconURLs): (WebCore::FrameLoader::fillIconURL): Restored original logic, the empty URL should be returned instead of default one. The client (at least chromium) may rely on the returned value to decided whether the favicon should be changed.
Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r86278 r86279  
     12011-05-11  Tao Bai  <michaelbai@chromium.org>
     2
     3        Reviewed by David Kilzer.
     4
     5        Return empty Favicon URL instead of default one when the frame isn't top level one
     6        https://bugs.webkit.org/show_bug.cgi?id=60527
     7        This issue was discovered by chromium browser test.
     8
     9        * dom/Document.cpp:
     10        (WebCore::Document::setIconURL):
     11        Restored original logic which was inadvertently flipped by http://trac.webkit.org/changeset/85785.
     12        * loader/FrameLoader.cpp:
     13        (WebCore::FrameLoader::iconURLs):
     14        (WebCore::FrameLoader::fillIconURL):
     15        Restored original logic, the empty URL should be returned instead of default one. The client (at
     16        least chromium) may rely on the returned value to decided whether the favicon should be changed.
     17
    1182011-05-11  Nat Duca  <nduca@chromium.org>
    219
  • trunk/Source/WebCore/dom/Document.cpp

    r86185 r86279  
    44234423    // FIXME - <rdar://problem/4727645> - At some point in the future, we might actually honor the "mimeType"
    44244424    IconURL newURL(KURL(ParsedURLString, url), iconType);
    4425     if (!iconURL(iconType).m_iconURL.isEmpty())
     4425    if (iconURL(iconType).m_iconURL.isEmpty())
    44264426        setIconURL(newURL);
    44274427    else if (!mimeType.isEmpty())
  • trunk/Source/WebCore/loader/FrameLoader.cpp

    r86251 r86279  
    477477{
    478478    IconURLs iconURLs;
     479    // If this isn't a top level frame, return
     480    if (m_frame->tree() && m_frame->tree()->parent())
     481        return iconURLs;
     482
    479483    if (iconTypes & Favicon && !fillIconURL(Favicon, &iconURLs))
    480484        iconURLs.append(getDefaultIconURL(Favicon));
     
    500504bool FrameLoader::fillIconURL(IconType iconType, IconURLs* iconURLs)
    501505{
    502     // If this isn't a top level frame, return
    503     if (m_frame->tree() && m_frame->tree()->parent())
    504         return false;
    505 
    506506    // If we have an iconURL from a Link element, return that
    507507    IconURL url = m_frame->document()->iconURL(iconType);
Note: See TracChangeset for help on using the changeset viewer.