[webkit-changes] [WebKit/WebKit] d47a77: Use a standard interface for all StyleColor kinds, ...
Sam Weinig
noreply at github.com
Fri May 10 12:00:18 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: d47a77a1cfa7e9f7cfee53030f702ebd659b5f54
https://github.com/WebKit/WebKit/commit/d47a77a1cfa7e9f7cfee53030f702ebd659b5f54
Author: Sam Weinig <weinig at apple.com>
Date: 2024-05-10 (Fri, 10 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
Log Message:
-----------
Use a standard interface for all StyleColor kinds, and move them each to their own file
https://bugs.webkit.org/show_bug.cgi?id=274005
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/278620@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