<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:darin@apple.com" title="Darin Adler <darin@apple.com>"> <span class="fn">Darin Adler</span></a>
</span> changed
<a class="bz_bug_link
bz_status_NEW "
title="NEW - Stop copying author shadow pseudo rules into shadow tree style resolver"
href="https://bugs.webkit.org/show_bug.cgi?id=163232">bug 163232</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Attachment #291155 Flags</td>
<td>review?
</td>
<td>review+
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Stop copying author shadow pseudo rules into shadow tree style resolver"
href="https://bugs.webkit.org/show_bug.cgi?id=163232#c6">Comment # 6</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Stop copying author shadow pseudo rules into shadow tree style resolver"
href="https://bugs.webkit.org/show_bug.cgi?id=163232">bug 163232</a>
from <span class="vcard"><a class="email" href="mailto:darin@apple.com" title="Darin Adler <darin@apple.com>"> <span class="fn">Darin Adler</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=291155&action=diff" name="attach_291155" title="patch">attachment 291155</a> <a href="attachment.cgi?id=291155&action=edit" title="patch">[details]</a></span>
patch
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=291155&action=review">https://bugs.webkit.org/attachment.cgi?id=291155&action=review</a>
<span class="quote">> Source/WebCore/css/ElementRuleCollector.cpp:229
> + auto& shadowRoot = *m_element.containingShadowRoot();</span >
What guarantees this is non-null?
<span class="quote">> Source/WebCore/css/ElementRuleCollector.cpp:233
> + auto& hostAuthorRules = Style::Scope::forNode(*shadowRoot.host()).resolver().ruleSets().authorStyle();</span >
What guarantees shadowRoot.host() is non-null?
<span class="quote">> Source/WebCore/css/ElementRuleCollector.cpp:234
> + MatchRequest hostAuthorRequest(&hostAuthorRules, matchRequest.includeEmptyRules);</span >
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.
<span class="quote">> Source/WebCore/css/ElementRuleCollector.cpp:296
> + auto& rules = *matchRequest.ruleSet;</span >
What guarantees ruleSet is non-null?</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>