| 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 326 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 337     DCHECK(m_shadowRootRareData); | 337     DCHECK(m_shadowRootRareData); | 
| 338     HeapVector<Member<HTMLSlotElement>> slots; | 338     HeapVector<Member<HTMLSlotElement>> slots; | 
| 339     slots.reserveCapacity(descendantSlotCount()); | 339     slots.reserveCapacity(descendantSlotCount()); | 
| 340     for (HTMLSlotElement& slot : Traversal<HTMLSlotElement>::descendantsOf(rootN
     ode())) | 340     for (HTMLSlotElement& slot : Traversal<HTMLSlotElement>::descendantsOf(rootN
     ode())) | 
| 341         slots.append(&slot); | 341         slots.append(&slot); | 
| 342     m_shadowRootRareData->setDescendantSlots(slots); | 342     m_shadowRootRareData->setDescendantSlots(slots); | 
| 343     m_descendantSlotsIsValid = true; | 343     m_descendantSlotsIsValid = true; | 
| 344     return m_shadowRootRareData->descendantSlots(); | 344     return m_shadowRootRareData->descendantSlots(); | 
| 345 } | 345 } | 
| 346 | 346 | 
|  | 347 void ShadowRoot::assignV1() | 
|  | 348 { | 
|  | 349     if (!m_slotAssignment) | 
|  | 350         m_slotAssignment = SlotAssignment::create(); | 
|  | 351     m_slotAssignment->resolveAssignment(*this); | 
|  | 352 } | 
|  | 353 | 
| 347 void ShadowRoot::distributeV1() | 354 void ShadowRoot::distributeV1() | 
| 348 { | 355 { | 
| 349     if (!m_slotAssignment) | 356     if (!m_slotAssignment) | 
| 350         m_slotAssignment = SlotAssignment::create(); | 357         m_slotAssignment = SlotAssignment::create(); | 
| 351     m_slotAssignment->resolveAssignment(*this); | 358     m_slotAssignment->resolveDistribution(*this); | 
| 352 } | 359 } | 
| 353 | 360 | 
| 354 DEFINE_TRACE(ShadowRoot) | 361 DEFINE_TRACE(ShadowRoot) | 
| 355 { | 362 { | 
| 356     visitor->trace(m_prev); | 363     visitor->trace(m_prev); | 
| 357     visitor->trace(m_next); | 364     visitor->trace(m_next); | 
| 358     visitor->trace(m_shadowRootRareData); | 365     visitor->trace(m_shadowRootRareData); | 
| 359     visitor->trace(m_shadowRootRareDataV0); | 366     visitor->trace(m_shadowRootRareDataV0); | 
| 360     visitor->trace(m_slotAssignment); | 367     visitor->trace(m_slotAssignment); | 
| 361     TreeScope::trace(visitor); | 368     TreeScope::trace(visitor); | 
| (...skipping 13 matching lines...) Expand all  Loading... | 
| 375         ostream << "ShadowRootType::Open"; | 382         ostream << "ShadowRootType::Open"; | 
| 376         break; | 383         break; | 
| 377     case ShadowRootType::Closed: | 384     case ShadowRootType::Closed: | 
| 378         ostream << "ShadowRootType::Closed"; | 385         ostream << "ShadowRootType::Closed"; | 
| 379         break; | 386         break; | 
| 380     } | 387     } | 
| 381     return ostream; | 388     return ostream; | 
| 382 } | 389 } | 
| 383 | 390 | 
| 384 } // namespace blink | 391 } // namespace blink | 
| OLD | NEW | 
|---|