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
&& 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;
if (inputEvent.type == WebInputEvent::MouseUp)
mouseCaptureLost();
+ OwnPtr<UserGestureIndicator> gestureIndicator;
+
AtomicString eventType;
switch (inputEvent.type) {
case WebInputEvent::MouseMove:
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();