15c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)/*
209380295ba73501a205346becac22c6978e4671dTorne (Richard Coles) * Copyright (C) 2014 Google Inc. All rights reserved.
35c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) *
409380295ba73501a205346becac22c6978e4671dTorne (Richard Coles) * Redistribution and use in source and binary forms, with or without
509380295ba73501a205346becac22c6978e4671dTorne (Richard Coles) * modification, are permitted provided that the following conditions are
609380295ba73501a205346becac22c6978e4671dTorne (Richard Coles) * met:
75c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) *
809380295ba73501a205346becac22c6978e4671dTorne (Richard Coles) *     * Redistributions of source code must retain the above copyright
909380295ba73501a205346becac22c6978e4671dTorne (Richard Coles) * notice, this list of conditions and the following disclaimer.
1009380295ba73501a205346becac22c6978e4671dTorne (Richard Coles) *     * Redistributions in binary form must reproduce the above
1109380295ba73501a205346becac22c6978e4671dTorne (Richard Coles) * copyright notice, this list of conditions and the following disclaimer
1209380295ba73501a205346becac22c6978e4671dTorne (Richard Coles) * in the documentation and/or other materials provided with the
1309380295ba73501a205346becac22c6978e4671dTorne (Richard Coles) * distribution.
1409380295ba73501a205346becac22c6978e4671dTorne (Richard Coles) *     * Neither the name of Google Inc. nor the names of its
1509380295ba73501a205346becac22c6978e4671dTorne (Richard Coles) * contributors may be used to endorse or promote products derived from
1609380295ba73501a205346becac22c6978e4671dTorne (Richard Coles) * this software without specific prior written permission.
175c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) *
1809380295ba73501a205346becac22c6978e4671dTorne (Richard Coles) * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1909380295ba73501a205346becac22c6978e4671dTorne (Richard Coles) * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
2009380295ba73501a205346becac22c6978e4671dTorne (Richard Coles) * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
2109380295ba73501a205346becac22c6978e4671dTorne (Richard Coles) * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
2209380295ba73501a205346becac22c6978e4671dTorne (Richard Coles) * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2309380295ba73501a205346becac22c6978e4671dTorne (Richard Coles) * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
2409380295ba73501a205346becac22c6978e4671dTorne (Richard Coles) * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2509380295ba73501a205346becac22c6978e4671dTorne (Richard Coles) * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2609380295ba73501a205346becac22c6978e4671dTorne (Richard Coles) * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2709380295ba73501a205346becac22c6978e4671dTorne (Richard Coles) * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2809380295ba73501a205346becac22c6978e4671dTorne (Richard Coles) * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
295c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) */
305c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)
315c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)#ifndef SVGPointList_h
325c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)#define SVGPointList_h
335c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)
34197021e6b966cfb06891637935ef33fff06433d1Ben Murdoch#include "bindings/core/v8/ScriptWrappable.h"
35e69819bd8e388ea4ad1636a19aa6b2eed4952191Ben Murdoch#include "core/svg/SVGPoint.h"
3607a852d8c1953036774d8f3b65d18dcfea3bb4a2Ben Murdoch#include "core/svg/properties/SVGListPropertyHelper.h"
375c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)
38c1847b1379d12d0e05df27436bf19a9b1bf12deaTorne (Richard Coles)namespace blink {
395c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)
4009380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)class SVGPointListTearOff;
4109380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)
4207a852d8c1953036774d8f3b65d18dcfea3bb4a2Ben Murdochclass SVGPointList FINAL : public SVGListPropertyHelper<SVGPointList, SVGPoint> {
435c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)public:
4409380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)    typedef SVGPointListTearOff TearOffType;
455c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)
4609380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)    static PassRefPtr<SVGPointList> create()
4709380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)    {
4809380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)        return adoptRef(new SVGPointList());
4909380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)    }
5009380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)
5109380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)    virtual ~SVGPointList();
5209380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)
5309380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)    void setValueAsString(const String&, ExceptionState&);
5409380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)
5507a852d8c1953036774d8f3b65d18dcfea3bb4a2Ben Murdoch    // SVGPropertyBase:
5609380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)    virtual String valueAsString() const OVERRIDE;
5709380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)
58d6cdb82654e8f3343a693ca752d5c4cee0324e17Torne (Richard Coles)    virtual void add(PassRefPtrWillBeRawPtr<SVGPropertyBase>, SVGElement*) OVERRIDE;
5907a852d8c1953036774d8f3b65d18dcfea3bb4a2Ben Murdoch    virtual void calculateAnimatedValue(SVGAnimationElement*, float percentage, unsigned repeatCount, PassRefPtr<SVGPropertyBase> fromValue, PassRefPtr<SVGPropertyBase> toValue, PassRefPtr<SVGPropertyBase> toAtEndOfDurationValue, SVGElement*) OVERRIDE;
6007a852d8c1953036774d8f3b65d18dcfea3bb4a2Ben Murdoch    virtual float calculateDistance(PassRefPtr<SVGPropertyBase> to, SVGElement*) OVERRIDE;
6109380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)
6209380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)    static AnimatedPropertyType classType() { return AnimatedPoints; }
6309380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)
6409380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)private:
6509380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)    SVGPointList();
6609380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)
6709380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)    template <typename CharType>
6809380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)    bool parse(const CharType*& ptr, const CharType* end);
695c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)};
705c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)
71c1847b1379d12d0e05df27436bf19a9b1bf12deaTorne (Richard Coles)} // namespace blink
725c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)
7309380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)#endif // SVGPointList_h
74