Remove URL decoding in srcset handling
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Sep 2013 05:02:59 +0000 (05:02 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Sep 2013 05:02:59 +0000 (05:02 +0000)
commit196976ed5abcbf734b115b2ea3e366006178e45c
tree284a82afd72880f1e8cc73fd3cfda43f3467450a
parent0b584da4cd520607bed8cad66d39e56a67bb77c7
Remove URL decoding in srcset handling
https://bugs.webkit.org/show_bug.cgi?id=121609

Patch by Yoav Weiss <yoav@yoav.ws> on 2013-09-19
Reviewed by Benjamin Poulain.

Source/WebCore:

Tests: fast/hidpi/image-srcset-question-mark.html
       fast/loader/image-src-question-mark.html

Removed URL decoding from src and srcset's handling algorithm, since they break encoded URLS.

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

LayoutTests:

These tests make sure that encoded URLs are properly handled, and especially URLs
with a question mark in them.

* fast/hidpi/image-srcset-question-mark-expected.txt: Added.
* fast/hidpi/image-srcset-question-mark.html: Added.
* fast/hidpi/resources/image?test.png: Added.
* fast/loader/image-src-question-mark-expected.txt: Added.
* fast/loader/image-src-question-mark.html: Added.
* fast/loader/resources/image?test.png: Added.

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