From 284837daa07b29d6a63a748544a90b1f5842ac5c Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Mon, 10 Sep 2012 19:10:20 +0200 Subject: Imported WebKit commit 68645295d2e3e09af2c942f092556f06aa5f8b0d (http://svn.webkit.org/repository/webkit/trunk@128073) New snapshot --- Source/WebKit2/WebProcess/WebPage/WebPage.cpp | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) (limited to 'Source/WebKit2/WebProcess/WebPage/WebPage.cpp') diff --git a/Source/WebKit2/WebProcess/WebPage/WebPage.cpp b/Source/WebKit2/WebProcess/WebPage/WebPage.cpp index ecac12cf6..8e151818a 100644 --- a/Source/WebKit2/WebProcess/WebPage/WebPage.cpp +++ b/Source/WebKit2/WebProcess/WebPage/WebPage.cpp @@ -515,7 +515,7 @@ EditorState WebPage::editorState() const } if (selectionRoot) - result.editorRect = frame->view()->contentsToWindow(selectionRoot->getPixelSnappedRect()); + result.editorRect = frame->view()->contentsToWindow(selectionRoot->pixelSnappedBoundingBox()); RefPtr range; if (result.hasComposition && (range = frame->editor()->compositionRange())) { @@ -1310,7 +1310,7 @@ static bool isContextClick(const PlatformMouseEvent& event) static bool handleContextMenuEvent(const PlatformMouseEvent& platformMouseEvent, WebPage* page) { IntPoint point = page->corePage()->mainFrame()->view()->windowToContents(platformMouseEvent.position()); - HitTestResult result = page->corePage()->mainFrame()->eventHandler()->hitTestResultAtPoint(point, false); + HitTestResult result = page->corePage()->mainFrame()->eventHandler()->hitTestResultAtPoint(point); Frame* frame = page->corePage()->mainFrame(); if (result.innerNonSharedNode()) @@ -1351,8 +1351,14 @@ static bool handleMouseEvent(const WebMouseEvent& mouseEvent, WebPage* page, boo return handled; } - case PlatformEvent::MouseReleased: - return frame->eventHandler()->handleMouseReleaseEvent(platformMouseEvent); + case PlatformEvent::MouseReleased: { + bool handled = frame->eventHandler()->handleMouseReleaseEvent(platformMouseEvent); +#if PLATFORM(QT) + if (!handled) + handled = page->handleMouseReleaseEvent(platformMouseEvent); +#endif + return handled; + } case PlatformEvent::MouseMoved: if (onlyUpdateScrollbars) return frame->eventHandler()->passMouseMovedEventToScrollbars(platformMouseEvent); @@ -1555,14 +1561,16 @@ void WebPage::highlightPotentialActivation(const IntPoint& point, const IntSize& return; #else - HitTestResult result = mainframe->eventHandler()->hitTestResultAtPoint(mainframe->view()->windowToContents(point), /*allowShadowContent*/ false, /*ignoreClipping*/ true); + HitTestResult result = mainframe->eventHandler()->hitTestResultAtPoint(mainframe->view()->windowToContents(point), HitTestRequest::ReadOnly | HitTestRequest::Active | HitTestRequest::AllowShadowContent); adjustedNode = result.innerNode(); #endif // Find the node to highlight. This is not the same as the node responding the tap gesture, because many // pages has a global click handler and we do not want to highlight the body. // Instead find the enclosing link or focusable element, or the last enclosing inline element. for (Node* node = adjustedNode; node; node = node->parentOrHostNode()) { - if (node->isMouseFocusable() || node->isLink()) { + if (node->isDocumentNode() || node->isFrameOwnerElement()) + break; + if (node->isMouseFocusable() || node->willRespondToMouseClickEvents()) { activationNode = node; break; } @@ -2066,6 +2074,7 @@ void WebPage::updatePreferences(const WebPreferencesStore& store) #if ENABLE(SMOOTH_SCROLLING) settings->setEnableScrollAnimator(store.getBoolValueForKey(WebPreferencesKey::scrollAnimatorEnabledKey())); #endif + settings->setInteractiveFormValidationEnabled(store.getBoolValueForKey(WebPreferencesKey::interactiveFormValidationEnabledKey())); // : It is necessary to force compositing when accelerate drawing // is enabled on Mac so that scrollbars are always in their own layers. @@ -2111,7 +2120,7 @@ void WebPage::updatePreferences(const WebPreferencesStore& store) #endif settings->setShouldRespectImageOrientation(store.getBoolValueForKey(WebPreferencesKey::shouldRespectImageOrientationKey())); - settings->setThirdPartyStorageBlockingEnabled(store.getBoolValueForKey(WebPreferencesKey::thirdPartyStorageBlockingEnabledKey())); + settings->setStorageBlockingPolicy(static_cast(store.getUInt32ValueForKey(WebPreferencesKey::storageBlockingPolicyKey()))); settings->setDiagnosticLoggingEnabled(store.getBoolValueForKey(WebPreferencesKey::diagnosticLoggingEnabledKey())); @@ -2722,7 +2731,7 @@ void WebPage::findZoomableAreaForPoint(const WebCore::IntPoint& point, const Web { UNUSED_PARAM(area); Frame* mainframe = m_mainFrame->coreFrame(); - HitTestResult result = mainframe->eventHandler()->hitTestResultAtPoint(mainframe->view()->windowToContents(point), /*allowShadowContent*/ false, /*ignoreClipping*/ true); + HitTestResult result = mainframe->eventHandler()->hitTestResultAtPoint(mainframe->view()->windowToContents(point), HitTestRequest::ReadOnly | HitTestRequest::Active | HitTestRequest::IgnoreClipping); Node* node = result.innerNode(); -- cgit v1.2.1