Source/WebCore:
Add parsing support for the extended :nth-last-child(An+B of selector-list) defined
https://bugs.webkit.org/show_bug.cgi?id=138520

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-11-10
Reviewed by Andreas Kling.

Add parsing for :nth-last-child(An+B of selector-list). The selector is defined
in CSS Selectors Level 4: http://dev.w3.org/csswg/selectors4/#the-nth-last-child-pseudo

Tests: fast/css/parsing-css-nth-last-child-of-1.html
       fast/css/parsing-css-nth-last-child-of-2.html
       fast/css/parsing-css-nth-last-child-of-3.html
       fast/css/parsing-css-nth-last-child-of-4.html

* css/CSSGrammar.y.in:
* css/CSSParser.cpp:
(WebCore::CSSParser::detectFunctionTypeToken):
* css/CSSSelector.cpp:
(WebCore::CSSSelector::selectorText):

LayoutTests:
Add parsing support for the extended :nth-last-child(An+B of selector-list)
https://bugs.webkit.org/show_bug.cgi?id=138520

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-11-10
Reviewed by Andreas Kling.

All the tests are variations of the existing tests for :nth-child(An+B of selector-list).

* fast/css/css-selector-text-expected.txt:
* fast/css/css-selector-text.html:
* fast/css/css-set-selector-text-expected.txt:
* fast/css/css-set-selector-text.html:
* fast/css/parsing-css-nth-last-child-of-1-expected.txt: Added.
* fast/css/parsing-css-nth-last-child-of-1.html: Added.
* fast/css/parsing-css-nth-last-child-of-2-expected.txt: Added.
* fast/css/parsing-css-nth-last-child-of-2.html: Added.
* fast/css/parsing-css-nth-last-child-of-3-expected.txt: Added.
* fast/css/parsing-css-nth-last-child-of-3.html: Added.
* fast/css/parsing-css-nth-last-child-of-4-expected.txt: Added.
* fast/css/parsing-css-nth-last-child-of-4.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@175848 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Assertion fix for debug builds after r175846.

PropertySlot::slotBase() will assert if the slot is unset, so reorder
the tests to check for isCacheableValue() first.

* jit/Repatch.cpp:
(JSC::tryCacheGetByID):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@175849 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Update Esprima, remove WebInspector.Esprima global.
https://bugs.webkit.org/show_bug.cgi?id=138579

Reviewed by Timothy Hatcher.

Update esprima.js file to be unchanged by removing WebInspector.Esprima global object. Move esprima.js include
so that all external libraries load before the WebInspector namespace is declared in the combined Main.js.

* UserInterface/External/Esprima/esprima.js: File updated, no changes made.
* UserInterface/Main.html: esprima.js script tag moved up with other externals.
* UserInterface/Models/ScriptSyntaxTree.js: WebInspector.Esprima changed to esprima
(WebInspector.ScriptSyntaxTree):


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