<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Rename setNeedsStyleRecalc to invalidateStyle"
   href="https://bugs.webkit.org/show_bug.cgi?id=163542#c5">Comment # 5</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Rename setNeedsStyleRecalc to invalidateStyle"
   href="https://bugs.webkit.org/show_bug.cgi?id=163542">bug 163542</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; I don’t understand why this check is correct. I think this needs a  “why”
&gt; comment.</span >

I don't really know either (for the latter part).

<span class="quote">&gt; &gt; Source/WebCore/dom/Node.h:322
&gt; &gt; +    void clearNeedsStyleRecalc() { clearStyleInvalidation(); }
&gt; 
&gt; This function seems to have a peculiar name now that it’s not paired with a
&gt; setNeedsStyleRecalc function. Do we really need to keep it?</span >

Eliminating all NeedsStyleRecalc terminology is bit too much for one patch. This is just where the line is drawn for this one.

<span class="quote">&gt; Needs a comma after the word &quot;dynamically&quot;. But also, what exactly does
&gt; &quot;used dynamically&quot; mean? Can we say that in a more straightforward way?</span >

I mean &quot;changed after initialization&quot;.

<span class="quote">&gt; The word &quot;scope&quot; makes sense when telling something to invalidate. But not
&gt; as much sense when it’s indicating how much is invalid. It’s also unclear to
&gt; me that when renderers are &quot;invalidated&quot; that also means the entire subtree
&gt; is invalidated. Maybe all this is more obvious to someone working in this
&gt; area, but I am not so sure.</span >

I'm not entirely happy with the names. Suggestions are welcome. Value 'InvalidationScope::Element' indicates that the style of the element where it is set is invalid. Value 'Subtree' indicates that the element and also all its descendants are invalid. Value 'Renderers' indicates that the renderers for the subtree are invalid and need to be rebuild (also recomputing subtree styles).

<span class="quote">&gt; &gt; Source/WebCore/style/StyleTreeResolver.cpp:236
&gt; &gt; +    if (update.change != Detach &amp;&amp; (parent().change == Force || element.styleInvalidationScope() == InvalidationScope::Subtree))
&gt; 
&gt; Why is &quot;==&quot; right here? What about the Renderers case?</span >

In Renderers case update.change == Detach. But it could as well be &gt;=.</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>