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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLSlotElement.cpp

Issue 2164493002: Renamed Node::attach to Node::attachLayoutTree. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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) 2015 Google Inc. All rights reserved. 2 * Copyright (C) 2015 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 if (index == 0) 179 if (index == 0)
180 return nullptr; 180 return nullptr;
181 return m_distributedNodes[index - 1].get(); 181 return m_distributedNodes[index - 1].get();
182 } 182 }
183 183
184 AtomicString HTMLSlotElement::name() const 184 AtomicString HTMLSlotElement::name() const
185 { 185 {
186 return normalizeSlotName(fastGetAttribute(HTMLNames::nameAttr)); 186 return normalizeSlotName(fastGetAttribute(HTMLNames::nameAttr));
187 } 187 }
188 188
189 void HTMLSlotElement::attach(const AttachContext& context) 189 void HTMLSlotElement::attachLayoutTree(const AttachContext& context)
190 { 190 {
191 for (auto& node : m_distributedNodes) { 191 for (auto& node : m_distributedNodes) {
192 if (node->needsAttach()) 192 if (node->needsAttach())
193 node->attach(context); 193 node->attachLayoutTree(context);
194 } 194 }
195 195
196 HTMLElement::attach(context); 196 HTMLElement::attachLayoutTree(context);
197 } 197 }
198 198
199 void HTMLSlotElement::detach(const AttachContext& context) 199 void HTMLSlotElement::detach(const AttachContext& context)
200 { 200 {
201 for (auto& node : m_distributedNodes) 201 for (auto& node : m_distributedNodes)
202 node->lazyReattachIfAttached(); 202 node->lazyReattachIfAttached();
203 203
204 HTMLElement::detach(context); 204 HTMLElement::detach(context);
205 } 205 }
206 206
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 DEFINE_TRACE(HTMLSlotElement) 356 DEFINE_TRACE(HTMLSlotElement)
357 { 357 {
358 visitor->trace(m_assignedNodes); 358 visitor->trace(m_assignedNodes);
359 visitor->trace(m_distributedNodes); 359 visitor->trace(m_distributedNodes);
360 visitor->trace(m_oldDistributedNodes); 360 visitor->trace(m_oldDistributedNodes);
361 visitor->trace(m_distributedIndices); 361 visitor->trace(m_distributedIndices);
362 HTMLElement::trace(visitor); 362 HTMLElement::trace(visitor);
363 } 363 }
364 364
365 } // namespace blink 365 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698