<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - The bounds on InteractionInformationAtPosition should be more precise"
   href="https://bugs.webkit.org/show_bug.cgi?id=146468#c4">Comment # 4</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - The bounds on InteractionInformationAtPosition should be more precise"
   href="https://bugs.webkit.org/show_bug.cgi?id=146468">bug 146468</a>
              from <span class="vcard"><a class="email" href="mailto:bdakin&#64;apple.com" title="Beth Dakin &lt;bdakin&#64;apple.com&gt;"> <span class="fn">Beth Dakin</span></a>
</span></b>
        <pre>(In reply to <a href="show_bug.cgi?id=146468#c3">comment #3</a>)
<span class="quote">&gt; Comment on <span class=""><a href="attachment.cgi?id=255843&amp;action=diff" name="attach_255843" title="Patch">attachment 255843</a> <a href="attachment.cgi?id=255843&amp;action=edit" title="Patch">[details]</a></span>
&gt; Patch
&gt; 
&gt; View in context:
&gt; <a href="https://bugs.webkit.org/attachment.cgi?id=255843&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=255843&amp;action=review</a>
&gt; 
&gt; &gt; Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:2162
&gt; &gt; +            if (element-&gt;renderer())
&gt; &gt;                  info.touchCalloutEnabled = element-&gt;renderer()-&gt;style().touchCalloutEnabled();
&gt; 
&gt; Seems like you can just bail early from this function if element-&gt;renderer()
&gt; is null.
&gt; </span >

There is more to the function that should be executed outside of an if (element) that this line of code is wrapped in. I could break; I suppose? I feel like we don't usually use breaks to break out of conditionals, but it's not covered by the style guide so maybe it's fine?

<span class="quote">&gt; &gt; Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:2171
&gt; &gt; +                RefPtr&lt;Range&gt; linkRange = rangeOfContents(*linkElement);
&gt; &gt; +                Vector&lt;FloatQuad&gt; quads;
&gt; &gt; +                linkRange-&gt;textQuads(quads);
&gt; &gt; +                FloatRect linkBoundingBox;
&gt; &gt; +                for (const auto&amp; quad : quads)
&gt; &gt; +                    linkBoundingBox.unite(quad.enclosingBoundingBox());
&gt; &gt; +                info.bounds = IntRect(linkBoundingBox);
&gt; 
&gt; This is just Range::boundingRect(), but that forces layout.
&gt; </span >

Layout should be up to date here, so that should;t be necessary. Unless we are sure it's smart enough to know things are up to date?

<span class="quote">&gt; &gt; Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:2172
&gt; &gt; +            } else if (element-&gt;renderer()) {
&gt; 
&gt; if (RenderElement* renderer = element-&gt;renderer())...
&gt; </span >

Fixed.

<span class="quote">&gt; &gt; Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:2177
&gt; &gt; +                    info.bounds = element-&gt;renderer()-&gt;absoluteBoundingBoxRect(true);
&gt; 
&gt; true is the default.</span >

Fixed.</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>