Favicons are not always loaded.
authorpeavo@outlook.com <peavo@outlook.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 20 Apr 2015 16:49:43 +0000 (16:49 +0000)
committerpeavo@outlook.com <peavo@outlook.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 20 Apr 2015 16:49:43 +0000 (16:49 +0000)
commitc31d73be8564d110ab10e70c12cc5d2539308bd7
tree8f951c7ab35cc5fcf301cb26fe3c0c5e7b8fe4e3
parent9c69252f346c2135afa9bf7e7e1c21df14eade24
Favicons are not always loaded.
https://bugs.webkit.org/show_bug.cgi?id=143880

Reviewed by Darin Adler.

Source/WebCore:

If the favicon link element(s) in the document does not have a mime type,
the favicon is loaded from the domain root (/favicon.ico). If no favicon
exists at this location, the favicon loading will fail. This can be solved
by not demanding that the link element has a mime type.

Test: fast/dom/icon-url-without-mimetype.html

* loader/icon/IconController.cpp:
(WebCore::iconFromLinkElements): Return the chosen icon URL instead of a vector of URLs.
(WebCore::IconController::url):
(WebCore::iconsFromLinkElements): Deleted.

LayoutTests:

Added new test for icon link elements without mime type.

* fast/dom/icon-url-without-mimetype-expected.txt: Added.
* fast/dom/icon-url-without-mimetype.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183015 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/dom/icon-url-without-mimetype-expected.txt [new file with mode: 0644]
LayoutTests/fast/dom/icon-url-without-mimetype.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/loader/icon/IconController.cpp