| Differences between
and this patch
- Source/WebKit/chromium/ChangeLog +25 lines
Lines 1-3 Source/WebKit/chromium/ChangeLog_sec1
1
2011-05-09  Tao Bai  <michaelbai@chromium.org>
2
3
        Reviewed by NOBODY (OOPS!).
4
5
        Handle the touch icon.
6
        https://bugs.webkit.org/show_bug.cgi?id=60247
7
8
        Added WebIconURL for the corresponding IconURL.
9
        Added a parameter to favIconURL() to specify the type of icon need to
10
        return.
11
12
        * WebKit.gyp:
13
        * features.gypi:
14
        * public/WebFrame.h:
15
        * public/WebFrameClient.h:
16
        (WebKit::WebFrameClient::didChangeIcons):
17
        * public/WebIconURL.h: Added.
18
        (WebKit::WebIconURL::WebIconURL):
19
        * src/AssertMatchingEnums.cpp:
20
        * src/FrameLoaderClientImpl.cpp:
21
        (WebKit::FrameLoaderClientImpl::dispatchDidChangeIcons):
22
        * src/WebFrameImpl.cpp:
23
        (WebKit::WebFrameImpl::favIconURL):
24
        * src/WebFrameImpl.h:
25
1
2011-05-09  Shishir Agrawal  <shishir@chromium.org>
26
2011-05-09  Shishir Agrawal  <shishir@chromium.org>
2
27
3
        Reviewed by Tony Gentilcore.
28
        Reviewed by Tony Gentilcore.
- Source/WebKit/chromium/WebKit.gyp +1 lines
Lines 185-190 Source/WebKit/chromium/WebKit.gyp_sec1
185
                'public/WebHTTPBody.h',
185
                'public/WebHTTPBody.h',
186
                'public/WebHTTPLoadInfo.h',
186
                'public/WebHTTPLoadInfo.h',
187
                'public/WebIconLoadingCompletion.h',
187
                'public/WebIconLoadingCompletion.h',
188
                'public/WebIconType.h',
188
                'public/WebImage.h',
189
                'public/WebImage.h',
189
                'public/WebImageDecoder.h',
190
                'public/WebImageDecoder.h',
190
                'public/WebIDBCallbacks.h',
191
                'public/WebIDBCallbacks.h',
- Source/WebKit/chromium/features.gypi +1 lines
Lines 88-93 Source/WebKit/chromium/features.gypi_sec1
88
        'ENABLE_SVG_FOREIGN_OBJECT=1',
88
        'ENABLE_SVG_FOREIGN_OBJECT=1',
89
        'ENABLE_SVG_USE=1',
89
        'ENABLE_SVG_USE=1',
90
        'ENABLE_TOUCH_EVENTS=1',
90
        'ENABLE_TOUCH_EVENTS=1',
91
        'ENABLE_TOUCH_ICON_LOADING=1',
91
        'ENABLE_V8_SCRIPT_DEBUG_SERVER=1',
92
        'ENABLE_V8_SCRIPT_DEBUG_SERVER=1',
92
        'ENABLE_VIDEO=1',
93
        'ENABLE_VIDEO=1',
93
        'ENABLE_WEB_AUDIO=0',
94
        'ENABLE_WEB_AUDIO=0',
- Source/WebKit/chromium/public/WebFrame.h -3 / +4 lines
Lines 33-38 Source/WebKit/chromium/public/WebFrame.h_sec1
33
33
34
#include "WebCanvas.h"
34
#include "WebCanvas.h"
35
#include "WebFileSystem.h"
35
#include "WebFileSystem.h"
36
#include "WebIconURL.h"
36
#include "WebNode.h"
37
#include "WebNode.h"
37
#include "WebURL.h"
38
#include "WebURL.h"
38
39
Lines 129-137 public: Source/WebKit/chromium/public/WebFrame.h_sec2
129
    // dataSource()->request().url().
130
    // dataSource()->request().url().
130
    virtual WebURL url() const = 0;
131
    virtual WebURL url() const = 0;
131
132
132
    // The url of the favicon (if any) specified by the document loaded in
133
    // The urls of the given combination types of favicon (if any) specified by
133
    // this frame.
134
    // the document loaded in this frame.
134
    virtual WebURL favIconURL() const = 0;
135
    virtual WebVector<WebIconURL> favIconURL(int iconTypes) const = 0;
135
136
136
    // The url of the OpenSearch Desription Document (if any) specified by
137
    // The url of the OpenSearch Desription Document (if any) specified by
137
    // the document loaded in this frame.
138
    // the document loaded in this frame.
- Source/WebKit/chromium/public/WebFrameClient.h -1 / +2 lines
Lines 33-38 Source/WebKit/chromium/public/WebFrameClient.h_sec1
33
33
34
#include "WebCommon.h"
34
#include "WebCommon.h"
35
#include "WebFileSystem.h"
35
#include "WebFileSystem.h"
36
#include "WebIconURL.h"
36
#include "WebNavigationPolicy.h"
37
#include "WebNavigationPolicy.h"
37
#include "WebNavigationType.h"
38
#include "WebNavigationType.h"
38
#include "WebStorageQuotaType.h"
39
#include "WebStorageQuotaType.h"
Lines 202-208 public: Source/WebKit/chromium/public/WebFrameClient.h_sec2
202
    }
203
    }
203
204
204
    // The icons for the page have changed.
205
    // The icons for the page have changed.
205
    virtual void didChangeIcons(WebFrame*) { }
206
    virtual void didChangeIcons(WebFrame*, WebIconURL::WebIconType) { }
206
207
207
    // The frame's document finished loading.
208
    // The frame's document finished loading.
208
    virtual void didFinishDocumentLoad(WebFrame*) { }
209
    virtual void didFinishDocumentLoad(WebFrame*) { }
- Source/WebKit/chromium/public/WebIconURL.h +74 lines
Line 0 Source/WebKit/chromium/public/WebIconURL.h_sec1
1
/*
2
 * Copyright (C) 2011 Google Inc. All rights reserved.
3
 *
4
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions are
6
 * met:
7
 *
8
 *     * Redistributions of source code must retain the above copyright
9
 * notice, this list of conditions and the following disclaimer.
10
 *     * Redistributions in binary form must reproduce the above
11
 * copyright notice, this list of conditions and the following disclaimer
12
 * in the documentation and/or other materials provided with the
13
 * distribution.
14
 *     * Neither the name of Google Inc. nor the names of its
15
 * contributors may be used to endorse or promote products derived from
16
 * this software without specific prior written permission.
17
 *
18
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29
 */
30
31
#ifndef WebIconURL_h
32
#define WebIconURL_h
33
34
#include "WebURL.h"
35
36
namespace WebKit {
37
38
struct WebIconURL {
39
    enum WebIconType {
40
        WebIconTypeInvalidIcon = 0,
41
        WebIconTypeFavicon = 1 << 0,
42
        WebIconTypeTouchIcon = 1 << 1,
43
        WebIconTypeTouchPrecomposedIcon = 1 << 2
44
    };
45
46
    WebIconURL()
47
        : m_iconType(WebIconTypeInvalidIcon)
48
    {
49
    }
50
51
    WebIconURL(const WebURL& url, WebIconType type)
52
        : m_iconType(type)
53
        , m_iconURL(url)
54
    {
55
    }
56
57
    WebIconType iconType() const
58
    {
59
        return m_iconType;
60
    }
61
62
    const WebURL& iconURL() const
63
    {
64
        return m_iconURL;
65
    }
66
67
private:
68
    WebIconType m_iconType;
69
    WebURL m_iconURL;
70
};
71
72
}
73
74
#endif // WebIconURL_h
0
  + LF
75
  + LF
- Source/WebKit/chromium/src/AssertMatchingEnums.cpp +7 lines
Lines 46-51 Source/WebKit/chromium/src/AssertMatchingEnums.cpp_sec1
46
#include "GeolocationError.h"
46
#include "GeolocationError.h"
47
#include "GeolocationPosition.h"
47
#include "GeolocationPosition.h"
48
#include "HTMLInputElement.h"
48
#include "HTMLInputElement.h"
49
#include "IconURL.h"
49
#include "IDBFactoryBackendInterface.h"
50
#include "IDBFactoryBackendInterface.h"
50
#include "IDBKey.h"
51
#include "IDBKey.h"
51
#include "MediaPlayer.h"
52
#include "MediaPlayer.h"
Lines 73-78 Source/WebKit/chromium/src/AssertMatchingEnums.cpp_sec2
73
#include "WebGeolocationPosition.h"
74
#include "WebGeolocationPosition.h"
74
#include "WebIDBFactory.h"
75
#include "WebIDBFactory.h"
75
#include "WebIDBKey.h"
76
#include "WebIDBKey.h"
77
#include "WebIconURL.h"
76
#include "WebInputElement.h"
78
#include "WebInputElement.h"
77
#include "WebMediaPlayer.h"
79
#include "WebMediaPlayer.h"
78
#include "WebNotificationPresenter.h"
80
#include "WebNotificationPresenter.h"
Lines 304-309 COMPILE_ASSERT_MATCHING_ENUM(WebFontDesc Source/WebKit/chromium/src/AssertMatchingEnums.cpp_sec3
304
COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::WeightNormal, FontWeightNormal);
306
COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::WeightNormal, FontWeightNormal);
305
COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::WeightBold, FontWeightBold);
307
COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::WeightBold, FontWeightBold);
306
308
309
COMPILE_ASSERT_MATCHING_ENUM(WebIconURL::WebIconTypeInvalidIcon, InvalidIcon);
310
COMPILE_ASSERT_MATCHING_ENUM(WebIconURL::WebIconTypeFavicon, Favicon);
311
COMPILE_ASSERT_MATCHING_ENUM(WebIconURL::WebIconTypeTouchIcon, TouchIcon);
312
COMPILE_ASSERT_MATCHING_ENUM(WebIconURL::WebIconTypeTouchPrecomposedIcon, TouchPrecomposedIcon);
313
307
COMPILE_ASSERT_MATCHING_ENUM(WebNode::ElementNode, Node::ELEMENT_NODE);
314
COMPILE_ASSERT_MATCHING_ENUM(WebNode::ElementNode, Node::ELEMENT_NODE);
308
COMPILE_ASSERT_MATCHING_ENUM(WebNode::AttributeNode, Node::ATTRIBUTE_NODE);
315
COMPILE_ASSERT_MATCHING_ENUM(WebNode::AttributeNode, Node::ATTRIBUTE_NODE);
309
COMPILE_ASSERT_MATCHING_ENUM(WebNode::TextNode, Node::TEXT_NODE);
316
COMPILE_ASSERT_MATCHING_ENUM(WebNode::TextNode, Node::TEXT_NODE);
- Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp -1 / +1 lines
Lines 760-766 void FrameLoaderClientImpl::dispatchDidR Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp_sec1
760
void FrameLoaderClientImpl::dispatchDidChangeIcons(WebCore::IconType type)
760
void FrameLoaderClientImpl::dispatchDidChangeIcons(WebCore::IconType type)
761
{
761
{
762
    if (m_webFrame->client())
762
    if (m_webFrame->client())
763
        m_webFrame->client()->didChangeIcons(m_webFrame);
763
        m_webFrame->client()->didChangeIcons(m_webFrame, static_cast<WebIconURL::WebIconType>(type));
764
}
764
}
765
765
766
void FrameLoaderClientImpl::dispatchDidCommitLoad()
766
void FrameLoaderClientImpl::dispatchDidCommitLoad()
- Source/WebKit/chromium/src/WebFrameImpl.cpp -5 / +9 lines
Lines 101-106 Source/WebKit/chromium/src/WebFrameImpl.cpp_sec1
101
#include "HTMLNames.h"
101
#include "HTMLNames.h"
102
#include "HistoryItem.h"
102
#include "HistoryItem.h"
103
#include "HitTestResult.h"
103
#include "HitTestResult.h"
104
#include "IconURL.h"
104
#include "InspectorController.h"
105
#include "InspectorController.h"
105
#include "Page.h"
106
#include "Page.h"
106
#include "painting/GraphicsContextBuilder.h"
107
#include "painting/GraphicsContextBuilder.h"
Lines 137-142 Source/WebKit/chromium/src/WebFrameImpl.cpp_sec2
137
#include "WebFormElement.h"
138
#include "WebFormElement.h"
138
#include "WebFrameClient.h"
139
#include "WebFrameClient.h"
139
#include "WebHistoryItem.h"
140
#include "WebHistoryItem.h"
141
#include "WebIconURL.h"
140
#include "WebInputElement.h"
142
#include "WebInputElement.h"
141
#include "WebNode.h"
143
#include "WebNode.h"
142
#include "WebPasswordAutocompleteListener.h"
144
#include "WebPasswordAutocompleteListener.h"
Lines 518-534 WebURL WebFrameImpl::url() const Source/WebKit/chromium/src/WebFrameImpl.cpp_sec3
518
    return ds->request().url();
520
    return ds->request().url();
519
}
521
}
520
522
521
WebURL WebFrameImpl::favIconURL() const
523
WebVector<WebIconURL> WebFrameImpl::favIconURL(int webIconTypes) const
522
{
524
{
523
    FrameLoader* frameLoader = m_frame->loader();
525
    FrameLoader* frameLoader = m_frame->loader();
524
    // The URL to the favicon may be in the header. As such, only
526
    // The URL to the favicon may be in the header. As such, only
525
    // ask the loader for the favicon if it's finished loading.
527
    // ask the loader for the favicon if it's finished loading.
526
    if (frameLoader->state() == FrameStateComplete) {
528
    if (frameLoader->state() == FrameStateComplete) {
527
        const KURL& url = frameLoader->iconURL();
529
        WTF::Vector<WebCore::IconURL> iconURLs = frameLoader->iconURLs(webIconTypes);
528
        if (!url.isEmpty())
530
        WebVector<WebIconURL> webIconURLs(iconURLs.size());
529
            return url;
531
        for (size_t i = 0; i < iconURLs.size(); i++)
532
            webIconURLs[i] = WebIconURL(iconURLs[i].m_iconURL, static_cast<WebIconURL::WebIconType>(iconURLs[i].m_iconType));
533
        return webIconURLs;
530
    }
534
    }
531
    return WebURL();
535
    return WebVector<WebIconURL>();
532
}
536
}
533
537
534
WebURL WebFrameImpl::openSearchDescriptionURL() const
538
WebURL WebFrameImpl::openSearchDescriptionURL() const
- Source/WebKit/chromium/src/WebFrameImpl.h -1 / +1 lines
Lines 70-76 public: Source/WebKit/chromium/src/WebFrameImpl.h_sec1
70
    virtual void setName(const WebString&);
70
    virtual void setName(const WebString&);
71
    virtual long long identifier() const;
71
    virtual long long identifier() const;
72
    virtual WebURL url() const;
72
    virtual WebURL url() const;
73
    virtual WebURL favIconURL() const;
73
    virtual WebVector<WebIconURL> favIconURL(int iconTypes) const;
74
    virtual WebURL openSearchDescriptionURL() const;
74
    virtual WebURL openSearchDescriptionURL() const;
75
    virtual WebString encoding() const;
75
    virtual WebString encoding() const;
76
    virtual WebSize scrollOffset() const;
76
    virtual WebSize scrollOffset() const;

Return to Bug 60247