| 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 1854 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1865 document().addMutationObserverTypes(registry->at(i)->mutationTypes()
); | 1865 document().addMutationObserverTypes(registry->at(i)->mutationTypes()
); |
| 1866 } | 1866 } |
| 1867 } | 1867 } |
| 1868 | 1868 |
| 1869 if (transientMutationObserverRegistry()) { | 1869 if (transientMutationObserverRegistry()) { |
| 1870 for (MutationObserverRegistration* registration : *transientMutationObse
rverRegistry()) | 1870 for (MutationObserverRegistration* registration : *transientMutationObse
rverRegistry()) |
| 1871 document().addMutationObserverTypes(registration->mutationTypes()); | 1871 document().addMutationObserverTypes(registration->mutationTypes()); |
| 1872 } | 1872 } |
| 1873 } | 1873 } |
| 1874 | 1874 |
| 1875 bool Node::addEventListenerInternal(const AtomicString& eventType, EventListener
* listener, const EventListenerOptions& options) | 1875 void Node::addedEventListener(const AtomicString& eventType, RegisteredEventList
ener& registeredListener) |
| 1876 { | 1876 { |
| 1877 if (!EventTarget::addEventListenerInternal(eventType, listener, options)) | 1877 EventTarget::addedEventListener(eventType, registeredListener); |
| 1878 return false; | |
| 1879 | |
| 1880 document().addListenerTypeIfNeeded(eventType); | 1878 document().addListenerTypeIfNeeded(eventType); |
| 1881 if (FrameHost* frameHost = document().frameHost()) | 1879 if (FrameHost* frameHost = document().frameHost()) |
| 1882 frameHost->eventHandlerRegistry().didAddEventHandler(*this, eventType, o
ptions); | 1880 frameHost->eventHandlerRegistry().didAddEventHandler(*this, eventType, r
egisteredListener.options()); |
| 1883 | |
| 1884 return true; | |
| 1885 } | 1881 } |
| 1886 | 1882 |
| 1887 bool Node::removeEventListenerInternal(const AtomicString& eventType, EventListe
ner* listener, const EventListenerOptions& options) | 1883 void Node::removedEventListener(const AtomicString& eventType, const RegisteredE
ventListener& registeredListener) |
| 1888 { | 1884 { |
| 1889 if (!EventTarget::removeEventListenerInternal(eventType, listener, options)) | 1885 EventTarget::removedEventListener(eventType, registeredListener); |
| 1890 return false; | |
| 1891 | |
| 1892 // FIXME: Notify Document that the listener has vanished. We need to keep tr
ack of a number of | 1886 // FIXME: Notify Document that the listener has vanished. We need to keep tr
ack of a number of |
| 1893 // listeners for each type, not just a bool - see https://bugs.webkit.org/sh
ow_bug.cgi?id=33861 | 1887 // listeners for each type, not just a bool - see https://bugs.webkit.org/sh
ow_bug.cgi?id=33861 |
| 1894 if (FrameHost* frameHost = document().frameHost()) | 1888 if (FrameHost* frameHost = document().frameHost()) |
| 1895 frameHost->eventHandlerRegistry().didRemoveEventHandler(*this, eventType
, options); | 1889 frameHost->eventHandlerRegistry().didRemoveEventHandler(*this, eventType
, registeredListener.options()); |
| 1896 | |
| 1897 return true; | |
| 1898 } | 1890 } |
| 1899 | 1891 |
| 1900 void Node::removeAllEventListeners() | 1892 void Node::removeAllEventListeners() |
| 1901 { | 1893 { |
| 1902 if (hasEventListeners() && document().frameHost()) | 1894 if (hasEventListeners() && document().frameHost()) |
| 1903 document().frameHost()->eventHandlerRegistry().didRemoveAllEventHandlers
(*this); | 1895 document().frameHost()->eventHandlerRegistry().didRemoveAllEventHandlers
(*this); |
| 1904 EventTarget::removeAllEventListeners(); | 1896 EventTarget::removeAllEventListeners(); |
| 1905 } | 1897 } |
| 1906 | 1898 |
| 1907 void Node::removeAllEventListenersRecursively() | 1899 void Node::removeAllEventListenersRecursively() |
| (...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2422 | 2414 |
| 2423 void showNodePath(const blink::Node* node) | 2415 void showNodePath(const blink::Node* node) |
| 2424 { | 2416 { |
| 2425 if (node) | 2417 if (node) |
| 2426 node->showNodePathForThis(); | 2418 node->showNodePathForThis(); |
| 2427 else | 2419 else |
| 2428 fprintf(stderr, "Cannot showNodePath for (nil)\n"); | 2420 fprintf(stderr, "Cannot showNodePath for (nil)\n"); |
| 2429 } | 2421 } |
| 2430 | 2422 |
| 2431 #endif | 2423 #endif |
| OLD | NEW |