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

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

Issue 977113003: Rename renderer() to layoutObject(). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/svg/SVGAnimateMotionElement.cpp ('k') | Source/core/svg/SVGCircleElement.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) Research In Motion Limited 2011. All rights reserved. 2 * Copyright (C) Research In Motion Limited 2011. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 24 matching lines...) Expand all
35 PassRefPtrWillBeRawPtr<SVGPropertyBase> SVGColorProperty::cloneForAnimation(cons t String&) const 35 PassRefPtrWillBeRawPtr<SVGPropertyBase> SVGColorProperty::cloneForAnimation(cons t String&) const
36 { 36 {
37 // SVGAnimatedColor is deprecated. So No SVG DOM animation. 37 // SVGAnimatedColor is deprecated. So No SVG DOM animation.
38 ASSERT_NOT_REACHED(); 38 ASSERT_NOT_REACHED();
39 return nullptr; 39 return nullptr;
40 } 40 }
41 41
42 static inline Color fallbackColorForCurrentColor(SVGElement* targetElement) 42 static inline Color fallbackColorForCurrentColor(SVGElement* targetElement)
43 { 43 {
44 ASSERT(targetElement); 44 ASSERT(targetElement);
45 if (LayoutObject* targetRenderer = targetElement->renderer()) 45 if (LayoutObject* targetRenderer = targetElement->layoutObject())
46 return targetRenderer->resolveColor(CSSPropertyColor); 46 return targetRenderer->resolveColor(CSSPropertyColor);
47 return Color::transparent; 47 return Color::transparent;
48 } 48 }
49 49
50 void SVGColorProperty::add(PassRefPtrWillBeRawPtr<SVGPropertyBase> other, SVGEle ment* contextElement) 50 void SVGColorProperty::add(PassRefPtrWillBeRawPtr<SVGPropertyBase> other, SVGEle ment* contextElement)
51 { 51 {
52 ASSERT(contextElement); 52 ASSERT(contextElement);
53 53
54 Color fallbackColor = fallbackColorForCurrentColor(contextElement); 54 Color fallbackColor = fallbackColorForCurrentColor(contextElement);
55 Color fromColor = toSVGColorProperty(other)->m_styleColor.resolve(fallbackCo lor); 55 Color fromColor = toSVGColorProperty(other)->m_styleColor.resolve(fallbackCo lor);
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 { 91 {
92 ASSERT(contextElement); 92 ASSERT(contextElement);
93 Color fallbackColor = fallbackColorForCurrentColor(contextElement); 93 Color fallbackColor = fallbackColorForCurrentColor(contextElement);
94 94
95 Color fromColor = m_styleColor.resolve(fallbackColor); 95 Color fromColor = m_styleColor.resolve(fallbackColor);
96 Color toColor = toSVGColorProperty(toValue)->m_styleColor.resolve(fallbackCo lor); 96 Color toColor = toSVGColorProperty(toValue)->m_styleColor.resolve(fallbackCo lor);
97 return ColorDistance::distance(fromColor, toColor); 97 return ColorDistance::distance(fromColor, toColor);
98 } 98 }
99 99
100 } 100 }
OLDNEW
« no previous file with comments | « Source/core/svg/SVGAnimateMotionElement.cpp ('k') | Source/core/svg/SVGCircleElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698