mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 18:17:22 +02: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:
Notes:
sideshowbarker
2024-07-17 17:51:23 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/6d1a9672a4
@@ -363,8 +363,14 @@ static CSS::ValueID to_css_value_id(CSS::ImageRendering value)
|
||||
switch (value) {
|
||||
case ImageRendering::Auto:
|
||||
return CSS::ValueID::Auto;
|
||||
case ImageRendering::CrispEdges:
|
||||
return CSS::ValueID::CrispEdges;
|
||||
case ImageRendering::HighQuality:
|
||||
return CSS::ValueID::HighQuality;
|
||||
case ImageRendering::Pixelated:
|
||||
return CSS::ValueID::Pixelated;
|
||||
case ImageRendering::Smooth:
|
||||
return CSS::ValueID::Smooth;
|
||||
}
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user