Use shouldBecomeEqual in asynchronous spellchecking tests.
https://bugs.webkit.org/show_bug.cgi?id=121483

Reviewed by Darin Adler.

Every asynchronous spellchecking layout test waits for spelling or grammar
markers using setTimeout. It duplicates the code, moreover the implementation
differs in every test.

Use shouldBecomeEqual helper (introduced in r143860) to test spellchecking
asynchronously.

* editing/spelling/grammar-markers-expected.txt:
* editing/spelling/grammar-markers-hidpi-expected.txt:
* editing/spelling/grammar-markers-hidpi.html:
* editing/spelling/grammar-markers.html:

* editing/spelling/grammar-paste-expected.txt:
* editing/spelling/grammar-paste.html:
Dump text of destination element instead of source one to show what is
really tested. It stops outputting that the input and textarea elements
can store html tags, for example,
PASS INPUT has a marker on 'I have a<b>n ki</b>wi'.

* editing/spelling/script-tests/spellcheck-paste.js:
(verifyMarker):
(pasteAndVerify):

* editing/spelling/spellcheck-paste-continuous-disabled-expected.txt:
* editing/spelling/spellcheck-paste-continuous-disabled.html:
* editing/spelling/spellcheck-paste-disabled-expected.txt:
* editing/spelling/spellcheck-paste-disabled.html:
At the beginning, those tests check whether spelling marker appears
synchronously. Then, spell checking is disabled to check whether
the markers have disappeared properly.
There is no need to check spelling asynchronously in the second part
of the tests. Use synchronous spellchecking path instead.

* editing/spelling/spellcheck-paste-expected.txt:
* editing/spelling/spelling-marker-description-expected.txt:
* editing/spelling/spelling-marker-description.html:
* platform/efl-wk2/editing/spelling/spellcheck-paste-continuous-disabled-expected.txt:
* platform/mac/editing/spelling/grammar-markers-expected.png:
* platform/mac/editing/spelling/grammar-markers-hidpi-expected.png:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156137 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix leaks in CSS parser caused by overwriting owned raw pointers with 0
https://bugs.webkit.org/show_bug.cgi?id=121655

Reviewed by Anders Carlsson.

* css/CSSGrammar.y.in: Use nullptr instead of 0. Use unique_ptr instead
of a raw pointer in cases where we might or might not actually keep
the allocated memory. This can still be cleaned up further, but this
should fix the memory leaks we have been seeing.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156138 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Avoid calling AtomicString::lower() in makeFontGlyphsCacheKey
https://bugs.webkit.org/show_bug.cgi?id=121656

Reviewed by Darin Adler.

Instead of lower casing AtomicStrings, store the strings as is and use the case folding
hash and case insensitive compare to determine equality.

* platform/graphics/Font.cpp:
(WebCore::operator==):
(WebCore::makeFontGlyphsCacheKey):
(WebCore::computeFontGlyphsCacheHash):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156139 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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
[Qt] Unreviewed gardening. Rebase tests.

Patch by Gabor Abraham <abrhm@inf.u-szeged.hu> on 2013-09-20

* platform/qt-wk2/fast/css/word-space-extra-expected.png: Added r155957.
* platform/qt/fast/css/pseudo-first-line-border-width-expected.png: Rebase after r155957.
* platform/qt/fast/css/pseudo-first-line-border-width-expected.txt: Rebase after r155957.
* platform/qt/fast/css/word-space-extra-expected.txt: Rebase after r155957.
* platform/qt/fast/forms/select-empty-option-height-expected.txt: Rebase after rr156040.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156143 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add covariant RenderElement* Element::renderer()
https://bugs.webkit.org/show_bug.cgi?id=121638

Reviewed by Andreas Kling.

Also add isRenderElement() test and casting functions.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156144 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WIN] Fix build without precompiled header after r154146.

* platform/win/WebCoreBundleWin.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156145 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Buildfix for ENABLE(CSS_FILTERS) && !ENABLE(ACCELERATED_COMPOSITING) after r155131.

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::enclosingFilterRepaintLayer):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156146 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make createRenderer() return RenderElement
https://bugs.webkit.org/show_bug.cgi?id=121666

Rubber-stamped by Andreas Kling.
        
Tighter typing.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156147 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add covariant RenderElement* Element::renderer()
https://bugs.webkit.org/show_bug.cgi?id=121638

Unreviewed buildfix after r156144.

* DOMCoreClasses.cpp:
(DOMElement::boundingBox):
(DOMElement::font):

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