Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(314)

Unified Diff: Source/WebKit/chromium/src/ContextMenuClientImpl.cpp

Issue 10868101: Merge 125757 - Prevent showing suggestions when right-clicking a selection range. (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1229/
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebKit/chromium/src/ContextMenuClientImpl.cpp
===================================================================
--- Source/WebKit/chromium/src/ContextMenuClientImpl.cpp (revision 126724)
+++ Source/WebKit/chromium/src/ContextMenuClientImpl.cpp (working copy)
@@ -279,9 +279,8 @@
// a mouse on a word, Chrome just needs to find a spelling marker on the word instread of spellchecking it.
if (selectedFrame->settings() && selectedFrame->settings()->asynchronousSpellCheckingEnabled()) {
VisibleSelection selection = selectedFrame->selection()->selection();
- if (selection.isCaretOrRange()) {
- if (selection.isCaret())
- selection.expandUsingGranularity(WordGranularity);
+ if (selection.isCaret()) {
+ selection.expandUsingGranularity(WordGranularity);
RefPtr<Range> range = selection.toNormalizedRange();
Vector<DocumentMarker*> markers = selectedFrame->document()->markers()->markersInRange(range.get(), DocumentMarker::Spelling | DocumentMarker::Grammar);
if (markers.size() == 1) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698