#define CSSValue_h
#include "core/dom/ExceptionCode.h"
-#include "heap/Handle.h"
+#include "platform/heap/Handle.h"
#include "platform/weborigin/KURL.h"
#include "wtf/HashMap.h"
#include "wtf/ListHashSet.h"
// They should be handled by separate wrapper classes.
// Please don't expose more CSSValue types to the web.
-class CSSValue : public RefCountedWillBeRefCountedGarbageCollected<CSSValue> {
- DECLARE_GC_INFO;
+class CSSValue : public RefCountedWillBeGarbageCollectedFinalized<CSSValue> {
public:
enum Type {
CSS_INHERIT = 0,
bool isFilterValue() const { return m_classType == CSSFilterClass; }
bool isArrayFunctionValue() const { return m_classType == CSSArrayFunctionValueClass; }
bool isGridTemplateAreasValue() const { return m_classType == GridTemplateAreasClass; }
- bool isSVGColor() const { return m_classType == SVGColorClass || m_classType == SVGPaintClass; }
bool isSVGPaint() const { return m_classType == SVGPaintClass; }
bool isSVGDocumentValue() const { return m_classType == CSSSVGDocumentClass; }
bool isUnicodeRangeValue() const { return m_classType == UnicodeRangeClass; }
bool isCSSOMSafe() const { return m_isCSSOMSafe; }
bool isSubtypeExposedToCSSOM() const
{
- return isPrimitiveValue() || isSVGColor() || isValueList();
+ return isPrimitiveValue() || isSVGPaint() || isValueList();
}
- PassRefPtr<CSSValue> cloneForCSSOM() const;
+ PassRefPtrWillBeRawPtr<CSSValue> cloneForCSSOM() const;
bool hasFailedOrCanceledSubresources() const;
bool equals(const CSSValue&) const;
- void finalize();
+ void finalizeGarbageCollectedObject();
void traceAfterDispatch(Visitor*) { }
void trace(Visitor*);
GridTemplateAreasClass,
// SVG classes.
- SVGColorClass,
SVGPaintClass,
CSSSVGDocumentClass,
unsigned m_classType : ClassTypeBits; // ClassType
};
-template<typename CSSValueType>
-inline bool compareCSSValueVector(const Vector<RefPtr<CSSValueType> >& firstVector, const Vector<RefPtr<CSSValueType> >& secondVector)
+template<typename CSSValueType, size_t inlineCapacity>
+inline bool compareCSSValueVector(const WillBeHeapVector<RefPtrWillBeMember<CSSValueType>, inlineCapacity>& firstVector, const WillBeHeapVector<RefPtrWillBeMember<CSSValueType>, inlineCapacity>& secondVector)
{
size_t size = firstVector.size();
if (size != secondVector.size())
return false;
for (size_t i = 0; i < size; i++) {
- const RefPtr<CSSValueType>& firstPtr = firstVector[i];
- const RefPtr<CSSValueType>& secondPtr = secondVector[i];
+ const RefPtrWillBeMember<CSSValueType>& firstPtr = firstVector[i];
+ const RefPtrWillBeMember<CSSValueType>& secondPtr = secondVector[i];
if (firstPtr == secondPtr || (firstPtr && secondPtr && firstPtr->equals(*secondPtr)))
continue;
return false;