| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. |
| 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
| 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
| 8 * | 8 * |
| 9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
| (...skipping 1784 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1795 } | 1795 } |
| 1796 } | 1796 } |
| 1797 | 1797 |
| 1798 bool Node::addEventListenerInternal(const AtomicString& eventType, PassRefPtrWil
lBeRawPtr<EventListener> listener, const EventListenerOptions& options) | 1798 bool Node::addEventListenerInternal(const AtomicString& eventType, PassRefPtrWil
lBeRawPtr<EventListener> listener, const EventListenerOptions& options) |
| 1799 { | 1799 { |
| 1800 if (!EventTarget::addEventListenerInternal(eventType, listener, options)) | 1800 if (!EventTarget::addEventListenerInternal(eventType, listener, options)) |
| 1801 return false; | 1801 return false; |
| 1802 | 1802 |
| 1803 document().addListenerTypeIfNeeded(eventType); | 1803 document().addListenerTypeIfNeeded(eventType); |
| 1804 if (FrameHost* frameHost = document().frameHost()) | 1804 if (FrameHost* frameHost = document().frameHost()) |
| 1805 frameHost->eventHandlerRegistry().didAddEventHandler(*this, eventType); | 1805 frameHost->eventHandlerRegistry().didAddEventHandler(*this, eventType, o
ptions); |
| 1806 | 1806 |
| 1807 return true; | 1807 return true; |
| 1808 } | 1808 } |
| 1809 | 1809 |
| 1810 bool Node::removeEventListenerInternal(const AtomicString& eventType, PassRefPtr
WillBeRawPtr<EventListener> listener, const EventListenerOptions& options) | 1810 bool Node::removeEventListenerInternal(const AtomicString& eventType, PassRefPtr
WillBeRawPtr<EventListener> listener, const EventListenerOptions& options) |
| 1811 { | 1811 { |
| 1812 if (!EventTarget::removeEventListenerInternal(eventType, listener, options)) | 1812 if (!EventTarget::removeEventListenerInternal(eventType, listener, options)) |
| 1813 return false; | 1813 return false; |
| 1814 | 1814 |
| 1815 // FIXME: Notify Document that the listener has vanished. We need to keep tr
ack of a number of | 1815 // FIXME: Notify Document that the listener has vanished. We need to keep tr
ack of a number of |
| 1816 // listeners for each type, not just a bool - see https://bugs.webkit.org/sh
ow_bug.cgi?id=33861 | 1816 // listeners for each type, not just a bool - see https://bugs.webkit.org/sh
ow_bug.cgi?id=33861 |
| 1817 if (FrameHost* frameHost = document().frameHost()) | 1817 if (FrameHost* frameHost = document().frameHost()) |
| 1818 frameHost->eventHandlerRegistry().didRemoveEventHandler(*this, eventType
); | 1818 frameHost->eventHandlerRegistry().didRemoveEventHandler(*this, eventType
, options); |
| 1819 | 1819 |
| 1820 return true; | 1820 return true; |
| 1821 } | 1821 } |
| 1822 | 1822 |
| 1823 void Node::removeAllEventListeners() | 1823 void Node::removeAllEventListeners() |
| 1824 { | 1824 { |
| 1825 if (hasEventListeners() && document().frameHost()) | 1825 if (hasEventListeners() && document().frameHost()) |
| 1826 document().frameHost()->eventHandlerRegistry().didRemoveAllEventHandlers
(*this); | 1826 document().frameHost()->eventHandlerRegistry().didRemoveAllEventHandlers
(*this); |
| 1827 EventTarget::removeAllEventListeners(); | 1827 EventTarget::removeAllEventListeners(); |
| 1828 } | 1828 } |
| (...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2404 | 2404 |
| 2405 void showNodePath(const blink::Node* node) | 2405 void showNodePath(const blink::Node* node) |
| 2406 { | 2406 { |
| 2407 if (node) | 2407 if (node) |
| 2408 node->showNodePathForThis(); | 2408 node->showNodePathForThis(); |
| 2409 else | 2409 else |
| 2410 fprintf(stderr, "Cannot showNodePath for (nil)\n"); | 2410 fprintf(stderr, "Cannot showNodePath for (nil)\n"); |
| 2411 } | 2411 } |
| 2412 | 2412 |
| 2413 #endif | 2413 #endif |
| OLD | NEW |