[Webkit-unassigned] [Bug 146468] The bounds on InteractionInformationAtPosition should be more precise

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jun 30 13:57:31 PDT 2015


https://bugs.webkit.org/show_bug.cgi?id=146468

Simon Fraser (smfr) <simon.fraser at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #255843|review+                     |review?
              Flags|                            |

--- Comment #3 from Simon Fraser (smfr) <simon.fraser at apple.com> ---
Comment on attachment 255843
  --> https://bugs.webkit.org/attachment.cgi?id=255843
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=255843&action=review

> Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:2162
> +            if (element->renderer())
>                  info.touchCalloutEnabled = element->renderer()->style().touchCalloutEnabled();

Seems like you can just bail early from this function if element->renderer() is null.

> Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:2171
> +                RefPtr<Range> linkRange = rangeOfContents(*linkElement);
> +                Vector<FloatQuad> quads;
> +                linkRange->textQuads(quads);
> +                FloatRect linkBoundingBox;
> +                for (const auto& quad : quads)
> +                    linkBoundingBox.unite(quad.enclosingBoundingBox());
> +                info.bounds = IntRect(linkBoundingBox);

This is just Range::boundingRect(), but that forces layout.

> Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:2172
> +            } else if (element->renderer()) {

if (RenderElement* renderer = element->renderer())...

> Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:2177
> +                    info.bounds = element->renderer()->absoluteBoundingBoxRect(true);

true is the default.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150630/4568d36b/attachment-0001.html>


More information about the webkit-unassigned mailing list