mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-24 08:59:50 +00:00
LibWeb: Use shape-rendering to control anti aliasing for SVG paths
Some checks are pending
CI / macOS, arm64, Sanitizer, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
Some checks are pending
CI / macOS, arm64, Sanitizer, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
Anti-aliasing is disabled if `shape-rendering` is set to `optimizeSpeed` or `crispEdges`.
This commit is contained in:
parent
1d745884be
commit
cfc6439c12
Notes:
github-actions[bot]
2025-08-19 08:48:50 +00:00
Author: https://github.com/tcl3
Commit: cfc6439c12
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5899
Reviewed-by: https://github.com/AtkinsSJ ✅
10 changed files with 43 additions and 4 deletions
|
|
@ -33,4 +33,12 @@ CSSPixelRect SVGPaintable::compute_absolute_rect() const
|
|||
return PaintableBox::compute_absolute_rect();
|
||||
}
|
||||
|
||||
ShouldAntiAlias SVGPaintable::should_anti_alias() const
|
||||
{
|
||||
auto shape_rendering = computed_values().shape_rendering();
|
||||
if (first_is_one_of(shape_rendering, CSS::ShapeRendering::Optimizespeed, CSS::ShapeRendering::Crispedges))
|
||||
return ShouldAntiAlias::No;
|
||||
return ShouldAntiAlias::Yes;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue