OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
280 void ElementShadow::distribute() | 280 void ElementShadow::distribute() |
281 { | 281 { |
282 if (isV1()) | 282 if (isV1()) |
283 distributeV1(); | 283 distributeV1(); |
284 else | 284 else |
285 distributeV0(); | 285 distributeV0(); |
286 } | 286 } |
287 | 287 |
288 void ElementShadow::distributeV0() | 288 void ElementShadow::distributeV0() |
289 { | 289 { |
290 host()->setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTracing:
:create(StyleChangeReason::Shadow)); | |
291 WillBeHeapVector<RawPtrWillBeMember<HTMLShadowElement>, 32> shadowInsertionP
oints; | 290 WillBeHeapVector<RawPtrWillBeMember<HTMLShadowElement>, 32> shadowInsertionP
oints; |
292 DistributionPool pool(*host()); | 291 DistributionPool pool(*host()); |
293 | 292 |
294 for (ShadowRoot* root = &youngestShadowRoot(); root; root = root->olderShado
wRoot()) { | 293 for (ShadowRoot* root = &youngestShadowRoot(); root; root = root->olderShado
wRoot()) { |
295 HTMLShadowElement* shadowInsertionPoint = 0; | 294 HTMLShadowElement* shadowInsertionPoint = 0; |
296 const WillBeHeapVector<RefPtrWillBeMember<InsertionPoint>>& insertionPoi
nts = root->descendantInsertionPoints(); | 295 const WillBeHeapVector<RefPtrWillBeMember<InsertionPoint>>& insertionPoi
nts = root->descendantInsertionPoints(); |
297 for (size_t i = 0; i < insertionPoints.size(); ++i) { | 296 for (size_t i = 0; i < insertionPoints.size(); ++i) { |
298 InsertionPoint* point = insertionPoints[i].get(); | 297 InsertionPoint* point = insertionPoints[i].get(); |
299 if (!point->isActive()) | 298 if (!point->isActive()) |
300 continue; | 299 continue; |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 visitor->trace(m_selectFeatures); | 400 visitor->trace(m_selectFeatures); |
402 // Shadow roots are linked with previous and next pointers which are traced. | 401 // Shadow roots are linked with previous and next pointers which are traced. |
403 // It is therefore enough to trace one of the shadow roots here and the | 402 // It is therefore enough to trace one of the shadow roots here and the |
404 // rest will be traced from there. | 403 // rest will be traced from there. |
405 visitor->trace(m_shadowRoots.head()); | 404 visitor->trace(m_shadowRoots.head()); |
406 visitor->trace(m_slotAssignment); | 405 visitor->trace(m_slotAssignment); |
407 #endif | 406 #endif |
408 } | 407 } |
409 | 408 |
410 } // namespace blink | 409 } // namespace blink |
OLD | NEW |