Chromium Code Reviews| Index: third_party/WebKit/Source/core/dom/shadow/SlotAssignment.h |
| diff --git a/third_party/WebKit/Source/core/dom/shadow/SlotAssignment.h b/third_party/WebKit/Source/core/dom/shadow/SlotAssignment.h |
| index 4ed9646733cb399a60e4336bdb04ff347186cd30..493f84bec5fe279aa967d9b5526517dc5aefe62e 100644 |
| --- a/third_party/WebKit/Source/core/dom/shadow/SlotAssignment.h |
| +++ b/third_party/WebKit/Source/core/dom/shadow/SlotAssignment.h |
| @@ -24,14 +24,27 @@ public: |
| void resolveAssignment(ShadowRoot&); |
| void resolveDistribution(ShadowRoot&); |
| + void didAddSlot() { ++m_descendantSlotCount; } |
| + void didRemoveSlot() { DCHECK_GT(m_descendantSlotCount, 0u); --m_descendantSlotCount; } |
| + unsigned descendantSlotCount() const { return m_descendantSlotCount; } |
| + |
| + const HeapVector<Member<HTMLSlotElement>>& descendantSlots() const { return m_descendantSlots; } |
| + |
| + void setDescendantSlots(HeapVector<Member<HTMLSlotElement>>& slots) { m_descendantSlots.swap(slots); } |
| + void clearDescendantSlots() { m_descendantSlots.clear(); } |
| + |
| DECLARE_TRACE(); |
| private: |
| - SlotAssignment() { } |
| + SlotAssignment(); |
| void assign(Node&, HTMLSlotElement&); |
| void distribute(Node&, HTMLSlotElement&); |
| + |
| + unsigned m_descendantSlotCount; |
|
kochi
2016/04/28 08:36:36
C++11-style initialization for members are allowed
hayato
2016/04/28 09:01:59
Done
|
| + HeapVector<Member<HTMLSlotElement>> m_descendantSlots; |
| HeapHashMap<Member<Node>, Member<HTMLSlotElement>> m_assignment; |
| + |
|
kochi
2016/04/28 08:36:36
nit: unnecessary newline?
hayato
2016/04/28 09:01:59
Done
|
| }; |
| } // namespace blink |