[webkit-reviews] review denied: [Bug 98173] [chromium] Allow long press to select word on Android. : [Attachment 166706] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Oct 2 10:21:21 PDT 2012


Ryosuke Niwa <rniwa at webkit.org> has denied Oli Lan <olilan at chromium.org>'s
request for review:
Bug 98173: [chromium] Allow long press to select word on Android.
https://bugs.webkit.org/show_bug.cgi?id=98173

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

------- Additional Comments from Ryosuke Niwa <rniwa at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=166706&action=review


> Source/WebKit/chromium/src/WebViewImpl.cpp:4077
> +    FrameSelection* fs = focusedFrame->selection();

Please don't use abbreviations like fs.

> Source/WebKit/chromium/src/WebViewImpl.cpp:4081
> +    if (node->renderer() && !fs->contains(point) &&
(node->isContentEditable() || node->isTextNode()) && !result.isLiveLink()
> +	   && node->dispatchEvent(Event::create(eventNames().selectstartEvent,
true, true))) {
> +	   VisiblePosition
pos(node->renderer()->positionForPoint(result.localPoint()));
> +	   WebFrameImpl::selectWordAroundPosition(focusedFrame, pos);

This code looks fishy to me. Why isn't this in EventHandler.cpp?
In particular, we should be using canMouseDownStartSelect and share most of
code with selectClosestWordFromMouseEvent.


More information about the webkit-reviews mailing list