mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-29 20:59:00 +00:00
LibWeb: Add the clip-path
property and resolve it for SVG elements
This commit is contained in:
parent
3160733c1a
commit
03f957dc79
Notes:
sideshowbarker
2024-07-16 23:23:26 +09:00
Author: https://github.com/MacDue
Commit: 03f957dc79
Pull-request: https://github.com/SerenityOS/serenity/pull/23736
Issue: https://github.com/SerenityOS/serenity/issues/19648
Issue: https://github.com/SerenityOS/serenity/issues/23006
Reviewed-by: https://github.com/nico
6 changed files with 51 additions and 3 deletions
|
@ -193,7 +193,7 @@ bool Node::establishes_stacking_context() const
|
|||
// - perspective
|
||||
// - clip-path
|
||||
// - mask / mask-image / mask-border
|
||||
if (computed_values().mask().has_value())
|
||||
if (computed_values().mask().has_value() || computed_values().clip_path().has_value())
|
||||
return true;
|
||||
|
||||
return computed_values().opacity() < 1.0f;
|
||||
|
@ -796,6 +796,9 @@ void NodeWithStyle::apply_style(const CSS::StyleProperties& computed_style)
|
|||
if (auto mask = computed_style.property(CSS::PropertyID::Mask); mask->is_url())
|
||||
computed_values.set_mask(mask->as_url().url());
|
||||
|
||||
if (auto clip_path = computed_style.property(CSS::PropertyID::ClipPath); clip_path->is_url())
|
||||
computed_values.set_clip_path(clip_path->as_url().url());
|
||||
|
||||
if (auto fill_rule = computed_style.fill_rule(); fill_rule.has_value())
|
||||
computed_values.set_fill_rule(*fill_rule);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue