CSS JIT: Implement Pseudo Element
https://bugs.webkit.org/show_bug.cgi?id=134835

Reviewed by Benjamin Poulain.

Implement Pseudo Element handling for CSS JIT SelectorCompiler.
At first, we start with the simple implementation. We handle limited number of pseudo element,
before, after, first-line, first-letter.

Source/WebCore:
Tests: fast/selectors/pseudo-element-inside-any.html
       fast/selectors/querySelector-pseudo-element-inside-functional-pseudo-class-any.html
       fast/selectors/querySelector-pseudo-element-inside-functional-pseudo-class-not.html
       fast/selectors/querySelector-pseudo-element.html

* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::ruleMatches):
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::matchRecursively):
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::SelectorFragment::SelectorFragment):
(WebCore::SelectorCompiler::constructFragments):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
(WebCore::SelectorCompiler::SelectorCodeGenerator::loadCheckingContext):
(WebCore::SelectorCompiler::SelectorCodeGenerator::branchOnResolvingModeWithCheckingContext):
(WebCore::SelectorCompiler::SelectorCodeGenerator::branchOnResolvingMode):
(WebCore::SelectorCompiler::SelectorCodeGenerator::jumpIfNotResolvingStyle):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsActive):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsHovered):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementHasPseudoElement):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateRequestedPseudoElementEqualsToSelectorPseudoElement):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateMarkPseudoStyleForPseudoElement):
* cssjit/SelectorCompiler.h:
* rendering/style/RenderStyle.h:
* rendering/style/RenderStyleConstants.h:

LayoutTests:
* fast/selectors/pseudo-element-inside-any-expected.html: Added.
* fast/selectors/pseudo-element-inside-any.html: Added.
Inside functional pseudo classes such as ":-webkit-any", when pseudo element comes (e.g. ":-webkit-any(::first-letter)"),
it produces a local failure. So if the other selectors are matched against the element, whole ":-webkit-any" succeeds.
For example, a selector ":-webkit-any(::first-letter, p)" matches against `p` elements.
* fast/selectors/querySelector-pseudo-element-expected.txt: Added.
* fast/selectors/querySelector-pseudo-element-inside-functional-pseudo-class-any-expected.txt: Added.
* fast/selectors/querySelector-pseudo-element-inside-functional-pseudo-class-any.html: Added.
* fast/selectors/querySelector-pseudo-element-inside-functional-pseudo-class-not-expected.txt: Added.
* fast/selectors/querySelector-pseudo-element-inside-functional-pseudo-class-not.html: Added.
* fast/selectors/querySelector-pseudo-element.html: Added.

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