<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Mutating styleSheet in shadow tree doesn't update the style"
   href="https://bugs.webkit.org/show_bug.cgi?id=162744#c15">Comment # 15</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Mutating styleSheet in shadow tree doesn't update the style"
   href="https://bugs.webkit.org/show_bug.cgi?id=162744">bug 162744</a>
              from <span class="vcard"><a class="email" href="mailto:rniwa&#64;webkit.org" title="Ryosuke Niwa &lt;rniwa&#64;webkit.org&gt;"> <span class="fn">Ryosuke Niwa</span></a>
</span></b>
        <pre>Comment on <span class=""><a href="attachment.cgi?id=290846&amp;action=diff" name="attach_290846" title="patch">attachment 290846</a> <a href="attachment.cgi?id=290846&amp;action=edit" title="patch">[details]</a></span>
patch

View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=290846&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=290846&amp;action=review</a>

It looks like two test cases are failing on WK1?

<span class="quote">&gt; Source/WebCore/css/CSSStyleSheet.cpp:173
&gt; +    auto* scope = styleSheetScope();</span >

I'm not sure scope is the most descriptive name of AuthorStyleSheets objects but perhaps you're planning to rename it?

<span class="quote">&gt; Source/WebCore/css/CSSStyleSheet.cpp:-205
&gt; -    owner-&gt;authorStyleSheets().didChangeCandidatesForActiveSet();</span >

Could you clarify in the change log why it's okay to remove this call?

<span class="quote">&gt; Source/WebCore/css/CSSStyleSheet.cpp:410
&gt; +{
&gt; +    return const_cast&lt;CSSStyleSheet&amp;&gt;(*this).rootStyleSheet();
&gt; +}</span >

Maybe we can just inline this in the header?

<span class="quote">&gt; Source/WebCore/dom/AuthorStyleSheets.cpp:88
&gt; +AuthorStyleSheets&amp; AuthorStyleSheets::forNode(Node&amp; node)</span >

It's pretty neat that we just needed three functions to abstract Document/ShadowRoot difference!

<span class="quote">&gt; Source/WebCore/dom/AuthorStyleSheets.cpp:337
&gt; +    if (m_shadowRoot)
&gt; +        updateType = UpdateType::ContentsOrInterpretation;
&gt; +</span >

Why do we want to override this? It seems that we do want to analyzeStyleSheetChange even inside a shadow tree?
Please clarify that in the change log.

<span class="quote">&gt; Source/WebCore/html/HTMLLinkElement.cpp:-333
&gt; -
&gt; -    if (document().hasLivingRenderTree())
&gt; -        document().authorStyleSheets().didChangeCandidatesForActiveSet();</span >

Could you clarify why it's okay to remove this in the change log?</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>