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

Unified Diff: Source/core/svg/SVGLength.h

Issue 861213003: Fix problems with flakes in SVG LayoutTests by reordering arithmetic. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rephrased comment. Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/rendering/svg/SVGTextLayoutEngineBaseline.cpp ('k') | Source/core/svg/SVGLength.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGLength.h
diff --git a/Source/core/svg/SVGLength.h b/Source/core/svg/SVGLength.h
index b7986d34dc16c64c27c43008ced8a2c3ad994e5d..41a3eb64256ffa16c811250e9208146563f79b51 100644
--- a/Source/core/svg/SVGLength.h
+++ b/Source/core/svg/SVGLength.h
@@ -69,8 +69,15 @@ public:
float valueInSpecifiedUnits() const { return m_valueInSpecifiedUnits; }
void setValueInSpecifiedUnits(float value) { m_valueInSpecifiedUnits = value; }
+ // Resolves LengthTypePercentage into a normalized floating point number (full value is 1.0).
float valueAsPercentage() const;
+ // Returns a number to be used as percentage (so full value is 100)
+ float valueAsPercentage100() const;
+
+ // Scale the input value by this SVGLength. Higher precision than input * valueAsPercentage().
+ float scaleByPercentage(float) const;
+
virtual String valueAsString() const override;
void setValueAsString(const String&, ExceptionState&);
« no previous file with comments | « Source/core/rendering/svg/SVGTextLayoutEngineBaseline.cpp ('k') | Source/core/svg/SVGLength.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698