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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 StyleChangeReasonForTracing::fromAttribute(attrName)); | 126 StyleChangeReasonForTracing::fromAttribute(attrName)); |
127 } | 127 } |
128 | 128 |
129 bool isLengthAttribute = isPresentationLengthAttribute | 129 bool isLengthAttribute = isPresentationLengthAttribute |
130 || attrName == SVGNames::widthAttr | 130 || attrName == SVGNames::widthAttr |
131 || attrName == SVGNames::heightAttr; | 131 || attrName == SVGNames::heightAttr; |
132 | 132 |
133 if (isLengthAttribute) | 133 if (isLengthAttribute) |
134 updateRelativeLengthsInformation(); | 134 updateRelativeLengthsInformation(); |
135 | 135 |
136 LayoutSVGShape* renderer = toLayoutSVGShape(this->renderer()); | 136 LayoutSVGShape* renderer = toLayoutSVGShape(this->layoutObject()); |
137 if (!renderer) | 137 if (!renderer) |
138 return; | 138 return; |
139 | 139 |
140 if (isLengthAttribute) { | 140 if (isLengthAttribute) { |
141 renderer->setNeedsShapeUpdate(); | 141 renderer->setNeedsShapeUpdate(); |
142 markForLayoutAndParentResourceInvalidation(renderer); | 142 markForLayoutAndParentResourceInvalidation(renderer); |
143 return; | 143 return; |
144 } | 144 } |
145 | 145 |
146 ASSERT_NOT_REACHED(); | 146 ASSERT_NOT_REACHED(); |
147 } | 147 } |
148 | 148 |
149 bool SVGRectElement::selfHasRelativeLengths() const | 149 bool SVGRectElement::selfHasRelativeLengths() const |
150 { | 150 { |
151 return m_x->currentValue()->isRelative() | 151 return m_x->currentValue()->isRelative() |
152 || m_y->currentValue()->isRelative() | 152 || m_y->currentValue()->isRelative() |
153 || m_width->currentValue()->isRelative() | 153 || m_width->currentValue()->isRelative() |
154 || m_height->currentValue()->isRelative() | 154 || m_height->currentValue()->isRelative() |
155 || m_rx->currentValue()->isRelative() | 155 || m_rx->currentValue()->isRelative() |
156 || m_ry->currentValue()->isRelative(); | 156 || m_ry->currentValue()->isRelative(); |
157 } | 157 } |
158 | 158 |
159 LayoutObject* SVGRectElement::createLayoutObject(const LayoutStyle&) | 159 LayoutObject* SVGRectElement::createLayoutObject(const LayoutStyle&) |
160 { | 160 { |
161 return new LayoutSVGRect(this); | 161 return new LayoutSVGRect(this); |
162 } | 162 } |
163 | 163 |
164 } // namespace blink | 164 } // namespace blink |
OLD | NEW |