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

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

Issue 19097005: Remove one SVG animated type special case from the bindings generator (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix the regressions Created 7 years, 5 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
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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 intrinsicSize.setHeight(floatValueForLength(intrinsicHeightAttribute , 0)); 86 intrinsicSize.setHeight(floatValueForLength(intrinsicHeightAttribute , 0));
87 if (!intrinsicSize.isEmpty()) 87 if (!intrinsicSize.isEmpty())
88 intrinsicRatio = intrinsicSize.width() / static_cast<double>(intrins icSize.height()); 88 intrinsicRatio = intrinsicSize.width() / static_cast<double>(intrins icSize.height());
89 return; 89 return;
90 } 90 }
91 91
92 // - If either/both of the ‘width’ and ‘height’ of the rootmost ‘svg’ elemen t are in percentage units (or omitted), the 92 // - If either/both of the ‘width’ and ‘height’ of the rootmost ‘svg’ elemen t are in percentage units (or omitted), the
93 // aspect ratio is calculated from the width and height values of the ‘vie wBox’ specified for the current SVG document 93 // aspect ratio is calculated from the width and height values of the ‘vie wBox’ specified for the current SVG document
94 // fragment. If the ‘viewBox’ is not correctly specified, or set to 'none' , the intrinsic aspect ratio cannot be 94 // fragment. If the ‘viewBox’ is not correctly specified, or set to 'none' , the intrinsic aspect ratio cannot be
95 // calculated and is considered unspecified. 95 // calculated and is considered unspecified.
96 intrinsicSize = svg->viewBox().size(); 96 intrinsicSize = svg->viewBoxCurrentValue().size();
97 if (!intrinsicSize.isEmpty()) { 97 if (!intrinsicSize.isEmpty()) {
98 // The viewBox can only yield an intrinsic ratio, not an intrinsic size. 98 // The viewBox can only yield an intrinsic ratio, not an intrinsic size.
99 intrinsicRatio = intrinsicSize.width() / static_cast<double>(intrinsicSi ze.height()); 99 intrinsicRatio = intrinsicSize.width() / static_cast<double>(intrinsicSi ze.height());
100 intrinsicSize = FloatSize(); 100 intrinsicSize = FloatSize();
101 return; 101 return;
102 } 102 }
103 103
104 // If our intrinsic size is in percentage units, return those to the caller through the intrinsicSize. Notify the caller 104 // If our intrinsic size is in percentage units, return those to the caller through the intrinsicSize. Notify the caller
105 // about the special situation, by setting isPercentageIntrinsicSize=true, s o it knows how to interpret the return values. 105 // about the special situation, by setting isPercentageIntrinsicSize=true, s o it knows how to interpret the return values.
106 if (intrinsicWidthAttribute.isPercent() && intrinsicHeightAttribute.isPercen t()) { 106 if (intrinsicWidthAttribute.isPercent() && intrinsicHeightAttribute.isPercen t()) {
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 { 490 {
491 RenderObject* svgRoot = resource->parent(); 491 RenderObject* svgRoot = resource->parent();
492 while (svgRoot && !svgRoot->isSVGRoot()) 492 while (svgRoot && !svgRoot->isSVGRoot())
493 svgRoot = svgRoot->parent(); 493 svgRoot = svgRoot->parent();
494 if (!svgRoot) 494 if (!svgRoot)
495 return; 495 return;
496 toRenderSVGRoot(svgRoot)->m_resourcesNeedingToInvalidateClients.add(resource ); 496 toRenderSVGRoot(svgRoot)->m_resourcesNeedingToInvalidateClients.add(resource );
497 } 497 }
498 498
499 } 499 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698