Changeset 86091 in webkit
- Timestamp:
- May 9, 2011 3:04:34 PM (13 years ago)
- Location:
- trunk/Source/WebKit/chromium
- Files:
-
- 1 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/chromium/ChangeLog
r86080 r86091 1 2011-05-09 Tao Bai <michaelbai@chromium.org> 2 3 Reviewed by David Levin. 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 26 2011-05-09 Evan Martin <evan@chromium.org> 2 27 -
trunk/Source/WebKit/chromium/WebKit.gyp
r86080 r86091 186 186 'public/WebHTTPLoadInfo.h', 187 187 'public/WebIconLoadingCompletion.h', 188 'public/WebIconType.h', 188 189 'public/WebImage.h', 189 190 'public/WebImageDecoder.h', -
trunk/Source/WebKit/chromium/features.gypi
r84991 r86091 89 89 'ENABLE_SVG_USE=1', 90 90 'ENABLE_TOUCH_EVENTS=1', 91 'ENABLE_TOUCH_ICON_LOADING=1', 91 92 'ENABLE_V8_SCRIPT_DEBUG_SERVER=1', 92 93 'ENABLE_VIDEO=1', -
trunk/Source/WebKit/chromium/public/WebFrame.h
r85001 r86091 34 34 #include "WebCanvas.h" 35 35 #include "WebFileSystem.h" 36 #include "WebIconURL.h" 36 37 #include "WebNode.h" 37 38 #include "WebURL.h" … … 130 131 virtual WebURL url() const = 0; 131 132 132 // The url of the favicon (if any) specified by the document loaded in133 // th is frame.134 virtual Web URL favIconURL() const = 0;133 // The urls of the given combination types of favicon (if any) specified by 134 // the document loaded in this frame. 135 virtual WebVector<WebIconURL> favIconURL(int iconTypes) const = 0; 135 136 136 137 // The url of the OpenSearch Desription Document (if any) specified by -
trunk/Source/WebKit/chromium/public/WebFrameClient.h
r85703 r86091 34 34 #include "WebCommon.h" 35 35 #include "WebFileSystem.h" 36 #include "WebIconURL.h" 36 37 #include "WebNavigationPolicy.h" 37 38 #include "WebNavigationType.h" … … 203 204 204 205 // The icons for the page have changed. 205 virtual void didChangeIcons(WebFrame* ) { }206 virtual void didChangeIcons(WebFrame*, WebIconURL::WebIconType) { } 206 207 207 208 // The frame's document finished loading. -
trunk/Source/WebKit/chromium/src/AssertMatchingEnums.cpp
r86047 r86091 47 47 #include "GeolocationPosition.h" 48 48 #include "HTMLInputElement.h" 49 #include "IconURL.h" 49 50 #include "IDBFactoryBackendInterface.h" 50 51 #include "IDBKey.h" … … 74 75 #include "WebIDBFactory.h" 75 76 #include "WebIDBKey.h" 77 #include "WebIconURL.h" 76 78 #include "WebInputElement.h" 77 79 #include "WebMediaPlayer.h" … … 305 307 COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::WeightBold, FontWeightBold); 306 308 309 COMPILE_ASSERT_MATCHING_ENUM(WebIconURL::WebIconTypeInvalid, InvalidIcon); 310 COMPILE_ASSERT_MATCHING_ENUM(WebIconURL::WebIconTypeFavicon, Favicon); 311 COMPILE_ASSERT_MATCHING_ENUM(WebIconURL::WebIconTypeTouch, TouchIcon); 312 COMPILE_ASSERT_MATCHING_ENUM(WebIconURL::WebIconTypeTouchPrecomposed, TouchPrecomposedIcon); 313 307 314 COMPILE_ASSERT_MATCHING_ENUM(WebNode::ElementNode, Node::ELEMENT_NODE); 308 315 COMPILE_ASSERT_MATCHING_ENUM(WebNode::AttributeNode, Node::ATTRIBUTE_NODE); -
trunk/Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp
r85785 r86091 761 761 { 762 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 -
trunk/Source/WebKit/chromium/src/WebFrameImpl.cpp
r85864 r86091 102 102 #include "HistoryItem.h" 103 103 #include "HitTestResult.h" 104 #include "IconURL.h" 104 105 #include "InspectorController.h" 105 106 #include "Page.h" … … 138 139 #include "WebFrameClient.h" 139 140 #include "WebHistoryItem.h" 141 #include "WebIconURL.h" 140 142 #include "WebInputElement.h" 141 143 #include "WebNode.h" … … 519 521 } 520 522 521 Web URL WebFrameImpl::favIconURL() const523 WebVector<WebIconURL> WebFrameImpl::favIconURL(int webIconTypes) const 522 524 { 523 525 FrameLoader* frameLoader = m_frame->loader(); … … 525 527 // ask the loader for the favicon if it's finished loading. 526 528 if (frameLoader->state() == FrameStateComplete) { 527 const KURL& url = frameLoader->iconURL(); 528 if (!url.isEmpty()) 529 return url; 530 } 531 return WebURL(); 529 WTF::Vector<WebCore::IconURL> iconURLs = frameLoader->iconURLs(webIconTypes); 530 WebVector<WebIconURL> webIconURLs(iconURLs.size()); 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; 534 } 535 return WebVector<WebIconURL>(); 532 536 } 533 537 -
trunk/Source/WebKit/chromium/src/WebFrameImpl.h
r85787 r86091 71 71 virtual long long identifier() const; 72 72 virtual WebURL url() const; 73 virtual Web URL favIconURL() const;73 virtual WebVector<WebIconURL> favIconURL(int iconTypes) const; 74 74 virtual WebURL openSearchDescriptionURL() const; 75 75 virtual WebString encoding() const;
Note: See TracChangeset
for help on using the changeset viewer.