Fix the specificity of the extended :not() selector
https://bugs.webkit.org/show_bug.cgi?id=138275

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

Source/WebCore:

The current draft says "The specificity of a :not() pseudo-class
is the specificity of the most specifc complex selector in its selector list."

It is still unclear how :not() plays with other new selectors. Until that is clarified,
this only handle the simple cases.

Tests: fast/css/not-self-specificity.html
       fast/css/not-specificity-1.html
       fast/css/not-specificity-2.html
       fast/css/not-specificity-3.html
       fast/css/not-specificity-4.html
       fast/css/not-specificity-5.html
       fast/css/not-specificity-6.html

* css/CSSSelector.cpp:
(WebCore::CSSSelector::specificityForOneSelector):

LayoutTests:

* fast/css/not-self-specificity-expected.html: Added.
* fast/css/not-self-specificity.html: Added.
Test that :not() itself does not influence the specificity,
only the nested selectors contribute to the global specificity.

* fast/css/not-specificity-1-expected.html: Added.
* fast/css/not-specificity-1.html: Added.
* fast/css/not-specificity-2-expected.html: Added.
* fast/css/not-specificity-2.html: Added.
* fast/css/not-specificity-3-expected.html: Added.
* fast/css/not-specificity-3.html: Added.
Tests for compound selectors.
All tests are variations of the same base testing specificity
and position.

* fast/css/not-specificity-4-expected.html: Added.
* fast/css/not-specificity-4.html: Added.
* fast/css/not-specificity-5-expected.html: Added.
* fast/css/not-specificity-5.html: Added.
* fast/css/not-specificity-6-expected.html: Added.
* fast/css/not-specificity-6.html: Added.
Same thing for complex selectors.

* fast/selectors/class-style-update-with-not-expected.txt:
Yeah, one more test fixed :)


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