Bug 245424 - Rename unclear usage of Color::isValid() to explicit isCurrentColor()
Summary: Rename unclear usage of Color::isValid() to explicit isCurrentColor()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-09-20 06:50 PDT by Matthieu Dubet
Modified: 2022-09-20 10:27 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthieu Dubet 2022-09-20 06:50:46 PDT
Due to the representation of "current color" as "invalid color" in WebCore, they are two functionally equivalent functions is the codebase : 
- Color::isValid()
- RenderStyle::isCurrentColor(Color) (which is implemented as "return !color.isValid()).

The second one makes the intention of the check clearer and should be preferred.
Comment 1 Matthieu Dubet 2022-09-20 06:53:07 PDT
Pull request: https://github.com/WebKit/WebKit/pull/4528
Comment 2 EWS 2022-09-20 10:26:16 PDT
Committed 254683@main (0b28244472f0): <https://commits.webkit.org/254683@main>

Reviewed commits have been landed. Closing PR #4528 and removing active labels.
Comment 3 Radar WebKit Bug Importer 2022-09-20 10:27:19 PDT
<rdar://problem/100178146>