| Index: third_party/WebKit/Source/core/dom/shadow/ShadowRootRareDataV0.h
|
| diff --git a/third_party/WebKit/Source/core/dom/shadow/ShadowRootRareData.h b/third_party/WebKit/Source/core/dom/shadow/ShadowRootRareDataV0.h
|
| similarity index 69%
|
| copy from third_party/WebKit/Source/core/dom/shadow/ShadowRootRareData.h
|
| copy to third_party/WebKit/Source/core/dom/shadow/ShadowRootRareDataV0.h
|
| index 379b1c2952ae219cf4545481124ad2a5b44a2ee3..c0f62d247576d495ed2339e7c024cda01eebdd69 100644
|
| --- a/third_party/WebKit/Source/core/dom/shadow/ShadowRootRareData.h
|
| +++ b/third_party/WebKit/Source/core/dom/shadow/ShadowRootRareDataV0.h
|
| @@ -28,22 +28,19 @@
|
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| */
|
|
|
| -#ifndef ShadowRootRareData_h
|
| -#define ShadowRootRareData_h
|
| +#ifndef ShadowRootRareDataV0_h
|
| +#define ShadowRootRareDataV0_h
|
|
|
| #include "core/dom/shadow/InsertionPoint.h"
|
| -#include "core/html/HTMLSlotElement.h"
|
| #include "wtf/Vector.h"
|
|
|
| namespace blink {
|
|
|
| -class ShadowRootRareData : public GarbageCollected<ShadowRootRareData> {
|
| +class ShadowRootRareDataV0 : public GarbageCollected<ShadowRootRareDataV0> {
|
| public:
|
| - ShadowRootRareData()
|
| + ShadowRootRareDataV0()
|
| : m_descendantShadowElementCount(0)
|
| , m_descendantContentElementCount(0)
|
| - , m_childShadowRootCount(0)
|
| - , m_descendantSlotCount(0)
|
| {
|
| }
|
|
|
| @@ -55,52 +52,27 @@ public:
|
|
|
| bool containsShadowElements() const { return m_descendantShadowElementCount; }
|
| bool containsContentElements() const { return m_descendantContentElementCount; }
|
| - bool containsShadowRoots() const { return m_childShadowRootCount; }
|
|
|
| unsigned descendantShadowElementCount() const { return m_descendantShadowElementCount; }
|
|
|
| - void didAddChildShadowRoot() { ++m_childShadowRootCount; }
|
| - void didRemoveChildShadowRoot() { DCHECK_GT(m_childShadowRootCount, 0u); --m_childShadowRootCount; }
|
| -
|
| - unsigned childShadowRootCount() const { return m_childShadowRootCount; }
|
| -
|
| const HeapVector<Member<InsertionPoint>>& descendantInsertionPoints() { return m_descendantInsertionPoints; }
|
| void setDescendantInsertionPoints(HeapVector<Member<InsertionPoint>>& list) { m_descendantInsertionPoints.swap(list); }
|
| void clearDescendantInsertionPoints() { m_descendantInsertionPoints.clear(); }
|
|
|
| - StyleSheetList* styleSheets() { return m_styleSheetList.get(); }
|
| - void setStyleSheets(StyleSheetList* styleSheetList) { m_styleSheetList = styleSheetList; }
|
| -
|
| - 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(); }
|
| -
|
| DEFINE_INLINE_TRACE()
|
| {
|
| visitor->trace(m_shadowInsertionPointOfYoungerShadowRoot);
|
| visitor->trace(m_descendantInsertionPoints);
|
| - visitor->trace(m_styleSheetList);
|
| - visitor->trace(m_descendantSlots);
|
| }
|
|
|
| private:
|
| Member<HTMLShadowElement> m_shadowInsertionPointOfYoungerShadowRoot;
|
| unsigned m_descendantShadowElementCount;
|
| unsigned m_descendantContentElementCount;
|
| - unsigned m_childShadowRootCount;
|
| HeapVector<Member<InsertionPoint>> m_descendantInsertionPoints;
|
| - Member<StyleSheetList> m_styleSheetList;
|
| - unsigned m_descendantSlotCount;
|
| - HeapVector<Member<HTMLSlotElement>> m_descendantSlots;
|
| };
|
|
|
| -inline void ShadowRootRareData::didAddInsertionPoint(InsertionPoint* point)
|
| +inline void ShadowRootRareDataV0::didAddInsertionPoint(InsertionPoint* point)
|
| {
|
| DCHECK(point);
|
| if (isHTMLShadowElement(*point))
|
| @@ -111,7 +83,7 @@ inline void ShadowRootRareData::didAddInsertionPoint(InsertionPoint* point)
|
| ASSERT_NOT_REACHED();
|
| }
|
|
|
| -inline void ShadowRootRareData::didRemoveInsertionPoint(InsertionPoint* point)
|
| +inline void ShadowRootRareDataV0::didRemoveInsertionPoint(InsertionPoint* point)
|
| {
|
| DCHECK(point);
|
| if (isHTMLShadowElement(*point)) {
|
|
|