| 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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 default: | 155 default: |
| 156 return false; | 156 return false; |
| 157 } | 157 } |
| 158 } | 158 } |
| 159 | 159 |
| 160 void ShadowRoot::recalcStyle(StyleChange change) | 160 void ShadowRoot::recalcStyle(StyleChange change) |
| 161 { | 161 { |
| 162 // ShadowRoot doesn't support custom callbacks. | 162 // ShadowRoot doesn't support custom callbacks. |
| 163 ASSERT(!hasCustomStyleCallbacks()); | 163 ASSERT(!hasCustomStyleCallbacks()); |
| 164 | 164 |
| 165 StyleResolver* styleResolver = document()->styleResolver(); | 165 StyleResolver* styleResolver = document().styleResolver(); |
| 166 styleResolver->pushParentShadowRoot(this); | 166 styleResolver->pushParentShadowRoot(this); |
| 167 | 167 |
| 168 if (!attached()) { | 168 if (!attached()) { |
| 169 attach(); | 169 attach(); |
| 170 return; | 170 return; |
| 171 } | 171 } |
| 172 | 172 |
| 173 // When we're set to lazyAttach we'll have a SubtreeStyleChange and we'll ne
ed | 173 // When we're set to lazyAttach we'll have a SubtreeStyleChange and we'll ne
ed |
| 174 // to promote the change to a Force for all our descendants so they get a | 174 // to promote the change to a Force for all our descendants so they get a |
| 175 // recalc and will attach. | 175 // recalc and will attach. |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 | 245 |
| 246 m_resetStyleInheritance = value; | 246 m_resetStyleInheritance = value; |
| 247 if (!isActive()) | 247 if (!isActive()) |
| 248 return; | 248 return; |
| 249 | 249 |
| 250 setNeedsStyleRecalc(); | 250 setNeedsStyleRecalc(); |
| 251 } | 251 } |
| 252 | 252 |
| 253 void ShadowRoot::attach(const AttachContext& context) | 253 void ShadowRoot::attach(const AttachContext& context) |
| 254 { | 254 { |
| 255 StyleResolver* styleResolver = document()->styleResolver(); | 255 StyleResolver* styleResolver = document().styleResolver(); |
| 256 styleResolver->pushParentShadowRoot(this); | 256 styleResolver->pushParentShadowRoot(this); |
| 257 DocumentFragment::attach(context); | 257 DocumentFragment::attach(context); |
| 258 styleResolver->popParentShadowRoot(this); | 258 styleResolver->popParentShadowRoot(this); |
| 259 } | 259 } |
| 260 | 260 |
| 261 Node::InsertionNotificationRequest ShadowRoot::insertedInto(ContainerNode* inser
tionPoint) | 261 Node::InsertionNotificationRequest ShadowRoot::insertedInto(ContainerNode* inser
tionPoint) |
| 262 { | 262 { |
| 263 DocumentFragment::insertedInto(insertionPoint); | 263 DocumentFragment::insertedInto(insertionPoint); |
| 264 | 264 |
| 265 if (!insertionPoint->inDocument() || !isOldest()) | 265 if (!insertionPoint->inDocument() || !isOldest()) |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 if (element->isInsertionPoint()) | 404 if (element->isInsertionPoint()) |
| 405 insertionPoints.append(toInsertionPoint(element)); | 405 insertionPoints.append(toInsertionPoint(element)); |
| 406 } | 406 } |
| 407 | 407 |
| 408 ensureShadowRootRareData()->setChildInsertionPoints(insertionPoints); | 408 ensureShadowRootRareData()->setChildInsertionPoints(insertionPoints); |
| 409 | 409 |
| 410 return m_shadowRootRareData->childInsertionPoints(); | 410 return m_shadowRootRareData->childInsertionPoints(); |
| 411 } | 411 } |
| 412 | 412 |
| 413 } | 413 } |
| OLD | NEW |