<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:darin&#64;apple.com" title="Darin Adler &lt;darin&#64;apple.com&gt;"> <span class="fn">Darin Adler</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - CSSCursorImageValue shouldn't mutate element during style resolution"
   href="https://bugs.webkit.org/show_bug.cgi?id=156659">bug 156659</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 #276558 Flags</td>
           <td>review?
           </td>
           <td>review+
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - CSSCursorImageValue shouldn't mutate element during style resolution"
   href="https://bugs.webkit.org/show_bug.cgi?id=156659#c3">Comment # 3</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - CSSCursorImageValue shouldn't mutate element during style resolution"
   href="https://bugs.webkit.org/show_bug.cgi?id=156659">bug 156659</a>
              from <span class="vcard"><a class="email" href="mailto:darin&#64;apple.com" title="Darin Adler &lt;darin&#64;apple.com&gt;"> <span class="fn">Darin Adler</span></a>
</span></b>
        <pre>Comment on <span class=""><a href="attachment.cgi?id=276558&amp;action=diff" name="attach_276558" title="patch">attachment 276558</a> <a href="attachment.cgi?id=276558&amp;action=edit" title="patch">[details]</a></span>
patch

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

I would probably refer to these as &quot;cursor elements&quot; rather than &quot;SVG cursor elements&quot; even more consistently in the code. Names like m_cursorElements and updateCursorElement would be nicer than m_svgCursorElements and updateSVGCursorElement. Type would still make it clear it’s specific to SVG.

<span class="quote">&gt; Source/WebCore/css/CSSCursorImageValue.cpp:91
&gt; +    auto* svgCursorElement = downcast&lt;SVGCursorElement&gt;(element);</span >

I would use a reference:

    auto&amp; svgCursorElement = downcast&lt;SVGCursorElement&gt;(*element);

<span class="quote">&gt; Source/WebCore/css/CSSCursorImageValue.cpp:110
&gt; +    SVGLengthContext lengthContext(0);</span >

Should be nullptr rather than 0.

<span class="quote">&gt; Source/WebCore/css/CSSCursorImageValue.cpp:112
&gt; +    float x = roundf(cursorElement.x().value(lengthContext));</span >

I suggest using std::round instead of roundf. Also not sure if rounding is correct. Also wondering if we should clamp to the size of the image.

<span class="quote">&gt; Source/WebCore/css/CSSCursorImageValue.cpp:115
&gt; +    float y = roundf(cursorElement.y().value(lengthContext));</span >

Ditto.

<span class="quote">&gt; Source/WebCore/css/CSSCursorImageValue.h:-78
&gt; +    HashSet&lt;SVGCursorElement*&gt; m_svgCursorElements;
&gt;  
&gt; -    HashSet&lt;SVGElement*&gt; m_referencedElements;</span >

There’s a stray blank line here. I suggest removing 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>