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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 } | 151 } |
152 | 152 |
153 // There's no style to update so just calling recalcStyle means we're updated. | 153 // There's no style to update so just calling recalcStyle means we're updated. |
154 ClearNeedsStyleRecalc(); | 154 ClearNeedsStyleRecalc(); |
155 | 155 |
156 RecalcDescendantStyles(change); | 156 RecalcDescendantStyles(change); |
157 ClearChildNeedsStyleRecalc(); | 157 ClearChildNeedsStyleRecalc(); |
158 } | 158 } |
159 | 159 |
160 void ShadowRoot::RebuildLayoutTree(Text*& next_text_sibling) { | 160 void ShadowRoot::RebuildLayoutTree(Text*& next_text_sibling) { |
161 // ShadowRoot doesn't support custom callbacks. | |
162 DCHECK(!HasCustomStyleCallbacks()); | |
163 | |
164 if (!NeedsReattachLayoutTree() && !ChildNeedsReattachLayoutTree()) { | 161 if (!NeedsReattachLayoutTree() && !ChildNeedsReattachLayoutTree()) { |
165 SkipRebuildLayoutTree(next_text_sibling); | 162 SkipRebuildLayoutTree(next_text_sibling); |
166 return; | 163 return; |
167 } | 164 } |
168 | 165 |
169 StyleSharingDepthScope sharing_scope(*this); | 166 StyleSharingDepthScope sharing_scope(*this); |
170 | 167 |
171 ClearNeedsReattachLayoutTree(); | 168 ClearNeedsReattachLayoutTree(); |
172 RebuildChildrenLayoutTrees(next_text_sibling); | 169 RebuildChildrenLayoutTrees(next_text_sibling); |
173 ClearChildNeedsReattachLayoutTree(); | 170 ClearChildNeedsReattachLayoutTree(); |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
384 ostream << "ShadowRootType::Open"; | 381 ostream << "ShadowRootType::Open"; |
385 break; | 382 break; |
386 case ShadowRootType::kClosed: | 383 case ShadowRootType::kClosed: |
387 ostream << "ShadowRootType::Closed"; | 384 ostream << "ShadowRootType::Closed"; |
388 break; | 385 break; |
389 } | 386 } |
390 return ostream; | 387 return ostream; |
391 } | 388 } |
392 | 389 |
393 } // namespace blink | 390 } // namespace blink |
OLD | NEW |