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

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

Issue 325663003: Remove scoped styles (retry) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix layout test (and expectation) Created 6 years, 6 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/ShadowRoot.h ('k') | Source/core/html/HTMLStyleElement.h » ('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 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 212
213 if (InsertionPoint* point = shadowInsertionPointOfYoungerShadowRoot()) { 213 if (InsertionPoint* point = shadowInsertionPointOfYoungerShadowRoot()) {
214 if (ShadowRoot* root = point->containingShadowRoot()) 214 if (ShadowRoot* root = point->containingShadowRoot())
215 root->owner()->setNeedsDistributionRecalc(); 215 root->owner()->setNeedsDistributionRecalc();
216 } 216 }
217 } 217 }
218 218
219 void ShadowRoot::registerScopedHTMLStyleChild() 219 void ShadowRoot::registerScopedHTMLStyleChild()
220 { 220 {
221 ++m_numberOfStyles; 221 ++m_numberOfStyles;
222 setHasScopedHTMLStyleChild(true);
223 } 222 }
224 223
225 void ShadowRoot::unregisterScopedHTMLStyleChild() 224 void ShadowRoot::unregisterScopedHTMLStyleChild()
226 { 225 {
227 ASSERT(hasScopedHTMLStyleChild() && m_numberOfStyles > 0); 226 ASSERT(m_numberOfStyles > 0);
228 --m_numberOfStyles; 227 --m_numberOfStyles;
229 setHasScopedHTMLStyleChild(m_numberOfStyles > 0);
230 } 228 }
231 229
232 ShadowRootRareData* ShadowRoot::ensureShadowRootRareData() 230 ShadowRootRareData* ShadowRoot::ensureShadowRootRareData()
233 { 231 {
234 if (m_shadowRootRareData) 232 if (m_shadowRootRareData)
235 return m_shadowRootRareData.get(); 233 return m_shadowRootRareData.get();
236 234
237 m_shadowRootRareData = adoptPtrWillBeNoop(new ShadowRootRareData); 235 m_shadowRootRareData = adoptPtrWillBeNoop(new ShadowRootRareData);
238 return m_shadowRootRareData.get(); 236 return m_shadowRootRareData.get();
239 } 237 }
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 void ShadowRoot::trace(Visitor* visitor) 337 void ShadowRoot::trace(Visitor* visitor)
340 { 338 {
341 visitor->trace(m_prev); 339 visitor->trace(m_prev);
342 visitor->trace(m_next); 340 visitor->trace(m_next);
343 visitor->trace(m_shadowRootRareData); 341 visitor->trace(m_shadowRootRareData);
344 TreeScope::trace(visitor); 342 TreeScope::trace(visitor);
345 DocumentFragment::trace(visitor); 343 DocumentFragment::trace(visitor);
346 } 344 }
347 345
348 } 346 }
OLDNEW
« no previous file with comments | « Source/core/dom/shadow/ShadowRoot.h ('k') | Source/core/html/HTMLStyleElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698