• benjamin@webkit.org's avatar
    Use the Selector Code Generator for matching in SelectorQuery · b2d9efda
    benjamin@webkit.org authored
    https://bugs.webkit.org/show_bug.cgi?id=126185
    
    Reviewed by Ryosuke Niwa.
    
    Source/WebCore: 
    
    Compile selectors on demand and use the generated binary to perform
    element matching in SelectorQuery.
    
    Tests: fast/selectors/querySelector-long-adjacent-backtracking.html
           fast/selectors/querySelector-long-child-backtracking.html
           fast/selectors/querySelector-mixed-child-adjacent-backtracking.html
           fast/selectors/querySelector-multiple-simple-child-backtracking.html
           fast/selectors/querySelector-simple-adjacent-backtracking.html
           fast/selectors/querySelector-simple-child-backtracking.html
    
    * dom/SelectorQuery.cpp:
    (WebCore::SelectorDataList::executeCompiledSimpleSelectorChecker):
    (WebCore::SelectorDataList::executeCompiledSelectorCheckerWithContext):
    (WebCore::SelectorDataList::execute):
    * dom/SelectorQuery.h:
    
    LayoutTests: 
    
    Add some tests for longer backtracking cases typically not covered by the other tests.
    
    * fast/selectors/querySelector-long-adjacent-backtracking-expected.txt: Added.
    * fast/selectors/querySelector-long-adjacent-backtracking.html: Added.
    * fast/selectors/querySelector-long-child-backtracking-expected.txt: Added.
    * fast/selectors/querySelector-long-child-backtracking.html: Added.
    * fast/selectors/querySelector-mixed-child-adjacent-backtracking-expected.txt: Added.
    * fast/selectors/querySelector-mixed-child-adjacent-backtracking.html: Added.
    * fast/selectors/querySelector-multiple-simple-child-backtracking-expected.txt: Added.
    * fast/selectors/querySelector-multiple-simple-child-backtracking.html: Added.
    * fast/selectors/querySelector-simple-adjacent-backtracking-expected.txt: Added.
    * fast/selectors/querySelector-simple-adjacent-backtracking.html: Added.
    * fast/selectors/querySelector-simple-child-backtracking-expected.txt: Added.
    * fast/selectors/querySelector-simple-child-backtracking.html: Added.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161839 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    b2d9efda