summaryrefslogtreecommitdiff
path: root/Source/WebKit/chromium/src/ContextMenuClientImpl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebKit/chromium/src/ContextMenuClientImpl.cpp')
-rw-r--r--Source/WebKit/chromium/src/ContextMenuClientImpl.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/Source/WebKit/chromium/src/ContextMenuClientImpl.cpp b/Source/WebKit/chromium/src/ContextMenuClientImpl.cpp
index a32a182a4..adaa41392 100644
--- a/Source/WebKit/chromium/src/ContextMenuClientImpl.cpp
+++ b/Source/WebKit/chromium/src/ContextMenuClientImpl.cpp
@@ -279,9 +279,8 @@ PlatformMenuDescription ContextMenuClientImpl::getCustomMenuFromDefaultItems(
// 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) {