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

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

Issue 2547053003: s/ passed(...) / WTF::passed(...) / to avoid future ambiguity w/ base::Passed. (Closed)
Patch Set: Rebasing... Created 4 years 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 // and objectBoundingBox is specified, then the given effect (e.g. a gradient 74 // and objectBoundingBox is specified, then the given effect (e.g. a gradient
75 // or a filter) will be ignored. 75 // or a filter) will be ignored.
76 FloatRect objectBoundingBox = object.objectBoundingBox(); 76 FloatRect objectBoundingBox = object.objectBoundingBox();
77 if (gradientUnits() == SVGUnitTypes::kSvgUnitTypeObjectboundingbox && 77 if (gradientUnits() == SVGUnitTypes::kSvgUnitTypeObjectboundingbox &&
78 objectBoundingBox.isEmpty()) 78 objectBoundingBox.isEmpty())
79 return SVGPaintServer::invalid(); 79 return SVGPaintServer::invalid();
80 80
81 std::unique_ptr<GradientData>& gradientData = 81 std::unique_ptr<GradientData>& gradientData =
82 m_gradientMap.add(&object, nullptr).storedValue->value; 82 m_gradientMap.add(&object, nullptr).storedValue->value;
83 if (!gradientData) 83 if (!gradientData)
84 gradientData = wrapUnique(new GradientData); 84 gradientData = WTF::wrapUnique(new GradientData);
85 85
86 // Create gradient object 86 // Create gradient object
87 if (!gradientData->gradient) { 87 if (!gradientData->gradient) {
88 gradientData->gradient = buildGradient(); 88 gradientData->gradient = buildGradient();
89 89
90 // We want the text bounding box applied to the gradient space transform 90 // We want the text bounding box applied to the gradient space transform
91 // now, so the gradient shader can use it. 91 // now, so the gradient shader can use it.
92 if (gradientUnits() == SVGUnitTypes::kSvgUnitTypeObjectboundingbox && 92 if (gradientUnits() == SVGUnitTypes::kSvgUnitTypeObjectboundingbox &&
93 !objectBoundingBox.isEmpty()) { 93 !objectBoundingBox.isEmpty()) {
94 gradientData->userspaceTransform.translate(objectBoundingBox.x(), 94 gradientData->userspaceTransform.translate(objectBoundingBox.x(),
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 return SpreadMethodReflect; 136 return SpreadMethodReflect;
137 case SVGSpreadMethodRepeat: 137 case SVGSpreadMethodRepeat:
138 return SpreadMethodRepeat; 138 return SpreadMethodRepeat;
139 } 139 }
140 140
141 ASSERT_NOT_REACHED(); 141 ASSERT_NOT_REACHED();
142 return SpreadMethodPad; 142 return SpreadMethodPad;
143 } 143 }
144 144
145 } // namespace blink 145 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698