Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(47)

Side by Side Diff: Source/core/rendering/svg/RenderSVGRoot.cpp

Issue 99663004: Avoid layout/full-repaint on view height change if possible (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Avoid hang in seamless frames Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/rendering/RenderView.cpp ('k') | Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderView.cpp ('k') | Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698