15c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)/* 2d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) * Copyright (C) 2014 Google Inc. All rights reserved. 35c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * 4d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) * Redistribution and use in source and binary forms, with or without 5d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) * modification, are permitted provided that the following conditions are 6d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) * met: 75c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * 8d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) * * Redistributions of source code must retain the above copyright 9d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) * notice, this list of conditions and the following disclaimer. 10d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) * * Redistributions in binary form must reproduce the above 11d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) * copyright notice, this list of conditions and the following disclaimer 12d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) * in the documentation and/or other materials provided with the 13d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) * distribution. 14d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) * * Neither the name of Google Inc. nor the names of its 15d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) * contributors may be used to endorse or promote products derived from 16d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) * this software without specific prior written permission. 175c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * 18d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 295c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) */ 305c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 315c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)#ifndef SVGTransformList_h 325c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)#define SVGTransformList_h 335c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 34d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles)#include "bindings/v8/ScriptWrappable.h" 3553e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)#include "core/svg/SVGTransform.h" 3607a852d8c1953036774d8f3b65d18dcfea3bb4a2Ben Murdoch#include "core/svg/properties/SVGListPropertyHelper.h" 375c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 385c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)namespace WebCore { 395c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 40d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles)class SVGTransformListTearOff; 41d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) 4207a852d8c1953036774d8f3b65d18dcfea3bb4a2Ben Murdochclass SVGTransformList FINAL : public SVGListPropertyHelper<SVGTransformList, SVGTransform> { 435c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)public: 44d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) typedef SVGTransformListTearOff TearOffType; 45d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) 46d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) static PassRefPtr<SVGTransformList> create() 47d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) { 48d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) return adoptRef(new SVGTransformList()); 49d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) } 50d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) 51d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) static PassRefPtr<SVGTransformList> create(SVGTransformType, const String&); 525c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 53d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) virtual ~SVGTransformList(); 54d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) 55d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) PassRefPtr<SVGTransform> consolidate(); 565c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 575c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) bool concatenate(AffineTransform& result) const; 5802772c6a72f1ee0b226341a4f4439970c29fc861Ben Murdoch 5907a852d8c1953036774d8f3b65d18dcfea3bb4a2Ben Murdoch // SVGPropertyBase: 6007a852d8c1953036774d8f3b65d18dcfea3bb4a2Ben Murdoch virtual PassRefPtr<SVGPropertyBase> cloneForAnimation(const String&) const OVERRIDE; 61d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) PassRefPtr<SVGTransformList> clone(); 62d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) 63d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) virtual String valueAsString() const OVERRIDE; 64d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) void setValueAsString(const String&, ExceptionState&); 65d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) bool parse(const UChar*& ptr, const UChar* end); 66d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) bool parse(const LChar*& ptr, const LChar* end); 67d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) 68d6cdb82654e8f3343a693ca752d5c4cee0324e17Torne (Richard Coles) virtual void add(PassRefPtrWillBeRawPtr<SVGPropertyBase>, SVGElement*) OVERRIDE; 6907a852d8c1953036774d8f3b65d18dcfea3bb4a2Ben Murdoch virtual void calculateAnimatedValue(SVGAnimationElement*, float percentage, unsigned repeatCount, PassRefPtr<SVGPropertyBase> fromValue, PassRefPtr<SVGPropertyBase> toValue, PassRefPtr<SVGPropertyBase> toAtEndOfDurationValue, SVGElement*) OVERRIDE; 7007a852d8c1953036774d8f3b65d18dcfea3bb4a2Ben Murdoch virtual float calculateDistance(PassRefPtr<SVGPropertyBase> to, SVGElement*) OVERRIDE; 71d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) 72d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) static AnimatedPropertyType classType() { return AnimatedTransformList; } 73d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) 74d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles)private: 75d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) SVGTransformList(); 76d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) 77d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) template <typename CharType> 78d5428f32f5d1719f774f62e19147104ca245a3abTorne (Richard Coles) bool parseInternal(const CharType*& ptr, const CharType* end); 795c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)}; 805c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 815c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)} // namespace WebCore 825c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 835c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)#endif // SVGTransformList_h 84