[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 14:11:29 PDT 2015
https://bugs.webkit.org/show_bug.cgi?id=146468
--- Comment #4 from Beth Dakin <bdakin at apple.com> ---
(In reply to comment #3)
> Comment on attachment 255843 [details]
> 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.
>
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?
> > 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.
>
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?
> > Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:2172
> > + } else if (element->renderer()) {
>
> if (RenderElement* renderer = element->renderer())...
>
Fixed.
> > Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:2177
> > + info.bounds = element->renderer()->absoluteBoundingBoxRect(true);
>
> true is the default.
Fixed.
--
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/4c907e52/attachment.html>
More information about the webkit-unassigned
mailing list