1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 06:17:35 +00:00

LibWeb: Ignore vendor-specific CSS properties

If we can't parse a property we previously a log-line was generated.
However it is in our best interest to simply ignore vendor-specific
properties (e.g -moz-something or -webkit-something) since they are not
part of the spec.
The vendor-specific-ness is determined by looking whether the property
starts with '-'.
If we want to support some vendor-specific stuff, this doesn't get in
the way since this check takes place after the parser determined that
the current property is invalid.
This cuts down the log-noise of the parser.
This commit is contained in:
Tobias Christiansen 2021-05-21 19:37:21 +02:00 committed by Andreas Kling
parent 229414b002
commit 66ad739934

View file

@ -793,7 +793,7 @@ public:
}
auto property_id = CSS::property_id_from_string(property_name);
if (property_id == CSS::PropertyID::Invalid) {
if (property_id == CSS::PropertyID::Invalid && !property_name.starts_with('-')) {
dbgln("CSSParser: Unrecognized property '{}'", property_name);
}
auto value = parse_css_value(m_context, property_value, property_id);