Changeset 144696 in webkit
- Timestamp:
- Mar 4, 2013 4:42:32 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r144614 r144696 1 2013-03-04 Ruslan Abdikeev <aruslan@chromium.org> 2 3 <link rel="apple-touch-icon"> tag is not honored on CNN.com, workflowy.com etc 4 https://bugs.webkit.org/show_bug.cgi?id=109061 5 6 Reviewed by Adam Barth. 7 8 * Source/autotools/symbols.filter: 9 1 10 2013-03-04 Kunihiko Sakamoto <ksakamoto@chromium.org> 2 11 -
trunk/LayoutTests/ChangeLog
r144694 r144696 1 2013-03-04 Ruslan Abdikeev <aruslan@chromium.org> 2 3 <link rel="apple-touch-icon"> tag is not honored on CNN.com, workflowy.com etc 4 https://bugs.webkit.org/show_bug.cgi?id=109061 5 6 Reviewed by Adam Barth. 7 8 Added test for apple-touch-icon in allIconURLs(). 9 Changed iconURLs() to shortcutIconURLs(). 10 11 * fast/dom/icon-url-change.html: 12 * fast/dom/icon-url-list-apple-touch-expected.txt: Added. 13 * fast/dom/icon-url-list-apple-touch.html: Added. 14 * fast/dom/icon-url-list.html: 15 * fast/dom/icon-url-property.html: 16 1 17 2013-02-27 Jeffrey Pfau <jpfau@apple.com> 2 18 -
trunk/LayoutTests/fast/dom/icon-url-change.html
r144572 r144696 46 46 // check that the URL list in the document is as we expect 47 47 var expectedURLs = "http://test.com/oldfavicon.ico"; 48 var iconURLs = window.internals. iconURLs(document);48 var iconURLs = window.internals.shortcutIconURLs(document); 49 49 if (expectedURLs == iconURLs[0]) 50 50 testPassed('URL list matches expected'); -
trunk/LayoutTests/fast/dom/icon-url-list.html
r144572 r144696 49 49 var expectedURL1 = "http://test.com/foofavicon.ico"; 50 50 var expectedURL2 = "http://test.com/newfavicon.ico"; 51 var iconURLs = window.internals. iconURLs(document);51 var iconURLs = window.internals.shortcutIconURLs(document); 52 52 if (expectedURL0 == iconURLs[0] && expectedURL1 == iconURLs[1] && expectedURL2 == iconURLs[2]) 53 53 testPassed('URL list matches expected'); -
trunk/LayoutTests/fast/dom/icon-url-property.html
r144572 r144696 44 44 // check that the URL list in the document is as we expect 45 45 var expectedURLs = "http://test.com/newfavicon.ico"; 46 var iconURLs = window.internals. iconURLs(document);46 var iconURLs = window.internals.shortcutIconURLs(document); 47 47 if (expectedURLs == iconURLs[0]) 48 48 debugOutput('PASS - URL list matches expected'); -
trunk/Source/WebCore/ChangeLog
r144694 r144696 1 2013-03-04 Ruslan Abdikeev <aruslan@chromium.org> 2 3 <link rel="apple-touch-icon"> tag is not honored on CNN.com, workflowy.com etc 4 https://bugs.webkit.org/show_bug.cgi?id=109061 5 6 Reviewed by Adam Barth. 7 8 Test: fast/dom/icon-url-list-apple-touch.html 9 10 Added iconTypes parameter to Document::iconURLs(). 11 Added Document::shortcutIconURLs() with original semantics of iconURLs(). 12 Fixed IconController.cpp to provide iconTypesMask to iconURLs(). 13 Renamed iconTypes to iconTypesMask to make the meaning clearer. 14 15 * WebCore.exp.in: 16 * dom/Document.cpp: 17 (WebCore::Document::shortcutIconURLs): 18 (WebCore): 19 (WebCore::Document::iconURLs): 20 * dom/Document.h: 21 (Document): 22 * loader/icon/IconController.cpp: 23 (WebCore::IconController::iconURL): 24 (WebCore::IconController::urlsForTypes): 25 * testing/Internals.cpp: 26 (WebCore::Internals::iconURLs): 27 (WebCore::Internals::shortcutIconURLs): 28 (WebCore): 29 (WebCore::Internals::allIconURLs): 30 * testing/Internals.h: 31 * testing/Internals.idl: 32 1 33 2013-02-27 Jeffrey Pfau <jpfau@apple.com> 2 34 -
trunk/Source/WebCore/WebCore.exp.in
r144572 r144696 983 983 __ZN7WebCore8FormData28removeGeneratedFilesIfNeededEv 984 984 __ZN7WebCore8FormData6decodeERN3WTF7DecoderE 985 __ZN7WebCore8Document8iconURLsEv 985 __ZN7WebCore8Document8iconURLsEi 986 __ZN7WebCore8Document16shortcutIconURLsEv 986 987 __ZN7WebCore8FormData6createEPKvm 987 988 __ZN7WebCore8FormDataD1Ev -
trunk/Source/WebCore/dom/Document.cpp
r144607 r144696 4500 4500 } 4501 4501 4502 const Vector<IconURL>& Document::iconURLs() 4502 const Vector<IconURL>& Document::shortcutIconURLs() 4503 { 4504 // Include any icons where type = link, rel = "shortcut icon". 4505 return iconURLs(Favicon); 4506 } 4507 4508 const Vector<IconURL>& Document::iconURLs(int iconTypesMask) 4503 4509 { 4504 4510 m_iconURLs.clear(); … … 4507 4513 return m_iconURLs; 4508 4514 4509 // Include any icons where type = link, rel = "shortcut icon".4510 4515 RefPtr<HTMLCollection> children = head()->children(); 4511 4516 unsigned int length = children->length(); … … 4515 4520 continue; 4516 4521 HTMLLinkElement* linkElement = static_cast<HTMLLinkElement*>(child); 4517 if ( linkElement->iconType() != Favicon)4522 if (!(linkElement->iconType() & iconTypesMask)) 4518 4523 continue; 4519 4524 if (linkElement->href().isEmpty()) -
trunk/Source/WebCore/dom/Document.h
r144572 r144696 944 944 void setHasNodesWithPlaceholderStyle() { m_hasNodesWithPlaceholderStyle = true; } 945 945 946 const Vector<IconURL>& iconURLs(); 946 const Vector<IconURL>& shortcutIconURLs(); 947 const Vector<IconURL>& iconURLs(int iconTypesMask); 947 948 void addIconURL(const String& url, const String& mimeType, const String& size, IconType); 948 949 -
trunk/Source/WebCore/loader/icon/IconController.cpp
r144572 r144696 70 70 { 71 71 IconURL result; 72 const Vector<IconURL>& iconURLs = m_frame->document()->iconURLs( );72 const Vector<IconURL>& iconURLs = m_frame->document()->iconURLs(iconType); 73 73 Vector<IconURL>::const_iterator iter(iconURLs.begin()); 74 74 for (; iter != iconURLs.end(); ++iter) { 75 if (iter->m_iconType == iconType) { 76 if (result.m_iconURL.isEmpty() || !iter->m_mimeType.isEmpty()) 77 result = *iter; 78 } 75 if (result.m_iconURL.isEmpty() || !iter->m_mimeType.isEmpty()) 76 result = *iter; 79 77 } 80 78 … … 82 80 } 83 81 84 IconURLs IconController::urlsForTypes(int iconTypes )82 IconURLs IconController::urlsForTypes(int iconTypesMask) 85 83 { 86 84 IconURLs iconURLs; … … 88 86 return iconURLs; 89 87 90 if (iconTypes & Favicon && !appendToIconURLs(Favicon, &iconURLs))88 if (iconTypesMask & Favicon && !appendToIconURLs(Favicon, &iconURLs)) 91 89 iconURLs.append(defaultURL(Favicon)); 92 90 93 91 #if ENABLE(TOUCH_ICON_LOADING) 94 92 int missedIcons = 0; 95 if (iconTypes & TouchPrecomposedIcon)93 if (iconTypesMask & TouchPrecomposedIcon) 96 94 missedIcons += appendToIconURLs(TouchPrecomposedIcon, &iconURLs) ? 0:1; 97 95 98 if (iconTypes & TouchIcon)96 if (iconTypesMask & TouchIcon) 99 97 missedIcons += appendToIconURLs(TouchIcon, &iconURLs) ? 0:1; 100 98 … … 107 105 108 106 // Finally, append all remaining icons of this type. 109 const Vector<IconURL>& allIconURLs = m_frame->document()->iconURLs( );107 const Vector<IconURL>& allIconURLs = m_frame->document()->iconURLs(iconTypesMask); 110 108 for (Vector<IconURL>::const_iterator iter = allIconURLs.begin(); iter != allIconURLs.end(); ++iter) { 111 if (!(iter->m_iconType & iconTypes))112 continue;113 114 109 int i; 115 110 int iconCount = iconURLs.size(); -
trunk/Source/WebCore/loader/icon/IconController.h
r144572 r144696 49 49 50 50 KURL url(); 51 IconURLs urlsForTypes(int iconTypes );51 IconURLs urlsForTypes(int iconTypesMask); 52 52 IconURL iconURL(IconType) const; 53 53 -
trunk/Source/WebCore/testing/Internals.cpp
r144572 r144696 1767 1767 } 1768 1768 1769 Vector<String> Internals::iconURLs(Document* document ) const1770 { 1771 Vector<IconURL> iconURLs = document->iconURLs( );1769 Vector<String> Internals::iconURLs(Document* document, int iconTypesMask) const 1770 { 1771 Vector<IconURL> iconURLs = document->iconURLs(iconTypesMask); 1772 1772 Vector<String> array; 1773 1773 … … 1777 1777 1778 1778 return array; 1779 } 1780 1781 Vector<String> Internals::shortcutIconURLs(Document* document) const 1782 { 1783 return iconURLs(document, Favicon); 1784 } 1785 1786 Vector<String> Internals::allIconURLs(Document* document) const 1787 { 1788 return iconURLs(document, Favicon | TouchIcon | TouchPrecomposedIcon); 1779 1789 } 1780 1790 -
trunk/Source/WebCore/testing/Internals.h
r144572 r144696 252 252 253 253 int pageNumber(Element*, float pageWidth = 800, float pageHeight = 600); 254 Vector<String> iconURLs(Document*) const; 254 Vector<String> shortcutIconURLs(Document*) const; 255 Vector<String> allIconURLs(Document*) const; 255 256 256 257 int numberOfPages(float pageWidthInPixels = 800, float pageHeightInPixels = 600); … … 299 300 Document* contextDocument() const; 300 301 Frame* frame() const; 302 Vector<String> iconURLs(Document*, int iconTypesMask) const; 301 303 302 304 DocumentMarker* markerAt(Node*, const String& markerType, unsigned index, ExceptionCode&); -
trunk/Source/WebCore/testing/Internals.idl
r144572 r144696 218 218 DOMString counterValue(in Element element); 219 219 long pageNumber(in Element element, in [Optional] float pageWidth, in [Optional] float pageHeight); 220 DOMString[] iconURLs(in Document document); 220 DOMString[] shortcutIconURLs(in Document document); 221 DOMString[] allIconURLs(in Document document); 221 222 long numberOfPages(in [Optional] double pageWidthInPixels, in [Optional] double pageHeightInPixels); 222 223 DOMString pageProperty(in DOMString propertyName, in long pageNumber) raises (DOMException); -
trunk/Source/WebKit/WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in
r144663 r144696 327 327 ?registerURLSchemeAsBypassingContentSecurityPolicy@SchemeRegistry@WebCore@@SAXABVString@WTF@@@Z 328 328 ?removeURLSchemeRegisteredAsBypassingContentSecurityPolicy@SchemeRegistry@WebCore@@SAXABVString@WTF@@@Z 329 ?iconURLs@Document@WebCore@@QAEABV?$Vector@UIconURL@WebCore@@$0A@@WTF@@XZ 329 ?shortcutIconURLs@Document@WebCore@@QAEABV?$Vector@UIconURL@WebCore@@$0A@@WTF@@XZ 330 ?iconURLs@Document@WebCore@@QAEABV?$Vector@UIconURL@WebCore@@$0A@@WTF@@H@Z 330 331 ?numberOfPages@PrintContext@WebCore@@SAHPAVFrame@2@ABVFloatSize@2@@Z 331 332 ?pageProperty@PrintContext@WebCore@@SA?AVString@WTF@@PAVFrame@2@PBDH@Z -
trunk/Source/WebKit/chromium/public/WebFrame.h
r144572 r144696 131 131 132 132 // The urls of the given combination types of favicon (if any) specified by 133 // the document loaded in this frame. The iconTypes is a bit-mask of133 // the document loaded in this frame. The iconTypesMask is a bit-mask of 134 134 // WebIconURL::Type values, used to select from the available set of icon 135 135 // URLs 136 virtual WebVector<WebIconURL> iconURLs(int iconTypes ) const = 0;136 virtual WebVector<WebIconURL> iconURLs(int iconTypesMask) const = 0; 137 137 138 138 -
trunk/Source/WebKit/chromium/src/WebFrameImpl.cpp
r144572 r144696 575 575 } 576 576 577 WebVector<WebIconURL> WebFrameImpl::iconURLs(int iconTypes ) const577 WebVector<WebIconURL> WebFrameImpl::iconURLs(int iconTypesMask) const 578 578 { 579 579 // The URL to the icon may be in the header. As such, only 580 580 // ask the loader for the icon if it's finished loading. 581 581 if (frame()->loader()->state() == FrameStateComplete) 582 return frame()->loader()->icon()->urlsForTypes(iconTypes );582 return frame()->loader()->icon()->urlsForTypes(iconTypesMask); 583 583 return WebVector<WebIconURL>(); 584 584 } -
trunk/Source/WebKit/chromium/src/WebFrameImpl.h
r144572 r144696 79 79 virtual void setName(const WebString&); 80 80 virtual long long identifier() const; 81 virtual WebVector<WebIconURL> iconURLs(int iconTypes ) const;81 virtual WebVector<WebIconURL> iconURLs(int iconTypesMask) const; 82 82 virtual WebSize scrollOffset() const; 83 83 virtual void setScrollOffset(const WebSize&); -
trunk/Source/WebKit/win/WebKit.vcproj/WebKitExports.def.in
r144573 r144696 329 329 ?registerURLSchemeAsBypassingContentSecurityPolicy@SchemeRegistry@WebCore@@SAXABVString@WTF@@@Z 330 330 ?removeURLSchemeRegisteredAsBypassingContentSecurityPolicy@SchemeRegistry@WebCore@@SAXABVString@WTF@@@Z 331 ?iconURLs@Document@WebCore@@QAEABV?$Vector@UIconURL@WebCore@@$0A@@WTF@@XZ 331 ?shortcutIconURLs@Document@WebCore@@QAEABV?$Vector@UIconURL@WebCore@@$0A@@WTF@@XZ 332 ?iconURLs@Document@WebCore@@QAEABV?$Vector@UIconURL@WebCore@@$0A@@WTF@@H@Z 332 333 ?numberOfPages@PrintContext@WebCore@@SAHPAVFrame@2@ABVFloatSize@2@@Z 333 334 ?pageProperty@PrintContext@WebCore@@SA?AVString@WTF@@PAVFrame@2@PBDH@Z -
trunk/Source/autotools/symbols.filter
r144572 r144696 43 43 _ZN7WebCore5RangeD1Ev; 44 44 _ZN7WebCore8Document36updateLayoutIgnorePendingStylesheetsEv; 45 _ZN7WebCore8Document8iconURLsEv; 45 _ZN7WebCore8Document8iconURLsEi; 46 _ZN7WebCore8Document16shortcutIconURLsEv; 46 47 _ZN7WebCore8Settings19minDOMTimerIntervalEv; 47 48 _ZN7WebCore8Settings22setMinDOMTimerIntervalEd;
Note: See TracChangeset
for help on using the changeset viewer.