[webkit-reviews] review granted: [Bug 237100] Restrict supported image decoding types when in CaptivePortal mode : [Attachment 453023] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Feb 23 15:01:29 PST 2022
Darin Adler <darin at apple.com> has granted Brent Fulgham <bfulgham at webkit.org>'s
request for review:
Bug 237100: Restrict supported image decoding types when in CaptivePortal mode
https://bugs.webkit.org/show_bug.cgi?id=237100
Attachment 453023: Patch
https://bugs.webkit.org/attachment.cgi?id=453023&action=review
--- Comment #4 from Darin Adler <darin at apple.com> ---
Comment on attachment 453023
--> https://bugs.webkit.org/attachment.cgi?id=453023
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=453023&action=review
> Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm:248
> +#if HAVE(CGIMAGESOURCE_WITH_SET_ALLOWABLE_TYPES)
> +static NSArray *UTITypes()
> +{
> + return @[@"public.jpeg",
> + @"public.png",
> + @"org.webmproject.webp",
> + @"com.compuserve.gif",
> + ];
> +}
> +#endif
Does not seem like we need a separate function for this.
NSArray *types = @[
@"public.jpeg",
@"public.png",
@"org.webmproject.webp",
@"com.compuserve.gif",
];
auto status = CGImageSourceSetAllowableTypes(bridge_cast(types));
Could even use auto or constexpr.
> Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm:255
> +#if HAVE(CGIMAGESOURCE_WITH_SET_ALLOWABLE_TYPES)
I think we should format the #if differently. Strange to just check the boolean
and then do nothing, so maybe we can put more of the function inside the #if,
or put the #if at the call site too.
More information about the webkit-reviews
mailing list