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

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

Issue 2194393004: Move Range objects new owner after moving tree rather than during moving tree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2016-08-02T18:35:29 Created 4 years, 4 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 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 1769 matching lines...) Expand 10 before | Expand all | Expand 10 after
1780 if (const EventTargetData* eventTargetData = this->eventTargetData()) { 1780 if (const EventTargetData* eventTargetData = this->eventTargetData()) {
1781 const EventListenerMap& listenerMap = eventTargetData->eventListenerMap; 1781 const EventListenerMap& listenerMap = eventTargetData->eventListenerMap;
1782 if (!listenerMap.isEmpty()) { 1782 if (!listenerMap.isEmpty()) {
1783 Vector<AtomicString> types = listenerMap.eventTypes(); 1783 Vector<AtomicString> types = listenerMap.eventTypes();
1784 for (unsigned i = 0; i < types.size(); ++i) 1784 for (unsigned i = 0; i < types.size(); ++i)
1785 document().addListenerTypeIfNeeded(types[i]); 1785 document().addListenerTypeIfNeeded(types[i]);
1786 } 1786 }
1787 } 1787 }
1788 1788
1789 oldDocument.markers().removeMarkers(this); 1789 oldDocument.markers().removeMarkers(this);
1790 oldDocument.updateRangesAfterNodeMovedToAnotherDocument(*this);
1791 if (oldDocument.frameHost() && !document().frameHost()) 1790 if (oldDocument.frameHost() && !document().frameHost())
1792 oldDocument.frameHost()->eventHandlerRegistry().didMoveOutOfFrameHost(*t his); 1791 oldDocument.frameHost()->eventHandlerRegistry().didMoveOutOfFrameHost(*t his);
1793 else if (document().frameHost() && !oldDocument.frameHost()) 1792 else if (document().frameHost() && !oldDocument.frameHost())
1794 document().frameHost()->eventHandlerRegistry().didMoveIntoFrameHost(*thi s); 1793 document().frameHost()->eventHandlerRegistry().didMoveIntoFrameHost(*thi s);
1795 else if (oldDocument.frameHost() != document().frameHost()) 1794 else if (oldDocument.frameHost() != document().frameHost())
1796 EventHandlerRegistry::didMoveBetweenFrameHosts(*this, oldDocument.frameH ost(), document().frameHost()); 1795 EventHandlerRegistry::didMoveBetweenFrameHosts(*this, oldDocument.frameH ost(), document().frameHost());
1797 1796
1798 if (HeapVector<Member<MutationObserverRegistration>>* registry = mutationObs erverRegistry()) { 1797 if (HeapVector<Member<MutationObserverRegistration>>* registry = mutationObs erverRegistry()) {
1799 for (size_t i = 0; i < registry->size(); ++i) { 1798 for (size_t i = 0; i < registry->size(); ++i) {
1800 document().addMutationObserverTypes(registry->at(i)->mutationTypes() ); 1799 document().addMutationObserverTypes(registry->at(i)->mutationTypes() );
(...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after
2404 2403
2405 void showNodePath(const blink::Node* node) 2404 void showNodePath(const blink::Node* node)
2406 { 2405 {
2407 if (node) 2406 if (node)
2408 node->showNodePathForThis(); 2407 node->showNodePathForThis();
2409 else 2408 else
2410 fprintf(stderr, "Cannot showNodePath for (nil)\n"); 2409 fprintf(stderr, "Cannot showNodePath for (nil)\n");
2411 } 2410 }
2412 2411
2413 #endif 2412 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.cpp ('k') | third_party/WebKit/Source/core/dom/RangeTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698