<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Factor style sharing code out of StyleResolver"
   href="https://bugs.webkit.org/show_bug.cgi?id=153768#c7">Comment # 7</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Factor style sharing code out of StyleResolver"
   href="https://bugs.webkit.org/show_bug.cgi?id=153768">bug 153768</a>
              from <span class="vcard"><a class="email" href="mailto:koivisto&#64;iki.fi" title="Antti Koivisto &lt;koivisto&#64;iki.fi&gt;"> <span class="fn">Antti Koivisto</span></a>
</span></b>
        <pre><span class="quote">&gt; Should we lazily compute this value to avoid looking up the hash table
&gt; proactively?</span >

Probably though I'm not sure if it makes much difference in practice.

<span class="quote">&gt; &gt; Source/WebCore/style/StyleSharingResolver.cpp:77
&gt; &gt; +    if (!element.parentElement())
&gt; &gt; +        return nullptr;
&gt; 
&gt; You no longer check the existence of parent style.  Is that expected?</span >

I'll put the check back. I'm not sure if it ever matters but can't really prove it.

<span class="quote">&gt; &gt; Source/WebCore/style/StyleSharingResolver.cpp:362
&gt; &gt; +    for (unsigned i = 0; i &lt; classNames.size(); ++i) {
&gt; 
&gt; Should we store classNames.size() in a local variable instead?</span >

Or rather use range-for.

<span class="quote">&gt; I got confused by this name because it sounded as if we need to do further
&gt; verification to make sure we can share a style with it.
&gt; How about &quot;findStyleSharableElement&quot; or &quot;findElementToShareStyle&quot;?</span >

The class name is Style::SharingResolver so I feel &quot;style&quot; and &quot;share&quot; are redundant in the function name. I sort of like &quot;similar&quot; since it communicates why we can share style with it.</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>