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