| 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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 } | 129 } |
| 130 | 130 |
| 131 SVGPaintServer LayoutSVGResourcePattern::preparePaintServer( | 131 SVGPaintServer LayoutSVGResourcePattern::preparePaintServer( |
| 132 const LayoutObject& object) { | 132 const LayoutObject& object) { |
| 133 clearInvalidationMask(); | 133 clearInvalidationMask(); |
| 134 | 134 |
| 135 SVGPatternElement* patternElement = toSVGPatternElement(element()); | 135 SVGPatternElement* patternElement = toSVGPatternElement(element()); |
| 136 if (!patternElement) | 136 if (!patternElement) |
| 137 return SVGPaintServer::invalid(); | 137 return SVGPaintServer::invalid(); |
| 138 | 138 |
| 139 // Validate patter DOM state before building the actual |
| 140 // pattern. This should avoid tearing down the pattern we're |
| 141 // currently working on. Preferably the state validation should have |
| 142 // no side-effects though. |
| 139 if (m_shouldCollectPatternAttributes) { | 143 if (m_shouldCollectPatternAttributes) { |
| 140 patternElement->synchronizeAnimatedSVGAttribute(anyQName()); | 144 patternElement->synchronizeAnimatedSVGAttribute(anyQName()); |
| 141 | 145 |
| 142 m_attributesWrapper->set(PatternAttributes()); | 146 m_attributesWrapper->set(PatternAttributes()); |
| 143 patternElement->collectPatternAttributes(mutableAttributes()); | 147 patternElement->collectPatternAttributes(mutableAttributes()); |
| 144 m_shouldCollectPatternAttributes = false; | 148 m_shouldCollectPatternAttributes = false; |
| 145 } | 149 } |
| 146 | 150 |
| 147 // Spec: When the geometry of the applicable element has no width or height | 151 // Spec: When the geometry of the applicable element has no width or height |
| 148 // and objectBoundingBox is specified, then the given effect (e.g. a gradient | 152 // and objectBoundingBox is specified, then the given effect (e.g. a gradient |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 tileTransform); | 216 tileTransform); |
| 213 for (LayoutObject* child = patternLayoutObject->firstChild(); child; | 217 for (LayoutObject* child = patternLayoutObject->firstChild(); child; |
| 214 child = child->nextSibling()) | 218 child = child->nextSibling()) |
| 215 SVGPaintContext::paintResourceSubtree(builder.context(), child); | 219 SVGPaintContext::paintResourceSubtree(builder.context(), child); |
| 216 } | 220 } |
| 217 | 221 |
| 218 return builder.endRecording(); | 222 return builder.endRecording(); |
| 219 } | 223 } |
| 220 | 224 |
| 221 } // namespace blink | 225 } // namespace blink |
| OLD | NEW |