| 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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 | 147 |
| 148 void HTMLSlotElement::saveAndClearDistribution() | 148 void HTMLSlotElement::saveAndClearDistribution() |
| 149 { | 149 { |
| 150 m_oldDistributedNodes.swap(m_distributedNodes); | 150 m_oldDistributedNodes.swap(m_distributedNodes); |
| 151 clearDistribution(); | 151 clearDistribution(); |
| 152 } | 152 } |
| 153 | 153 |
| 154 void HTMLSlotElement::dispatchSlotChangeEvent() | 154 void HTMLSlotElement::dispatchSlotChangeEvent() |
| 155 { | 155 { |
| 156 m_slotchangeEventEnqueued = false; | 156 m_slotchangeEventEnqueued = false; |
| 157 Event* event = Event::create(EventTypeNames::slotchange); | 157 Event* event = Event::createBubble(EventTypeNames::slotchange); |
| 158 event->setTarget(this); | 158 event->setTarget(this); |
| 159 dispatchScopedEvent(event); | 159 dispatchScopedEvent(event); |
| 160 } | 160 } |
| 161 | 161 |
| 162 Node* HTMLSlotElement::distributedNodeNextTo(const Node& node) const | 162 Node* HTMLSlotElement::distributedNodeNextTo(const Node& node) const |
| 163 { | 163 { |
| 164 const auto& it = m_distributedIndices.find(&node); | 164 const auto& it = m_distributedIndices.find(&node); |
| 165 if (it == m_distributedIndices.end()) | 165 if (it == m_distributedIndices.end()) |
| 166 return nullptr; | 166 return nullptr; |
| 167 size_t index = it->value; | 167 size_t index = it->value; |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 DEFINE_TRACE(HTMLSlotElement) | 356 DEFINE_TRACE(HTMLSlotElement) |
| 357 { | 357 { |
| 358 visitor->trace(m_assignedNodes); | 358 visitor->trace(m_assignedNodes); |
| 359 visitor->trace(m_distributedNodes); | 359 visitor->trace(m_distributedNodes); |
| 360 visitor->trace(m_oldDistributedNodes); | 360 visitor->trace(m_oldDistributedNodes); |
| 361 visitor->trace(m_distributedIndices); | 361 visitor->trace(m_distributedIndices); |
| 362 HTMLElement::trace(visitor); | 362 HTMLElement::trace(visitor); |
| 363 } | 363 } |
| 364 | 364 |
| 365 } // namespace blink | 365 } // namespace blink |
| OLD | NEW |