LibWeb: Make CSS property parsing case-insensitive

These are all valid:

background-COLOR: red;
Background-Color: red;
BACKGROUND-COLOR: red;
BaCkGrOuNd-CoLoR: red;
This commit is contained in:
Linus Groh 2020-05-13 17:25:56 +01:00 committed by Andreas Kling
parent 1277290a4a
commit d8cdf3f5e1
Notes: sideshowbarker 2024-07-19 06:40:25 +09:00

View file

@ -67,7 +67,7 @@ int main(int argc, char** argv)
json.as_object().for_each_member([&](auto& name, auto& value) {
ASSERT(value.is_object());
out() << " if (string == \"" << name << "\")";
out() << " if (string.equals_ignoring_case(\"" << name << "\"))";
out() << " return PropertyID::" << title_casify(name) << ";";
});