| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org> |
| 3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> |
| 4 * Copyright (C) 2007 Apple Inc. All rights reserved. | 4 * Copyright (C) 2007 Apple Inc. All rights reserved. |
| 5 * Copyright (C) Research In Motion Limited 2011. All rights reserved. | 5 * Copyright (C) Research In Motion Limited 2011. 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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 if (!context) | 187 if (!context) |
| 188 return 0; | 188 return 0; |
| 189 | 189 |
| 190 const ContainerNode* currentContext = context; | 190 const ContainerNode* currentContext = context; |
| 191 do { | 191 do { |
| 192 if (currentContext->renderer()) | 192 if (currentContext->renderer()) |
| 193 return currentContext->renderer()->style(); | 193 return currentContext->renderer()->style(); |
| 194 currentContext = currentContext->parentNode(); | 194 currentContext = currentContext->parentNode(); |
| 195 } while (currentContext); | 195 } while (currentContext); |
| 196 | 196 |
| 197 // There must be at least a RenderSVGRoot renderer, carrying a style. | 197 // There must be at least a LayoutSVGRoot renderer, carrying a style. |
| 198 ASSERT_NOT_REACHED(); | 198 ASSERT_NOT_REACHED(); |
| 199 return 0; | 199 return 0; |
| 200 } | 200 } |
| 201 | 201 |
| 202 float SVGLengthContext::convertValueFromUserUnitsToEMS(float value) const | 202 float SVGLengthContext::convertValueFromUserUnitsToEMS(float value) const |
| 203 { | 203 { |
| 204 LayoutStyle* style = layoutStyleForLengthResolving(m_context); | 204 LayoutStyle* style = layoutStyleForLengthResolving(m_context); |
| 205 if (!style) | 205 if (!style) |
| 206 return 0; | 206 return 0; |
| 207 | 207 |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 | 264 |
| 265 const SVGSVGElement& svg = toSVGSVGElement(*viewportElement); | 265 const SVGSVGElement& svg = toSVGSVGElement(*viewportElement); |
| 266 viewportSize = svg.currentViewBoxRect().size(); | 266 viewportSize = svg.currentViewBoxRect().size(); |
| 267 if (viewportSize.isEmpty()) | 267 if (viewportSize.isEmpty()) |
| 268 viewportSize = svg.currentViewportSize(); | 268 viewportSize = svg.currentViewportSize(); |
| 269 | 269 |
| 270 return true; | 270 return true; |
| 271 } | 271 } |
| 272 | 272 |
| 273 } | 273 } |
| OLD | NEW |