#include "wtf/RefPtr.h"
#include "wtf/Vector.h"
-namespace WebCore {
+namespace blink {
-class ShadowRootRareData {
+class ShadowRootRareData : public NoBaseWillBeGarbageCollected<ShadowRootRareData> {
public:
ShadowRootRareData()
: m_descendantShadowElementCount(0)
}
HTMLShadowElement* shadowInsertionPointOfYoungerShadowRoot() const { return m_shadowInsertionPointOfYoungerShadowRoot.get(); }
- void setShadowInsertionPointOfYoungerShadowRoot(PassRefPtr<HTMLShadowElement> shadowInsertionPoint) { m_shadowInsertionPointOfYoungerShadowRoot = shadowInsertionPoint; }
+ void setShadowInsertionPointOfYoungerShadowRoot(PassRefPtrWillBeRawPtr<HTMLShadowElement> shadowInsertionPoint) { m_shadowInsertionPointOfYoungerShadowRoot = shadowInsertionPoint; }
void didAddInsertionPoint(InsertionPoint*);
void didRemoveInsertionPoint(InsertionPoint*);
unsigned childShadowRootCount() const { return m_childShadowRootCount; }
- const Vector<RefPtr<InsertionPoint> >& descendantInsertionPoints() { return m_descendantInsertionPoints; }
- void setDescendantInsertionPoints(Vector<RefPtr<InsertionPoint> >& list) { m_descendantInsertionPoints.swap(list); }
+ const WillBeHeapVector<RefPtrWillBeMember<InsertionPoint> >& descendantInsertionPoints() { return m_descendantInsertionPoints; }
+ void setDescendantInsertionPoints(WillBeHeapVector<RefPtrWillBeMember<InsertionPoint> >& list) { m_descendantInsertionPoints.swap(list); }
void clearDescendantInsertionPoints() { m_descendantInsertionPoints.clear(); }
StyleSheetList* styleSheets() { return m_styleSheetList.get(); }
void setStyleSheets(PassRefPtrWillBeRawPtr<StyleSheetList> styleSheetList) { m_styleSheetList = styleSheetList; }
+ void trace(Visitor* visitor)
+ {
+ visitor->trace(m_shadowInsertionPointOfYoungerShadowRoot);
+ visitor->trace(m_descendantInsertionPoints);
+ visitor->trace(m_styleSheetList);
+ }
+
private:
- RefPtr<HTMLShadowElement> m_shadowInsertionPointOfYoungerShadowRoot;
+ RefPtrWillBeMember<HTMLShadowElement> m_shadowInsertionPointOfYoungerShadowRoot;
unsigned m_descendantShadowElementCount;
unsigned m_descendantContentElementCount;
unsigned m_childShadowRootCount;
- Vector<RefPtr<InsertionPoint> > m_descendantInsertionPoints;
- RefPtrWillBePersistent<StyleSheetList> m_styleSheetList;
+ WillBeHeapVector<RefPtrWillBeMember<InsertionPoint> > m_descendantInsertionPoints;
+ RefPtrWillBeMember<StyleSheetList> m_styleSheetList;
};
inline void ShadowRootRareData::didAddInsertionPoint(InsertionPoint* point)
ASSERT(m_descendantShadowElementCount >= 0);
}
-} // namespace WebCore
+} // namespace blink
#endif