diff options
Diffstat (limited to 'Source/WebKit/chromium/src/ContextMenuClientImpl.cpp')
-rw-r--r-- | Source/WebKit/chromium/src/ContextMenuClientImpl.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/Source/WebKit/chromium/src/ContextMenuClientImpl.cpp b/Source/WebKit/chromium/src/ContextMenuClientImpl.cpp index ad116090c..bda1b2e9a 100644 --- a/Source/WebKit/chromium/src/ContextMenuClientImpl.cpp +++ b/Source/WebKit/chromium/src/ContextMenuClientImpl.cpp @@ -120,7 +120,7 @@ static String selectMisspelledWord(const ContextMenu* defaultMenu, Frame* select // Selection is empty, so change the selection to the word under the cursor. HitTestResult hitTestResult = selectedFrame->eventHandler()-> - hitTestResultAtPoint(selectedFrame->page()->contextMenuController()->hitTestResult().point(), true); + hitTestResultAtPoint(selectedFrame->page()->contextMenuController()->hitTestResult().pointInInnerNodeFrame(), true); Node* innerNode = hitTestResult.innerNode(); VisiblePosition pos(innerNode->renderer()->positionForPoint( hitTestResult.localPoint())); @@ -155,10 +155,10 @@ PlatformMenuDescription ContextMenuClientImpl::getCustomMenuFromDefaultItems( return 0; HitTestResult r = m_webView->page()->contextMenuController()->hitTestResult(); - Frame* selectedFrame = r.innerNonSharedNode()->document()->frame(); + Frame* selectedFrame = r.innerNodeFrame(); WebContextMenuData data; - data.mousePosition = selectedFrame->view()->contentsToWindow(r.roundedPoint()); + data.mousePosition = selectedFrame->view()->contentsToWindow(r.roundedPointInInnerNodeFrame()); // Compute edit flags. data.editFlags = WebContextMenuData::CanDoNone; @@ -212,7 +212,7 @@ PlatformMenuDescription ContextMenuClientImpl::getCustomMenuFromDefaultItems( if (mediaElement->hasVideo()) data.mediaFlags |= WebContextMenuData::MediaHasVideo; if (mediaElement->controls()) - data.mediaFlags |= WebContextMenuData::MediaControlRootElement; + data.mediaFlags |= WebContextMenuData::MediaControls; } else if (r.innerNonSharedNode()->hasTagName(HTMLNames::objectTag) || r.innerNonSharedNode()->hasTagName(HTMLNames::embedTag)) { RenderObject* object = r.innerNonSharedNode()->renderer(); @@ -298,8 +298,9 @@ PlatformMenuDescription ContextMenuClientImpl::getCustomMenuFromDefaultItems( selectedFrame->selection()->setSelection(selection, WordGranularity); } } - } else if (m_webView->focusedWebCoreFrame()->editor()->isContinuousSpellCheckingEnabled()) { - data.isSpellCheckingEnabled = true; + } else { + data.isSpellCheckingEnabled = + m_webView->focusedWebCoreFrame()->editor()->isContinuousSpellCheckingEnabled(); // Spellchecking might be enabled for the field, but could be disabled on the node. if (m_webView->focusedWebCoreFrame()->editor()->isSpellCheckingEnabledInFocusedNode()) { data.misspelledWord = selectMisspelledWord(defaultMenu, selectedFrame); |