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

Side by Side Diff: Source/core/rendering/svg/RenderSVGResourceGradient.cpp

Issue 22897011: Introduce toSVGRadialGradientElement(), and use it (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 4 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 | « no previous file | Source/core/rendering/svg/RenderSVGResourceRadialGradient.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) 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 { 55 {
56 ASSERT(object); 56 ASSERT(object);
57 ASSERT(style); 57 ASSERT(style);
58 ASSERT(context); 58 ASSERT(context);
59 ASSERT(resourceMode != ApplyToDefaultMode); 59 ASSERT(resourceMode != ApplyToDefaultMode);
60 60
61 // Be sure to synchronize all SVG properties on the gradientElement _before_ processing any further. 61 // Be sure to synchronize all SVG properties on the gradientElement _before_ processing any further.
62 // Otherwhise the call to collectGradientAttributes() in createTileImage(), may cause the SVG DOM property 62 // Otherwhise the call to collectGradientAttributes() in createTileImage(), may cause the SVG DOM property
63 // synchronization to kick in, which causes removeAllClientsFromCache() to b e called, which in turn deletes our 63 // synchronization to kick in, which causes removeAllClientsFromCache() to b e called, which in turn deletes our
64 // GradientData object! Leaving out the line below will cause svg/dynamic-up dates/SVG*GradientElement-svgdom* to crash. 64 // GradientData object! Leaving out the line below will cause svg/dynamic-up dates/SVG*GradientElement-svgdom* to crash.
65 SVGGradientElement* gradientElement = static_cast<SVGGradientElement*>(node( )); 65 SVGGradientElement* gradientElement = toSVGGradientElement(node());
66 if (!gradientElement) 66 if (!gradientElement)
67 return false; 67 return false;
68 68
69 if (m_shouldCollectGradientAttributes) { 69 if (m_shouldCollectGradientAttributes) {
70 gradientElement->synchronizeAnimatedSVGAttribute(anyQName()); 70 gradientElement->synchronizeAnimatedSVGAttribute(anyQName());
71 if (!collectGradientAttributes(gradientElement)) 71 if (!collectGradientAttributes(gradientElement))
72 return false; 72 return false;
73 73
74 m_shouldCollectGradientAttributes = false; 74 m_shouldCollectGradientAttributes = false;
75 } 75 }
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 return SpreadMethodReflect; 178 return SpreadMethodReflect;
179 case SVGSpreadMethodRepeat: 179 case SVGSpreadMethodRepeat:
180 return SpreadMethodRepeat; 180 return SpreadMethodRepeat;
181 } 181 }
182 182
183 ASSERT_NOT_REACHED(); 183 ASSERT_NOT_REACHED();
184 return SpreadMethodPad; 184 return SpreadMethodPad;
185 } 185 }
186 186
187 } 187 }
OLDNEW
« no previous file with comments | « no previous file | Source/core/rendering/svg/RenderSVGResourceRadialGradient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698