<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Updating class name of a shadow host does not update the style applied by :host()"
href="https://bugs.webkit.org/show_bug.cgi?id=158900#c4">Comment # 4</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Updating class name of a shadow host does not update the style applied by :host()"
href="https://bugs.webkit.org/show_bug.cgi?id=158900">bug 158900</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=281623&action=diff" name="attach_281623" title="Patch">attachment 281623</a> <a href="attachment.cgi?id=281623&action=edit" title="Patch">[details]</a></span>
Patch
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=281623&action=review">https://bugs.webkit.org/attachment.cgi?id=281623&action=review</a>
<span class="quote">> Source/WebCore/style/AttributeChangeInvalidation.cpp:42
> + if (shadowRuleSets.authorStyle()->hostPseudoClassRules().isEmpty())
> + return false;</span >
Is there a solid guarantee that authorStyle is non-null? I noticed this pattern repeating in the code so the question applies not just here but at many other sites too.
<span class="quote">> Source/WebCore/style/AttributeChangeInvalidation.cpp:61
> + auto* shadowRoot = m_element.shadowRoot();
> + if (shadowRoot && mayBeAffectedByHostStyle(*shadowRoot, isHTML, attributeName))
> + mayAffectStyle = true;</span >
Can we skip this work if mayAffectStyle is already true?
<span class="quote">> Source/WebCore/style/ClassChangeInvalidation.cpp:108
> + if (shadowRoot && mayBeAffectedByHostStyle(*shadowRoot, changedClass))
> + mayAffectStyle = true;</span >
Can we skip this work if mayAffectStyle is already true?
<span class="quote">> Source/WebCore/style/IdChangeInvalidation.cpp:57
> + auto* shadowRoot = m_element.shadowRoot();
> + if (shadowRoot && mayBeAffectedByHostStyle(*shadowRoot, changedId))
> + mayAffectStyle = true;</span >
Can we skip this work if mayAffectStyle is already true?</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>