Title: [165001] trunk/Source/WebCore
Revision
165001
Author
benja...@webkit.org
Date
2014-03-03 12:57:59 -0800 (Mon, 03 Mar 2014)

Log Message

SelectorQuery failing RightMostWithIdMatch are compiling their selectors for each execution
https://bugs.webkit.org/show_bug.cgi?id=129601

Reviewed by Andreas Kling.

This caused a regression after r164924 for documents in quirks mode. Since those always fail
selectorForIdLookup(), they ended up compiling the selector every time they were called.

* dom/SelectorQuery.cpp:
(WebCore::SelectorDataList::execute):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (165000 => 165001)


--- trunk/Source/WebCore/ChangeLog	2014-03-03 20:47:59 UTC (rev 165000)
+++ trunk/Source/WebCore/ChangeLog	2014-03-03 20:57:59 UTC (rev 165001)
@@ -1,3 +1,16 @@
+2014-03-03  Benjamin Poulain  <benja...@webkit.org>
+
+        SelectorQuery failing RightMostWithIdMatch are compiling their selectors for each execution
+        https://bugs.webkit.org/show_bug.cgi?id=129601
+
+        Reviewed by Andreas Kling.
+
+        This caused a regression after r164924 for documents in quirks mode. Since those always fail
+        selectorForIdLookup(), they ended up compiling the selector every time they were called.
+
+        * dom/SelectorQuery.cpp:
+        (WebCore::SelectorDataList::execute):
+
 2014-03-01  Jer Noble  <jer.no...@apple.com>
 
         [Mac] Crash in MediaPlayer::rateChanged()

Modified: trunk/Source/WebCore/dom/SelectorQuery.cpp (165000 => 165001)


--- trunk/Source/WebCore/dom/SelectorQuery.cpp	2014-03-03 20:47:59 UTC (rev 165000)
+++ trunk/Source/WebCore/dom/SelectorQuery.cpp	2014-03-03 20:57:59 UTC (rev 165001)
@@ -380,10 +380,17 @@
     ContainerNode* searchRootNode = &rootNode;
     switch (m_matchType) {
     case RightMostWithIdMatch:
-        if (const CSSSelector* idSelector = selectorForIdLookup(*searchRootNode, *m_selectors.first().selector)) {
+        {
+        const SelectorData& selectorData = m_selectors.first();
+        if (const CSSSelector* idSelector = selectorForIdLookup(*searchRootNode, *selectorData.selector)) {
             executeFastPathForIdSelector<SelectorQueryTrait>(*searchRootNode, m_selectors.first(), idSelector, output);
             break;
         }
+#if ENABLE(CSS_SELECTOR_JIT)
+        if (selectorData.compilationStatus == SelectorCompilationStatus::SimpleSelectorChecker)
+            goto CompiledSingleCase;
+#endif
+        }
         FALLTHROUGH;
     case CompilableSingleWithRootFilter:
     case CompilableSingle:
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to