| OLD | NEW |
| 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 Loading... |
| 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); |
| 222 } | 223 } |
| 223 | 224 |
| 224 void ShadowRoot::unregisterScopedHTMLStyleChild() | 225 void ShadowRoot::unregisterScopedHTMLStyleChild() |
| 225 { | 226 { |
| 226 ASSERT(m_numberOfStyles > 0); | 227 ASSERT(hasScopedHTMLStyleChild() && m_numberOfStyles > 0); |
| 227 --m_numberOfStyles; | 228 --m_numberOfStyles; |
| 229 setHasScopedHTMLStyleChild(m_numberOfStyles > 0); |
| 228 } | 230 } |
| 229 | 231 |
| 230 ShadowRootRareData* ShadowRoot::ensureShadowRootRareData() | 232 ShadowRootRareData* ShadowRoot::ensureShadowRootRareData() |
| 231 { | 233 { |
| 232 if (m_shadowRootRareData) | 234 if (m_shadowRootRareData) |
| 233 return m_shadowRootRareData.get(); | 235 return m_shadowRootRareData.get(); |
| 234 | 236 |
| 235 m_shadowRootRareData = adoptPtrWillBeNoop(new ShadowRootRareData); | 237 m_shadowRootRareData = adoptPtrWillBeNoop(new ShadowRootRareData); |
| 236 return m_shadowRootRareData.get(); | 238 return m_shadowRootRareData.get(); |
| 237 } | 239 } |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 void ShadowRoot::trace(Visitor* visitor) | 339 void ShadowRoot::trace(Visitor* visitor) |
| 338 { | 340 { |
| 339 visitor->trace(m_prev); | 341 visitor->trace(m_prev); |
| 340 visitor->trace(m_next); | 342 visitor->trace(m_next); |
| 341 visitor->trace(m_shadowRootRareData); | 343 visitor->trace(m_shadowRootRareData); |
| 342 TreeScope::trace(visitor); | 344 TreeScope::trace(visitor); |
| 343 DocumentFragment::trace(visitor); | 345 DocumentFragment::trace(visitor); |
| 344 } | 346 } |
| 345 | 347 |
| 346 } | 348 } |
| OLD | NEW |