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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 return m_containerSize.height(); | 166 return m_containerSize.height(); |
167 | 167 |
168 if (style()->logicalHeight().isSpecified() || style()->logicalMaxHeight().is
Specified()) | 168 if (style()->logicalHeight().isSpecified() || style()->logicalMaxHeight().is
Specified()) |
169 return RenderReplaced::computeReplacedLogicalHeight(); | 169 return RenderReplaced::computeReplacedLogicalHeight(); |
170 | 170 |
171 if (svg->heightAttributeEstablishesViewport()) { | 171 if (svg->heightAttributeEstablishesViewport()) { |
172 Length height = svg->intrinsicHeight(SVGSVGElement::IgnoreCSSProperties)
; | 172 Length height = svg->intrinsicHeight(SVGSVGElement::IgnoreCSSProperties)
; |
173 if (height.isPercent()) { | 173 if (height.isPercent()) { |
174 RenderBlock* cb = containingBlock(); | 174 RenderBlock* cb = containingBlock(); |
175 ASSERT(cb); | 175 ASSERT(cb); |
176 while (cb->isAnonymous()) { | 176 while (cb->isAnonymous()) |
177 cb = cb->containingBlock(); | 177 cb = cb->containingBlock(); |
178 cb->addPercentHeightDescendant(const_cast<RenderSVGRoot*>(this))
; | 178 cb->addPercentHeightDescendant(const_cast<RenderSVGRoot*>(this)); |
179 } | |
180 } else | 179 } else |
181 RenderBlock::removePercentHeightDescendant(const_cast<RenderSVGRoot*
>(this)); | 180 RenderBlock::removePercentHeightDescendant(const_cast<RenderSVGRoot*
>(this)); |
182 | 181 |
183 return resolveLengthAttributeForSVG(height, style()->effectiveZoom(), co
ntainingBlock()->availableLogicalHeight(IncludeMarginBorderPadding), view()); | 182 return resolveLengthAttributeForSVG(height, style()->effectiveZoom(), co
ntainingBlock()->availableLogicalHeight(IncludeMarginBorderPadding), view()); |
184 } | 183 } |
185 | 184 |
186 // SVG embedded through object/embed/iframe. | 185 // SVG embedded through object/embed/iframe. |
187 if (isEmbeddedThroughFrameContainingSVGDocument()) | 186 if (isEmbeddedThroughFrameContainingSVGDocument()) |
188 return document().frame()->ownerRenderer()->availableLogicalHeight(Inclu
deMarginBorderPadding); | 187 return document().frame()->ownerRenderer()->availableLogicalHeight(Inclu
deMarginBorderPadding); |
189 | 188 |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
445 | 444 |
446 bool RenderSVGRoot::hasRelativeLogicalHeight() const | 445 bool RenderSVGRoot::hasRelativeLogicalHeight() const |
447 { | 446 { |
448 SVGSVGElement* svg = toSVGSVGElement(node()); | 447 SVGSVGElement* svg = toSVGSVGElement(node()); |
449 ASSERT(svg); | 448 ASSERT(svg); |
450 | 449 |
451 return svg->intrinsicHeight(SVGSVGElement::IgnoreCSSProperties).isPercent(); | 450 return svg->intrinsicHeight(SVGSVGElement::IgnoreCSSProperties).isPercent(); |
452 } | 451 } |
453 | 452 |
454 } | 453 } |
OLD | NEW |