RESOLVED FIXED 226730
Convert WebCore::SnapshotOptions into an enum class
https://bugs.webkit.org/show_bug.cgi?id=226730
Summary Convert WebCore::SnapshotOptions into an enum class
Devin Rousso
Reported 2021-06-07 08:36:11 PDT
.
Attachments
Patch (20.69 KB, patch)
2021-06-07 08:41 PDT, Devin Rousso
ews-feeder: commit-queue-
Patch (20.64 KB, patch)
2021-06-07 08:52 PDT, Devin Rousso
ews-feeder: commit-queue-
Patch (20.66 KB, patch)
2021-06-07 09:29 PDT, Devin Rousso
no flags
Devin Rousso
Comment 1 2021-06-07 08:41:28 PDT
Wenson Hsieh
Comment 2 2021-06-07 08:45:34 PDT
Comment on attachment 430749 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=430749&action=review r=mews > Source/WebCore/page/FrameSnapshotting.h:57 > + OptionSet<SnapshotFlags> flags = { }; Nit - you don't need the `= { }` here. > Source/WebCore/page/FrameSnapshotting.h:59 > + std::optional<PixelFormat> pixelFormat = std::nullopt; > + std::optional<DestinationColorSpace> colorSpace = std::nullopt; Ditto (don't need the `= std::nullopt`).
Devin Rousso
Comment 3 2021-06-07 08:52:29 PDT
Devin Rousso
Comment 4 2021-06-07 09:17:16 PDT
Comment on attachment 430749 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=430749&action=review >> Source/WebCore/page/FrameSnapshotting.h:59 >> + std::optional<DestinationColorSpace> colorSpace = std::nullopt; > > Ditto (don't need the `= std::nullopt`). without these I seem to be getting errors related to missing field initializers :/
Wenson Hsieh
Comment 5 2021-06-07 09:17:59 PDT
(In reply to Devin Rousso from comment #4) > Comment on attachment 430749 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=430749&action=review > > >> Source/WebCore/page/FrameSnapshotting.h:59 > >> + std::optional<DestinationColorSpace> colorSpace = std::nullopt; > > > > Ditto (don't need the `= std::nullopt`). > > without these I seem to be getting errors related to missing field > initializers :/ I see. Maybe just remove the `=` then?
Devin Rousso
Comment 6 2021-06-07 09:29:10 PDT
EWS
Comment 7 2021-06-07 11:54:02 PDT
Committed r278565 (238563@main): <https://commits.webkit.org/238563@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 430755 [details].
Radar WebKit Bug Importer
Comment 8 2021-06-07 11:55:15 PDT
Sam Weinig
Comment 9 2021-06-07 12:35:18 PDT
Comment on attachment 430755 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=430755&action=review > Source/WebCore/page/FrameSnapshotting.h:59 > + std::optional<PixelFormat> pixelFormat { }; > + std::optional<DestinationColorSpace> colorSpace { }; We've been trying to move to making these kind of parameters non-optional, as you really always need to specify them. What was the rationale here for making them optional?
Devin Rousso
Comment 10 2021-06-07 22:04:41 PDT
Comment on attachment 430755 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=430755&action=review >> Source/WebCore/page/FrameSnapshotting.h:59 >> + std::optional<DestinationColorSpace> colorSpace { }; > > We've been trying to move to making these kind of parameters non-optional, as you really always need to specify them. What was the rationale here for making them optional? Oh! I was not aware of that. I'll change these to be non-optional and specify them at callsites :) <https://webkit.org/b/226756> (Require that callsites of `SnapshotOptions` specify a `DestinationColorSpace` and `PixelFormat`)
Note You need to log in before you can comment on or make changes to this bug.