1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:58:12 +00:00
serenity/Meta/Lagom/Tools/CodeGenerators/LibWeb
Sam Atkins 11d3098f40 LibWeb: Generate property_accepts_value() function :^)
Previously, we have not been validating the values for CSS declarations
inside the Parser. This causes issues, since we should be discarding
invalid style declarations, so that previous ones are used instead. For
example, in this code:

```css
.foo {
  width: 2em;
  width: orange;
}
```

... the `width: orange` declaration overwrites the `width: 2em` one,
even though it is invalid. According to the spec, `width: orange` should
be rejected at parse time, and discarded, leaving `width: 2em` as the
resulting value.

Many properties (mostly shorthands) are parsed specially, and so they
are already rejected if they are invalid. But for simple properties, we
currently accept any value. With `property_accepts_value()`, we can
check if the value is valid in `parse_css_value()`, and reject it if it
is not.
2021-09-23 17:47:40 +02:00
..
CMakeLists.txt Meta: Define and use lagom_tool() CMake helper function for all Tools 2021-09-15 19:04:52 +04:30
Generate_CSS_PropertyID_cpp.cpp LibWeb: Generate property_accepts_value() function :^) 2021-09-23 17:47:40 +02:00
Generate_CSS_PropertyID_h.cpp LibWeb: Generate property_accepts_value() function :^) 2021-09-23 17:47:40 +02:00
Generate_CSS_ValueID_cpp.cpp Everywhere: Move all host tools into the Lagom/Tools subdirectory 2021-08-28 08:44:17 +01:00
Generate_CSS_ValueID_h.cpp Everywhere: Move all host tools into the Lagom/Tools subdirectory 2021-08-28 08:44:17 +01:00
WrapperGenerator.cpp LibWeb: Implement basic support for MessageChannel and MessagePort 2021-09-19 22:34:44 +02:00