mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:48:14 +00:00
LibWeb: Support more CSS image-rendering values
This patch adds support for "crisp-edges", "high-quality" and "smooth" for the CSS image-rendering property. "crisp-edges" maps to nearest-neighbor scaling for <canvas> and <img> elements, while "high-quality" and "smooth" both use bilinear blending.
This commit is contained in:
parent
fe52ee2f8e
commit
6d1a9672a4
7 changed files with 42 additions and 9 deletions
|
@ -277,8 +277,14 @@ Optional<CSS::ImageRendering> StyleProperties::image_rendering() const
|
|||
switch (value.value()->to_identifier()) {
|
||||
case CSS::ValueID::Auto:
|
||||
return CSS::ImageRendering::Auto;
|
||||
case CSS::ValueID::CrispEdges:
|
||||
return CSS::ImageRendering::CrispEdges;
|
||||
case CSS::ValueID::HighQuality:
|
||||
return CSS::ImageRendering::HighQuality;
|
||||
case CSS::ValueID::Pixelated:
|
||||
return CSS::ImageRendering::Pixelated;
|
||||
case CSS::ValueID::Smooth:
|
||||
return CSS::ImageRendering::Smooth;
|
||||
default:
|
||||
return {};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue