summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2022-02-21 22:27:56 +0100
committerAndreas Kling <kling@serenityos.org>2022-02-21 22:27:56 +0100
commitb45ed48ca700de6106add69b54b3590aecf01515 (patch)
tree99f24445949bfea56b6f2c87123a26e58df7658b /Userland
parent19b5033dc47694d9eda4c461501cfd5ff9df6e96 (diff)
downloadserenity-b45ed48ca700de6106add69b54b3590aecf01515.zip
LibWeb: Support CSSStyleDeclaration.cssFloat
Unlike all the other CSS properties, 'float' is special, and can only be accessed via 'cssFloat' on CSSStyleDeclaration. So this patch adds support for that. 1 point on ACID3! :^)
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Libraries/LibWeb/Bindings/CSSStyleDeclarationWrapperCustom.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/Bindings/CSSStyleDeclarationWrapperCustom.cpp b/Userland/Libraries/LibWeb/Bindings/CSSStyleDeclarationWrapperCustom.cpp
index 5d056f3d5a..d1746689b4 100644
--- a/Userland/Libraries/LibWeb/Bindings/CSSStyleDeclarationWrapperCustom.cpp
+++ b/Userland/Libraries/LibWeb/Bindings/CSSStyleDeclarationWrapperCustom.cpp
@@ -12,6 +12,10 @@ namespace Web::Bindings {
static CSS::PropertyID property_id_from_name(StringView name)
{
+ // FIXME: Perhaps this should go in the code generator.
+ if (name == "cssFloat"sv)
+ return CSS::PropertyID::Float;
+
if (auto property_id = CSS::property_id_from_camel_case_string(name); property_id != CSS::PropertyID::Invalid)
return property_id;