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

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

Issue 1156273002: Add assert that updateLayoutTree clears dirty bits. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Check the accept conditions for documents. Created 5 years, 7 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 for (ShadowRoot* root = youngestShadowRoot(); root; root = root->olderShadow Root()) 158 for (ShadowRoot* root = youngestShadowRoot(); root; root = root->olderShadow Root())
159 root->lazyReattachIfAttached(); 159 root->lazyReattachIfAttached();
160 160
161 RefPtrWillBeRawPtr<ShadowRoot> shadowRoot = ShadowRoot::create(shadowHost.do cument(), type); 161 RefPtrWillBeRawPtr<ShadowRoot> shadowRoot = ShadowRoot::create(shadowHost.do cument(), type);
162 shadowRoot->setParentOrShadowHostNode(&shadowHost); 162 shadowRoot->setParentOrShadowHostNode(&shadowHost);
163 shadowRoot->setParentTreeScope(shadowHost.treeScope()); 163 shadowRoot->setParentTreeScope(shadowHost.treeScope());
164 m_shadowRoots.push(shadowRoot.get()); 164 m_shadowRoots.push(shadowRoot.get());
165 setNeedsDistributionRecalc(); 165 setNeedsDistributionRecalc();
166 166
167 shadowRoot->insertedInto(&shadowHost); 167 shadowRoot->insertedInto(&shadowHost);
168 shadowHost.setChildNeedsStyleRecalc();
169
168 InspectorInstrumentation::didPushShadowRoot(&shadowHost, shadowRoot.get()); 170 InspectorInstrumentation::didPushShadowRoot(&shadowHost, shadowRoot.get());
169 171
170 return *shadowRoot; 172 return *shadowRoot;
171 } 173 }
172 174
173 #if !ENABLE(OILPAN) 175 #if !ENABLE(OILPAN)
174 void ElementShadow::removeDetachedShadowRoots() 176 void ElementShadow::removeDetachedShadowRoots()
175 { 177 {
176 // Dont protect this ref count. 178 // Dont protect this ref count.
177 Element* shadowHost = host(); 179 Element* shadowHost = host();
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 visitor->trace(m_nodeToInsertionPoints); 378 visitor->trace(m_nodeToInsertionPoints);
377 visitor->trace(m_selectFeatures); 379 visitor->trace(m_selectFeatures);
378 // Shadow roots are linked with previous and next pointers which are traced. 380 // Shadow roots are linked with previous and next pointers which are traced.
379 // It is therefore enough to trace one of the shadow roots here and the 381 // It is therefore enough to trace one of the shadow roots here and the
380 // rest will be traced from there. 382 // rest will be traced from there.
381 visitor->trace(m_shadowRoots.head()); 383 visitor->trace(m_shadowRoots.head());
382 #endif 384 #endif
383 } 385 }
384 386
385 } // namespace 387 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698