Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 387ee066cbef9b469bffbd369fd21f5ea4d3d1a9
https://github.com/WebKit/WebKit/commit/387ee066cbef9b469bffbd369fd21f5ea4d3d1a9
Author: Bartosz Moczulski <[email protected]>
Date: 2024-11-06 (Wed, 06 Nov 2024)
Changed paths:
M Source/WebCore/platform/graphics/ColorSerialization.cpp
Log Message:
-----------
Add explicit Color constructor to disambiguate type
https://bugs.webkit.org/show_bug.cgi?id=282038
Reviewed by Elliott Williams.
With UnifiedSources `--max-bundle-size` set to 16 it is possible that
BifurcatedGraphicsContext.cpp is bundled in a single compilation unit
with ColorSerialization.cpp, in which case StyleColor.h will become
unintentionally included in the latter file.
StyleColor.h contains additional overload of `serializationForCSS()`
function which may be ambiguous with the static one defined locally in
ColorSerialization.cpp. In one place in ColorSerialization.cpp implicit
conversion was used so far to call the static version of this function.
To disambiguate the two overloads explicit conversion is added.
Error:
In file included from
[...]/WebCore/DerivedSources/unified-sources/UnifiedSource-3c72abbe-13.cpp:16:
[...]/Source/WebCore/platform/graphics/ColorSerialization.cpp: In function
‘WTF::String WebCore::serializationForHTML(SRGBA<unsigned char>, bool)’:
[...]/Source/WebCore/platform/graphics/ColorSerialization.cpp:607:31:
error: call of overloaded ‘serializationForCSS(WebCore::SRGBA<unsigned char>&)’
is ambiguous
607 | return serializationForCSS(color);
| ~~~~~~~~~~~~~~~~~~~^~~~~~~
In file included from
[...]/Source/WebCore/rendering/style/ScrollbarColor.h:28,
from [...]/Source/WebCore/platform/ScrollableArea.h:35,
from
[...]/Source/WebCore/platform/graphics/GraphicsLayer.h:46,
from
[...]/Source/WebCore/platform/graphics/GraphicsLayerContentsDisplayDelegate.h:28,
from
[...]/Source/WebCore/platform/graphics/ImageBufferBackend.h:31,
from
[...]/Source/WebCore/platform/graphics/ImageBuffer.h:31,
from
[...]/Source/WebCore/platform/graphics/SourceImage.h:28,
from [...]/Source/WebCore/platform/graphics/Pattern.h:31,
from
[...]/Source/WebCore/platform/graphics/SourceBrush.h:30,
from
[...]/Source/WebCore/platform/graphics/GraphicsContextState.h:30,
from
[...]/Source/WebCore/platform/graphics/GraphicsContext.h:35,
from
[...]/Source/WebCore/platform/graphics/BifurcatedGraphicsContext.h:28,
from
[...]/Source/WebCore/platform/graphics/BifurcatedGraphicsContext.cpp:27,
from
[...]/WebCore/DerivedSources/unified-sources/UnifiedSource-3c72abbe-13.cpp:3:
[...]/Source/WebCore/css/color/StyleColor.h:174:23: note: candidate:
‘WTF::String WebCore::serializationForCSS(const StyleColor&)’
174 | WEBCORE_EXPORT String serializationForCSS(const StyleColor&);
| ^~~~~~~~~~~~~~~~~~~
[...]/Source/WebCore/platform/graphics/ColorSerialization.cpp:136:8: note:
candidate: ‘WTF::String WebCore::serializationForCSS(const Color&)’
136 | String serializationForCSS(const Color& color)
| ^~~~~~~~~~~~~~~~~~~
* Source/WebCore/platform/graphics/ColorSerialization.cpp:
(WebCore::serializationForHTML):
Canonical link: https://commits.webkit.org/286227@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes