| 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) Research In Motion Limited 2010. All rights reserved. | 3 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
| 4 * Copyright 2014 The Chromium Authors. All rights reserved. | 4 * Copyright 2014 The Chromium Authors. All rights reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 attributes.viewBox(), attributes.preserveAspectRatio(), | 108 attributes.viewBox(), attributes.preserveAspectRatio(), |
| 109 tileBounds.width(), tileBounds.height()); | 109 tileBounds.width(), tileBounds.height()); |
| 110 } else { | 110 } else { |
| 111 // A viewbox overrides patternContentUnits, per spec. | 111 // A viewbox overrides patternContentUnits, per spec. |
| 112 if (attributes.patternContentUnits() == | 112 if (attributes.patternContentUnits() == |
| 113 SVGUnitTypes::kSvgUnitTypeObjectboundingbox) | 113 SVGUnitTypes::kSvgUnitTypeObjectboundingbox) |
| 114 tileTransform.scale(clientBoundingBox.width(), | 114 tileTransform.scale(clientBoundingBox.width(), |
| 115 clientBoundingBox.height()); | 115 clientBoundingBox.height()); |
| 116 } | 116 } |
| 117 | 117 |
| 118 std::unique_ptr<PatternData> patternData = wrapUnique(new PatternData); | 118 std::unique_ptr<PatternData> patternData = WTF::wrapUnique(new PatternData); |
| 119 patternData->pattern = | 119 patternData->pattern = |
| 120 Pattern::createPicturePattern(asPicture(tileBounds, tileTransform)); | 120 Pattern::createPicturePattern(asPicture(tileBounds, tileTransform)); |
| 121 | 121 |
| 122 // Compute pattern space transformation. | 122 // Compute pattern space transformation. |
| 123 patternData->transform.translate(tileBounds.x(), tileBounds.y()); | 123 patternData->transform.translate(tileBounds.x(), tileBounds.y()); |
| 124 patternData->transform.preMultiply(attributes.patternTransform()); | 124 patternData->transform.preMultiply(attributes.patternTransform()); |
| 125 | 125 |
| 126 return patternData; | 126 return patternData; |
| 127 } | 127 } |
| 128 | 128 |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 *patternLayoutObject, tileTransform); | 210 *patternLayoutObject, tileTransform); |
| 211 for (LayoutObject* child = patternLayoutObject->firstChild(); child; | 211 for (LayoutObject* child = patternLayoutObject->firstChild(); child; |
| 212 child = child->nextSibling()) | 212 child = child->nextSibling()) |
| 213 SVGPaintContext::paintSubtree(pictureBuilder.context(), child); | 213 SVGPaintContext::paintSubtree(pictureBuilder.context(), child); |
| 214 } | 214 } |
| 215 | 215 |
| 216 return pictureBuilder.endRecording(); | 216 return pictureBuilder.endRecording(); |
| 217 } | 217 } |
| 218 | 218 |
| 219 } // namespace blink | 219 } // namespace blink |
| OLD | NEW |