RESOLVED FIXED 227489
[Modern Media Controls] Address additional feedback on LayoutTraits refactor
https://bugs.webkit.org/show_bug.cgi?id=227489
Summary [Modern Media Controls] Address additional feedback on LayoutTraits refactor
Sam Weinig
Reported 2021-06-29 09:39:42 PDT
[Modern Media Controls] Address additional feedback on LayoutTraits refactor
Attachments
Patch (13.05 KB, patch)
2021-06-29 09:50 PDT, Sam Weinig
no flags
Patch (12.57 KB, patch)
2021-06-29 10:26 PDT, Sam Weinig
no flags
Patch (4.02 KB, patch)
2021-08-01 10:13 PDT, Sam Weinig
no flags
Sam Weinig
Comment 1 2021-06-29 09:50:42 PDT
Sam Weinig
Comment 2 2021-06-29 09:52:59 PDT
This is addressing the additional post land feedback in https://bugs.webkit.org/show_bug.cgi?id=227423. It does not address the feedback on the overridenSupportingObjectClasses() delegation point, as doing so would require some file placement factoring that seems outside the scope.
Devin Rousso
Comment 3 2021-06-29 10:15:52 PDT
Comment on attachment 432490 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=432490&action=review r=mews, nice! Thanks for making these changes :) > Source/WebCore/Modules/modern-media-controls/controls/ios-layout-traits.js:43 > + controlsAvailabilityOverride() I think this is much clearer :) > Source/WebCore/Modules/modern-media-controls/controls/layout-traits.js:98 > + FallThrough : 2, NIT: I feel like maybe `FallThrough` should be `0` so that its the only non-override (as well as being the only falsy value) > Source/WebCore/Modules/modern-media-controls/media/media-controller.js:253 > - this._supportingObjects = this._supportingObjectClasses().map(SupportClass => new SupportClass(this), this); > + this._supportingObjects = this.layoutTraits.supportingObjectClasses().map(SupportClass => new SupportClass(this), this); comment #2 suggests that you weren't going to do this. FWIW this is the idea that I had in mind, so I'm on-board with this approach if it is workable :)
Sam Weinig
Comment 4 2021-06-29 10:24:15 PDT
(In reply to Devin Rousso from comment #3) > Comment on attachment 432490 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=432490&action=review > > r=mews, nice! Thanks for making these changes :) > > > Source/WebCore/Modules/modern-media-controls/controls/ios-layout-traits.js:43 > > + controlsAvailabilityOverride() > > I think this is much clearer :) > > > Source/WebCore/Modules/modern-media-controls/controls/layout-traits.js:98 > > + FallThrough : 2, > > NIT: I feel like maybe `FallThrough` should be `0` so that its the only > non-override (as well as being the only falsy value) Ok. > > > Source/WebCore/Modules/modern-media-controls/media/media-controller.js:253 > > - this._supportingObjects = this._supportingObjectClasses().map(SupportClass => new SupportClass(this), this); > > + this._supportingObjects = this.layoutTraits.supportingObjectClasses().map(SupportClass => new SupportClass(this), this); > > comment #2 suggests that you weren't going to do this. FWIW this is the > idea that I had in mind, so I'm on-board with this approach if it is > workable :) Yeah, this is wrong. I borked the commit. Will fix.
Sam Weinig
Comment 5 2021-06-29 10:26:29 PDT
Radar WebKit Bug Importer
Comment 6 2021-07-06 09:40:33 PDT
Sam Weinig
Comment 7 2021-08-01 10:13:48 PDT
EWS
Comment 8 2021-08-02 09:38:37 PDT
Committed r280534 (240166@main): <https://commits.webkit.org/240166@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 434724 [details].
Sam Weinig
Comment 9 2021-08-02 09:53:01 PDT
(In reply to EWS from comment #8) > Committed r280534 (240166@main): <https://commits.webkit.org/240166@main> > > All reviewed patches have been landed. Closing bug and clearing flags on > attachment 434724 [details]. Well, drat. Will land the rest in new bugs.
Note You need to log in before you can comment on or make changes to this bug.