WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
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-
Details
Formatted Diff
Diff
Patch
(20.64 KB, patch)
2021-06-07 08:52 PDT
,
Devin Rousso
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
Patch
(20.66 KB, patch)
2021-06-07 09:29 PDT
,
Devin Rousso
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Devin Rousso
Comment 1
2021-06-07 08:41:28 PDT
Created
attachment 430749
[details]
Patch
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
Created
attachment 430751
[details]
Patch
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
Created
attachment 430755
[details]
Patch
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
<
rdar://problem/78956259
>
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.
Top of Page
Format For Printing
XML
Clone This Bug