summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/StylePropertiesModel.cpp
diff options
context:
space:
mode:
authorSam Atkins <atkinssj@gmail.com>2021-07-30 17:48:23 +0100
committerAli Mohammad Pur <Ali.mpfard@gmail.com>2021-08-02 19:01:25 +0430
commit4065eb169c9d1e1ab4ec1f42291360b493e73c29 (patch)
tree1eb82ab4b056fa1b675ca524da1047aed2e3719b /Userland/Libraries/LibWeb/StylePropertiesModel.cpp
parenteadcdd21e3367f4a3c0a4376099fca69d856b37c (diff)
downloadserenity-4065eb169c9d1e1ab4ec1f42291360b493e73c29.zip
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.
Diffstat (limited to 'Userland/Libraries/LibWeb/StylePropertiesModel.cpp')
0 files changed, 0 insertions, 0 deletions