Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(443)

Side by Side Diff: third_party/WebKit/Source/core/svg/SVGTransformList.cpp

Issue 1412123015: Replace open-coded toSVG<type> with DEFINE_SVG_PROPERTY_TYPE_CASTS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org>
4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> 4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org>
5 * Copyright (C) 2008 Apple Inc. All rights reserved. 5 * Copyright (C) 2008 Apple Inc. All rights reserved.
6 * Copyright (C) Research In Motion Limited 2012. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2012. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 17 matching lines...) Expand all
28 #include "core/SVGNames.h" 28 #include "core/SVGNames.h"
29 #include "core/svg/SVGAnimateTransformElement.h" 29 #include "core/svg/SVGAnimateTransformElement.h"
30 #include "core/svg/SVGAnimatedNumber.h" 30 #include "core/svg/SVGAnimatedNumber.h"
31 #include "core/svg/SVGParserUtilities.h" 31 #include "core/svg/SVGParserUtilities.h"
32 #include "core/svg/SVGTransformDistance.h" 32 #include "core/svg/SVGTransformDistance.h"
33 #include "wtf/text/StringBuilder.h" 33 #include "wtf/text/StringBuilder.h"
34 #include "wtf/text/WTFString.h" 34 #include "wtf/text/WTFString.h"
35 35
36 namespace blink { 36 namespace blink {
37 37
38 inline PassRefPtrWillBeRawPtr<SVGTransformList> toSVGTransformList(PassRefPtrWil lBeRawPtr<SVGPropertyBase> passBase) 38 DEFINE_SVG_PROPERTY_TYPE_CASTS(SVGTransformList);
39 {
40 RefPtrWillBeRawPtr<SVGPropertyBase> base = passBase;
41 ASSERT(base->type() == SVGTransformList::classType());
42 return static_pointer_cast<SVGTransformList>(base.release());
43 }
44 39
45 SVGTransformList::SVGTransformList() 40 SVGTransformList::SVGTransformList()
46 { 41 {
47 } 42 }
48 43
49 SVGTransformList::~SVGTransformList() 44 SVGTransformList::~SVGTransformList()
50 { 45 {
51 } 46 }
52 47
53 PassRefPtrWillBeRawPtr<SVGTransform> SVGTransformList::consolidate() 48 PassRefPtrWillBeRawPtr<SVGTransform> SVGTransformList::consolidate()
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 if (at(0)->transformType() == toList->at(0)->transformType()) 340 if (at(0)->transformType() == toList->at(0)->transformType())
346 return -1; 341 return -1;
347 342
348 // Spec: http://www.w3.org/TR/SVG/animate.html#complexDistances 343 // Spec: http://www.w3.org/TR/SVG/animate.html#complexDistances
349 // Paced animations assume a notion of distance between the various animatio n values defined by the 'to', 'from', 'by' and 'values' attributes. 344 // Paced animations assume a notion of distance between the various animatio n values defined by the 'to', 'from', 'by' and 'values' attributes.
350 // Distance is defined only for scalar types (such as <length>), colors and the subset of transformation types that are supported by 'animateTransform'. 345 // Distance is defined only for scalar types (such as <length>), colors and the subset of transformation types that are supported by 'animateTransform'.
351 return SVGTransformDistance(at(0), toList->at(0)).distance(); 346 return SVGTransformDistance(at(0), toList->at(0)).distance();
352 } 347 }
353 348
354 } 349 }
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGString.h ('k') | third_party/WebKit/Source/core/svg/properties/SVGProperty.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698