1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:38:11 +00:00

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! :^)
This commit is contained in:
Andreas Kling 2022-02-21 22:27:56 +01:00
parent 19b5033dc4
commit b45ed48ca7

View file

@ -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;