Filter attribute selectors with selector filter
https://bugs.webkit.org/show_bug.cgi?id=183200
Reviewed by Zalan Bujtas.
Currently selector filtering is done based on tags, classes and ids. We should include attributes too.
This patch adds filtering based on attribute name (but not content).
* css/SelectorFilter.cpp:
(WebCore::isExcludedAttribute):
Ignore id, class and style attributes. First two are already handled and the last is common but is rarely
used in selectors.
(WebCore::collectElementIdentifierHashes):
Collect attributes.
Remove the unnecessary StyledElement casting.
(WebCore::collectSimpleSelectorHash):
Collect attribute selectors.
(WebCore::chooseSelectorHashesForFilter):
Pick attributes with high priority for the filter as it is likely a good signal.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@229090
268f45cc-cd09-0410-ab3c-
d52691b4dbfc