Changeset 65997 in webkit
- Timestamp:
- Aug 25, 2010 1:38:49 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r65996 r65997 1 2010-08-25 Kent Tamura <tkent@chromium.org> 2 3 Reviewed by Shinichiro Hamaji 4 5 Fix a bug that a spin-button doesn't release mouse capturing 6 https://bugs.webkit.org/show_bug.cgi?id=44411 7 8 * fast/forms/input-spinbutton-capturing-expected.txt: Added. 9 * fast/forms/input-spinbutton-capturing.html: Added. 10 * fast/forms/script-tests/input-spinbutton-capturing.js: Added. 11 1 12 2010-08-25 Gavin Peters <gavinp@chromium.org> 2 13 -
trunk/WebCore/ChangeLog
r65995 r65997 1 2010-08-25 Kent Tamura <tkent@chromium.org> 2 3 Reviewed by Shinichiro Hamaji 4 5 Fix a bug that a spin-button doesn't release mouse capturing 6 https://bugs.webkit.org/show_bug.cgi?id=44411 7 8 - LeftButton should be checked only for clickEvent. 9 Note that this change doesn't change the behavior because 10 button() value is initialized with LeftButton even for 11 mousemoveEvent. 12 - Should pass a SpinButtonElement node to setCapturingMouseEventsNode(). 13 14 Test: fast/forms/input-spinbutton-capturing.html 15 16 * rendering/TextControlInnerElements.cpp: 17 (WebCore::SpinButtonElement::defaultEventHandler): 18 1 19 2010-08-16 Gabor Loki <loki@webkit.org> 2 20 -
trunk/WebCore/rendering/TextControlInnerElements.cpp
r65986 r65997 275 275 } 276 276 277 MouseEvent* mouseEvent = static_cast<MouseEvent*>(event);278 if (mouseEvent->button() != LeftButton) {279 if (!event->defaultHandled())280 HTMLDivElement::defaultEventHandler(event);281 return;282 }283 284 277 RenderBox* box = renderBox(); 285 278 if (!box) { … … 289 282 } 290 283 284 MouseEvent* mouseEvent = static_cast<MouseEvent*>(event); 291 285 HTMLInputElement* input = static_cast<HTMLInputElement*>(shadowAncestorNode()); 292 286 if (input->disabled() || input->isReadOnlyFormControl()) { … … 297 291 298 292 IntPoint local = roundedIntPoint(box->absoluteToLocal(mouseEvent->absoluteLocation(), false, true)); 299 if (event->type() == eventNames().clickEvent ) {293 if (event->type() == eventNames().clickEvent && mouseEvent->button() == LeftButton) { 300 294 if (box->borderBoxRect().contains(local)) { 301 295 RefPtr<Node> protector(input); … … 312 306 if (!m_capturing) { 313 307 if (Frame* frame = document()->frame()) { 314 frame->eventHandler()->setCapturingMouseEventsNode( input);308 frame->eventHandler()->setCapturingMouseEventsNode(this); 315 309 m_capturing = true; 316 310 }
Note: See TracChangeset
for help on using the changeset viewer.