Changeset 86452 in webkit
- Timestamp:
- May 13, 2011 12:28:53 PM (13 years ago)
- Location:
- trunk/Source/WebKit/chromium
- Files:
-
- 1 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/chromium/ChangeLog
r86451 r86452 1 2011-05-13 Tao Bai <michaelbai@chromium.org> 2 3 Reviewed by Darin Fisher. 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 method iconURLs() to specify the type of icon need to return. 10 The favIconURL() is deprecated and will be removed later. 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 (WebKit::WebIconURL::iconType): 20 (WebKit::WebIconURL::iconURL): 21 * src/AssertMatchingEnums.cpp: 22 * src/FrameLoaderClientImpl.cpp: 23 (WebKit::FrameLoaderClientImpl::dispatchDidChangeIcons): 24 * src/WebFrameImpl.cpp: 25 (WebKit::WebFrameImpl::favIconURL): 26 * src/WebFrameImpl.h: 27 1 28 2011-05-13 Sam Weinig <sam@webkit.org> 2 29 … … 265 292 266 293 Added WebIconURL for the corresponding IconURL. 267 Added a parameter to favIconURL() to specify the type of icon need to268 return.294 Added method iconURLs() to specify the type of icon need to return. 295 The favIconURL() is deprecated. 269 296 270 297 * WebKit.gyp: -
trunk/Source/WebKit/chromium/WebKit.gyp
r86094 r86452 186 186 'public/WebHTTPLoadInfo.h', 187 187 'public/WebIconLoadingCompletion.h', 188 'public/WebIconURL.h', 188 189 'public/WebImage.h', 189 190 'public/WebImageDecoder.h', -
trunk/Source/WebKit/chromium/features.gypi
r86094 r86452 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
r86094 r86452 34 34 #include "WebCanvas.h" 35 35 #include "WebFileSystem.h" 36 #include "WebIconURL.h" 36 37 #include "WebNode.h" 37 38 #include "WebURL.h" 39 // FIXME : Remove this file when transient done. 40 #include "WebVector.h" 38 41 39 42 struct NPObject; … … 130 133 virtual WebURL url() const = 0; 131 134 132 // The url of the favicon (if any) specified by the document loaded in 133 // this frame. 135 // DEPRECATED: Use iconIRLs instead. 134 136 virtual WebURL favIconURL() const = 0; 137 138 // The urls of the given combination types of favicon (if any) specified by 139 // the document loaded in this frame. The iconTypes is a bit-mask of 140 // WebIconURL::Type values, used to select from the available set of icon 141 // URLs 142 virtual WebVector<WebIconURL> iconURLs(int iconTypes) const 143 { 144 // FIXME : Remove the implementation, this make buildbot happy during 145 // the transient. 146 return WebVector<WebIconURL>(); 147 } 135 148 136 149 // The url of the OpenSearch Desription Document (if any) specified by -
trunk/Source/WebKit/chromium/public/WebFrameClient.h
r86094 r86452 34 34 #include "WebCommon.h" 35 35 #include "WebFileSystem.h" 36 #include "WebIconURL.h" 36 37 #include "WebNavigationPolicy.h" 37 38 #include "WebNavigationType.h" … … 202 203 } 203 204 204 // The icons for the page have changed.205 // DEPRECATED: Implement didChangeIcon instead. 205 206 virtual void didChangeIcons(WebFrame*) { } 207 208 // The icon for the page have changed. 209 virtual void didChangeIcon(WebFrame*, WebIconURL::Type) { } 206 210 207 211 // The frame's document finished loading. -
trunk/Source/WebKit/chromium/src/AssertMatchingEnums.cpp
r86094 r86452 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::TypeInvalid, InvalidIcon); 310 COMPILE_ASSERT_MATCHING_ENUM(WebIconURL::TypeFavicon, Favicon); 311 COMPILE_ASSERT_MATCHING_ENUM(WebIconURL::TypeTouch, TouchIcon); 312 COMPILE_ASSERT_MATCHING_ENUM(WebIconURL::TypeTouchPrecomposed, 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
r86094 r86452 760 760 void FrameLoaderClientImpl::dispatchDidChangeIcons(WebCore::IconType type) 761 761 { 762 if (m_webFrame->client()) 763 m_webFrame->client()->didChangeIcons(m_webFrame); 762 if (m_webFrame->client()) { 763 m_webFrame->client()->didChangeIcon(m_webFrame, static_cast<WebIconURL::Type>(type)); 764 // FIXME : Keep the API work in the transient. 765 if (type == WebCore::Favicon) 766 m_webFrame->client()->didChangeIcons(m_webFrame); 767 } 764 768 } 765 769 -
trunk/Source/WebKit/chromium/src/WebFrameImpl.cpp
r86219 r86452 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" … … 521 523 WebURL WebFrameImpl::favIconURL() const 522 524 { 525 WebVector<WebIconURL> urls = iconURLs(WebIconURL::TypeFavicon); 526 if (urls.size()) 527 return urls[0].iconURL(); 528 return WebURL(); 529 } 530 531 WebVector<WebIconURL> WebFrameImpl::iconURLs(int iconTypes) const 532 { 523 533 FrameLoader* frameLoader = m_frame->loader(); 524 // 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. 526 if (frameLoader->state() == FrameStateComplete) { 527 const KURL& url = frameLoader->iconURL(); 528 if (!url.isEmpty()) 529 return url; 530 } 531 return WebURL(); 534 // The URL to the icon may be in the header. As such, only 535 // ask the loader for the icon if it's finished loading. 536 if (frameLoader->state() == FrameStateComplete) 537 return frameLoader->iconURLs(iconTypes); 538 return WebVector<WebIconURL>(); 532 539 } 533 540 -
trunk/Source/WebKit/chromium/src/WebFrameImpl.h
r86094 r86452 72 72 virtual WebURL url() const; 73 73 virtual WebURL favIconURL() const; 74 virtual WebVector<WebIconURL> iconURLs(int iconTypes) const; 74 75 virtual WebURL openSearchDescriptionURL() const; 75 76 virtual WebString encoding() const;
Note: See TracChangeset
for help on using the changeset viewer.