[webkit-reviews] review denied: [Bug 83446] Broken handling of pseudo-elements in selectors API : [Attachment 139786] Patch

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


Antti Koivisto <koivisto at iki.fi> has denied Arpita Bahuguna
<arpitabahuguna at gmail.com>'s request for review:
Bug 83446: Broken handling of pseudo-elements in selectors API
https://bugs.webkit.org/show_bug.cgi?id=83446

Attachment 139786: Patch
https://bugs.webkit.org/attachment.cgi?id=139786&action=review

------- Additional Comments from Antti Koivisto <koivisto at iki.fi>
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.


More information about the webkit-reviews mailing list