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

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

Issue 1885453002: Rename Node::treeScope() to Node::treeScopeOrDocument() Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 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 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 { 110 {
111 DCHECK(!didMoveToNewDocumentWasCalled); 111 DCHECK(!didMoveToNewDocumentWasCalled);
112 ASSERT_UNUSED(oldDocument, oldDocument == oldDocumentDidMoveToNewDocumentWas CalledWith); 112 ASSERT_UNUSED(oldDocument, oldDocument == oldDocumentDidMoveToNewDocumentWas CalledWith);
113 didMoveToNewDocumentWasCalled = true; 113 didMoveToNewDocumentWasCalled = true;
114 } 114 }
115 #endif 115 #endif
116 116
117 inline void TreeScopeAdopter::updateTreeScope(Node& node) const 117 inline void TreeScopeAdopter::updateTreeScope(Node& node) const
118 { 118 {
119 DCHECK(!node.isTreeScope()); 119 DCHECK(!node.isTreeScope());
120 DCHECK(node.treeScope() == oldScope()); 120 DCHECK(node.treeScopeOrDocument() == oldScope());
121 #if !ENABLE(OILPAN) 121 #if !ENABLE(OILPAN)
122 newScope().guardRef(); 122 newScope().guardRef();
123 oldScope().guardDeref(); 123 oldScope().guardDeref();
124 #endif 124 #endif
125 node.setTreeScope(m_newScope); 125 node.setTreeScope(m_newScope);
126 } 126 }
127 127
128 inline void TreeScopeAdopter::moveNodeToNewDocument(Node& node, Document& oldDoc ument, Document& newDocument) const 128 inline void TreeScopeAdopter::moveNodeToNewDocument(Node& node, Document& oldDoc ument, Document& newDocument) const
129 { 129 {
130 DCHECK_NE(oldDocument, newDocument); 130 DCHECK_NE(oldDocument, newDocument);
(...skipping 14 matching lines...) Expand all
145 oldDocumentDidMoveToNewDocumentWasCalledWith = &oldDocument; 145 oldDocumentDidMoveToNewDocumentWasCalledWith = &oldDocument;
146 #endif 146 #endif
147 147
148 node.didMoveToNewDocument(oldDocument); 148 node.didMoveToNewDocument(oldDocument);
149 #if DCHECK_IS_ON() 149 #if DCHECK_IS_ON()
150 DCHECK(didMoveToNewDocumentWasCalled); 150 DCHECK(didMoveToNewDocumentWasCalled);
151 #endif 151 #endif
152 } 152 }
153 153
154 } // namespace blink 154 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/TreeScopeAdopter.h ('k') | third_party/WebKit/Source/core/dom/shadow/ElementShadow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698