| 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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 // Spec: When the geometry of the applicable element has no width or height
and objectBoundingBox is specified, | 136 // Spec: When the geometry of the applicable element has no width or height
and objectBoundingBox is specified, |
| 137 // then the given effect (e.g. a gradient or a filter) will be ignored. | 137 // then the given effect (e.g. a gradient or a filter) will be ignored. |
| 138 FloatRect objectBoundingBox = object.objectBoundingBox(); | 138 FloatRect objectBoundingBox = object.objectBoundingBox(); |
| 139 if (attributes().patternUnits() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDIN
GBOX && objectBoundingBox.isEmpty()) | 139 if (attributes().patternUnits() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDIN
GBOX && objectBoundingBox.isEmpty()) |
| 140 return SVGPaintServer::invalid(); | 140 return SVGPaintServer::invalid(); |
| 141 | 141 |
| 142 PatternData* patternData = patternForLayoutObject(object); | 142 PatternData* patternData = patternForLayoutObject(object); |
| 143 if (!patternData || !patternData->pattern) | 143 if (!patternData || !patternData->pattern) |
| 144 return SVGPaintServer::invalid(); | 144 return SVGPaintServer::invalid(); |
| 145 | 145 |
| 146 patternData->pattern->setPatternSpaceTransform(patternData->transform); | 146 return SVGPaintServer(patternData->pattern, patternData->transform); |
| 147 | |
| 148 return SVGPaintServer(patternData->pattern); | |
| 149 } | 147 } |
| 150 | 148 |
| 151 const LayoutSVGResourceContainer* LayoutSVGResourcePattern::resolveContentElemen
t() const | 149 const LayoutSVGResourceContainer* LayoutSVGResourcePattern::resolveContentElemen
t() const |
| 152 { | 150 { |
| 153 ASSERT(attributes().patternContentElement()); | 151 ASSERT(attributes().patternContentElement()); |
| 154 LayoutSVGResourceContainer* expectedLayoutObject = | 152 LayoutSVGResourceContainer* expectedLayoutObject = |
| 155 toLayoutSVGResourceContainer(attributes().patternContentElement()->layou
tObject()); | 153 toLayoutSVGResourceContainer(attributes().patternContentElement()->layou
tObject()); |
| 156 // No content inheritance - avoid walking the inheritance chain. | 154 // No content inheritance - avoid walking the inheritance chain. |
| 157 if (this == expectedLayoutObject) | 155 if (this == expectedLayoutObject) |
| 158 return this; | 156 return this; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 { | 191 { |
| 194 TransformRecorder transformRecorder(pictureBuilder.context(), *patternLa
youtObject, tileTransform); | 192 TransformRecorder transformRecorder(pictureBuilder.context(), *patternLa
youtObject, tileTransform); |
| 195 for (LayoutObject* child = patternLayoutObject->firstChild(); child; chi
ld = child->nextSibling()) | 193 for (LayoutObject* child = patternLayoutObject->firstChild(); child; chi
ld = child->nextSibling()) |
| 196 SVGPaintContext::paintSubtree(pictureBuilder.context(), child); | 194 SVGPaintContext::paintSubtree(pictureBuilder.context(), child); |
| 197 } | 195 } |
| 198 | 196 |
| 199 return pictureBuilder.endRecording(); | 197 return pictureBuilder.endRecording(); |
| 200 } | 198 } |
| 201 | 199 |
| 202 } // namespace blink | 200 } // namespace blink |
| OLD | NEW |