| 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 #endif | 98 #endif |
| 99 | 99 |
| 100 PassRefPtr<Node> ShadowRoot::cloneNode(bool, ExceptionState& exceptionState) | 100 PassRefPtr<Node> ShadowRoot::cloneNode(bool, ExceptionState& exceptionState) |
| 101 { | 101 { |
| 102 exceptionState.throwDOMException(DataCloneError, "ShadowRoot nodes are not c
lonable."); | 102 exceptionState.throwDOMException(DataCloneError, "ShadowRoot nodes are not c
lonable."); |
| 103 return nullptr; | 103 return nullptr; |
| 104 } | 104 } |
| 105 | 105 |
| 106 void ShadowRoot::recalcStyle(StyleRecalcChange change) | 106 void ShadowRoot::recalcStyle(StyleRecalcChange change) |
| 107 { | 107 { |
| 108 // ShadowRoot doesn't support custom callbacks. | |
| 109 ASSERT(!hasCustomStyleCallbacks()); | |
| 110 | |
| 111 if (styleChangeType() >= SubtreeStyleChange) | 108 if (styleChangeType() >= SubtreeStyleChange) |
| 112 change = Force; | 109 change = Force; |
| 113 | 110 |
| 114 // There's no style to update so just calling recalcStyle means we're update
d. | 111 // There's no style to update so just calling recalcStyle means we're update
d. |
| 115 clearNeedsStyleRecalc(); | 112 clearNeedsStyleRecalc(); |
| 116 | 113 |
| 117 // FIXME: This doesn't handle :hover + div properly like Element::recalcStyl
e does. | 114 // FIXME: This doesn't handle :hover + div properly like Element::recalcStyl
e does. |
| 118 Text* lastTextNode = 0; | 115 Text* lastTextNode = 0; |
| 119 for (Node* child = lastChild(); child; child = child->previousSibling()) { | 116 for (Node* child = lastChild(); child; child = child->previousSibling()) { |
| 120 if (child->isTextNode()) { | 117 if (child->isTextNode()) { |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 void ShadowRoot::trace(Visitor* visitor) | 292 void ShadowRoot::trace(Visitor* visitor) |
| 296 { | 293 { |
| 297 visitor->trace(m_prev); | 294 visitor->trace(m_prev); |
| 298 visitor->trace(m_next); | 295 visitor->trace(m_next); |
| 299 visitor->trace(m_shadowRootRareData); | 296 visitor->trace(m_shadowRootRareData); |
| 300 TreeScope::trace(visitor); | 297 TreeScope::trace(visitor); |
| 301 DocumentFragment::trace(visitor); | 298 DocumentFragment::trace(visitor); |
| 302 } | 299 } |
| 303 | 300 |
| 304 } | 301 } |
| OLD | NEW |