diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:35:49 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:35:49 +0000 |
commit | d8bbc7858622b6d9c278469aab701ca0b609cddf (patch) | |
tree | eff41dc61d9f714852212739e6b3738b82a2af87 /dom/svg/SVGPathData.h | |
parent | Releasing progress-linux version 125.0.3-1~progress7.99u1. (diff) | |
download | firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.tar.xz firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.zip |
Merging upstream version 126.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/svg/SVGPathData.h')
-rw-r--r-- | dom/svg/SVGPathData.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/dom/svg/SVGPathData.h b/dom/svg/SVGPathData.h index 4aa60de3cb..e06e669706 100644 --- a/dom/svg/SVGPathData.h +++ b/dom/svg/SVGPathData.h @@ -17,13 +17,13 @@ #include "mozilla/gfx/Types.h" #include "mozilla/MemoryReporting.h" #include "mozilla/RefPtr.h" +#include "mozilla/ServoStyleConsts.h" #include "nsTArray.h" #include <string.h> namespace mozilla { -struct StylePathCommand; struct SVGMark; enum class StyleStrokeLinecap : uint8_t; @@ -190,14 +190,22 @@ class SVGPathData { Span<const StylePathCommand> aPath); /** - * This function tries to build the path from an array of StylePathCommand, + * This function tries to build the path from an array of GenericShapeCommand, * which is generated by cbindgen from Rust (see ServoStyleConsts.h). * Basically, this is a variant of the above BuildPath() functions. + * Note: |StylePathCommand| doesn't accept percentage values, so its |aBasis| + * is empty by default. */ static already_AddRefed<Path> BuildPath( Span<const StylePathCommand> aPath, PathBuilder* aBuilder, StyleStrokeLinecap aStrokeLineCap, Float aStrokeWidth, - const gfx::Point& aOffset = gfx::Point(), float aZoomFactor = 1.0); + const CSSSize& aBasis = {}, const gfx::Point& aOffset = gfx::Point(), + float aZoomFactor = 1.0); + static already_AddRefed<Path> BuildPath( + Span<const StyleShapeCommand> aShape, PathBuilder* aBuilder, + StyleStrokeLinecap aStrokeLineCap, Float aStrokeWidth, + const CSSSize& aBasis, const gfx::Point& aOffset = gfx::Point(), + float aZoomFactor = 1.0); const_iterator begin() const { return mData.Elements(); } const_iterator end() const { return mData.Elements() + mData.Length(); } |