Changeset 46273 in webkit
- Timestamp:
- Jul 23, 2009 9:55:55 AM (15 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r46263 r46273 1 2009-07-22 Viet-Trung Luu <viettrungluu@gmail.com> 2 3 Reviewed by David Hyatt. 4 5 https://bugs.webkit.org/show_bug.cgi?id=27289 6 Tests that mouse clicks/releases are handled properly on scrollbars 7 even when there is no mouse move onto the scrollbar (two cases: enabled 8 and disabled controls). 9 10 * scrollbars/scrollbar-miss-mousemove-disabled-expected.txt: Added. 11 * scrollbars/scrollbar-miss-mousemove-disabled.html: Added. 12 * scrollbars/scrollbar-miss-mousemove-expected.txt: Added. 13 * scrollbars/scrollbar-miss-mousemove.html: Added. 14 1 15 2009-07-23 Simon Hausmann <simon.hausmann@nokia.com> 2 16 -
trunk/WebCore/ChangeLog
r46272 r46273 1 2009-07-22 Viet-Trung Luu <viettrungluu@gmail.com> 2 3 Reviewed by David Hyatt. 4 5 https://bugs.webkit.org/show_bug.cgi?id=27289 6 When a mouse click occurs on a scrollbar without a preceding mouse move 7 onto it, the release isn't handled correctly (since 8 EventHandler::m_lastScrollbarUnderMouse isn't set on mouse down, but 9 only on mouse move). (Side comment: That scrollbar-handling code 10 in EventHandler is ugly. It should be fixed properly.) 11 12 Tests: scrollbars/scrollbar-miss-mousemove.html 13 scrollbars/scrollbar-miss-mousemove-disabled.html 14 15 * page/EventHandler.cpp: 16 (WebCore::EventHandler::handleMousePressEvent): 17 (WebCore::EventHandler::handleMouseMoveEvent): 18 (WebCore::EventHandler::updateLastScrollbarUnderMouse): 19 * page/EventHandler.h: 20 1 21 2009-07-23 Mike Fenton <mike.fenton@torchmobile.com> 2 22 -
trunk/WebCore/page/EventHandler.cpp
r45747 r46273 1196 1196 if (swallowEvent) { 1197 1197 // scrollbars should get events anyway, even disabled controls might be scrollable 1198 if (mev.scrollbar()) 1199 passMousePressEventToScrollbar(mev, mev.scrollbar()); 1198 Scrollbar* scrollbar = mev.scrollbar(); 1199 1200 updateLastScrollbarUnderMouse(scrollbar, true); 1201 1202 if (scrollbar) 1203 passMousePressEventToScrollbar(mev, scrollbar); 1200 1204 } else { 1201 1205 // Refetch the event target node if it currently is the shadow node inside an <input> element. … … 1212 1216 if (!scrollbar) 1213 1217 scrollbar = mev.scrollbar(); 1218 1219 updateLastScrollbarUnderMouse(scrollbar, true); 1220 1214 1221 if (scrollbar && passMousePressEventToScrollbar(mev, scrollbar)) 1215 1222 swallowEvent = true; … … 1328 1335 scrollbar = mev.scrollbar(); 1329 1336 1330 if (m_lastScrollbarUnderMouse != scrollbar) { 1331 // Send mouse exited to the old scrollbar. 1332 if (m_lastScrollbarUnderMouse) 1333 m_lastScrollbarUnderMouse->mouseExited(); 1334 m_lastScrollbarUnderMouse = m_mousePressed ? 0 : scrollbar; 1335 } 1337 updateLastScrollbarUnderMouse(scrollbar, !m_mousePressed); 1336 1338 } 1337 1339 … … 2423 2425 } 2424 2426 2425 } 2427 // If scrollbar (under mouse) is different from last, send a mouse exited. Set 2428 // last to scrollbar if setLast is true; else set last to 0. 2429 void EventHandler::updateLastScrollbarUnderMouse(Scrollbar* scrollbar, bool setLast) 2430 { 2431 if (m_lastScrollbarUnderMouse != scrollbar) { 2432 // Send mouse exited to the old scrollbar. 2433 if (m_lastScrollbarUnderMouse) 2434 m_lastScrollbarUnderMouse->mouseExited(); 2435 m_lastScrollbarUnderMouse = setLast ? scrollbar : 0; 2436 } 2437 } 2438 2439 } -
trunk/WebCore/page/EventHandler.h
r45891 r46273 272 272 void updateSelectionForMouseDrag(Node* targetNode, const IntPoint& localPoint); 273 273 274 void updateLastScrollbarUnderMouse(Scrollbar*, bool); 275 274 276 bool capturesDragging() const { return m_capturesDragging; } 275 277
Note: See TracChangeset
for help on using the changeset viewer.