Bug 69159 - Add exact match attribute selectors to the fast path
Summary: Add exact match attribute selectors to the fast path
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
Depends on:
Reported: 2011-09-30 11:24 PDT by Antti Koivisto
Modified: 2011-10-11 22:04 PDT (History)
3 users (show)

See Also:

patch (17.84 KB, patch)
2011-09-30 11:44 PDT, Antti Koivisto
no flags Details | Formatted Diff | Diff
now with more style, less printfs (17.46 KB, patch)
2011-09-30 12:02 PDT, Antti Koivisto
sam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Antti Koivisto 2011-09-30 11:24:03 PDT
Attribute selectors are increasingly common and we have them in our default style sheet too. [foo] and [foo="bar"] type selectors can be resolved quicky and easily in the fast path.
Comment 1 Antti Koivisto 2011-09-30 11:44:50 PDT
Created attachment 109318 [details]

This is ~20% progression in styleForElement() performance loading the full HTML5 spec (~0.8s).
Comment 2 WebKit Review Bot 2011-09-30 11:47:14 PDT
Attachment 109318 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1

Source/WebCore/css/SelectorChecker.h:87:  The parameter name "attribute" adds no information, so it should be removed.  [readability/parameter_name] [5]
Total errors found: 1 in 7 files

If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Antti Koivisto 2011-09-30 12:02:40 PDT
Created attachment 109320 [details]
now with more style, less printfs
Comment 4 Antti Koivisto 2011-10-03 10:39:34 PDT