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 if (styleChangeType() == FullStyleChange) | |
146 change = Force; | |
ojan
2013/05/18 00:28:36
Still don't get this change. Probably deserves to
| |
147 | |
145 for (Node* child = firstChild(); child; child = child->nextSibling()) { | 148 for (Node* child = firstChild(); child; child = child->nextSibling()) { |
146 if (child->isElementNode()) | 149 if (child->isElementNode()) |
147 toElement(child)->recalcStyle(change); | 150 toElement(child)->recalcStyle(change); |
148 else if (child->isTextNode()) | 151 else if (child->isTextNode()) |
149 toText(child)->recalcTextStyle(change); | 152 toText(child)->recalcTextStyle(change); |
150 } | 153 } |
151 | 154 |
152 styleResolver->popParentShadowRoot(this); | 155 styleResolver->popParentShadowRoot(this); |
153 clearNeedsStyleRecalc(); | 156 clearNeedsStyleRecalc(); |
154 clearChildNeedsStyleRecalc(); | 157 clearChildNeedsStyleRecalc(); |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
256 { | 259 { |
257 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::DOM); | 260 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::DOM); |
258 DocumentFragment::reportMemoryUsage(memoryObjectInfo); | 261 DocumentFragment::reportMemoryUsage(memoryObjectInfo); |
259 TreeScope::reportMemoryUsage(memoryObjectInfo); | 262 TreeScope::reportMemoryUsage(memoryObjectInfo); |
260 info.addMember(m_prev, "prev"); | 263 info.addMember(m_prev, "prev"); |
261 info.addMember(m_next, "next"); | 264 info.addMember(m_next, "next"); |
262 info.addMember(m_scopeDistribution, "scopeDistribution"); | 265 info.addMember(m_scopeDistribution, "scopeDistribution"); |
263 } | 266 } |
264 | 267 |
265 } | 268 } |
OLD | NEW |