summaryrefslogtreecommitdiffstats
path: root/servo/ports/geckolib/cbindgen.toml
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:35:49 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:35:49 +0000
commitd8bbc7858622b6d9c278469aab701ca0b609cddf (patch)
treeeff41dc61d9f714852212739e6b3738b82a2af87 /servo/ports/geckolib/cbindgen.toml
parentReleasing progress-linux version 125.0.3-1~progress7.99u1. (diff)
downloadfirefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.tar.xz
firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.zip
Merging upstream version 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.toml39
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(); }
"""