OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> |
3 * Copyright (C) 2004, 2005, 2007, 2008, 2009 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2007, 2008, 2009 Rob Buis <buis@kde.org> |
4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> | 4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> |
5 * Copyright (C) 2009 Google, Inc. | 5 * Copyright (C) 2009 Google, Inc. |
6 * Copyright (C) Research In Motion Limited 2011. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2011. All rights reserved. |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 return m_containerSize.height(); | 167 return m_containerSize.height(); |
168 | 168 |
169 if (style()->logicalHeight().isSpecified() || style()->logicalMaxHeight().is
Specified()) | 169 if (style()->logicalHeight().isSpecified() || style()->logicalMaxHeight().is
Specified()) |
170 return RenderReplaced::computeReplacedLogicalHeight(); | 170 return RenderReplaced::computeReplacedLogicalHeight(); |
171 | 171 |
172 if (svg->heightAttributeEstablishesViewport()) { | 172 if (svg->heightAttributeEstablishesViewport()) { |
173 Length height = svg->intrinsicHeight(SVGSVGElement::IgnoreCSSProperties)
; | 173 Length height = svg->intrinsicHeight(SVGSVGElement::IgnoreCSSProperties)
; |
174 if (height.isPercent()) { | 174 if (height.isPercent()) { |
175 RenderBlock* cb = containingBlock(); | 175 RenderBlock* cb = containingBlock(); |
176 ASSERT(cb); | 176 ASSERT(cb); |
177 while (cb->isAnonymous()) { | 177 while (cb->isAnonymous()) |
178 cb = cb->containingBlock(); | 178 cb = cb->containingBlock(); |
179 cb->addPercentHeightDescendant(const_cast<RenderSVGRoot*>(this))
; | 179 cb->addPercentHeightDescendant(const_cast<RenderSVGRoot*>(this)); |
180 } | |
181 } else | 180 } else |
182 RenderBlock::removePercentHeightDescendant(const_cast<RenderSVGRoot*
>(this)); | 181 RenderBlock::removePercentHeightDescendant(const_cast<RenderSVGRoot*
>(this)); |
183 | 182 |
184 return resolveLengthAttributeForSVG(height, style()->effectiveZoom(), co
ntainingBlock()->availableLogicalHeight(IncludeMarginBorderPadding)); | 183 return resolveLengthAttributeForSVG(height, style()->effectiveZoom(), co
ntainingBlock()->availableLogicalHeight(IncludeMarginBorderPadding)); |
185 } | 184 } |
186 | 185 |
187 // SVG embedded through object/embed/iframe. | 186 // SVG embedded through object/embed/iframe. |
188 if (isEmbeddedThroughFrameContainingSVGDocument()) | 187 if (isEmbeddedThroughFrameContainingSVGDocument()) |
189 return document().frame()->ownerRenderer()->availableLogicalHeight(Inclu
deMarginBorderPadding); | 188 return document().frame()->ownerRenderer()->availableLogicalHeight(Inclu
deMarginBorderPadding); |
190 | 189 |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
446 | 445 |
447 bool RenderSVGRoot::hasRelativeLogicalHeight() const | 446 bool RenderSVGRoot::hasRelativeLogicalHeight() const |
448 { | 447 { |
449 SVGSVGElement* svg = toSVGSVGElement(node()); | 448 SVGSVGElement* svg = toSVGSVGElement(node()); |
450 ASSERT(svg); | 449 ASSERT(svg); |
451 | 450 |
452 return svg->intrinsicHeight(SVGSVGElement::IgnoreCSSProperties).isPercent(); | 451 return svg->intrinsicHeight(SVGSVGElement::IgnoreCSSProperties).isPercent(); |
453 } | 452 } |
454 | 453 |
455 } | 454 } |
OLD | NEW |