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

Side by Side Diff: third_party/WebKit/WebCore/svg/SVGSVGElement.cpp

Issue 21184: WebKit merge 40722:40785 (part 1) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 10 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, 2006 Nikolas Zimmermann <zimmermann@kde.org> 2 Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org>
3 2004, 2005, 2006, 2007, 2008 Rob Buis <buis@kde.org> 3 2004, 2005, 2006, 2007, 2008 Rob Buis <buis@kde.org>
4 2007 Apple Inc. All rights reserved. 4 2007 Apple Inc. All rights reserved.
5 5
6 This library is free software; you can redistribute it and/or 6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public 7 modify it under the terms of the GNU Library General Public
8 License as published by the Free Software Foundation; either 8 License as published by the Free Software Foundation; either
9 version 2 of the License, or (at your option) any later version. 9 version 2 of the License, or (at your option) any later version.
10 10
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 double _y = 0.0; 118 double _y = 0.0;
119 if (!isOutermostSVG()) { 119 if (!isOutermostSVG()) {
120 _x = x().value(this); 120 _x = x().value(this);
121 _y = y().value(this); 121 _y = y().value(this);
122 } 122 }
123 float w = width().value(this); 123 float w = width().value(this);
124 float h = height().value(this); 124 float h = height().value(this);
125 TransformationMatrix viewBox = viewBoxToViewTransform(w, h); 125 TransformationMatrix viewBox = viewBoxToViewTransform(w, h);
126 double wDouble = w; 126 double wDouble = w;
127 double hDouble = h; 127 double hDouble = h;
128 viewBox.map(_x, _y, &_x, &_y); 128 viewBox.map(_x, _y, _x, _y);
129 viewBox.map(w, h, &wDouble, &hDouble); 129 viewBox.map(w, h, wDouble, hDouble);
130 return FloatRect::narrowPrecision(_x, _y, wDouble, hDouble); 130 return FloatRect::narrowPrecision(_x, _y, wDouble, hDouble);
131 } 131 }
132 132
133 int SVGSVGElement::relativeWidthValue() const 133 int SVGSVGElement::relativeWidthValue() const
134 { 134 {
135 SVGLength w = width(); 135 SVGLength w = width();
136 if (w.unitType() != LengthTypePercentage) 136 if (w.unitType() != LengthTypePercentage)
137 return 0; 137 return 0;
138 138
139 return static_cast<int>(w.valueAsPercentage() * m_containerSize.width()); 139 return static_cast<int>(w.valueAsPercentage() * m_containerSize.width());
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
530 { 530 {
531 unpauseAnimations(); 531 unpauseAnimations();
532 } 532 }
533 533
534 } 534 }
535 535
536 #endif // ENABLE(SVG) 536 #endif // ENABLE(SVG)
537 537
538 // vim:ts=4:noet 538 // vim:ts=4:noet
539 539
OLDNEW
« no previous file with comments | « third_party/WebKit/WebCore/svg/SVGPreserveAspectRatio.cpp ('k') | third_party/WebKit/WebCore/svg/SVGTransform.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698