Bug 232646

Summary: Make scroll elasticity an enum class
Product: WebKit Reporter: Nikos Mouchtaris <nmouchtaris>
Component: New BugsAssignee: Nikos Mouchtaris <nmouchtaris>
Status: RESOLVED FIXED    
Severity: Normal CC: changseok, cmarcelo, esprehn+autocc, ews-watchlist, fred.wang, glenn, jamesr, kondapallykalyan, luiz, pdr, simon.fraser, tonikitoo, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch
none
Patch none

Nikos Mouchtaris
Reported 2021-11-02 16:48:04 PDT
Make scroll elasticity an enum class
Attachments
Patch (17.88 KB, patch)
2021-11-02 16:51 PDT, Nikos Mouchtaris
no flags
Patch (17.77 KB, patch)
2021-11-03 16:44 PDT, Nikos Mouchtaris
no flags
Patch (17.75 KB, patch)
2021-11-03 18:32 PDT, Nikos Mouchtaris
no flags
Patch (17.66 KB, patch)
2021-11-04 17:01 PDT, Nikos Mouchtaris
no flags
Patch (17.66 KB, patch)
2021-11-04 18:20 PDT, Nikos Mouchtaris
no flags
Nikos Mouchtaris
Comment 1 2021-11-02 16:51:57 PDT
Simon Fraser (smfr)
Comment 2 2021-11-02 18:46:55 PDT
Comment on attachment 443147 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=443147&action=review > Source/WebCore/page/FrameView.cpp:200 > + ScrollElasticity verticalElasticity = ScrollElasticity::None; > + ScrollElasticity horizontalElasticity = ScrollElasticity::None; You could use 'auto' here since it's now very obvious from the RHS what the values are. > Source/WebCore/page/Page.cpp:285 > + , m_verticalScrollElasticity(ScrollElasticity::Allowed) > + , m_horizontalScrollElasticity(ScrollElasticity::Allowed) No need for this since you have the initializers. > Source/WebCore/page/Page.h:1043 > - unsigned m_verticalScrollElasticity : 2; // ScrollElasticity > - unsigned m_horizontalScrollElasticity : 2; // ScrollElasticity > + ScrollElasticity m_verticalScrollElasticity { ScrollElasticity::Allowed }; > + ScrollElasticity m_horizontalScrollElasticity { ScrollElasticity::Allowed }; You've undone some memory saving bitfield stuff here; you'll now use 2 bytes instead of one. But since there are not many Page objects allocated, that's probably OK. > Source/WebCore/page/scrolling/ScrollingCoordinator.cpp:390 > + ts.dumpProperty("horizontal scroll elasticity", static_cast<int>(scrollableAreaParameters.horizontalScrollElasticity)); The ideal way to fix this would be to implement TextStream& operator<<(TextStream& ts, ScrollElasticity)
Nikos Mouchtaris
Comment 3 2021-11-03 16:44:43 PDT
Nikos Mouchtaris
Comment 4 2021-11-03 18:32:15 PDT
EWS
Comment 5 2021-11-04 16:36:44 PDT
Tools/Scripts/svn-apply failed to apply attachment 443264 [details] to trunk. Please resolve the conflicts and upload a new patch.
Nikos Mouchtaris
Comment 6 2021-11-04 17:01:08 PDT
Nikos Mouchtaris
Comment 7 2021-11-04 18:20:58 PDT
EWS
Comment 8 2021-11-05 11:46:29 PDT
Committed r285347 (243908@main): <https://commits.webkit.org/243908@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 443366 [details].
Radar WebKit Bug Importer
Comment 9 2021-11-05 11:47:21 PDT
Note You need to log in before you can comment on or make changes to this bug.