[Webkit-unassigned] [Bug 88334] New: Prefer higher specificify selectors for rule set keys
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Jun 5 08:33:37 PDT 2012
https://bugs.webkit.org/show_bug.cgi?id=88334
Summary: Prefer higher specificify selectors for rule set keys
Product: WebKit
Version: 528+ (Nightly build)
Platform: Unspecified
OS/Version: Unspecified
Status: UNCONFIRMED
Severity: Normal
Priority: P2
Component: CSS
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: josh at joshpeek.com
CC: aroben at webkit.org
Created an attachment (id=145805)
--> (https://bugs.webkit.org/attachment.cgi?id=145805&action=review)
Patch
RuleSet::addRule always uses the first simple selector component as the key for its rule set hashmap. This causes "#foo.bar" and ".bar#foo" to be optimized differently. Same for worse off cases like "input[type=text].foo". In RuleSet::addRule, the first simple selector would be an attribute selector rather than the class selector. So its inserted into the m_tagRules hash rather than m_classRules.
This change promotes higher specificify selectors like IDs or classes to the front of the tag history chain. This ensures they'll be used as the most efficent index.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list