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

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

Issue 2007553002: Retire setGradientSpaceTransform, setPatternSpaceTransform (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fmalita discovers SkMatrix::I() Created 4 years, 6 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) 2006 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> 3 * Copyright (C) 2008 Eric Seidel <eric@webkit.org>
4 * Copyright (C) 2008 Dirk Schulze <krit@webkit.org> 4 * Copyright (C) 2008 Dirk Schulze <krit@webkit.org>
5 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 5 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 86
87 AffineTransform gradientTransform; 87 AffineTransform gradientTransform;
88 calculateGradientTransform(gradientTransform); 88 calculateGradientTransform(gradientTransform);
89 89
90 gradientData->userspaceTransform *= gradientTransform; 90 gradientData->userspaceTransform *= gradientTransform;
91 } 91 }
92 92
93 if (!gradientData->gradient) 93 if (!gradientData->gradient)
94 return SVGPaintServer::invalid(); 94 return SVGPaintServer::invalid();
95 95
96 gradientData->gradient->setGradientSpaceTransform(gradientData->userspaceTra nsform); 96 return SVGPaintServer(gradientData->gradient, gradientData->userspaceTransfo rm);
97
98 return SVGPaintServer(gradientData->gradient);
99 } 97 }
100 98
101 bool LayoutSVGResourceGradient::isChildAllowed(LayoutObject* child, const Comput edStyle&) const 99 bool LayoutSVGResourceGradient::isChildAllowed(LayoutObject* child, const Comput edStyle&) const
102 { 100 {
103 if (child->isSVGGradientStop()) 101 if (child->isSVGGradientStop())
104 return true; 102 return true;
105 103
106 if (!child->isSVGResourceContainer()) 104 if (!child->isSVGResourceContainer())
107 return false; 105 return false;
108 106
(...skipping 18 matching lines...) Expand all
127 return SpreadMethodReflect; 125 return SpreadMethodReflect;
128 case SVGSpreadMethodRepeat: 126 case SVGSpreadMethodRepeat:
129 return SpreadMethodRepeat; 127 return SpreadMethodRepeat;
130 } 128 }
131 129
132 ASSERT_NOT_REACHED(); 130 ASSERT_NOT_REACHED();
133 return SpreadMethodPad; 131 return SpreadMethodPad;
134 } 132 }
135 133
136 } // namespace blink 134 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698