Bug 212631 - UIColor and NSColor WebCore::Color factories should return invalid colors for nil input colors
Summary: UIColor and NSColor WebCore::Color factories should return invalid colors for...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tim Horton
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-06-02 01:59 PDT by Tim Horton
Modified: 2020-06-02 10:12 PDT (History)
5 users (show)

See Also:


Attachments
Patch (2.68 KB, patch)
2020-06-02 01:59 PDT, Tim Horton
andersca: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Horton 2020-06-02 01:59:14 PDT
UIColor and NSColor WebCore::Color factories should return invalid colors for nil input colors
Comment 1 Tim Horton 2020-06-02 01:59:36 PDT
Created attachment 400798 [details]
Patch
Comment 2 Radar WebKit Bug Importer 2020-06-02 01:59:58 PDT
<rdar://problem/63865676>
Comment 3 Anders Carlsson 2020-06-02 07:28:14 PDT
Comment on attachment 400798 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=400798&action=review

> Source/WebCore/platform/graphics/mac/ColorMac.mm:98
> +        return Color();

Can probably just return { } here.

> Source/WebCore/platform/graphics/mac/ColorMac.mm:108
> +        return Color();

Same.

> Source/WebCore/platform/ios/ColorIOS.mm:38
> +        return Color();

Same.
Comment 4 Tim Horton 2020-06-02 10:10:37 PDT
True!
Comment 5 Tim Horton 2020-06-02 10:12:03 PDT
https://trac.webkit.org/changeset/262428/webkit