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

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

Issue 2623513005: Introduce Element::AttributeModificationParams (Closed)
Patch Set: Created 3 years, 11 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
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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 64
65 DEFINE_NODE_FACTORY(SVGAnimateMotionElement) 65 DEFINE_NODE_FACTORY(SVGAnimateMotionElement)
66 66
67 SVGAnimateMotionElement::~SVGAnimateMotionElement() {} 67 SVGAnimateMotionElement::~SVGAnimateMotionElement() {}
68 68
69 bool SVGAnimateMotionElement::hasValidTarget() { 69 bool SVGAnimateMotionElement::hasValidTarget() {
70 return SVGAnimationElement::hasValidTarget() && 70 return SVGAnimationElement::hasValidTarget() &&
71 targetCanHaveMotionTransform(*targetElement()); 71 targetCanHaveMotionTransform(*targetElement());
72 } 72 }
73 73
74 void SVGAnimateMotionElement::parseAttribute(const QualifiedName& name, 74 void SVGAnimateMotionElement::parseAttribute(
75 const AtomicString& oldValue, 75 const AttributeModificationParams& params) {
76 const AtomicString& value) { 76 if (params.name == SVGNames::pathAttr) {
77 if (name == SVGNames::pathAttr) {
78 m_path = Path(); 77 m_path = Path();
79 buildPathFromString(value, m_path); 78 buildPathFromString(params.newValue, m_path);
80 updateAnimationPath(); 79 updateAnimationPath();
81 return; 80 return;
82 } 81 }
83 82
84 SVGAnimationElement::parseAttribute(name, oldValue, value); 83 SVGAnimationElement::parseAttribute(params);
85 } 84 }
86 85
87 SVGAnimateMotionElement::RotateMode SVGAnimateMotionElement::getRotateMode() 86 SVGAnimateMotionElement::RotateMode SVGAnimateMotionElement::getRotateMode()
88 const { 87 const {
89 DEFINE_STATIC_LOCAL(const AtomicString, autoVal, ("auto")); 88 DEFINE_STATIC_LOCAL(const AtomicString, autoVal, ("auto"));
90 DEFINE_STATIC_LOCAL(const AtomicString, autoReverse, ("auto-reverse")); 89 DEFINE_STATIC_LOCAL(const AtomicString, autoReverse, ("auto-reverse"));
91 const AtomicString& rotate = getAttribute(SVGNames::rotateAttr); 90 const AtomicString& rotate = getAttribute(SVGNames::rotateAttr);
92 if (rotate == autoVal) 91 if (rotate == autoVal)
93 return RotateAuto; 92 return RotateAuto;
94 if (rotate == autoReverse) 93 if (rotate == autoReverse)
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 LayoutObject& object) { 299 LayoutObject& object) {
301 object.setNeedsTransformUpdate(); 300 object.setNeedsTransformUpdate();
302 if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) { 301 if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) {
303 // The transform paint property relies on the SVG transform value. 302 // The transform paint property relies on the SVG transform value.
304 object.setNeedsPaintPropertyUpdate(); 303 object.setNeedsPaintPropertyUpdate();
305 } 304 }
306 markForLayoutAndParentResourceInvalidation(&object); 305 markForLayoutAndParentResourceInvalidation(&object);
307 } 306 }
308 307
309 } // namespace blink 308 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698