Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(347)

Side by Side Diff: Source/core/dom/Node.h

Issue 236653002: Oilpan: move mutation observers to the Oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased + explicitly dispose() mutation observer registrations always (non-Oilpan also.) Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 6 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 18 matching lines...) Expand all
29 #include "bindings/v8/ScriptWrappable.h" 29 #include "bindings/v8/ScriptWrappable.h"
30 #include "core/dom/MutationObserver.h" 30 #include "core/dom/MutationObserver.h"
31 #include "core/dom/SimulatedClickOptions.h" 31 #include "core/dom/SimulatedClickOptions.h"
32 #include "core/dom/TreeScope.h" 32 #include "core/dom/TreeScope.h"
33 #include "core/dom/TreeShared.h" 33 #include "core/dom/TreeShared.h"
34 #include "core/editing/EditingBoundary.h" 34 #include "core/editing/EditingBoundary.h"
35 #include "core/events/EventTarget.h" 35 #include "core/events/EventTarget.h"
36 #include "core/inspector/InspectorCounters.h" 36 #include "core/inspector/InspectorCounters.h"
37 #include "core/rendering/style/RenderStyleConstants.h" 37 #include "core/rendering/style/RenderStyleConstants.h"
38 #include "platform/geometry/LayoutRect.h" 38 #include "platform/geometry/LayoutRect.h"
39 #include "platform/heap/Handle.h"
39 #include "platform/weborigin/KURLHash.h" 40 #include "platform/weborigin/KURLHash.h"
40 #include "wtf/Forward.h" 41 #include "wtf/Forward.h"
41 #include "wtf/ListHashSet.h" 42 #include "wtf/ListHashSet.h"
42 #include "wtf/text/AtomicString.h" 43 #include "wtf/text/AtomicString.h"
43 44
44 // This needs to be here because Document.h also depends on it. 45 // This needs to be here because Document.h also depends on it.
45 #define DUMP_NODE_STATISTICS 0 46 #define DUMP_NODE_STATISTICS 0
46 47
47 namespace WebCore { 48 namespace WebCore {
48 49
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after
640 641
641 void dispatchInputEvent(); 642 void dispatchInputEvent();
642 643
643 // Perform the default action for an event. 644 // Perform the default action for an event.
644 virtual void defaultEventHandler(Event*); 645 virtual void defaultEventHandler(Event*);
645 virtual void willCallDefaultEventHandler(const Event&); 646 virtual void willCallDefaultEventHandler(const Event&);
646 647
647 virtual EventTargetData* eventTargetData() OVERRIDE; 648 virtual EventTargetData* eventTargetData() OVERRIDE;
648 virtual EventTargetData& ensureEventTargetData() OVERRIDE; 649 virtual EventTargetData& ensureEventTargetData() OVERRIDE;
649 650
650 void getRegisteredMutationObserversOfType(HashMap<MutationObserver*, Mutatio nRecordDeliveryOptions>&, MutationObserver::MutationType, const QualifiedName* a ttributeName); 651 void getRegisteredMutationObserversOfType(WillBeHeapHashMap<RawPtrWillBeMemb er<MutationObserver>, MutationRecordDeliveryOptions>&, MutationObserver::Mutatio nType, const QualifiedName* attributeName);
651 void registerMutationObserver(MutationObserver&, MutationObserverOptions, co nst HashSet<AtomicString>& attributeFilter); 652 void registerMutationObserver(MutationObserver&, MutationObserverOptions, co nst HashSet<AtomicString>& attributeFilter);
652 void unregisterMutationObserver(MutationObserverRegistration*); 653 void unregisterMutationObserver(MutationObserverRegistration*);
653 void registerTransientMutationObserver(MutationObserverRegistration*); 654 void registerTransientMutationObserver(MutationObserverRegistration*);
654 void unregisterTransientMutationObserver(MutationObserverRegistration*); 655 void unregisterTransientMutationObserver(MutationObserverRegistration*);
655 void notifyMutationObserversNodeWillDetach(); 656 void notifyMutationObserversNodeWillDetach();
656 657
657 virtual void registerScopedHTMLStyleChild(); 658 virtual void registerScopedHTMLStyleChild();
658 virtual void unregisterScopedHTMLStyleChild(); 659 virtual void unregisterScopedHTMLStyleChild();
659 size_t numberOfScopedHTMLStyleChildren() const; 660 size_t numberOfScopedHTMLStyleChildren() const;
660 661
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
813 void traceStyleChange(StyleChangeType); 814 void traceStyleChange(StyleChangeType);
814 void traceStyleChangeIfNeeded(StyleChangeType); 815 void traceStyleChangeIfNeeded(StyleChangeType);
815 void setStyleChange(StyleChangeType); 816 void setStyleChange(StyleChangeType);
816 817
817 virtual RenderStyle* nonRendererStyle() const { return 0; } 818 virtual RenderStyle* nonRendererStyle() const { return 0; }
818 819
819 virtual RenderStyle* virtualComputedStyle(PseudoId = NOPSEUDO); 820 virtual RenderStyle* virtualComputedStyle(PseudoId = NOPSEUDO);
820 821
821 void trackForDebugging(); 822 void trackForDebugging();
822 823
823 Vector<OwnPtr<MutationObserverRegistration> >* mutationObserverRegistry(); 824 WillBeHeapVector<OwnPtrWillBeMember<MutationObserverRegistration> >* mutatio nObserverRegistry();
824 HashSet<MutationObserverRegistration*>* transientMutationObserverRegistry(); 825 WillBeHeapHashSet<RawPtrWillBeMember<MutationObserverRegistration> >* transi entMutationObserverRegistry();
825 826
826 mutable uint32_t m_nodeFlags; 827 mutable uint32_t m_nodeFlags;
827 ContainerNode* m_parentOrShadowHostNode; 828 ContainerNode* m_parentOrShadowHostNode;
828 TreeScope* m_treeScope; 829 TreeScope* m_treeScope;
829 Node* m_previous; 830 Node* m_previous;
830 Node* m_next; 831 Node* m_next;
831 // When a node has rare data we move the renderer into the rare data. 832 // When a node has rare data we move the renderer into the rare data.
832 union DataUnion { 833 union DataUnion {
833 DataUnion() : m_renderer(0) { } 834 DataUnion() : m_renderer(0) { }
834 RenderObject* m_renderer; 835 RenderObject* m_renderer;
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
907 } // namespace WebCore 908 } // namespace WebCore
908 909
909 #ifndef NDEBUG 910 #ifndef NDEBUG
910 // Outside the WebCore namespace for ease of invocation from gdb. 911 // Outside the WebCore namespace for ease of invocation from gdb.
911 void showNode(const WebCore::Node*); 912 void showNode(const WebCore::Node*);
912 void showTree(const WebCore::Node*); 913 void showTree(const WebCore::Node*);
913 void showNodePath(const WebCore::Node*); 914 void showNodePath(const WebCore::Node*);
914 #endif 915 #endif
915 916
916 #endif 917 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698