| 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 } | 135 } |
| 136 | 136 |
| 137 void ShadowRoot::recalcStyle(StyleChange change) | 137 void ShadowRoot::recalcStyle(StyleChange change) |
| 138 { | 138 { |
| 139 // ShadowRoot doesn't support custom callbacks. | 139 // ShadowRoot doesn't support custom callbacks. |
| 140 ASSERT(!hasCustomStyleCallbacks()); | 140 ASSERT(!hasCustomStyleCallbacks()); |
| 141 | 141 |
| 142 StyleResolver* styleResolver = document()->styleResolver(); | 142 StyleResolver* styleResolver = document()->styleResolver(); |
| 143 styleResolver->pushParentShadowRoot(this); | 143 styleResolver->pushParentShadowRoot(this); |
| 144 | 144 |
| 145 for (Node* child = firstChild(); child; child = child->nextSibling()) { | 145 for (Node* child = lastChild(); child; child = child->previousSibling()) { |
| 146 if (child->isElementNode()) | 146 if (child->isElementNode()) |
| 147 toElement(child)->recalcStyle(change); | 147 toElement(child)->recalcStyle(change); |
| 148 else if (child->isTextNode()) | 148 else if (child->isTextNode()) |
| 149 toText(child)->recalcTextStyle(change); | 149 toText(child)->recalcTextStyle(change); |
| 150 } | 150 } |
| 151 | 151 |
| 152 styleResolver->popParentShadowRoot(this); | 152 styleResolver->popParentShadowRoot(this); |
| 153 clearNeedsStyleRecalc(); | 153 clearNeedsStyleRecalc(); |
| 154 clearChildNeedsStyleRecalc(); | 154 clearChildNeedsStyleRecalc(); |
| 155 } | 155 } |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 { | 271 { |
| 272 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::DOM); | 272 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::DOM); |
| 273 DocumentFragment::reportMemoryUsage(memoryObjectInfo); | 273 DocumentFragment::reportMemoryUsage(memoryObjectInfo); |
| 274 TreeScope::reportMemoryUsage(memoryObjectInfo); | 274 TreeScope::reportMemoryUsage(memoryObjectInfo); |
| 275 info.addMember(m_prev, "prev"); | 275 info.addMember(m_prev, "prev"); |
| 276 info.addMember(m_next, "next"); | 276 info.addMember(m_next, "next"); |
| 277 info.addMember(m_scopeDistribution, "scopeDistribution"); | 277 info.addMember(m_scopeDistribution, "scopeDistribution"); |
| 278 } | 278 } |
| 279 | 279 |
| 280 } | 280 } |
| OLD | NEW |