X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fthird_party%2FWebKit%2FSource%2Fweb%2FWebViewImpl.cpp;h=4c709a0756d61894627c9282605d72f58d9eef4f;hb=8be7648e3bc188a587d5050c5a945c1099957e8b;hp=4b8b5cc11628aa0bd3023ba0d672f2c35cbcaa52;hpb=3cb1527a1d0111fd75188ac2c34c117944473076;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/third_party/WebKit/Source/web/WebViewImpl.cpp b/src/third_party/WebKit/Source/web/WebViewImpl.cpp index 4b8b5cc..4c709a0 100644 --- a/src/third_party/WebKit/Source/web/WebViewImpl.cpp +++ b/src/third_party/WebKit/Source/web/WebViewImpl.cpp @@ -483,6 +483,9 @@ void WebViewImpl::handleMouseDown(LocalFrame& mainFrame, const WebMouseEvent& ev PageWidgetEventHandler::handleMouseDown(mainFrame, event); + if (event.button == WebMouseEvent::ButtonLeft && m_mouseCaptureNode) + m_mouseCaptureGestureToken = mainFrame.eventHandler().takeLastMouseDownGestureToken(); + if (m_selectPopup && m_selectPopup == selectPopup) { // That click triggered a select popup which is the same as the one that // was showing before the click. It means the user clicked the select @@ -865,7 +868,10 @@ void WebViewImpl::getSelectionRootBounds(WebRect& bounds) const && toHTMLInputElement(*shadowHost).isText()))) root = shadowHost; - IntRect boundingBox = root->pixelSnappedBoundingBox(); + IntRect boundingBox = isHTMLHtmlElement(root) + ? IntRect(IntPoint(0, 0), root->document().frame()->view()->contentsSize()) + : root->pixelSnappedBoundingBox(); + boundingBox = root->document().frame()->view()->contentsToWindow(boundingBox); boundingBox.scale(pageScaleFactor()); bounds = boundingBox; @@ -1812,6 +1818,8 @@ bool WebViewImpl::handleInputEvent(const WebInputEvent& inputEvent) if (inputEvent.type == WebInputEvent::MouseUp) mouseCaptureLost(); + OwnPtr gestureIndicator; + AtomicString eventType; switch (inputEvent.type) { case WebInputEvent::MouseMove: @@ -1822,9 +1830,12 @@ bool WebViewImpl::handleInputEvent(const WebInputEvent& inputEvent) break; case WebInputEvent::MouseDown: eventType = EventTypeNames::mousedown; + gestureIndicator = adoptPtr(new UserGestureIndicator(DefinitelyProcessingNewUserGesture)); + m_mouseCaptureGestureToken = gestureIndicator->currentToken(); break; case WebInputEvent::MouseUp: eventType = EventTypeNames::mouseup; + gestureIndicator = adoptPtr(new UserGestureIndicator(m_mouseCaptureGestureToken.release())); break; default: ASSERT_NOT_REACHED();