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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 recalcChildStyle(change); | 148 recalcChildStyle(change); |
149 clearChildNeedsStyleRecalc(); | 149 clearChildNeedsStyleRecalc(); |
150 } | 150 } |
151 | 151 |
152 void ShadowRoot::attach(const AttachContext& context) | 152 void ShadowRoot::attach(const AttachContext& context) |
153 { | 153 { |
154 StyleResolverParentScope parentScope(*this); | 154 StyleResolverParentScope parentScope(*this); |
155 DocumentFragment::attach(context); | 155 DocumentFragment::attach(context); |
156 } | 156 } |
157 | 157 |
| 158 void ShadowRoot::detach(const AttachContext& context) |
| 159 { |
| 160 TreeScope::clearComposedParent(); |
| 161 DocumentFragment::detach(context); |
| 162 } |
| 163 |
158 Node::InsertionNotificationRequest ShadowRoot::insertedInto(ContainerNode* inser
tionPoint) | 164 Node::InsertionNotificationRequest ShadowRoot::insertedInto(ContainerNode* inser
tionPoint) |
159 { | 165 { |
160 DocumentFragment::insertedInto(insertionPoint); | 166 DocumentFragment::insertedInto(insertionPoint); |
161 | 167 |
162 if (!insertionPoint->inDocument() || !isOldest()) | 168 if (!insertionPoint->inDocument() || !isOldest()) |
163 return InsertionDone; | 169 return InsertionDone; |
164 | 170 |
165 // FIXME: When parsing <video controls>, insertedInto() is called many times
without invoking removedFrom. | 171 // FIXME: When parsing <video controls>, insertedInto() is called many times
without invoking removedFrom. |
166 // For now, we check m_registeredWithParentShadowroot. We would like to ASSE
RT(!m_registeredShadowRoot) here. | 172 // For now, we check m_registeredWithParentShadowroot. We would like to ASSE
RT(!m_registeredShadowRoot) here. |
167 // https://bugs.webkit.org/show_bug.cig?id=101316 | 173 // https://bugs.webkit.org/show_bug.cig?id=101316 |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 DEFINE_TRACE(ShadowRoot) | 331 DEFINE_TRACE(ShadowRoot) |
326 { | 332 { |
327 visitor->trace(m_prev); | 333 visitor->trace(m_prev); |
328 visitor->trace(m_next); | 334 visitor->trace(m_next); |
329 visitor->trace(m_shadowRootRareData); | 335 visitor->trace(m_shadowRootRareData); |
330 TreeScope::trace(visitor); | 336 TreeScope::trace(visitor); |
331 DocumentFragment::trace(visitor); | 337 DocumentFragment::trace(visitor); |
332 } | 338 } |
333 | 339 |
334 } | 340 } |
OLD | NEW |