| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2001 Peter Kelly (pmk@post.com) | 2 * Copyright (C) 2001 Peter Kelly (pmk@post.com) |
| 3 * Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de) | 3 * Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de) |
| 4 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) | 4 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) |
| 5 * Copyright (C) 2003, 2005, 2006, 2008 Apple Inc. All rights reserved. | 5 * Copyright (C) 2003, 2005, 2006, 2008 Apple Inc. All rights reserved. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 // event. This is not part of the DOM specs, but is used for compatibility | 350 // event. This is not part of the DOM specs, but is used for compatibility |
| 351 // with the ondblclick="" attribute. This is treated as a separate event in | 351 // with the ondblclick="" attribute. This is treated as a separate event in |
| 352 // other DOM-compliant browsers like Firefox, and so we do the same. | 352 // other DOM-compliant browsers like Firefox, and so we do the same. |
| 353 MouseEvent* doubleClickEvent = MouseEvent::create(); | 353 MouseEvent* doubleClickEvent = MouseEvent::create(); |
| 354 doubleClickEvent->initMouseEventInternal( | 354 doubleClickEvent->initMouseEventInternal( |
| 355 EventTypeNames::dblclick, mouseEvent.bubbles(), mouseEvent.cancelable(), | 355 EventTypeNames::dblclick, mouseEvent.bubbles(), mouseEvent.cancelable(), |
| 356 mouseEvent.view(), mouseEvent.detail(), mouseEvent.screenX(), | 356 mouseEvent.view(), mouseEvent.detail(), mouseEvent.screenX(), |
| 357 mouseEvent.screenY(), mouseEvent.clientX(), mouseEvent.clientY(), | 357 mouseEvent.screenY(), mouseEvent.clientX(), mouseEvent.clientY(), |
| 358 mouseEvent.modifiers(), mouseEvent.button(), relatedTarget, | 358 mouseEvent.modifiers(), mouseEvent.button(), relatedTarget, |
| 359 mouseEvent.sourceCapabilities(), mouseEvent.buttons()); | 359 mouseEvent.sourceCapabilities(), mouseEvent.buttons()); |
| 360 doubleClickEvent->setComposed(mouseEvent.composed()); |
| 360 | 361 |
| 361 // Inherit the trusted status from the original event. | 362 // Inherit the trusted status from the original event. |
| 362 doubleClickEvent->setTrusted(mouseEvent.isTrusted()); | 363 doubleClickEvent->setTrusted(mouseEvent.isTrusted()); |
| 363 if (mouseEvent.defaultHandled()) | 364 if (mouseEvent.defaultHandled()) |
| 364 doubleClickEvent->setDefaultHandled(); | 365 doubleClickEvent->setDefaultHandled(); |
| 365 DispatchEventResult doubleClickDispatchResult = | 366 DispatchEventResult doubleClickDispatchResult = |
| 366 EventDispatcher::dispatchEvent( | 367 EventDispatcher::dispatchEvent( |
| 367 dispatcher.node(), | 368 dispatcher.node(), |
| 368 MouseEventDispatchMediator::create(doubleClickEvent)); | 369 MouseEventDispatchMediator::create(doubleClickEvent)); |
| 369 if (doubleClickDispatchResult != DispatchEventResult::NotCanceled) | 370 if (doubleClickDispatchResult != DispatchEventResult::NotCanceled) |
| 370 return doubleClickDispatchResult; | 371 return doubleClickDispatchResult; |
| 371 return dispatchResult; | 372 return dispatchResult; |
| 372 } | 373 } |
| 373 | 374 |
| 374 } // namespace blink | 375 } // namespace blink |
| OLD | NEW |