| 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 1783 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1794 } | 1794 } |
| 1795 } | 1795 } |
| 1796 | 1796 |
| 1797 bool Node::addEventListenerInternal(const AtomicString& eventType, PassRefPtrWil
lBeRawPtr<EventListener> listener, const EventListenerOptions& options) | 1797 bool Node::addEventListenerInternal(const AtomicString& eventType, PassRefPtrWil
lBeRawPtr<EventListener> listener, const EventListenerOptions& options) |
| 1798 { | 1798 { |
| 1799 if (!EventTarget::addEventListenerInternal(eventType, listener, options)) | 1799 if (!EventTarget::addEventListenerInternal(eventType, listener, options)) |
| 1800 return false; | 1800 return false; |
| 1801 | 1801 |
| 1802 document().addListenerTypeIfNeeded(eventType); | 1802 document().addListenerTypeIfNeeded(eventType); |
| 1803 if (FrameHost* frameHost = document().frameHost()) | 1803 if (FrameHost* frameHost = document().frameHost()) |
| 1804 frameHost->eventHandlerRegistry().didAddEventHandler(*this, eventType); | 1804 frameHost->eventHandlerRegistry().didAddEventHandler(*this, eventType, o
ptions); |
| 1805 | 1805 |
| 1806 return true; | 1806 return true; |
| 1807 } | 1807 } |
| 1808 | 1808 |
| 1809 bool Node::removeEventListenerInternal(const AtomicString& eventType, PassRefPtr
WillBeRawPtr<EventListener> listener, const EventListenerOptions& options) | 1809 bool Node::removeEventListenerInternal(const AtomicString& eventType, PassRefPtr
WillBeRawPtr<EventListener> listener, const EventListenerOptions& options) |
| 1810 { | 1810 { |
| 1811 if (!EventTarget::removeEventListenerInternal(eventType, listener, options)) | 1811 if (!EventTarget::removeEventListenerInternal(eventType, listener, options)) |
| 1812 return false; | 1812 return false; |
| 1813 | 1813 |
| 1814 // FIXME: Notify Document that the listener has vanished. We need to keep tr
ack of a number of | 1814 // FIXME: Notify Document that the listener has vanished. We need to keep tr
ack of a number of |
| 1815 // listeners for each type, not just a bool - see https://bugs.webkit.org/sh
ow_bug.cgi?id=33861 | 1815 // listeners for each type, not just a bool - see https://bugs.webkit.org/sh
ow_bug.cgi?id=33861 |
| 1816 if (FrameHost* frameHost = document().frameHost()) | 1816 if (FrameHost* frameHost = document().frameHost()) |
| 1817 frameHost->eventHandlerRegistry().didRemoveEventHandler(*this, eventType
); | 1817 frameHost->eventHandlerRegistry().didRemoveEventHandler(*this, eventType
, options); |
| 1818 | 1818 |
| 1819 return true; | 1819 return true; |
| 1820 } | 1820 } |
| 1821 | 1821 |
| 1822 void Node::removeAllEventListeners() | 1822 void Node::removeAllEventListeners() |
| 1823 { | 1823 { |
| 1824 if (hasEventListeners() && document().frameHost()) | 1824 if (hasEventListeners() && document().frameHost()) |
| 1825 document().frameHost()->eventHandlerRegistry().didRemoveAllEventHandlers
(*this); | 1825 document().frameHost()->eventHandlerRegistry().didRemoveAllEventHandlers
(*this); |
| 1826 EventTarget::removeAllEventListeners(); | 1826 EventTarget::removeAllEventListeners(); |
| 1827 } | 1827 } |
| (...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2403 | 2403 |
| 2404 void showNodePath(const blink::Node* node) | 2404 void showNodePath(const blink::Node* node) |
| 2405 { | 2405 { |
| 2406 if (node) | 2406 if (node) |
| 2407 node->showNodePathForThis(); | 2407 node->showNodePathForThis(); |
| 2408 else | 2408 else |
| 2409 fprintf(stderr, "Cannot showNodePath for (nil)\n"); | 2409 fprintf(stderr, "Cannot showNodePath for (nil)\n"); |
| 2410 } | 2410 } |
| 2411 | 2411 |
| 2412 #endif | 2412 #endif |
| OLD | NEW |