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

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

Issue 138643003: Simpler return value of HashTable::add/HashMap:add and others (Closed)
Patch Set: Daily master update (now with base url?) Created 6 years, 10 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 74
75 m_shouldCollectGradientAttributes = false; 75 m_shouldCollectGradientAttributes = false;
76 } 76 }
77 77
78 // Spec: When the geometry of the applicable element has no width or height and objectBoundingBox is specified, 78 // Spec: When the geometry of the applicable element has no width or height and objectBoundingBox is specified,
79 // then the given effect (e.g. a gradient or a filter) will be ignored. 79 // then the given effect (e.g. a gradient or a filter) will be ignored.
80 FloatRect objectBoundingBox = object->objectBoundingBox(); 80 FloatRect objectBoundingBox = object->objectBoundingBox();
81 if (gradientUnits() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX && obje ctBoundingBox.isEmpty()) 81 if (gradientUnits() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX && obje ctBoundingBox.isEmpty())
82 return false; 82 return false;
83 83
84 OwnPtr<GradientData>& gradientData = m_gradientMap.add(object, nullptr).iter ator->value; 84 OwnPtr<GradientData>& gradientData = m_gradientMap.add(object, nullptr).stor edValue->value;
85 if (!gradientData) 85 if (!gradientData)
86 gradientData = adoptPtr(new GradientData); 86 gradientData = adoptPtr(new GradientData);
87 87
88 bool isPaintingText = resourceMode & ApplyToTextMode; 88 bool isPaintingText = resourceMode & ApplyToTextMode;
89 89
90 // Create gradient object 90 // Create gradient object
91 if (!gradientData->gradient) { 91 if (!gradientData->gradient) {
92 buildGradient(gradientData.get()); 92 buildGradient(gradientData.get());
93 93
94 // We want the text bounding box applied to the gradient space transform now, so the gradient shader can use it. 94 // We want the text bounding box applied to the gradient space transform now, so the gradient shader can use it.
(...skipping 83 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 | « Source/core/rendering/shapes/ShapeInfo.h ('k') | Source/core/rendering/svg/RenderSVGResourcePattern.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698