Summary: | [css-cascade] makeprop.pl should sort deferred properties at the end | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Oriol Brufau <obrufau> | ||||||||||
Component: | CSS | Assignee: | Oriol Brufau <obrufau> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Normal | CC: | darin, esprehn+autocc, ews-watchlist, glenn, gyuyoung.kim, joepeck, koivisto, macpherson, menard, simon.fraser, webkit-bug-importer | ||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||
Version: | WebKit Nightly Build | ||||||||||||
Hardware: | Unspecified | ||||||||||||
OS: | Unspecified | ||||||||||||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=238888 | ||||||||||||
Bug Depends on: | 238350 | ||||||||||||
Bug Blocks: | 238260 | ||||||||||||
Attachments: |
|
Description
Oriol Brufau
2022-03-24 13:06:36 PDT
Since this is a generated file, I suggest we generate first/last constants for each section. first/lastCSSProperty first/lastHighPriorityCSSProperty first/lastLowPriorityCSSProperty first/lastDeferredCSSProperty That way, most code that wants to make checks can be written without depending on the ordering at all; the few places that do depend on the ordering can be written in the clearest fashion possible. Somewhere we could even put functions so we don't have to use these constants directly so often: bool isHighPriority(CSSPropertyID); bool isLowPriority(CSSPropertyID); bool isDeferred(CSSPropertyID); Or whatever predicates we need. I think it helps when code can write such things so they read cleanly even if they are just expanding to < and > checks. Yes, actually StyleBuilder.cpp already has static const CSSPropertyID firstLowPriorityProperty = static_cast<CSSPropertyID>(lastHighPriorityProperty + 1); Created attachment 455784 [details]
Patch
Created attachment 455785 [details]
Patch for EWS
Created attachment 455789 [details]
Patch
Created attachment 455791 [details]
Patch for EWS
Committed r292639 (249459@main): <https://commits.webkit.org/249459@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 455789 [details]. |