Commit adac9d9
Fix markerUnits=strokeWidth combined with non-scaling-stroke
https://bugs.webkit.org/show_bug.cgi?id=304893
Reviewed by Simon Fraser.
This patch aligns WebKit with Gecko / Firefox and Blink / Chromium. Additionally,
it also fixes it for both LegacySVG and Layer Based SVG engine (LBSE).
Merge: https://chromium.googlesource.com/chromium/src/+/ef238963f2eaf1add1f8c3a0b3cb20c74310e67d
When vector-effect=non-scaling-stroke applies to an element we need to
adjust the stroke width used to compute the local coordinate space for a
marker with markerUnits=strokeWidth.
This also do clean-up of removing local test in favor of WPT.
* Source/WebCore/rendering/svg/RenderSVGPath.cpp:
(WebCore::RenderSVGPath::drawMarkers):
* Source/WebCore/rendering/svg/RenderSVGShape.cpp:
(WebCore::RenderSVGShape::strokeWidthForMarkerUnits const):
* Source/WebCore/rendering/svg/RenderSVGShape.h:
* Source/WebCore/rendering/svg/legacy/LegacyRenderSVGPath.cpp:
(WebCore::LegacyRenderSVGPath::drawMarkers):
* Source/WebCore/rendering/svg/legacy/LegacyRenderSVGShape.cpp:
(WebCore::LegacyRenderSVGShape::strokeWidthForMarkerUnits const):
* Source/WebCore/rendering/svg/legacy/LegacyRenderSVGShape.h:
* LayoutTests/TestExpectations: Progression
> Clean-up (Removed Local Test):
* LayoutTests/platform/mac-sonoma-wk2-lbse-text/svg/custom/non-scaling-stroke-markers-expected.txt: Removed.
* LayoutTests/platform/mac-sonoma-wk2-pixel/svg/custom/non-scaling-stroke-markers-expected.png: Removed.
* LayoutTests/platform/mac/svg/custom/non-scaling-stroke-markers-expected.png: Removed.
* LayoutTests/svg/custom/non-scaling-stroke-markers-expected.txt: Removed.
* LayoutTests/svg/custom/non-scaling-stroke-markers.svg: Removed.
Canonical link: https://commits.webkit.org/305077@main1 parent 84eae22 commit adac9d9
File tree
12 files changed
+38
-46
lines changed- LayoutTests
- platform
- mac-sonoma-wk2-lbse-text/svg/custom
- mac-sonoma-wk2-pixel/svg/custom
- mac/svg/custom
- svg/custom
- Source/WebCore/rendering/svg
- legacy
12 files changed
+38
-46
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7638 | 7638 | | |
7639 | 7639 | | |
7640 | 7640 | | |
7641 | | - | |
7642 | 7641 | | |
7643 | 7642 | | |
7644 | 7643 | | |
| |||
Lines changed: 0 additions & 18 deletions
This file was deleted.
Binary file not shown.
Binary file not shown.
Lines changed: 0 additions & 11 deletions
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
231 | | - | |
| 231 | + | |
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
394 | 394 | | |
395 | 395 | | |
396 | 396 | | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
397 | 414 | | |
398 | 415 | | |
399 | 416 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| 114 | + | |
114 | 115 | | |
115 | 116 | | |
116 | 117 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
250 | 250 | | |
251 | 251 | | |
252 | 252 | | |
253 | | - | |
| 253 | + | |
254 | 254 | | |
255 | 255 | | |
256 | 256 | | |
| |||
0 commit comments