Bug 5923

Summary: REGRESSION: scrolling on Google maps continues after the mouse is released outside the window
Product: WebKit Reporter: Alexey Proskuryakov <ap>
Component: DOMAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: alice.barraclough, cdumez, darin, mitz
Priority: P1 Keywords: InRadar, Regression
Version: 420+   
Hardware: Mac   
OS: OS X 10.4   
URL: http://maps.google.com
Attachments:
Description Flags
Patch mjs: review+

Description Alexey Proskuryakov 2005-12-03 03:49:55 PST
Mouse-up events that happen when the mouse is outside a browser window seem to not be delivered.

Steps to reproduce:
1. Go to http://maps.google.com
2. Click the mouse anywhere on the mouse, drag until the mouse pointer goes outside the Safari window
3. Release the mouse button
4. Move the mouse pointer back into the window

Results: the map scrolls, although the mouse button is not down
Expected results (as in Safari 2.0.2): it shouldn't
Comment 1 Alexey Proskuryakov 2005-12-03 03:54:09 PST
Appears related to bug 4822.
Comment 2 Alice Liu 2006-01-10 14:26:00 PST
<rdar://problem/4404596>
Comment 3 Joost de Valk (AlthA) 2006-01-22 04:36:10 PST
Adding Regression keyword.
Comment 4 Darin Adler 2006-02-19 13:05:18 PST
I'm guessing that either a mouseup or mouseout event is not being delivered that's supposed to be. According to my reading of the DOM specification, the mouseup event goes to whatever element you're over when the mouse goes up. So what if you're not over any element at all (outside the window)?
Comment 5 mitz 2006-02-19 22:36:44 PST
(In reply to comment #4)
> I'm guessing that either a mouseup or mouseout event is not being delivered
> that's supposed to be. According to my reading of the DOM specification, the
> mouseup event goes to whatever element you're over when the mouse goes up. So
> what if you're not over any element at all (outside the window)?
> 

The bug could be on a lower level, if it is related to another thing I observed when leaving the window during a drag operation: if you start dragging the separator between two frames and leave the window, the separator stops following the mouse, and remains active even if you release the mouse button. If you return to the window, it starts tracking the mouse again, even if the button is up.
Comment 6 mitz 2006-02-20 09:23:06 PST
Yes, here, too, the problem show already when the mouse leaves the window and the map stops following it. In shipping Safari, the map keeps moving even when the mouse is outside the window for as long as the button is pressed.
Comment 7 mitz 2006-03-03 13:26:02 PST
I tracked this bug down to this change, from r11105 (Fix hit testing of relative positioned inline flows inside clipped overflow blocks so that they aren't mistakenly included in hit testing):

 bool RenderLayer::containsPoint(int x, int y, const QRect& damageRect) const
 {
-    return mustExamineRenderer(renderer()) || damageRect.contains(x, y);
+    return damageRect.contains(x, y);
 }

Undoing this change alone fixes the regression (and the frame-resize separator issue too).
Comment 8 mitz 2006-03-10 10:33:51 PST
Created attachment 6987 [details]
Patch
Comment 9 Maciej Stachowiak 2006-03-12 12:30:12 PST
Comment on attachment 6987 [details]
Patch

r=me
Comment 10 Lucas Forschler 2019-02-06 09:03:59 PST
Mass moving XML DOM bugs to the "DOM" Component.