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

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

Issue 1743863002: Rename enums/functions that collide in chromium style in core/svg,xml (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: get-names-10: rebase Created 4 years, 9 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) 2004, 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2006 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 Apple Inc. All rights reserved. 4 * Copyright (C) 2007 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 } 105 }
106 106
107 void SVGRect::add(PassRefPtrWillBeRawPtr<SVGPropertyBase> other, SVGElement*) 107 void SVGRect::add(PassRefPtrWillBeRawPtr<SVGPropertyBase> other, SVGElement*)
108 { 108 {
109 m_value += toSVGRect(other)->value(); 109 m_value += toSVGRect(other)->value();
110 } 110 }
111 111
112 void SVGRect::calculateAnimatedValue(SVGAnimationElement* animationElement, floa t percentage, unsigned repeatCount, PassRefPtrWillBeRawPtr<SVGPropertyBase> from Value, PassRefPtrWillBeRawPtr<SVGPropertyBase> toValue, PassRefPtrWillBeRawPtr<S VGPropertyBase> toAtEndOfDurationValue, SVGElement*) 112 void SVGRect::calculateAnimatedValue(SVGAnimationElement* animationElement, floa t percentage, unsigned repeatCount, PassRefPtrWillBeRawPtr<SVGPropertyBase> from Value, PassRefPtrWillBeRawPtr<SVGPropertyBase> toValue, PassRefPtrWillBeRawPtr<S VGPropertyBase> toAtEndOfDurationValue, SVGElement*)
113 { 113 {
114 ASSERT(animationElement); 114 ASSERT(animationElement);
115 RefPtrWillBeRawPtr<SVGRect> fromRect = animationElement->animationMode() == ToAnimation ? PassRefPtrWillBeRawPtr<SVGRect>(this) : toSVGRect(fromValue); 115 RefPtrWillBeRawPtr<SVGRect> fromRect = animationElement->getAnimationMode() == ToAnimation ? PassRefPtrWillBeRawPtr<SVGRect>(this) : toSVGRect(fromValue);
116 RefPtrWillBeRawPtr<SVGRect> toRect = toSVGRect(toValue); 116 RefPtrWillBeRawPtr<SVGRect> toRect = toSVGRect(toValue);
117 RefPtrWillBeRawPtr<SVGRect> toAtEndOfDurationRect = toSVGRect(toAtEndOfDurat ionValue); 117 RefPtrWillBeRawPtr<SVGRect> toAtEndOfDurationRect = toSVGRect(toAtEndOfDurat ionValue);
118 118
119 float animatedX = x(); 119 float animatedX = x();
120 float animatedY = y(); 120 float animatedY = y();
121 float animatedWidth = width(); 121 float animatedWidth = width();
122 float animatedHeight = height(); 122 float animatedHeight = height();
123 animationElement->animateAdditiveNumber(percentage, repeatCount, fromRect->x (), toRect->x(), toAtEndOfDurationRect->x(), animatedX); 123 animationElement->animateAdditiveNumber(percentage, repeatCount, fromRect->x (), toRect->x(), toAtEndOfDurationRect->x(), animatedX);
124 animationElement->animateAdditiveNumber(percentage, repeatCount, fromRect->y (), toRect->y(), toAtEndOfDurationRect->y(), animatedY); 124 animationElement->animateAdditiveNumber(percentage, repeatCount, fromRect->y (), toRect->y(), toAtEndOfDurationRect->y(), animatedY);
125 animationElement->animateAdditiveNumber(percentage, repeatCount, fromRect->w idth(), toRect->width(), toAtEndOfDurationRect->width(), animatedWidth); 125 animationElement->animateAdditiveNumber(percentage, repeatCount, fromRect->w idth(), toRect->width(), toAtEndOfDurationRect->width(), animatedWidth);
126 animationElement->animateAdditiveNumber(percentage, repeatCount, fromRect->h eight(), toRect->height(), toAtEndOfDurationRect->height(), animatedHeight); 126 animationElement->animateAdditiveNumber(percentage, repeatCount, fromRect->h eight(), toRect->height(), toAtEndOfDurationRect->height(), animatedHeight);
127 127
128 m_value = FloatRect(animatedX, animatedY, animatedWidth, animatedHeight); 128 m_value = FloatRect(animatedX, animatedY, animatedWidth, animatedHeight);
129 } 129 }
130 130
131 float SVGRect::calculateDistance(PassRefPtrWillBeRawPtr<SVGPropertyBase> to, SVG Element* contextElement) 131 float SVGRect::calculateDistance(PassRefPtrWillBeRawPtr<SVGPropertyBase> to, SVG Element* contextElement)
132 { 132 {
133 // FIXME: Distance calculation is not possible for SVGRect right now. We nee d the distance for every single value. 133 // FIXME: Distance calculation is not possible for SVGRect right now. We nee d the distance for every single value.
134 return -1; 134 return -1;
135 } 135 }
136 136
137 void SVGRect::setInvalid() 137 void SVGRect::setInvalid()
138 { 138 {
139 m_value = FloatRect(0.0f, 0.0f, 0.0f, 0.0f); 139 m_value = FloatRect(0.0f, 0.0f, 0.0f, 0.0f);
140 m_isValid = false; 140 m_isValid = false;
141 } 141 }
142 142
143 } // namespace blink 143 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGPointList.cpp ('k') | third_party/WebKit/Source/core/svg/SVGTransformList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698