1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 05:48:12 +00:00
serenity/Userland/Libraries/LibWeb/CSS
Sam Atkins 4065eb169c LibWeb: Implement CSS parsing convenience functions
These mostly match the API in `DeprecatedCSSParser.h`. The exception is
that `parse_selector()` returns a `SelectorList` instead of just one
`Selector`. The only uses of that are in
`ParentNode::query_selector[_all]()` which should be matching against a
list, according to the spec.

`parse_html_length()` is an odd case. It's used for `width="200"` cases
in HTML, so is not really CSS related, but does produce a StyleValue.
The values allowed in `width/height` in HTML vary per element, but they
are a lot more restricted than in CSS, so it's slightly inappropriate to
use the CSS parser for them, even though it's convenient.

We also ignore a few functions:

- `parse_line_width()`
- `parse_line_style()`
- `parse_color()`

These are all only used in `StyleResolver`, when it is given a property
value as a String. That won't happen once the old parser is removed.
2021-08-02 19:01:25 +04:30
..
Parser LibWeb: Implement CSS parsing convenience functions 2021-08-02 19:01:25 +04:30
.gitignore
ComputedValues.h LibWeb: Make box-shadow known throughout the CSS subsystem 2021-07-24 22:16:48 +02:00
CSSImportRule.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
CSSImportRule.h AK: Rename adopt() to adopt_ref() 2021-04-23 16:46:57 +02:00
CSSRule.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
CSSRule.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
CSSStyleDeclaration.cpp LibWeb: Store custom properties in CSSStyleDeclaration 2021-05-28 10:45:38 +01:00
CSSStyleDeclaration.h LibWeb: Store custom properties in CSSStyleDeclaration 2021-05-28 10:45:38 +01:00
CSSStyleDeclaration.idl LibWeb: Add a CustomHasProperty trait to WrapperGenerator 2021-07-26 15:56:15 +01:00
CSSStyleRule.cpp LibWeb: Make CSS::Selector reference counted 2021-07-14 13:31:00 +02:00
CSSStyleRule.h LibWeb: Make CSS::Selector reference counted 2021-07-14 13:31:00 +02:00
CSSStyleSheet.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
CSSStyleSheet.h AK: Rename downcast<T> => verify_cast<T> 2021-06-24 19:57:01 +02:00
CSSStyleSheet.idl
Default.css LibWeb: Use -libweb-palette-base-text for text color in default CSS 2021-05-19 23:23:48 +01:00
Identifiers.json LibWeb: Resolve CSS text-decoration from value list 2021-07-22 23:09:01 +02:00
Length.cpp LibWeb: Remove unused header includes 2021-08-01 08:10:16 +02:00
Length.h LibWeb: Add calc() resolution to CSS::Length 2021-07-24 03:02:07 +04:30
LengthBox.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Properties.json LibWeb: Add box-shadow as a known ValueID 2021-07-24 22:16:48 +02:00
QuirksMode.css
Screen.cpp Everywhere: Use linusg@serenityos.org for my copyright headers 2021-04-22 22:51:19 +02:00
Screen.h AK: Rename adopt() to adopt_ref() 2021-04-23 16:46:57 +02:00
Screen.idl
Selector.cpp LibWeb: Remove unused header includes 2021-08-01 08:10:16 +02:00
Selector.h LibWeb: Make CSS 'An+B' parsing spec-compliant 2021-07-31 00:18:11 +02:00
SelectorEngine.cpp LibWeb: Fix issues with CSS attribute selector handling 2021-07-31 00:18:11 +02:00
SelectorEngine.h LibWeb: Convert CSS Dump, Selector, & SelectorEngine to east const 2021-07-14 13:31:00 +02:00
StyleInvalidator.cpp Everywhere: Use linusg@serenityos.org for my copyright headers 2021-04-22 22:51:19 +02:00
StyleInvalidator.h Everywhere: Use linusg@serenityos.org for my copyright headers 2021-04-22 22:51:19 +02:00
StyleProperties.cpp LibWeb: Remove unused header includes 2021-08-01 08:10:16 +02:00
StyleProperties.h LibWeb: Make box-shadow known throughout the CSS subsystem 2021-07-24 22:16:48 +02:00
StyleResolver.cpp LibWeb: Resolve CSS text-decoration from value list 2021-07-22 23:09:01 +02:00
StyleResolver.h LibWeb: Convert StyleResolver.{h,cpp} to east const 2021-07-22 23:09:01 +02:00
StyleSheet.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
StyleSheet.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
StyleSheet.idl
StyleSheetList.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
StyleSheetList.h AK: Rename adopt() to adopt_ref() 2021-04-23 16:46:57 +02:00
StyleSheetList.idl
StyleValue.cpp LibWeb: Add CSS ValueListStyleValue 2021-07-22 23:09:01 +02:00
StyleValue.h LibWeb: Treat CSS calc() values as "builtin_or_dynamic" 2021-07-31 00:18:11 +02:00