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: http://svn.webkit.org/repository/webkit/trunk@156140 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix a couple mistakes in my recent CSS grammar leak patch
https://bugs.webkit.org/show_bug.cgi?id=121659

Reviewed by Alexey Proskuryakov.

* css/CSSGrammar.y.in: Added initialization to nullptr for some error cases
that were otherwise leaving a bad value for the result of the production.
Also fixed a reversed logical expression.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156141 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Handle null font families.

Reviewed by Darin Adler.

* platform/graphics/Font.cpp:
(WebCore::computeFontGlyphsCacheHash):
Don't crash when trying to hash null strings.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156142 268f45cc-cd09-0410-ab3c-d52691b4dbfc