mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-07 00:29:15 +00:00
LibWeb: Generate logical property mappings
To support this, how we declare logical property aliases has changed. Instead of `logical-alias-for` being a list of properties, it's now an object with a `group` and `mapping`. The group is the name of a logical property group in LogicalPropertyGroups.json. The mapping is which side/dimension/corner this property is. Hopefully it's self-explanatory enough. The generated code is very much a copy of what was previously in `StyleComputer::map_logical_alias_to_physical_property_id()`, so there should be no behaviour change.
This commit is contained in:
parent
4c48a51860
commit
69d4811ef7
Notes:
github-actions[bot]
2025-07-08 17:46:32 +00:00
Author: https://github.com/AtkinsSJ
Commit: 69d4811ef7
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5287
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/tcl3 ✅
9 changed files with 561 additions and 646 deletions
|
@ -131,13 +131,6 @@ public:
|
|||
static void for_each_property_expanding_shorthands(PropertyID, CSSStyleValue const&, Function<void(PropertyID, CSSStyleValue const&)> const& set_longhand_property);
|
||||
static NonnullRefPtr<CSSStyleValue const> get_inherit_value(CSS::PropertyID, DOM::Element const*, Optional<CSS::PseudoElement> = {});
|
||||
|
||||
struct LogicalAliasMappingContext {
|
||||
CSS::WritingMode writing_mode;
|
||||
CSS::Direction direction;
|
||||
// TODO: text-orientation
|
||||
};
|
||||
static PropertyID map_logical_alias_to_physical_property_id(PropertyID, LogicalAliasMappingContext);
|
||||
|
||||
static Optional<String> user_agent_style_sheet_source(StringView name);
|
||||
|
||||
explicit StyleComputer(DOM::Document&);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue