| 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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 } | 159 } |
| 160 | 160 |
| 161 void ShadowRoot::recalcStyle(StyleRecalcChange change) | 161 void ShadowRoot::recalcStyle(StyleRecalcChange change) |
| 162 { | 162 { |
| 163 // ShadowRoot doesn't support custom callbacks. | 163 // ShadowRoot doesn't support custom callbacks. |
| 164 ASSERT(!hasCustomStyleCallbacks()); | 164 ASSERT(!hasCustomStyleCallbacks()); |
| 165 | 165 |
| 166 StyleResolver* styleResolver = document().styleResolver(); | 166 StyleResolver* styleResolver = document().styleResolver(); |
| 167 styleResolver->pushParentShadowRoot(*this); | 167 styleResolver->pushParentShadowRoot(*this); |
| 168 | 168 |
| 169 if (!attached()) { | 169 if (!confusingAndOftenMisusedAttached()) { |
| 170 attach(); | 170 attach(); |
| 171 return; | 171 return; |
| 172 } | 172 } |
| 173 | 173 |
| 174 // When we're set to lazyAttach we'll have a SubtreeStyleChange and we'll ne
ed | 174 // When we're set to lazyAttach we'll have a SubtreeStyleChange and we'll ne
ed |
| 175 // to promote the change to a Force for all our descendants so they get a | 175 // to promote the change to a Force for all our descendants so they get a |
| 176 // recalc and will attach. | 176 // recalc and will attach. |
| 177 if (styleChangeType() >= SubtreeStyleChange) | 177 if (styleChangeType() >= SubtreeStyleChange) |
| 178 change = Force; | 178 change = Force; |
| 179 | 179 |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 405 if (element->isInsertionPoint()) | 405 if (element->isInsertionPoint()) |
| 406 insertionPoints.append(toInsertionPoint(element)); | 406 insertionPoints.append(toInsertionPoint(element)); |
| 407 } | 407 } |
| 408 | 408 |
| 409 ensureShadowRootRareData()->setChildInsertionPoints(insertionPoints); | 409 ensureShadowRootRareData()->setChildInsertionPoints(insertionPoints); |
| 410 | 410 |
| 411 return m_shadowRootRareData->childInsertionPoints(); | 411 return m_shadowRootRareData->childInsertionPoints(); |
| 412 } | 412 } |
| 413 | 413 |
| 414 } | 414 } |
| OLD | NEW |