mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 13:19:05 +00:00
LibWeb: Add support for CSS image-rendering property
Currently only "auto" and "pixelated" values are supported.
This commit is contained in:
parent
246b42b635
commit
3e1c1c0b16
Notes:
sideshowbarker
2024-07-17 18:32:59 +09:00
Author: https://github.com/sppmacd
Commit: 3e1c1c0b16
Pull-request: https://github.com/SerenityOS/serenity/pull/12620
Reviewed-by: https://github.com/AtkinsSJ ✅
11 changed files with 73 additions and 1 deletions
|
@ -269,6 +269,21 @@ float StyleProperties::flex_shrink() const
|
|||
return value.value()->to_number();
|
||||
}
|
||||
|
||||
Optional<CSS::ImageRendering> StyleProperties::image_rendering() const
|
||||
{
|
||||
auto value = property(CSS::PropertyID::ImageRendering);
|
||||
if (!value.has_value())
|
||||
return {};
|
||||
switch (value.value()->to_identifier()) {
|
||||
case CSS::ValueID::Auto:
|
||||
return CSS::ImageRendering::Auto;
|
||||
case CSS::ValueID::Pixelated:
|
||||
return CSS::ImageRendering::Pixelated;
|
||||
default:
|
||||
return {};
|
||||
}
|
||||
}
|
||||
|
||||
Optional<CSS::JustifyContent> StyleProperties::justify_content() const
|
||||
{
|
||||
auto value = property(CSS::PropertyID::JustifyContent);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue