Summary: | canonicalUnitTypeForCategory should handle percent category | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Antti Koivisto <koivisto> | ||||||||||
Component: | CSS | Assignee: | Antti Koivisto <koivisto> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Normal | CC: | commit-queue, esprehn+autocc, ews-watchlist, glenn, gyuyoung.kim, macpherson, menard, ntim, philn, webkit-bug-importer | ||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||
Version: | WebKit Nightly Build | ||||||||||||
Hardware: | Unspecified | ||||||||||||
OS: | Unspecified | ||||||||||||
Bug Depends on: | 249131, 249132 | ||||||||||||
Bug Blocks: | 189692 | ||||||||||||
Attachments: |
|
Description
Antti Koivisto
2022-12-11 13:08:02 PST
Created attachment 463989 [details]
Patch
Created attachment 463990 [details]
Patch
Created attachment 464000 [details]
Patch
Comment on attachment 464000 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=464000&action=review > Source/WebCore/css/typedom/CSSUnitValue.cpp:161 > auto canonicalUnit = [] (CSSUnitType unit) { > - // FIXME: We probably want to change the definition of canonicalUnitTypeForCategory so this lambda isn't necessary. > - auto category = unitCategory(unit); > - switch (category) { > - case CSSUnitCategory::Percent: > - return CSSUnitType::CSS_PERCENTAGE; > - case CSSUnitCategory::Flex: > - return CSSUnitType::CSS_FR; > - default: > - break; > - } > - auto result = canonicalUnitTypeForCategory(category); > + auto result = canonicalUnitTypeForUnitType(unit); > return result == CSSUnitType::CSS_UNKNOWN ? unit : result; > } (m_unit); Do we really need this lambda? Can we just call `canonicalUnitTypeForUnitType` directly ? Created attachment 464002 [details]
Patch for landing
Committed 257716@main (f23f94eab4ca): <https://commits.webkit.org/257716@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 464002 [details]. Re-opened since this is blocked by bug 249131 Manually reverted, see https://bugs.webkit.org/show_bug.cgi?id=249133 Revert no longer needed. |