1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-23 19:15:07 +00:00
serenity/Userland/Libraries/LibWeb/CSS
Sam Atkins 8fd4678e79 LibWeb: Parse comma-separated lists for most background properties
We now can parse lists of values for these properties:
- `background-attachment`
- `background-clip`
- `background-image`
- `background-origin`
- `background-position`
- `background-repeat`
- `background-size`

This uses two new Parser methods:
`parse_simple_comma_separated_value_list()` for the simple case when
each value is parsed from a single token; and
`parse_comma_separated_value_list()` which takes a lambda for when
parsing each value is more involved.

This also means that any unconsumed tokens at the end will make the
parsing fail as it should, where previously we just ignored them.
2021-11-17 22:20:01 +01:00
..
Parser LibWeb: Parse comma-separated lists for most background properties 2021-11-17 22:20:01 +01:00
SyntaxHighlighter LibWeb: Implement first draft of CSS syntax highlighting :^) 2021-10-23 19:07:44 +02:00
.gitignore Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
ComputedValues.h LibWeb: Combine background-repeat-x/y pseudo-properties 2021-11-10 14:38:49 +01:00
CSSConditionRule.cpp LibWeb: Make style-rule iteration aware of CSSMediaRule 2021-10-08 23:02:57 +02:00
CSSConditionRule.h LibWeb: Make style-rule iteration aware of CSSMediaRule 2021-10-08 23:02:57 +02:00
CSSConditionRule.idl LibWeb: Add CSSConditionRule 2021-09-29 18:57:48 +02:00
CSSGroupingRule.cpp Everywhere: Pass AK::StringView by value 2021-11-11 01:27:46 +01:00
CSSGroupingRule.h Everywhere: Pass AK::StringView by value 2021-11-11 01:27:46 +01:00
CSSGroupingRule.idl LibWeb: Add CSSGroupingRule 2021-09-29 18:57:48 +02:00
CSSImportRule.cpp LibWeb: Use W3C urls for CSSOM spec links 2021-10-15 21:05:35 +01:00
CSSImportRule.h LibWeb: Resolve cyclic dependency between StyleSheet and ImportRule 2021-10-06 23:52:40 +01:00
CSSMediaRule.cpp LibWeb: Add serialization code for CSS{Media,Supports}Rule 2021-10-15 18:12:20 +01:00
CSSMediaRule.h LibWeb: Add serialization code for CSS{Media,Supports}Rule 2021-10-15 18:12:20 +01:00
CSSRule.cpp LibWeb: Use W3C urls for CSSOM spec links 2021-10-15 21:05:35 +01:00
CSSRule.h LibWeb: Implement @supports rule :^) 2021-10-08 23:02:57 +02:00
CSSRule.idl LibWeb: Implement CSSRule and CSSStyleDeclaration serialization 2021-10-01 20:17:15 +02:00
CSSRuleList.cpp LibWeb: Use W3C urls for CSSOM spec links 2021-10-15 21:05:35 +01:00
CSSRuleList.h LibWeb: Use W3C urls for CSSOM spec links 2021-10-15 21:05:35 +01:00
CSSRuleList.idl LibWeb: Make CSSRule and CSSRuleList available to JavaScript :^) 2021-09-29 21:21:57 +02:00
CSSStyleDeclaration.cpp LibWeb: Use W3C urls for CSSOM spec links 2021-10-15 21:05:35 +01:00
CSSStyleDeclaration.h LibWeb: Optimize CSS::StyleDeclaration for size 2021-10-10 13:48:04 +02:00
CSSStyleDeclaration.idl LibWeb: Support simplest form of CSSStyleDeclaration.setProperty() 2021-09-26 19:07:03 +02:00
CSSStyleRule.cpp LibWeb: Serialize selectors only in CSSStyleRule::selector_text() 2021-10-16 15:16:27 +01:00
CSSStyleRule.h LibWeb: Implement CSSRule and CSSStyleDeclaration serialization 2021-10-01 20:17:15 +02:00
CSSStyleRule.idl LibWeb: Have CSSStyleRule inherit from CSSRule in IDL 2021-10-03 16:39:17 +02:00
CSSStyleSheet.cpp LibWeb: Use W3C urls for CSSOM spec links 2021-10-15 21:05:35 +01:00
CSSStyleSheet.h LibWeb: Evaluate @media rules 2021-10-08 23:02:57 +02:00
CSSStyleSheet.idl LibWeb: Add CSSStyleSheet.{insert,delete,remove}Rule() APIs 2021-09-29 21:21:57 +02:00
CSSSupportsRule.cpp LibWeb: Add serialization code for CSS{Media,Supports}Rule 2021-10-15 18:12:20 +01:00
CSSSupportsRule.h LibWeb: Add serialization code for CSS{Media,Supports}Rule 2021-10-15 18:12:20 +01:00
Default.css LibWeb: Use -libweb-palette-base-text for text color in default CSS 2021-05-19 23:23:48 +01:00
Display.h LibWeb: Add missing headers 2021-10-20 09:20:18 +01:00
Identifiers.json LibWeb: Parse background-size property 2021-11-10 14:38:49 +01:00
Length.cpp LibWeb: Remove unused CSS::Length::relative_length_to_px(Layout::Node) 2021-10-28 18:15:15 +02:00
Length.h LibWeb: Remove unused CSS::Length::relative_length_to_px(Layout::Node) 2021-10-28 18:15:15 +02:00
LengthBox.h LibWeb: Add missing headers 2021-10-06 23:52:40 +01:00
MediaList.cpp LibWeb: Move media-query-list serialization code to MediaQuery.{h,cpp} 2021-10-15 18:12:20 +01:00
MediaList.h LibWeb: Implement MediaQuery matching :^) 2021-10-05 18:51:39 +02:00
MediaList.idl LibWeb: Add MediaList 2021-10-01 20:03:03 +02:00
MediaQuery.cpp LibWeb: Move media-query-list serialization code to MediaQuery.{h,cpp} 2021-10-15 18:12:20 +01:00
MediaQuery.h AK: Convert AK::Format formatting helpers to returning ErrorOr<void> 2021-11-17 00:21:13 +01:00
MediaQueryList.cpp LibWeb: Move media-query-list serialization code to MediaQuery.{h,cpp} 2021-10-15 18:12:20 +01:00
MediaQueryList.h LibWeb: Implement MediaQuery matching :^) 2021-10-05 18:51:39 +02:00
MediaQueryList.idl LibWeb: Implement MediaQueryList.onchange 2021-10-01 01:35:30 +01:00
MediaQueryListEvent.h LibWeb: Fire MediaQueryListEvents when an MQL's match-state changes 2021-10-05 18:51:39 +02:00
MediaQueryListEvent.idl LibWeb: Fire MediaQueryListEvents when an MQL's match-state changes 2021-10-05 18:51:39 +02:00
PreferredColorScheme.cpp LibWeb: Add Web::CSS::PreferredColorScheme enum 2021-10-31 18:39:13 +01:00
PreferredColorScheme.h LibWeb: Add Web::CSS::PreferredColorScheme enum 2021-10-31 18:39:13 +01:00
Properties.json LibWeb: Add initial values for all CSS properties 2021-11-10 21:58:14 +01:00
QuirksMode.css Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
ResolvedCSSStyleDeclaration.cpp LibWeb: Parse background-size as part of background shorthand 2021-11-10 14:38:49 +01:00
ResolvedCSSStyleDeclaration.h LibWeb: Implement CSSRule and CSSStyleDeclaration serialization 2021-10-01 20:17:15 +02:00
Screen.cpp LibWeb: Add DOM::Window::page() 2021-09-09 21:25:10 +02:00
Screen.h AK: Rename adopt() to adopt_ref() 2021-04-23 16:46:57 +02:00
Screen.idl LibWeb: Implement the Screen interface 2021-04-04 00:37:54 +02:00
Selector.cpp LibWeb: Use the serialize_a_{identifier,string} algorithms for selectors 2021-10-16 15:16:27 +01:00
Selector.h AK: Convert AK::Format formatting helpers to returning ErrorOr<void> 2021-11-17 00:21:13 +01:00
SelectorEngine.cpp Libraries: Fix -Wunreachable-code warnings from clang 2021-10-08 23:33:46 +02:00
SelectorEngine.h LibWeb: Convert CSS Dump, Selector, & SelectorEngine to east const 2021-07-14 13:31:00 +02:00
Serialize.cpp Everywhere: Pass AK::StringView by value 2021-11-11 01:27:46 +01:00
Serialize.h Everywhere: Pass AK::StringView by value 2021-11-11 01:27:46 +01:00
StyleComputer.cpp LibWeb: Make property_initial_value() return a NonnullRefPtr 2021-11-10 21:58:14 +01:00
StyleComputer.h LibWeb: Rename CSS::StyleResolver => StyleComputer 2021-09-24 15:12:15 +02:00
StyleInvalidator.cpp LibWeb: Rename CSS::StyleResolver => StyleComputer 2021-09-24 15:12:15 +02:00
StyleInvalidator.h LibWeb: Rename CSS::StyleResolver => StyleComputer 2021-09-24 15:12:15 +02:00
StyleProperties.cpp LibWeb: Store Repeat values directly in BackgroundRepeatStyleValue 2021-11-10 14:38:49 +01:00
StyleProperties.h LibWeb: Combine background-repeat-x/y pseudo-properties 2021-11-10 14:38:49 +01:00
StyleSheet.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
StyleSheet.h LibWeb: Reimplement the <style> element following the spec 2021-09-30 00:00:55 +02:00
StyleSheet.idl LibWeb: Reimplement the <style> element following the spec 2021-09-30 00:00:55 +02:00
StyleSheetList.cpp LibWeb: Use W3C urls for CSSOM spec links 2021-10-15 21:05:35 +01:00
StyleSheetList.h LibWeb: Evaluate @media rules 2021-10-08 23:02:57 +02:00
StyleSheetList.idl LibWeb: Make StyleSheetList.item an IDL getter 2021-09-29 14:57:59 +01:00
StyleValue.cpp LibWeb: Add BackgroundSizeStyleValue 2021-11-10 14:38:49 +01:00
StyleValue.h LibWeb: Parse background-size as part of background shorthand 2021-11-10 14:38:49 +01:00
Supports.cpp LibWeb: Add CSS 'Supports' class 2021-10-08 23:02:57 +02:00
Supports.h LibWeb: Add CSS 'Supports' class 2021-10-08 23:02:57 +02:00