Changeset 122806 in webkit
- Timestamp:
- Jul 16, 2012 9:37:29 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r122805 r122806 1 2012-07-16 Pete Williamson <petewil@google.com> 2 3 Expose an export for the iconUrl list so Internals can use it 4 https://bugs.webkit.org/show_bug.cgi?id=88665 5 6 Reviewed by Kent Tamura. 7 8 * Source/autotools/symbols.filter: export iconURLs 9 1 10 2012-07-16 Hajime Morrita <morrita@chromium.org> 2 11 -
trunk/LayoutTests/ChangeLog
r122802 r122806 1 2012-07-16 Pete Williamson <petewil@google.com> 2 3 Add some new unit tests to test the favicon changing dynamically 4 https://bugs.webkit.org/show_bug.cgi?id=88665 5 6 Reviewed by Kent Tamura. 7 8 * fast/dom/icon-url-change-expected.txt: Added. 9 * fast/dom/icon-url-change.html: Added a new test for changing the favicon dynamically 10 * fast/dom/icon-url-list-expected.txt: Added. 11 * fast/dom/icon-url-list.html: Added a new test for multiple favicons in the HTML header 12 * fast/dom/icon-url-property-expected.txt: update unit test expectations 13 * fast/dom/icon-url-property.html: update and enable existing favicon test 14 * platform/chromium/TestExpectations: reenable the url-property test 15 1 16 2012-07-16 Kiran Muppala <cmuppala@apple.com> 2 17 -
trunk/LayoutTests/fast/dom/icon-url-property-expected.txt
r122205 r122806 1 main frame - didChangeIcons2 1 Original iconURL is: http://test.com/oldfavicon.ico 3 Setting new icon URL to: http://test.com/newfavion.ico 4 New iconURL is: http://test.com/newfavion.ico 2 Setting new icon URL to: http://test.com/newfavicon.ico 3 New iconURL is: http://test.com/newfavicon.ico 4 PASS - URL list matches expected -
trunk/LayoutTests/fast/dom/icon-url-property.html
r122205 r122806 30 30 31 31 function runTests() { 32 if (window.testRunner) {32 if (window.testRunner) 33 33 testRunner.dumpAsText(); 34 testRunner.dumpIconChanges(); 35 } 34 36 35 iconURL = document.getElementsByTagName("head")[0].getElementsByTagName("link")[0].href; 37 36 debugOutput ('Original iconURL is: ' + iconURL); 38 newURL = 'http://test.com/newfavi on.ico';37 newURL = 'http://test.com/newfavicon.ico'; 39 38 debugOutput ('Setting new icon URL to: ' + newURL); 40 39 setFavIcon(newURL); … … 42 41 43 42 debugOutput ('New iconURL is: ' + iconURL); 43 44 // check that the URL list in the document is as we expect 45 var expectedURLs = "http://test.com/newfavicon.ico"; 46 var iconURLs = window.internals.iconURLs(document); 47 if (expectedURLs == iconURLs[0]) 48 debugOutput('PASS - URL list matches expected'); 49 else 50 debugOutput('FAIL - URL list does not match expected'); 51 44 52 } 45 53 -
trunk/LayoutTests/platform/chromium/TestExpectations
r122778 r122806 1875 1875 // BUGWK38038 : fast/url/file-http-base.html = TEXT 1876 1876 1877 BUGWK33812 SKIP : fast/dom/icon-url-property.html = PASS1878 1879 1877 // New layoutTestController function added at r57993 1880 1878 BUGCR42696 : http/tests/xmlhttprequest/cross-origin-authorization-with-embedder.html = TIMEOUT -
trunk/Source/WebCore/ChangeLog
r122805 r122806 1 2012-07-16 Pete Williamson <petewil@google.com> 2 3 Changed the behavior of iconURLs to always recalculate the list. 4 https://bugs.webkit.org/show_bug.cgi?id=88665 5 6 Reviewed by Kent Tamura. 7 8 As it turns out, it can contain stale URLs in the case that some script 9 manipulates the DOM, which breaks scripts trying to reset the favicon 10 URL. Also added a method in Internals to allow tests to get the list of 11 icon 12 13 Tests: fast/dom/icon-url-change.html 14 fast/dom/icon-url-list.html 15 16 * WebCore.exp.in: export Document::iconURLs on the mac for the Internals class 17 * dom/Document.cpp: 18 (WebCore::Document::iconURLs): Changed the method to recalculate the iconURL list every time 19 (WebCore::Document::addIconURL): we no longer need to add to the internal list since we recalculate it 20 (WebCore::Document::setUseSecureKeyboardEntryWhenActive): removed extra whitespace 21 * dom/Document.h: 22 (Document): removed the addIconURL method which is no longer used 23 * html/HTMLLinkElement.cpp: 24 (WebCore::HTMLLinkElement::iconType): exposed the icon type with an accessor 25 (WebCore): 26 (WebCore::HTMLLinkElement::iconSizes): exposed the icon sizes with an accessor 27 * html/HTMLLinkElement.h: 28 (HTMLLinkElement): declared the icon type and size accessors 29 * testing/Internals.cpp: 30 (WebCore::Internals::iconURLs): made a method to be used by unit tests for inspecting the icon URL list 31 (WebCore): 32 * testing/Internals.h: 33 (Internals): declared the method for unit testing the icon URL list 34 * testing/Internals.idl: exported the Document::iconURLs function 35 1 36 2012-07-16 Hajime Morrita <morrita@chromium.org> 2 37 -
trunk/Source/WebCore/WebCore.exp.in
r122670 r122806 835 835 __ZN7WebCore8Document36updateLayoutIgnorePendingStylesheetsEv 836 836 __ZN7WebCore8Document4headEv 837 __ZN7WebCore8Document8iconURLsEv 837 838 __ZN7WebCore8FormData6createEPKvm 838 839 __ZN7WebCore8FormDataD1Ev -
trunk/Source/WebCore/dom/Document.cpp
r122787 r122806 4895 4895 } 4896 4896 4897 const Vector<IconURL>& Document::iconURLs() const 4898 { 4897 const Vector<IconURL>& Document::iconURLs() 4898 { 4899 m_iconURLs.clear(); 4900 4901 if (!head() || !(head()->children())) 4902 return m_iconURLs; 4903 4904 // Include any icons where type = link, rel = "shortcut icon". 4905 RefPtr<HTMLCollection> children = head()->children(); 4906 unsigned int length = children->length(); 4907 for (unsigned int i = 0; i < length; ++i) { 4908 Node* child = children->item(i); 4909 if (!child->hasTagName(linkTag)) 4910 continue; 4911 HTMLLinkElement* linkElement = static_cast<HTMLLinkElement*>(child); 4912 if (linkElement->iconType() != Favicon) 4913 continue; 4914 if (linkElement->href().isEmpty()) 4915 continue; 4916 4917 // Put it at the front to ensure that icons seen later take precedence as required by the spec. 4918 IconURL newURL(linkElement->href(), linkElement->iconSizes(), linkElement->type(), linkElement->iconType()); 4919 m_iconURLs.prepend(newURL); 4920 } 4921 4899 4922 return m_iconURLs; 4900 4923 } … … 4907 4930 // FIXME - <rdar://problem/4727645> - At some point in the future, we might actually honor the "mimeType" 4908 4931 IconURL newURL(KURL(ParsedURLString, url), sizes, mimeType, iconType); 4909 m_iconURLs.append(newURL);4910 4932 4911 4933 if (Frame* f = frame()) { … … 4920 4942 if (m_useSecureKeyboardEntryWhenActive == usesSecureKeyboard) 4921 4943 return; 4922 4944 4923 4945 m_useSecureKeyboardEntryWhenActive = usesSecureKeyboard; 4924 4946 m_frame->selection()->updateSecureKeyboardEntryIfActive(); -
trunk/Source/WebCore/dom/Document.h
r122787 r122806 953 953 void setHasNodesWithPlaceholderStyle() { m_hasNodesWithPlaceholderStyle = true; } 954 954 955 const Vector<IconURL>& iconURLs() const;955 const Vector<IconURL>& iconURLs(); 956 956 void addIconURL(const String& url, const String& mimeType, const String& size, IconType); 957 957 -
trunk/Source/WebCore/html/HTMLLinkElement.cpp
r122205 r122806 419 419 } 420 420 421 IconType HTMLLinkElement::iconType() const 422 { 423 return m_relAttribute.m_iconType; 424 } 425 426 String HTMLLinkElement::iconSizes() const 427 { 428 return m_sizes->toString(); 429 } 430 421 431 void HTMLLinkElement::addSubresourceAttributeURLs(ListHashSet<KURL>& urls) const 422 432 { -
trunk/Source/WebCore/html/HTMLLinkElement.h
r122205 r122806 55 55 56 56 String type() const; 57 58 IconType iconType() const; 59 60 // the icon size string as parsed from the HTML attribute 61 String iconSizes() const; 57 62 58 63 CSSStyleSheet* sheet() const { return m_sheet.get(); } -
trunk/Source/WebCore/testing/Internals.cpp
r122761 r122806 1077 1077 } 1078 1078 1079 PassRefPtr<DOMStringList> Internals::iconURLs(Document* document) const 1080 { 1081 Vector<IconURL> iconURLs = document->iconURLs(); 1082 RefPtr<DOMStringList> stringList = DOMStringList::create(); 1083 1084 Vector<IconURL>::const_iterator iter(iconURLs.begin()); 1085 for (; iter != iconURLs.end(); ++iter) 1086 stringList->append(iter->m_iconURL.string()); 1087 1088 return stringList.release(); 1089 } 1090 1079 1091 #if ENABLE(FULLSCREEN_API) 1080 1092 void Internals::webkitWillEnterFullScreenForElement(Document* document, Element* element) -
trunk/Source/WebCore/testing/Internals.h
r122761 r122806 186 186 187 187 String counterValue(Element*); 188 PassRefPtr<DOMStringList> iconURLs(Document*) const; 188 189 189 190 #if ENABLE(FULLSCREEN_API) -
trunk/Source/WebCore/testing/Internals.idl
r122761 r122806 166 166 167 167 DOMString counterValue(in Element element); 168 DOMString[] iconURLs(in Document document); 168 169 169 170 #if defined(ENABLE_FULLSCREEN_API) && ENABLE_FULLSCREEN_API -
trunk/Source/WebKit2/ChangeLog
r122805 r122806 1 2012-07-16 Pete Williamson <petewil@google.com> 2 3 Export the iconURL list to make it available to the Internals class for testing 4 https://bugs.webkit.org/show_bug.cgi?id=88665 5 6 Reviewed by Kent Tamura. 7 8 * win/WebKit2.def: export the DocumentL::iconURLs function 9 1 10 2012-07-16 Hajime Morrita <morrita@chromium.org> 2 11 -
trunk/Source/WebKit2/win/WebKit2.def
r122805 r122806 274 274 ?registerURLSchemeAsBypassingContentSecurityPolicy@SchemeRegistry@WebCore@@SAXABVString@WTF@@@Z 275 275 ?removeURLSchemeRegisteredAsBypassingContentSecurityPolicy@SchemeRegistry@WebCore@@SAXABVString@WTF@@@Z 276 ?iconURLs@Document@WebCore@@QAEABV?$Vector@UIconURL@WebCore@@$0A@@WTF@@XZ -
trunk/Source/autotools/symbols.filter
r122805 r122806 38 38 _ZN7WebCore5RangeD1Ev; 39 39 _ZN7WebCore8Document36updateLayoutIgnorePendingStylesheetsEv; 40 _ZN7WebCore8Document8iconURLsEv; 40 41 _ZN7WebCore9HTMLNames8inputTagE; 41 42 _ZN7WebCore9HTMLNames11textareaTagE;
Note: See TracChangeset
for help on using the changeset viewer.