Fixed img src URLS with multiple spaces
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Sep 2013 19:09:05 +0000 (19:09 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Sep 2013 19:09:05 +0000 (19:09 +0000)
commit61b89c2242381338b2efc4f5fafdaefeff66a4db
tree476e261b0cfe4e257353c9bab2c27ed6873f19e4
parent5e1a8ebdeaa0700c0380ad39d5b6c0865635d28e
Fixed img src URLS with multiple spaces
https://bugs.webkit.org/show_bug.cgi?id=121592

Patch by Yoav Weiss <yoav@yoav.ws> on 2013-09-20
Reviewed by Darin Adler.

Source/WebCore:

Test: fast/loader/image-src-multiple-space.html

I've removed the simplifyWhiteSpace step from HTMLImageElement's src attribute during the srcset selection algorithm.
That step prevented URLs with multiple spaces from being loaded as images, minimizing the multiple spaces into a single one.

* html/parser/HTMLParserIdioms.cpp:
(WebCore::bestFitSourceForImageAttributes):

LayoutTests:

This test verifies that URLs with multiple spaces can be loaded as an image resource.

* fast/loader/image-src-multiple-space-expected.txt: Added.
* fast/loader/image-src-multiple-space.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156186 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/loader/image-src-multiple-space-expected.txt [new file with mode: 0644]
LayoutTests/fast/loader/image-src-multiple-space.html [new file with mode: 0644]
LayoutTests/fast/loader/resources/image space.png [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/html/parser/HTMLParserIdioms.cpp