RESOLVED FIXED 228130
[css-logical] Simplify logical property groups
https://bugs.webkit.org/show_bug.cgi?id=228130
Summary [css-logical] Simplify logical property groups
Oriol Brufau
Reported 2021-07-20 15:58:44 PDT
Currently, makeprop.pl has my %resolverKinds = ( "logical" => { "block" => "axis", "inline" => "axis", "block-start" => "side", "block-end" => "side", "inline-start" => "side", "inline-end" => "side", "start-start" => "corner", "start-end" => "corner", "end-start" => "corner", "end-end" => "corner", }, "physical" => { "horizontal" => "axis", "vertical" => "axis", "top" => "side", "right" => "side", "bottom" => "side", "left" => "side", "top-left" => "corner", "top-right" => "corner", "bottom-right" => "corner", "bottom-left" => "corner", }, ); So many repeated values, it would be better to structure it like: my %logicalPropertyResolvers = ( "logical" => { "axis" => ["inline", "block"], "side" => ["block-start", "inline-end", "block-end", "inline-start"], "corner" => ["start-start", "start-end", "end-start", "end-end"], }, "physical" => { "axis" => ["horizontal", "vertical"], "side" => ["top", "right", "bottom", "left"], "corner" => ["top-left", "top-right", "bottom-right", "bottom-left"], }, ); And this would avoid having to hardcode the lists in this other piece of code: if ($kind eq "side") { @physicals = ("top", "right", "bottom", "left"); } elsif ($kind eq "corner") { @physicals = ("top-left", "top-right", "bottom-right", "bottom-left"); } elsif ($kind eq "axis") { @physicals = ("horizontal", "vertical"); }
Attachments
Patch (6.64 KB, patch)
2021-07-20 16:02 PDT, Oriol Brufau
no flags
Patch (6.66 KB, patch)
2022-01-17 11:33 PST, Oriol Brufau
no flags
Oriol Brufau
Comment 1 2021-07-20 16:02:05 PDT
Radar WebKit Bug Importer
Comment 2 2021-07-27 15:59:21 PDT
Oriol Brufau
Comment 3 2022-01-17 11:33:13 PST
Oriol Brufau
Comment 4 2022-01-17 16:06:33 PST
Antti, can you take a look? Not urgent.
Antti Koivisto
Comment 5 2022-01-17 23:31:02 PST
Comment on attachment 449343 [details] Patch rs=me
EWS
Comment 6 2022-01-18 04:29:53 PST
Committed r288114 (246128@main): <https://commits.webkit.org/246128@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 449343 [details].
Note You need to log in before you can comment on or make changes to this bug.