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
This commit is contained in:
Emilio Cobos Álvarez 2019-02-12 23:27:23 +01:00
parent f7a59bf0ee
commit d4ad12bee4

View file

@ -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<typename T> inline CSSCoord ResolveToCSSPixelsWith(T aPercentageGetter) const;
inline nscoord Resolve(nscoord aPercentageBasis) const;