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

Side by Side Diff: third_party/WebKit/Source/core/svg/SVGLengthContext.cpp

Issue 1420303002: Remove support for intrinsic and min-intrinsic (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2006 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 * Copyright (C) 2007 Apple Inc. All rights reserved. 4 * Copyright (C) 2007 Apple Inc. All rights reserved.
5 * Copyright (C) Research In Motion Limited 2011. All rights reserved. 5 * Copyright (C) Research In Motion Limited 2011. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 float SVGLengthContext::valueForLength(const Length& length, const ComputedStyle & style, float dimension) 171 float SVGLengthContext::valueForLength(const Length& length, const ComputedStyle & style, float dimension)
172 { 172 {
173 return valueForLength(length, style.effectiveZoom(), dimension); 173 return valueForLength(length, style.effectiveZoom(), dimension);
174 } 174 }
175 175
176 float SVGLengthContext::valueForLength(const Length& length, float zoom, float d imension) 176 float SVGLengthContext::valueForLength(const Length& length, float zoom, float d imension)
177 { 177 {
178 ASSERT(zoom != 0); 178 ASSERT(zoom != 0);
179 // isIntrinsic can occur for 'width' and 'height', but has no 179 // isIntrinsic can occur for 'width' and 'height', but has no
180 // real meaning for svg. 180 // real meaning for svg.
181 if (length.isIntrinsic() || length.isLegacyIntrinsic()) 181 if (length.isIntrinsic())
182 return 0; 182 return 0;
183 return floatValueForLength(length, dimension * zoom) / zoom; 183 return floatValueForLength(length, dimension * zoom) / zoom;
184 } 184 }
185 185
186 float SVGLengthContext::convertValueToUserUnits(float value, SVGLengthMode mode, SVGLengthType fromUnit) const 186 float SVGLengthContext::convertValueToUserUnits(float value, SVGLengthMode mode, SVGLengthType fromUnit) const
187 { 187 {
188 float userUnits = value; 188 float userUnits = value;
189 switch (fromUnit) { 189 switch (fromUnit) {
190 case LengthTypeUnknown: 190 case LengthTypeUnknown:
191 return 0; 191 return 0;
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 348
349 const SVGSVGElement& svg = toSVGSVGElement(*viewportElement); 349 const SVGSVGElement& svg = toSVGSVGElement(*viewportElement);
350 viewportSize = svg.currentViewBoxRect().size(); 350 viewportSize = svg.currentViewBoxRect().size();
351 if (viewportSize.isEmpty()) 351 if (viewportSize.isEmpty())
352 viewportSize = svg.currentViewportSize(); 352 viewportSize = svg.currentViewportSize();
353 353
354 return true; 354 return true;
355 } 355 }
356 356
357 } 357 }
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutDeprecatedFlexibleBox.cpp ('k') | third_party/WebKit/Source/platform/Length.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698