[webkit-changes] [WebKit/WebKit] 794b34: Re-land "Use a standard interface for all StyleCol...
Sam Weinig
noreply at github.com
Sat May 11 07:24:55 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 794b345789d622c60a60e4b29b264c838b177279
https://github.com/WebKit/WebKit/commit/794b345789d622c60a60e4b29b264c838b177279
Author: Sam Weinig <weinig at apple.com>
Date: 2024-05-11 (Sat, 11 May 2024)
Changed paths:
M Source/WebCore/Headers.cmake
M Source/WebCore/Sources.txt
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
R Source/WebCore/css/StyleColor.cpp
R Source/WebCore/css/StyleColor.h
M Source/WebCore/css/color/CSSColorDescriptors.h
M Source/WebCore/css/color/CSSColorMixSerialization.h
A Source/WebCore/css/color/StyleAbsoluteColor.cpp
A Source/WebCore/css/color/StyleAbsoluteColor.h
A Source/WebCore/css/color/StyleColor.cpp
A Source/WebCore/css/color/StyleColor.h
A Source/WebCore/css/color/StyleColorMix.cpp
A Source/WebCore/css/color/StyleColorMix.h
A Source/WebCore/css/color/StyleCurrentColor.cpp
A Source/WebCore/css/color/StyleCurrentColor.h
M Source/WebCore/css/parser/CSSPropertyParserConsumer+None.cpp
M Source/WebCore/css/parser/CSSPropertyParserConsumer+NoneDefinitions.h
Log Message:
-----------
Re-land "Use a standard interface for all StyleColor kinds, and move them each to their own file"
https://bugs.webkit.org/show_bug.cgi?id=274029
Reviewed by Matthieu Dubet and Tim Nguyen.
In preparation for adding support for relative colors to StyleColor, this
change adds explicit types for each StyleColor kind and gives each their own
files. This allows the implementation of StyleColor itself to be very simple,
just dispatching to whatever kind is resident in the variant.
The one complication here is that StyleColorMix (and any relative color
support type in the future), wants to have a StyleColor as a member, creating
a recursive relationship. This means we have be very careful not to instantiate
the ColorKind variant in the StyleColor header at all, as it would lead to
undefined type compile errors. Instead, we out-of-line all the operations.
With a bunch of StyleColor related files now existing, they also all got
moved to the color subdirectory.
* Source/WebCore/Headers.cmake:
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
- Added new files, updated for file moves.
* Source/WebCore/css/color/CSSColorDescriptors.h:
- Add missing #include.
* Source/WebCore/css/color/CSSColorMixSerialization.h:
- Updated #include to use new StyleColorMix header.
* Source/WebCore/css/color/StyleAbsoluteColor.cpp: Added.
* Source/WebCore/css/color/StyleAbsoluteColor.h: Added.
- Added. Simple wrapper around a Color.
* Source/WebCore/css/color/StyleColor.cpp: Renamed from Source/WebCore/css/StyleColor.cpp.
* Source/WebCore/css/color/StyleColor.h: Renamed from Source/WebCore/css/StyleColor.h.
- Moved. Updated to out-of-line all uses of ColorKind
and use generic dispatch in all possible places.
* Source/WebCore/css/color/StyleColorMix.cpp: Added.
* Source/WebCore/css/color/StyleColorMix.h: Added.
- Moved from StyleColor.h/cpp
* Source/WebCore/css/color/StyleCurrentColor.cpp: Added.
* Source/WebCore/css/color/StyleCurrentColor.h: Added.
- Moved from StyleColor.h/cpp
Canonical link: https://commits.webkit.org/278652@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list