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

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

Issue 2299033005: Pass the old and new owner documents to the adoptedCallback. (Closed)
Patch Set: WTF_ARRAY_LENGTH Created 4 years, 3 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 * Copyright (C) 2011 Google Inc. All rights reserved. 8 * Copyright (C) 2011 Google Inc. All rights reserved.
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 if (node.hasRareData()) { 125 if (node.hasRareData()) {
126 NodeRareData* rareData = node.rareData(); 126 NodeRareData* rareData = node.rareData();
127 if (rareData->nodeLists()) 127 if (rareData->nodeLists())
128 rareData->nodeLists()->adoptDocument(oldDocument, newDocument); 128 rareData->nodeLists()->adoptDocument(oldDocument, newDocument);
129 } 129 }
130 130
131 oldDocument.moveNodeIteratorsToNewDocument(node, newDocument); 131 oldDocument.moveNodeIteratorsToNewDocument(node, newDocument);
132 132
133 if (node.getCustomElementState() == CustomElementState::Custom) { 133 if (node.getCustomElementState() == CustomElementState::Custom) {
134 Element& element = toElement(node); 134 Element& element = toElement(node);
135 CustomElement::enqueueAdoptedCallback(&element); 135 CustomElement::enqueueAdoptedCallback(&element, &oldDocument, &newDocume nt);
136 } 136 }
137 137
138 if (node.isShadowRoot()) 138 if (node.isShadowRoot())
139 toShadowRoot(node).setDocument(newDocument); 139 toShadowRoot(node).setDocument(newDocument);
140 140
141 #if DCHECK_IS_ON() 141 #if DCHECK_IS_ON()
142 didMoveToNewDocumentWasCalled = false; 142 didMoveToNewDocumentWasCalled = false;
143 oldDocumentDidMoveToNewDocumentWasCalledWith = &oldDocument; 143 oldDocumentDidMoveToNewDocumentWasCalledWith = &oldDocument;
144 #endif 144 #endif
145 145
146 node.didMoveToNewDocument(oldDocument); 146 node.didMoveToNewDocument(oldDocument);
147 #if DCHECK_IS_ON() 147 #if DCHECK_IS_ON()
148 DCHECK(didMoveToNewDocumentWasCalled); 148 DCHECK(didMoveToNewDocumentWasCalled);
149 #endif 149 #endif
150 } 150 }
151 151
152 } // namespace blink 152 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698