| Index: Source/bindings/v8/ScriptObjectTraits.h
|
| diff --git a/Source/core/svg/SVGAnimatedPath.h b/Source/bindings/v8/ScriptObjectTraits.h
|
| similarity index 64%
|
| copy from Source/core/svg/SVGAnimatedPath.h
|
| copy to Source/bindings/v8/ScriptObjectTraits.h
|
| index 6e03c58a50a17edb497524a00c9e3ab9626fec68..1bdb203c0933def4512604517a1cf471e0b6ae56 100644
|
| --- a/Source/core/svg/SVGAnimatedPath.h
|
| +++ b/Source/bindings/v8/ScriptObjectTraits.h
|
| @@ -28,29 +28,28 @@
|
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| */
|
|
|
| -#ifndef SVGAnimatedPath_h
|
| -#define SVGAnimatedPath_h
|
| +#ifndef ScriptObjectTraits_h
|
| +#define ScriptObjectTraits_h
|
|
|
| -#include "core/svg/SVGPathSegListTearOff.h"
|
| -#include "core/svg/properties/NewSVGAnimatedProperty.h"
|
| +#include "bindings/v8/ScriptObject.h"
|
| +#include "bindings/v8/ScriptState.h"
|
| +#include "wtf/HashTraits.h"
|
|
|
| namespace WebCore {
|
|
|
| -class SVGPathElement;
|
| -
|
| -class SVGAnimatedPath : public NewSVGAnimatedProperty<SVGPathSegList> {
|
| -public:
|
| - virtual ~SVGAnimatedPath();
|
| -
|
| - static PassRefPtr<SVGAnimatedPath> create(SVGPathElement* contextElement, const QualifiedName& attributeName)
|
| - {
|
| - return adoptRef(new SVGAnimatedPath(contextElement, attributeName));
|
| - }
|
| +struct ScriptObjectHash {
|
| + static unsigned hash(const ScriptObject& object) { return object.v8Object()->GetIdentityHash(); }
|
| + static bool equal(const ScriptObject& a, const ScriptObject& b) { return a == b; }
|
| + static const bool safeToCompareToEmptyOrDeleted = true;
|
| +};
|
|
|
| -protected:
|
| - SVGAnimatedPath(SVGPathElement*, const QualifiedName&);
|
| +struct ScriptObjectHashTraits : WTF::GenericHashTraits<ScriptObject> {
|
| + static const bool emptyValueIsZero = false;
|
| + static ScriptObject emptyValue() { return ScriptObject(ScriptState::current(), ScriptValue::createNull()); }
|
| + static void constructDeletedValue(ScriptObject& slot) { slot = ScriptObject(); }
|
| + static bool isDeletedValue(ScriptObject value) { return value.hasNoValue(); }
|
| };
|
|
|
| } // namespace WebCore
|
|
|
| -#endif // SVGAnimatedPath_h
|
| +#endif // !defined(ScriptObjectTraits_h)
|
|
|