Bug 303746
| Summary: | Improve readability of StyleLogicalHeight by adopting a switch on statement. | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Karl Dubost <karlcow> |
| Component: | Tables | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | sam, webkit-bug-importer, zalan |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=155919 | ||
Karl Dubost
See Sam Weining comment on https://github.com/WebKit/WebKit/pull/54635#discussion_r2583134648
Please consider using the switchOn() form here. While a bit more verbose, I think it ends up making things more clear.
WTF::switchOn(styleLogicalHeight,
[&](const Style::PreferredSize::Fixed& fixed) {
...
},
[&](Style::IsPercentageOrCalc auto const& percentageOrCalc) {
...
},
[&](const CSS::Keyword::FitContent&) {
...
},
[&](const CSS::Keyword::WebkitFillAvailable&) {
...
},
[&](const CSS::Keyword::MinContent&) {
...
},
[&](const CSS::Keyword::MaxContent&) {
...
},
[&](const CSS::Keyword::Intrinsic&) {
...
},
[&](const CSS::Keyword::MinIntrinsic&) {
...
},
[&](const CSS::Keyword::Auto&) {
...
}
);
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/166529986>