[Webkit-unassigned] [Bug 163232] Stop copying author shadow pseudo rules into shadow tree style resolver

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Oct 10 14:02:19 PDT 2016


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

Darin Adler <darin at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #291155|review?                     |review+
              Flags|                            |

--- Comment #6 from Darin Adler <darin at apple.com> ---
Comment on attachment 291155
  --> https://bugs.webkit.org/attachment.cgi?id=291155
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=291155&action=review

> Source/WebCore/css/ElementRuleCollector.cpp:229
> +    auto& shadowRoot = *m_element.containingShadowRoot();

What guarantees this is non-null?

> Source/WebCore/css/ElementRuleCollector.cpp:233
> +    auto& hostAuthorRules = Style::Scope::forNode(*shadowRoot.host()).resolver().ruleSets().authorStyle();

What guarantees shadowRoot.host() is non-null?

> Source/WebCore/css/ElementRuleCollector.cpp:234
> +    MatchRequest hostAuthorRequest(&hostAuthorRules, matchRequest.includeEmptyRules);

Anders and I would write this in this new coding style:

    MatchRequest hostAuthorRequest { &hostAuthorRules, matchRequest.includeEmptyRules };

Has the benefit of not looking anything like a function call and another benefit is that it won’t do implicit type conversions like silently converting an int to a boolean.

> Source/WebCore/css/ElementRuleCollector.cpp:296
> +    auto& rules = *matchRequest.ruleSet;

What guarantees ruleSet is non-null?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20161010/72e4db71/attachment-0001.html>


More information about the webkit-unassigned mailing list