Remove SelectorCheckerFastPath from the style resolution algorithm
authorbenjamin@webkit.org <benjamin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 13 Jul 2014 21:51:16 +0000 (21:51 +0000)
committerbenjamin@webkit.org <benjamin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 13 Jul 2014 21:51:16 +0000 (21:51 +0000)
commitc890ccfe73987a03f5a6e29e89215525f0e43808
tree0f65563da256d258c8f65db0763c959b5d223f52
parentc33611259f5b99ed0e5b0be8b5b729efde88bbe0
Remove SelectorCheckerFastPath from the style resolution algorithm
https://bugs.webkit.org/show_bug.cgi?id=134866

Reviewed by Antti Koivisto.

SelectorCheckerFastPath is now pure overhead because it can almost never match
if the CSS JIT was unable to compile.

* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::ruleMatches):
The "pre-filter" behind fastCheckableSelector had two parts:
1) Filtering the pseudoID.
2) Filtering on the rule hash.

The first part has been generalized (RuleDatacanMatchPseudoElement())
and moved to collectMatchingRulesForList().

(WebCore::ElementRuleCollector::collectMatchingRulesForList):
* css/RuleSet.cpp:
(WebCore::selectorCanMatchPseudoElement):
(WebCore::RuleData::RuleData):
(WebCore::RuleSet::addRegionRule):
(WebCore::RuleSet::addRulesFromSheet):
* css/RuleSet.h:
(WebCore::RuleData::canMatchPseudoElement):
(WebCore::RuleData::hasFastCheckableSelector): Deleted.
* css/StyleResolver.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171059 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/css/ElementRuleCollector.cpp
Source/WebCore/css/RuleSet.cpp
Source/WebCore/css/RuleSet.h
Source/WebCore/css/StyleResolver.cpp