2010-02-02 Kent Tamura <tkent@chromium.org>
Reviewed by Darin Fisher. [Chromium] Should not select a word on right-click. https://bugs.webkit.org/show_bug.cgi?id=33364 For non-Mac platforms, do not select a word around the caret when a context menu is opening. This behavior is not common in non-Mac platforms, and it prevents pasting with a context menu. In order that the spell checker works without the selection, we introduce WebFrame::selectWordAroundCaret(). We can replace a word around the caret with selectWordAroundCaret() + replaceSelection(). * public/WebFrame.h: Add pure selectWordAroundCaret() declaration. * src/ContextMenuClientImpl.cpp: (WebKit::selectMisspelledWord): Move word-selection code to WebFrameImpl::selectWordAroundPosition(), and clear the selection on non-Mac. * src/WebFrameImpl.cpp: (WebKit::WebFrameImpl::selectWordAroundPosition): (WebKit::WebFrameImpl::selectWordAroundCaret): * src/WebFrameImpl.h: Add selectWordAroundCaret() declaration. git-svn-id: svn://svn.chromium.org/blink/trunk@54212 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Showing
Please register or sign in to comment