[webkit-reviews] review denied: [Bug 82460] [Chromium] Selectively retrieve text around a touched point : [Attachment 134291] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Mar 28 10:56:06 PDT 2012


Adam Barth <abarth at webkit.org> has denied Leandro Graciá Gil
<leandrogracia at chromium.org>'s request for review:
Bug 82460: [Chromium] Selectively retrieve text around a touched point
https://bugs.webkit.org/show_bug.cgi?id=82460

Attachment 134291: Patch
https://bugs.webkit.org/attachment.cgi?id=134291&action=review

------- Additional Comments from Adam Barth <abarth at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=134291&action=review


This generally looks good.  I have a couple minor questions below.

> Source/WebKit/chromium/src/WebSurroundingText.cpp:57
> +    if (!node->inDocument() && element && element->inDocument())

How can a node's parent be inDocument() without the node itself being
inDocument() ?

> Source/WebKit/chromium/src/WebSurroundingText.cpp:59
> +    m_private.reset(new
SurroundingText(node->renderer()->positionForPoint(hitTestInfo.point()),
maxLength));

Won't this crash if the node doesn't have a renderer?  Maybe that's impossible
if the node is in a HitTestInfo (but then when do you need to check whether the
node is inDocument)?  I wonder if you mean to be null-checking renderer()
rather than checking inDocument().

> Source/WebKit/chromium/src/WebViewImpl.cpp:3470
> +#if OS(ANDROID)

Again this shouldn't be Android-specific.


More information about the webkit-reviews mailing list