| OLD | NEW |
| 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 | 72 |
| 73 // Spec: When the geometry of the applicable element has no width or height | 73 // Spec: When the geometry of the applicable element has no width or height |
| 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.insert(&object, nullptr).storedValue->value; |
| 83 if (!gradientData) | 83 if (!gradientData) |
| 84 gradientData = WTF::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 && |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| OLD | NEW |