| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2015 Google Inc. All rights reserved. | 2 * Copyright (C) 2015 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 next->enqueueSlotChangeEvent(); | 308 next->enqueueSlotChangeEvent(); |
| 309 } | 309 } |
| 310 } | 310 } |
| 311 | 311 |
| 312 bool HTMLSlotElement::hasAssignedNodesSlow() const | 312 bool HTMLSlotElement::hasAssignedNodesSlow() const |
| 313 { | 313 { |
| 314 ShadowRoot* root = containingShadowRoot(); | 314 ShadowRoot* root = containingShadowRoot(); |
| 315 DCHECK(root); | 315 DCHECK(root); |
| 316 DCHECK(root->isV1()); | 316 DCHECK(root->isV1()); |
| 317 SlotAssignment& assignment = root->ensureSlotAssignment(); | 317 SlotAssignment& assignment = root->ensureSlotAssignment(); |
| 318 if (assignment.findSlot(*this) != this) | 318 if (assignment.findSlotByName(name()) != this) |
| 319 return false; | 319 return false; |
| 320 return assignment.findHostChildBySlotName(name()); | 320 return assignment.findHostChildBySlotName(name()); |
| 321 } | 321 } |
| 322 | 322 |
| 323 bool HTMLSlotElement::findHostChildWithSameSlotName() const | 323 bool HTMLSlotElement::findHostChildWithSameSlotName() const |
| 324 { | 324 { |
| 325 ShadowRoot* root = containingShadowRoot(); | 325 ShadowRoot* root = containingShadowRoot(); |
| 326 DCHECK(root); | 326 DCHECK(root); |
| 327 DCHECK(root->isV1()); | 327 DCHECK(root->isV1()); |
| 328 SlotAssignment& assignment = root->ensureSlotAssignment(); | 328 SlotAssignment& assignment = root->ensureSlotAssignment(); |
| 329 return assignment.findHostChildBySlotName(name()); | 329 return assignment.findHostChildBySlotName(name()); |
| 330 } | 330 } |
| 331 | 331 |
| 332 short HTMLSlotElement::tabIndex() const | 332 short HTMLSlotElement::tabIndex() const |
| 333 { | 333 { |
| 334 return Element::tabIndex(); | 334 return Element::tabIndex(); |
| 335 } | 335 } |
| 336 | 336 |
| 337 DEFINE_TRACE(HTMLSlotElement) | 337 DEFINE_TRACE(HTMLSlotElement) |
| 338 { | 338 { |
| 339 visitor->trace(m_assignedNodes); | 339 visitor->trace(m_assignedNodes); |
| 340 visitor->trace(m_distributedNodes); | 340 visitor->trace(m_distributedNodes); |
| 341 visitor->trace(m_distributedIndices); | 341 visitor->trace(m_distributedIndices); |
| 342 HTMLElement::trace(visitor); | 342 HTMLElement::trace(visitor); |
| 343 } | 343 } |
| 344 | 344 |
| 345 } // namespace blink | 345 } // namespace blink |
| OLD | NEW |