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 1795 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1806 } | 1806 } |
1807 } | 1807 } |
1808 | 1808 |
1809 bool Node::addEventListenerInternal(const AtomicString& eventType, PassRefPtrWil
lBeRawPtr<EventListener> listener, const EventListenerOptions& options) | 1809 bool Node::addEventListenerInternal(const AtomicString& eventType, PassRefPtrWil
lBeRawPtr<EventListener> listener, const EventListenerOptions& options) |
1810 { | 1810 { |
1811 if (!EventTarget::addEventListenerInternal(eventType, listener, options)) | 1811 if (!EventTarget::addEventListenerInternal(eventType, listener, options)) |
1812 return false; | 1812 return false; |
1813 | 1813 |
1814 document().addListenerTypeIfNeeded(eventType); | 1814 document().addListenerTypeIfNeeded(eventType); |
1815 if (FrameHost* frameHost = document().frameHost()) | 1815 if (FrameHost* frameHost = document().frameHost()) |
1816 frameHost->eventHandlerRegistry().didAddEventHandler(*this, eventType); | 1816 frameHost->eventHandlerRegistry().didAddEventHandler(*this, eventType, o
ptions); |
1817 | 1817 |
1818 return true; | 1818 return true; |
1819 } | 1819 } |
1820 | 1820 |
1821 bool Node::removeEventListenerInternal(const AtomicString& eventType, PassRefPtr
WillBeRawPtr<EventListener> listener, const EventListenerOptions& options) | 1821 bool Node::removeEventListenerInternal(const AtomicString& eventType, PassRefPtr
WillBeRawPtr<EventListener> listener, const EventListenerOptions& options) |
1822 { | 1822 { |
1823 if (!EventTarget::removeEventListenerInternal(eventType, listener, options)) | 1823 if (!EventTarget::removeEventListenerInternal(eventType, listener, options)) |
1824 return false; | 1824 return false; |
1825 | 1825 |
1826 // FIXME: Notify Document that the listener has vanished. We need to keep tr
ack of a number of | 1826 // FIXME: Notify Document that the listener has vanished. We need to keep tr
ack of a number of |
1827 // listeners for each type, not just a bool - see https://bugs.webkit.org/sh
ow_bug.cgi?id=33861 | 1827 // listeners for each type, not just a bool - see https://bugs.webkit.org/sh
ow_bug.cgi?id=33861 |
1828 if (FrameHost* frameHost = document().frameHost()) | 1828 if (FrameHost* frameHost = document().frameHost()) |
1829 frameHost->eventHandlerRegistry().didRemoveEventHandler(*this, eventType
); | 1829 frameHost->eventHandlerRegistry().didRemoveEventHandler(*this, eventType
, options); |
1830 | 1830 |
1831 return true; | 1831 return true; |
1832 } | 1832 } |
1833 | 1833 |
1834 void Node::removeAllEventListeners() | 1834 void Node::removeAllEventListeners() |
1835 { | 1835 { |
1836 if (hasEventListeners() && document().frameHost()) | 1836 if (hasEventListeners() && document().frameHost()) |
1837 document().frameHost()->eventHandlerRegistry().didRemoveAllEventHandlers
(*this); | 1837 document().frameHost()->eventHandlerRegistry().didRemoveAllEventHandlers
(*this); |
1838 EventTarget::removeAllEventListeners(); | 1838 EventTarget::removeAllEventListeners(); |
1839 } | 1839 } |
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2415 | 2415 |
2416 void showNodePath(const blink::Node* node) | 2416 void showNodePath(const blink::Node* node) |
2417 { | 2417 { |
2418 if (node) | 2418 if (node) |
2419 node->showNodePathForThis(); | 2419 node->showNodePathForThis(); |
2420 else | 2420 else |
2421 fprintf(stderr, "Cannot showNodePath for (nil)\n"); | 2421 fprintf(stderr, "Cannot showNodePath for (nil)\n"); |
2422 } | 2422 } |
2423 | 2423 |
2424 #endif | 2424 #endif |
OLD | NEW |