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

Side by Side Diff: Source/core/svg/SVGAnimateMotionElement.cpp

Issue 18278003: Introduce isSVGFontElement() and isSVGImageElement(), and use them (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 5 months 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
« no previous file with comments | « Source/core/rendering/HitTestResult.cpp ('k') | Source/core/svg/SVGElement.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> 2 * Copyright (C) 2007 Eric Seidel <eric@webkit.org>
3 * Copyright (C) 2007 Rob Buis <buis@kde.org> 3 * Copyright (C) 2007 Rob Buis <buis@kde.org>
4 * Copyright (C) 2008 Apple Inc. All rights reserved. 4 * Copyright (C) 2008 Apple Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 11 matching lines...) Expand all
22 #include "config.h" 22 #include "config.h"
23 23
24 #include "core/svg/SVGAnimateMotionElement.h" 24 #include "core/svg/SVGAnimateMotionElement.h"
25 25
26 #include "SVGNames.h" 26 #include "SVGNames.h"
27 #include "core/platform/graphics/transforms/AffineTransform.h" 27 #include "core/platform/graphics/transforms/AffineTransform.h"
28 #include "core/rendering/RenderObject.h" 28 #include "core/rendering/RenderObject.h"
29 #include "core/rendering/svg/RenderSVGResource.h" 29 #include "core/rendering/svg/RenderSVGResource.h"
30 #include "core/rendering/svg/SVGPathData.h" 30 #include "core/rendering/svg/SVGPathData.h"
31 #include "core/svg/SVGElementInstance.h" 31 #include "core/svg/SVGElementInstance.h"
32 #include "core/svg/SVGImageElement.h"
32 #include "core/svg/SVGMPathElement.h" 33 #include "core/svg/SVGMPathElement.h"
33 #include "core/svg/SVGParserUtilities.h" 34 #include "core/svg/SVGParserUtilities.h"
34 #include "core/svg/SVGPathElement.h" 35 #include "core/svg/SVGPathElement.h"
35 #include "core/svg/SVGPathUtilities.h" 36 #include "core/svg/SVGPathUtilities.h"
36 #include <wtf/MathExtras.h> 37 #include <wtf/MathExtras.h>
37 #include <wtf/StdLibExtras.h> 38 #include <wtf/StdLibExtras.h>
38 39
39 namespace WebCore { 40 namespace WebCore {
40 41
41 using namespace SVGNames; 42 using namespace SVGNames;
(...skipping 19 matching lines...) Expand all
61 return false; 62 return false;
62 63
63 // We don't have a special attribute name to verify the animation type. Chec k the element name instead. 64 // We don't have a special attribute name to verify the animation type. Chec k the element name instead.
64 if (!targetElement->isSVGGraphicsElement()) 65 if (!targetElement->isSVGGraphicsElement())
65 return false; 66 return false;
66 // Spec: SVG 1.1 section 19.2.15 67 // Spec: SVG 1.1 section 19.2.15
67 // FIXME: svgTag is missing. Needs to be checked, if transforming <svg> coul d cause problems. 68 // FIXME: svgTag is missing. Needs to be checked, if transforming <svg> coul d cause problems.
68 if (targetElement->hasTagName(gTag) 69 if (targetElement->hasTagName(gTag)
69 || targetElement->hasTagName(defsTag) 70 || targetElement->hasTagName(defsTag)
70 || targetElement->hasTagName(useTag) 71 || targetElement->hasTagName(useTag)
71 || targetElement->hasTagName(SVGNames::imageTag) 72 || isSVGImageElement(targetElement)
72 || targetElement->hasTagName(switchTag) 73 || targetElement->hasTagName(switchTag)
73 || targetElement->hasTagName(pathTag) 74 || targetElement->hasTagName(pathTag)
74 || targetElement->hasTagName(rectTag) 75 || targetElement->hasTagName(rectTag)
75 || targetElement->hasTagName(circleTag) 76 || targetElement->hasTagName(circleTag)
76 || targetElement->hasTagName(ellipseTag) 77 || targetElement->hasTagName(ellipseTag)
77 || targetElement->hasTagName(lineTag) 78 || targetElement->hasTagName(lineTag)
78 || targetElement->hasTagName(polylineTag) 79 || targetElement->hasTagName(polylineTag)
79 || targetElement->hasTagName(polygonTag) 80 || targetElement->hasTagName(polygonTag)
80 || targetElement->hasTagName(textTag) 81 || targetElement->hasTagName(textTag)
81 || targetElement->hasTagName(clipPathTag) 82 || targetElement->hasTagName(clipPathTag)
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 336
336 void SVGAnimateMotionElement::updateAnimationMode() 337 void SVGAnimateMotionElement::updateAnimationMode()
337 { 338 {
338 if (!m_animationPath.isEmpty()) 339 if (!m_animationPath.isEmpty())
339 setAnimationMode(PathAnimation); 340 setAnimationMode(PathAnimation);
340 else 341 else
341 SVGAnimationElement::updateAnimationMode(); 342 SVGAnimationElement::updateAnimationMode();
342 } 343 }
343 344
344 } 345 }
OLDNEW
« no previous file with comments | « Source/core/rendering/HitTestResult.cpp ('k') | Source/core/svg/SVGElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698