Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(304)

Unified Diff: Source/WebKit/chromium/src/WebViewImpl.cpp

Issue 7005016: Revert 79703 - 2011-02-15 Brett Wilson <brettw@chromium.org> (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/742/
Patch Set: Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/WebKit/chromium/ChangeLog ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebKit/chromium/src/WebViewImpl.cpp
===================================================================
--- Source/WebKit/chromium/src/WebViewImpl.cpp (revision 86190)
+++ Source/WebKit/chromium/src/WebViewImpl.cpp (working copy)
@@ -1148,49 +1148,36 @@
m_currentInputEvent = &inputEvent;
if (m_mouseCaptureNode.get() && WebInputEvent::isMouseEventType(inputEvent.type)) {
- const int mouseButtonModifierMask = WebInputEvent::LeftButtonDown | WebInputEvent::MiddleButtonDown | WebInputEvent::RightButtonDown;
- if (inputEvent.type == WebInputEvent::MouseDown ||
- (inputEvent.modifiers & mouseButtonModifierMask) == 0) {
- // It's possible the mouse was released and we didn't get the "up"
- // message. This can happen if a dialog pops up while the mouse is
- // held, for example. This will leave us "stuck" in capture mode.
- // If we get a new mouse down message or any other mouse message
- // where no "down" flags are set, we know the user is no longer
- // dragging and we can release the capture and fall through to the
- // regular event processing.
+ // Save m_mouseCaptureNode since mouseCaptureLost() will clear it.
+ RefPtr<Node> node = m_mouseCaptureNode;
+
+ // Not all platforms call mouseCaptureLost() directly.
+ if (inputEvent.type == WebInputEvent::MouseUp)
mouseCaptureLost();
- } else {
- // Save m_mouseCaptureNode since mouseCaptureLost() will clear it.
- RefPtr<Node> node = m_mouseCaptureNode;
- // Not all platforms call mouseCaptureLost() directly.
- if (inputEvent.type == WebInputEvent::MouseUp)
- mouseCaptureLost();
-
- AtomicString eventType;
- switch (inputEvent.type) {
- case WebInputEvent::MouseMove:
- eventType = eventNames().mousemoveEvent;
- break;
- case WebInputEvent::MouseLeave:
- eventType = eventNames().mouseoutEvent;
- break;
- case WebInputEvent::MouseDown:
- eventType = eventNames().mousedownEvent;
- break;
- case WebInputEvent::MouseUp:
- eventType = eventNames().mouseupEvent;
- break;
- default:
- ASSERT_NOT_REACHED();
- }
-
- node->dispatchMouseEvent(
- PlatformMouseEventBuilder(mainFrameImpl()->frameView(), *static_cast<const WebMouseEvent*>(&inputEvent)),
- eventType, static_cast<const WebMouseEvent*>(&inputEvent)->clickCount);
- m_currentInputEvent = 0;
- return true;
+ AtomicString eventType;
+ switch (inputEvent.type) {
+ case WebInputEvent::MouseMove:
+ eventType = eventNames().mousemoveEvent;
+ break;
+ case WebInputEvent::MouseLeave:
+ eventType = eventNames().mouseoutEvent;
+ break;
+ case WebInputEvent::MouseDown:
+ eventType = eventNames().mousedownEvent;
+ break;
+ case WebInputEvent::MouseUp:
+ eventType = eventNames().mouseupEvent;
+ break;
+ default:
+ ASSERT_NOT_REACHED();
}
+
+ node->dispatchMouseEvent(
+ PlatformMouseEventBuilder(mainFrameImpl()->frameView(), *static_cast<const WebMouseEvent*>(&inputEvent)),
+ eventType, static_cast<const WebMouseEvent*>(&inputEvent)->clickCount);
+ m_currentInputEvent = 0;
+ return true;
}
bool handled = true;
« no previous file with comments | « Source/WebKit/chromium/ChangeLog ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698