Changeset 86776 in webkit
- Timestamp:
- May 18, 2011 10:47:25 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r86771 r86776 1 2011-05-18 Erik Arvidsson <arv@chromium.org> 2 3 Reviewed by Ojan Vafai. 4 5 event.clientX/clientY is 0/0 in a click generated through a label 6 https://bugs.webkit.org/show_bug.cgi?id=56606 7 8 This tests that clicking on a label for an input generates a click event on the input 9 with the same coordinates as the original click. 10 11 * fast/events/simulated-click-coords-expected.txt: Added. 12 * fast/events/simulated-click-coords.html: Added. 13 1 14 2011-05-18 Rob Buis <rbuis@rim.com> 2 15 -
trunk/Source/WebCore/ChangeLog
r86775 r86776 1 2011-05-18 Erik Arvidsson <arv@chromium.org> 2 3 Reviewed by Ojan Vafai. 4 5 event.clientX/clientY is 0/0 in a click generated through a label 6 https://bugs.webkit.org/show_bug.cgi?id=56606 7 8 This copies the coordinates from the underlying event to the simulated mouse event if the underlying event 9 is a mouse event. 10 11 This makes us match Firefox and IE. 12 13 Test: fast/events/simulated-click-coords.html 14 15 * dom/MouseEvent.cpp: 16 (WebCore::SimulatedMouseEvent::SimulatedMouseEvent): 17 1 18 2011-05-18 Nikolas Zimmermann <nzimmermann@rim.com> 2 19 -
trunk/Source/WebCore/dom/MouseEvent.cpp
r83386 r86776 151 151 } 152 152 setUnderlyingEvent(underlyingEvent); 153 154 if (this->underlyingEvent() && this->underlyingEvent()->isMouseEvent()) { 155 MouseEvent* mouseEvent = static_cast<MouseEvent*>(this->underlyingEvent()); 156 m_screenX = mouseEvent->screenX(); 157 m_screenY = mouseEvent->screenY(); 158 initCoordinates(mouseEvent->clientX(), mouseEvent->clientY()); 159 } 153 160 } 154 161
Note: See TracChangeset
for help on using the changeset viewer.