diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:34:42 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:34:42 +0000 |
commit | da4c7e7ed675c3bf405668739c3012d140856109 (patch) | |
tree | cdd868dba063fecba609a1d819de271f0d51b23e /servo/ports/geckolib/cbindgen.toml | |
parent | Adding upstream version 125.0.3. (diff) | |
download | firefox-da4c7e7ed675c3bf405668739c3012d140856109.tar.xz firefox-da4c7e7ed675c3bf405668739c3012d140856109.zip |
Adding upstream version 126.0.upstream/126.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'servo/ports/geckolib/cbindgen.toml')
-rw-r--r-- | servo/ports/geckolib/cbindgen.toml | 39 |
1 files changed, 28 insertions, 11 deletions
diff --git a/servo/ports/geckolib/cbindgen.toml b/servo/ports/geckolib/cbindgen.toml index 8e6818e421..3edab4dfbb 100644 --- a/servo/ports/geckolib/cbindgen.toml +++ b/servo/ports/geckolib/cbindgen.toml @@ -51,6 +51,7 @@ derive_neq = true "feature = servo" = "CBINDGEN_IS_SERVO" "feature = servo-layout-2013" = "CBINDGEN_IS_SERVO" "feature = servo-layout-2020" = "CBINDGEN_IS_SERVO" +"feature = track_alloc_size" = "CBINDGEN_IS_SERVO" # These will always be defined. "feature = gecko" = "CBINDGEN_IS_GECKO" "feature = cbindgen" = "CBINDGEN_IS_GECKO" @@ -214,6 +215,7 @@ include = [ "BasicShape", "InsetRect", "ShapeRadius", + "ShapeCommand", "ArcSlice", "ForgottenArcSlicePtr", "HeaderWithLength", @@ -366,7 +368,8 @@ renaming_overrides_prefixing = true "CalcLengthPercentage" = """ inline CSSCoord ResolveToCSSPixels(CSSCoord aBasis) const; - inline nscoord Resolve(nscoord aBasis) const; + template<typename Rounder> + inline nscoord Resolve(nscoord aBasis, Rounder) const; """ "GenericCalcNode" = """ @@ -427,10 +430,10 @@ renaming_overrides_prefixing = true inline bool IsDefinitelyZero() const; inline CSSCoord ResolveToCSSPixels(CSSCoord aPercentageBasisInCSSPixels) const; template<typename T> inline CSSCoord ResolveToCSSPixelsWith(T aPercentageGetter) const; - template<typename T, typename PercentRounder> - inline nscoord Resolve(T aPercentageGetter, PercentRounder) const; - template<typename PercentRounder> - inline nscoord Resolve(nscoord aPercentageBasis, PercentRounder) const; + template<typename T, typename Rounder> + inline nscoord Resolve(T aPercentageGetter, Rounder) const; + template<typename Rounder> + inline nscoord Resolve(nscoord aPercentageBasis, Rounder) const; template<typename T> inline nscoord Resolve(T aPercentageGetter) const; inline nscoord Resolve(nscoord aPercentageBasis) const; """ @@ -757,9 +760,11 @@ renaming_overrides_prefixing = true } """ -"CoordPair" = """ - explicit StyleCoordPair(const gfx::Point& aPoint): x(aPoint.x), y(aPoint.y) {} - gfx::Point ConvertsToGfxPoint() const { return gfx::Point(x, y); } +"CoordinatePair" = """ + inline gfx::Point ToGfxPoint(const CSSSize* aBasis = nullptr) const; + gfx::Point ToGfxPoint(const CSSSize& aBasis) const { + return ToGfxPoint(&aBasis); + }; """ "TextOverflow" = """ @@ -1035,12 +1040,19 @@ renaming_overrides_prefixing = true // Return true if the <basic-shape> is path(). bool IsPath() const { - return IsOffsetPath() && AsOffsetPath().path->IsShape() && - AsOffsetPath().path->AsShape().IsPath(); + if (!IsOffsetPath()) { + return false; + } + const auto& path = AsOffsetPath().path; + if (!path->IsShape()) { + return false; + } + const auto& shape = path->AsShape(); + return shape.IsPathOrShape() && shape.AsPathOrShape().IsPath(); } const StyleSVGPathData& AsSVGPathData() const { - return AsOffsetPath().path->AsShape().AsPath().path; + return AsOffsetPath().path->AsShape().AsPathOrShape().AsPath().path; } // Return true if this is "<basic-shape> || <coord-box>". @@ -1049,6 +1061,11 @@ renaming_overrides_prefixing = true } """ +"GenericShapeCommand" = """ + bool IsCubicType() const { return IsCubicCurve() || IsSmoothCubic(); } + bool IsQuadraticType() const { return IsQuadCurve() || IsSmoothQuad(); } +""" + "GenericContainIntrinsicSize" = """ bool HasAuto() const { return IsAutoLength() || IsAutoNone(); } """ |