[Webkit-unassigned] [Bug 83446] Broken handling of pseudo-elements in selectors API

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed May 2 04:17:33 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=83446


Antti Koivisto <koivisto at iki.fi> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #139786|review?                     |review-
               Flag|                            |




--- Comment #7 from Antti Koivisto <koivisto at iki.fi>  2012-05-02 04:17:30 PST ---
(From update of attachment 139786)
View in context: https://bugs.webkit.org/attachment.cgi?id=139786&action=review

> Source/WebCore/css/SelectorChecker.cpp:776
> +                if (SettingRules == m_selectorCheckerMode) {

Putting the constant first looks strange.

> Source/WebCore/css/SelectorChecker.h:101
> +    void setCollectingRulesOnly(bool b) { b ? m_selectorCheckerMode = CollectingRules : m_selectorCheckerMode = SettingRules; }
> +    void setQueryingRulesOnly() { m_selectorCheckerMode = QueryingRules; }

Abuse of ternary operator. You should just replace these boolean setters with one that takes the mode enum.

> Source/WebCore/css/SelectorChecker.h:139
> +    enum SelectorCheckerMode { SettingRules = 0, CollectingRules, QueryingRules };

The name SettingRules makes no sense. We are never setting any rules. ResolvingStyle perhaps.

SelectorChecker::SelectorCheckerMode is redundant. This should be just Mode.

-- 
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