| 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 void ResolveDistributedNodes(); | 69 void ResolveDistributedNodes(); |
| 70 void AppendDistributedNode(Node&); | 70 void AppendDistributedNode(Node&); |
| 71 void AppendDistributedNodesFrom(const HTMLSlotElement& other); | 71 void AppendDistributedNodesFrom(const HTMLSlotElement& other); |
| 72 | 72 |
| 73 void UpdateDistributedNodesWithFallback(); | 73 void UpdateDistributedNodesWithFallback(); |
| 74 | 74 |
| 75 void LazyReattachDistributedNodesIfNeeded(); | 75 void LazyReattachDistributedNodesIfNeeded(); |
| 76 | 76 |
| 77 void AttachLayoutTree(const AttachContext& = AttachContext()) final; | 77 void AttachLayoutTree(const AttachContext& = AttachContext()) final; |
| 78 void DetachLayoutTree(const AttachContext& = AttachContext()) final; | 78 void DetachLayoutTree(const AttachContext& = AttachContext()) final; |
| 79 void RebuildDistributedChildrenLayoutTrees(); |
| 79 | 80 |
| 80 void AttributeChanged(const AttributeModificationParams&) final; | 81 void AttributeChanged(const AttributeModificationParams&) final; |
| 81 | 82 |
| 82 int tabIndex() const override; | 83 int tabIndex() const override; |
| 83 AtomicString GetName() const; | 84 AtomicString GetName() const; |
| 84 | 85 |
| 85 // This method can be slow because this has to traverse the children of a | 86 // This method can be slow because this has to traverse the children of a |
| 86 // shadow host. This method should be used only when m_assignedNodes is | 87 // shadow host. This method should be used only when m_assignedNodes is |
| 87 // dirty. e.g. To detect a slotchange event in DOM mutations. | 88 // dirty. e.g. To detect a slotchange event in DOM mutations. |
| 88 bool HasAssignedNodesSlow() const; | 89 bool HasAssignedNodesSlow() const; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 112 HeapVector<Member<Node>> assigned_nodes_; | 113 HeapVector<Member<Node>> assigned_nodes_; |
| 113 HeapVector<Member<Node>> distributed_nodes_; | 114 HeapVector<Member<Node>> distributed_nodes_; |
| 114 HeapVector<Member<Node>> old_distributed_nodes_; | 115 HeapVector<Member<Node>> old_distributed_nodes_; |
| 115 HeapHashMap<Member<const Node>, size_t> distributed_indices_; | 116 HeapHashMap<Member<const Node>, size_t> distributed_indices_; |
| 116 bool slotchange_event_enqueued_ = false; | 117 bool slotchange_event_enqueued_ = false; |
| 117 }; | 118 }; |
| 118 | 119 |
| 119 } // namespace blink | 120 } // namespace blink |
| 120 | 121 |
| 121 #endif // HTMLSlotElement_h | 122 #endif // HTMLSlotElement_h |
| OLD | NEW |