| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2006, 2008 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 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 visitor->trace(m_ry); | 70 visitor->trace(m_ry); |
| 71 SVGGeometryElement::trace(visitor); | 71 SVGGeometryElement::trace(visitor); |
| 72 } | 72 } |
| 73 | 73 |
| 74 DEFINE_NODE_FACTORY(SVGRectElement) | 74 DEFINE_NODE_FACTORY(SVGRectElement) |
| 75 | 75 |
| 76 Path SVGRectElement::asPath() const { | 76 Path SVGRectElement::asPath() const { |
| 77 Path path; | 77 Path path; |
| 78 | 78 |
| 79 SVGLengthContext lengthContext(this); | 79 SVGLengthContext lengthContext(this); |
| 80 ASSERT(layoutObject()); | 80 DCHECK(layoutObject()); |
| 81 const ComputedStyle& style = layoutObject()->styleRef(); | 81 const ComputedStyle& style = layoutObject()->styleRef(); |
| 82 const SVGComputedStyle& svgStyle = style.svgStyle(); | 82 const SVGComputedStyle& svgStyle = style.svgStyle(); |
| 83 | 83 |
| 84 float width = | 84 float width = |
| 85 lengthContext.valueForLength(style.width(), style, SVGLengthMode::Width); | 85 lengthContext.valueForLength(style.width(), style, SVGLengthMode::Width); |
| 86 if (width < 0) | 86 if (width < 0) |
| 87 return path; | 87 return path; |
| 88 float height = lengthContext.valueForLength(style.height(), style, | 88 float height = lengthContext.valueForLength(style.height(), style, |
| 89 SVGLengthMode::Height); | 89 SVGLengthMode::Height); |
| 90 if (height < 0) | 90 if (height < 0) |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 m_height->currentValue()->isRelative() || | 176 m_height->currentValue()->isRelative() || |
| 177 m_rx->currentValue()->isRelative() || | 177 m_rx->currentValue()->isRelative() || |
| 178 m_ry->currentValue()->isRelative(); | 178 m_ry->currentValue()->isRelative(); |
| 179 } | 179 } |
| 180 | 180 |
| 181 LayoutObject* SVGRectElement::createLayoutObject(const ComputedStyle&) { | 181 LayoutObject* SVGRectElement::createLayoutObject(const ComputedStyle&) { |
| 182 return new LayoutSVGRect(this); | 182 return new LayoutSVGRect(this); |
| 183 } | 183 } |
| 184 | 184 |
| 185 } // namespace blink | 185 } // namespace blink |
| OLD | NEW |