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

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

Issue 1072273006: Oilpan: Prepare moving AXObject to heap (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « Source/core/dom/Element.h ('k') | Source/core/dom/TreeScopeAdopter.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 #include "core/events/MouseEvent.h" 69 #include "core/events/MouseEvent.h"
70 #include "core/events/MutationEvent.h" 70 #include "core/events/MutationEvent.h"
71 #include "core/events/PointerEvent.h" 71 #include "core/events/PointerEvent.h"
72 #include "core/events/TextEvent.h" 72 #include "core/events/TextEvent.h"
73 #include "core/events/TouchEvent.h" 73 #include "core/events/TouchEvent.h"
74 #include "core/events/UIEvent.h" 74 #include "core/events/UIEvent.h"
75 #include "core/events/WheelEvent.h" 75 #include "core/events/WheelEvent.h"
76 #include "core/frame/EventHandlerRegistry.h" 76 #include "core/frame/EventHandlerRegistry.h"
77 #include "core/frame/LocalDOMWindow.h" 77 #include "core/frame/LocalDOMWindow.h"
78 #include "core/frame/LocalFrame.h" 78 #include "core/frame/LocalFrame.h"
79 #include "core/frame/Settings.h"
80 #include "core/html/HTMLDialogElement.h" 79 #include "core/html/HTMLDialogElement.h"
81 #include "core/html/HTMLFrameOwnerElement.h" 80 #include "core/html/HTMLFrameOwnerElement.h"
82 #include "core/input/EventHandler.h" 81 #include "core/input/EventHandler.h"
83 #include "core/layout/LayoutBox.h" 82 #include "core/layout/LayoutBox.h"
84 #include "core/page/ContextMenuController.h" 83 #include "core/page/ContextMenuController.h"
85 #include "core/page/Page.h" 84 #include "core/page/Page.h"
86 #include "core/svg/graphics/SVGImage.h" 85 #include "core/svg/graphics/SVGImage.h"
87 #include "platform/EventDispatchForbiddenScope.h" 86 #include "platform/EventDispatchForbiddenScope.h"
88 #include "platform/TraceEvent.h" 87 #include "platform/TraceEvent.h"
89 #include "platform/TracedValue.h" 88 #include "platform/TracedValue.h"
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 clearEventTargetData(); 324 clearEventTargetData();
326 325
327 if (!isTreeScopeInitialized()) 326 if (!isTreeScopeInitialized())
328 return; 327 return;
329 328
330 Document& document = this->document(); 329 Document& document = this->document();
331 330
332 if (document.frameHost()) 331 if (document.frameHost())
333 document.frameHost()->eventHandlerRegistry().didRemoveAllEventHandlers(* this); 332 document.frameHost()->eventHandlerRegistry().didRemoveAllEventHandlers(* this);
334 333
335 if (AXObjectCache* cache = document.existingAXObjectCache())
336 cache->remove(this);
337
338 document.markers().removeMarkers(this); 334 document.markers().removeMarkers(this);
339 } 335 }
340 #endif 336 #endif
341 337
342 NodeRareData* Node::rareData() const 338 NodeRareData* Node::rareData() const
343 { 339 {
344 ASSERT_WITH_SECURITY_IMPLICATION(hasRareData()); 340 ASSERT_WITH_SECURITY_IMPLICATION(hasRareData());
345 return static_cast<NodeRareData*>(m_data.m_rareData); 341 return static_cast<NodeRareData*>(m_data.m_rareData);
346 } 342 }
347 343
(...skipping 1451 matching lines...) Expand 10 before | Expand all | Expand 10 after
1799 1795
1800 if (const EventTargetData* eventTargetData = this->eventTargetData()) { 1796 if (const EventTargetData* eventTargetData = this->eventTargetData()) {
1801 const EventListenerMap& listenerMap = eventTargetData->eventListenerMap; 1797 const EventListenerMap& listenerMap = eventTargetData->eventListenerMap;
1802 if (!listenerMap.isEmpty()) { 1798 if (!listenerMap.isEmpty()) {
1803 Vector<AtomicString> types = listenerMap.eventTypes(); 1799 Vector<AtomicString> types = listenerMap.eventTypes();
1804 for (unsigned i = 0; i < types.size(); ++i) 1800 for (unsigned i = 0; i < types.size(); ++i)
1805 document().addListenerTypeIfNeeded(types[i]); 1801 document().addListenerTypeIfNeeded(types[i]);
1806 } 1802 }
1807 } 1803 }
1808 1804
1809 Settings* settings = document().settings();
1810 if (settings && settings->accessibilityEnabled()) {
1811 if (AXObjectCache* cache = oldDocument.existingAXObjectCache())
1812 cache->remove(this);
1813 }
1814
1815 oldDocument.markers().removeMarkers(this); 1805 oldDocument.markers().removeMarkers(this);
1816 oldDocument.updateRangesAfterNodeMovedToAnotherDocument(*this); 1806 oldDocument.updateRangesAfterNodeMovedToAnotherDocument(*this);
1817 if (oldDocument.frameHost() && !document().frameHost()) 1807 if (oldDocument.frameHost() && !document().frameHost())
1818 oldDocument.frameHost()->eventHandlerRegistry().didMoveOutOfFrameHost(*t his); 1808 oldDocument.frameHost()->eventHandlerRegistry().didMoveOutOfFrameHost(*t his);
1819 else if (document().frameHost() && !oldDocument.frameHost()) 1809 else if (document().frameHost() && !oldDocument.frameHost())
1820 document().frameHost()->eventHandlerRegistry().didMoveIntoFrameHost(*thi s); 1810 document().frameHost()->eventHandlerRegistry().didMoveIntoFrameHost(*thi s);
1821 else if (oldDocument.frameHost() != document().frameHost()) 1811 else if (oldDocument.frameHost() != document().frameHost())
1822 EventHandlerRegistry::didMoveBetweenFrameHosts(*this, oldDocument.frameH ost(), document().frameHost()); 1812 EventHandlerRegistry::didMoveBetweenFrameHosts(*this, oldDocument.frameH ost(), document().frameHost());
1823 1813
1824 if (WillBeHeapVector<OwnPtrWillBeMember<MutationObserverRegistration>>* regi stry = mutationObserverRegistry()) { 1814 if (WillBeHeapVector<OwnPtrWillBeMember<MutationObserverRegistration>>* regi stry = mutationObserverRegistry()) {
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after
2469 2459
2470 void showNodePath(const blink::Node* node) 2460 void showNodePath(const blink::Node* node)
2471 { 2461 {
2472 if (node) 2462 if (node)
2473 node->showNodePathForThis(); 2463 node->showNodePathForThis();
2474 else 2464 else
2475 fprintf(stderr, "Cannot showNodePath for (nil)\n"); 2465 fprintf(stderr, "Cannot showNodePath for (nil)\n");
2476 } 2466 }
2477 2467
2478 #endif 2468 #endif
OLDNEW
« no previous file with comments | « Source/core/dom/Element.h ('k') | Source/core/dom/TreeScopeAdopter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698