From d4ad12bee41c501d7fab351576a3288e03327ecc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Tue, 12 Feb 2019 23:27:23 +0100 Subject: [PATCH] style: Preserve calc() rounding behavior. See the comment. I don't really this is ideal, I filed bug 1528114 to investigate changing that. Differential Revision: https://phabricator.services.mozilla.com/D19584 --- components/style/cbindgen.toml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/components/style/cbindgen.toml b/components/style/cbindgen.toml index cda462d654e..fca08a8e2ea 100644 --- a/components/style/cbindgen.toml +++ b/components/style/cbindgen.toml @@ -90,14 +90,17 @@ item_types = ["enums", "structs", "typedefs"] // Defined in nsStyleCoord.h static constexpr inline StyleLengthPercentage Zero(); static inline StyleLengthPercentage FromAppUnits(nscoord); + inline CSSCoord LengthInCSSPixels() const; + private: + inline nscoord LengthComponent() const; + public: + inline float Percentage() const; inline bool HasPercent() const; inline bool ConvertsToLength() const; inline nscoord ToLength() const; inline bool ConvertsToPercentage() const; inline bool HasLengthAndPercentage() const; inline float ToPercentage() const; - inline CSSCoord LengthInCSSPixels() const; - inline float Percentage() const; inline CSSCoord ResolveToCSSPixels(CSSCoord aPercentageBasisInCSSPixels) const; template inline CSSCoord ResolveToCSSPixelsWith(T aPercentageGetter) const; inline nscoord Resolve(nscoord aPercentageBasis) const;