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

Side by Side Diff: Source/core/dom/shadow/ShadowRoot.cpp

Issue 24773003: Rename Node::attached() to confusingAndOftenMisusedAttached() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/shadow/InsertionPoint.cpp ('k') | Source/core/editing/AppendNodeCommand.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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 * * Neither the name of Google Inc. nor the names of its 10 * * Neither the name of Google Inc. nor the names of its
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 } 159 }
160 160
161 void ShadowRoot::recalcStyle(StyleRecalcChange change) 161 void ShadowRoot::recalcStyle(StyleRecalcChange change)
162 { 162 {
163 // ShadowRoot doesn't support custom callbacks. 163 // ShadowRoot doesn't support custom callbacks.
164 ASSERT(!hasCustomStyleCallbacks()); 164 ASSERT(!hasCustomStyleCallbacks());
165 165
166 StyleResolver* styleResolver = document().styleResolver(); 166 StyleResolver* styleResolver = document().styleResolver();
167 styleResolver->pushParentShadowRoot(*this); 167 styleResolver->pushParentShadowRoot(*this);
168 168
169 if (!attached()) { 169 if (!confusingAndOftenMisusedAttached()) {
170 attach(); 170 attach();
171 return; 171 return;
172 } 172 }
173 173
174 // When we're set to lazyAttach we'll have a SubtreeStyleChange and we'll ne ed 174 // When we're set to lazyAttach we'll have a SubtreeStyleChange and we'll ne ed
175 // to promote the change to a Force for all our descendants so they get a 175 // to promote the change to a Force for all our descendants so they get a
176 // recalc and will attach. 176 // recalc and will attach.
177 if (styleChangeType() >= SubtreeStyleChange) 177 if (styleChangeType() >= SubtreeStyleChange)
178 change = Force; 178 change = Force;
179 179
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 if (element->isInsertionPoint()) 405 if (element->isInsertionPoint())
406 insertionPoints.append(toInsertionPoint(element)); 406 insertionPoints.append(toInsertionPoint(element));
407 } 407 }
408 408
409 ensureShadowRootRareData()->setChildInsertionPoints(insertionPoints); 409 ensureShadowRootRareData()->setChildInsertionPoints(insertionPoints);
410 410
411 return m_shadowRootRareData->childInsertionPoints(); 411 return m_shadowRootRareData->childInsertionPoints();
412 } 412 }
413 413
414 } 414 }
OLDNEW
« no previous file with comments | « Source/core/dom/shadow/InsertionPoint.cpp ('k') | Source/core/editing/AppendNodeCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698