Title: [264311] trunk
Revision
264311
Author
[email protected]
Date
2020-07-13 12:42:46 -0700 (Mon, 13 Jul 2020)

Log Message

Replace single argument makeSimpleColor uses with their implementation
https://bugs.webkit.org/show_bug.cgi?id=214240

Reviewed by Darin Adler.

Source/WebCore:

Remove makeSimpleColor overloads that took SRGBA<uint8_t> and SRGBA<float>:
- makeSimpleColor(SRGBA<uint8_t>) was a no-op, so is replaced with nothing.
- makeSimpleColor(SRGBA<float>) is replaced by the function it called, convertToComponentBytes().

* css/StyleColor.cpp:
(WebCore::StyleColor::colorFromKeyword):
* css/parser/CSSPropertyParserHelpers.cpp:
(WebCore::CSSPropertyParserHelpers::parseHSLParameters):
* editing/cocoa/DataDetection.mm:
(WebCore::DataDetection::detectContentInRange):
* html/canvas/CanvasRenderingContext2DBase.cpp:
(WebCore::CanvasRenderingContext2DBase::setShadow):
* html/canvas/CanvasStyle.cpp:
(WebCore::CanvasStyle::CanvasStyle):
(WebCore::CanvasStyle::isEquivalent const):
* platform/graphics/Color.cpp:
(WebCore::Color::lightened const):
(WebCore::Color::darkened const):
* platform/graphics/SimpleColor.h:
* platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
(WebCore::makeSimpleColorFromARGBCFArray):
* platform/graphics/filters/FilterOperations.cpp:
(WebCore::FilterOperations::transformColor const):
(WebCore::FilterOperations::inverseTransformColor const):
* platform/graphics/mac/ColorMac.mm:
(WebCore::makeSimpleColorFromNSColor):
(WebCore::colorFromNSColor):
(WebCore::semanticColorFromNSColor):
* platform/graphics/win/PlatformContextDirect2D.cpp:
(WebCore::PlatformContextDirect2D::brushWithColor):
* platform/ios/ColorIOS.mm:
(WebCore::colorFromUIColor):

Source/WebKit:

* UIProcess/API/wpe/WebKitColor.cpp:
(webkitColorToWebCoreColor):
Replace makeSimpleColor with convertToComponentBytes.

Tools:

* TestWebKitAPI/Tests/WebCore/ColorTests.cpp:
(TestWebKitAPI::TEST):
Replace makeSimpleColor with convertToComponentBytes.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (264310 => 264311)


--- trunk/Source/WebCore/ChangeLog	2020-07-13 19:16:25 UTC (rev 264310)
+++ trunk/Source/WebCore/ChangeLog	2020-07-13 19:42:46 UTC (rev 264311)
@@ -1,3 +1,43 @@
+2020-07-13  Sam Weinig  <[email protected]>
+
+        Replace single argument makeSimpleColor uses with their implementation
+        https://bugs.webkit.org/show_bug.cgi?id=214240
+
+        Reviewed by Darin Adler.
+
+        Remove makeSimpleColor overloads that took SRGBA<uint8_t> and SRGBA<float>:
+        - makeSimpleColor(SRGBA<uint8_t>) was a no-op, so is replaced with nothing.
+        - makeSimpleColor(SRGBA<float>) is replaced by the function it called, convertToComponentBytes().
+
+        * css/StyleColor.cpp:
+        (WebCore::StyleColor::colorFromKeyword):
+        * css/parser/CSSPropertyParserHelpers.cpp:
+        (WebCore::CSSPropertyParserHelpers::parseHSLParameters):
+        * editing/cocoa/DataDetection.mm:
+        (WebCore::DataDetection::detectContentInRange):
+        * html/canvas/CanvasRenderingContext2DBase.cpp:
+        (WebCore::CanvasRenderingContext2DBase::setShadow):
+        * html/canvas/CanvasStyle.cpp:
+        (WebCore::CanvasStyle::CanvasStyle):
+        (WebCore::CanvasStyle::isEquivalent const):
+        * platform/graphics/Color.cpp:
+        (WebCore::Color::lightened const):
+        (WebCore::Color::darkened const):
+        * platform/graphics/SimpleColor.h:
+        * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
+        (WebCore::makeSimpleColorFromARGBCFArray):
+        * platform/graphics/filters/FilterOperations.cpp:
+        (WebCore::FilterOperations::transformColor const):
+        (WebCore::FilterOperations::inverseTransformColor const):
+        * platform/graphics/mac/ColorMac.mm:
+        (WebCore::makeSimpleColorFromNSColor):
+        (WebCore::colorFromNSColor):
+        (WebCore::semanticColorFromNSColor):
+        * platform/graphics/win/PlatformContextDirect2D.cpp:
+        (WebCore::PlatformContextDirect2D::brushWithColor):
+        * platform/ios/ColorIOS.mm:
+        (WebCore::colorFromUIColor):
+
 2020-07-13  Sihui Liu  <[email protected]>
 
         Text manipulation does not observe manipulated text after update

Modified: trunk/Source/WebCore/css/StyleColor.cpp (264310 => 264311)


--- trunk/Source/WebCore/css/StyleColor.cpp	2020-07-13 19:16:25 UTC (rev 264310)
+++ trunk/Source/WebCore/css/StyleColor.cpp	2020-07-13 19:42:46 UTC (rev 264311)
@@ -41,7 +41,7 @@
 {
     if (const char* valueName = getValueName(keyword)) {
         if (const NamedColor* namedColor = findColor(valueName, strlen(valueName)))
-            return makeSimpleColor(asSRGBA(Packed::ARGB { namedColor->ARGBValue }));
+            return asSRGBA(Packed::ARGB { namedColor->ARGBValue });
     }
 
     return RenderTheme::singleton().systemColor(keyword, options);

Modified: trunk/Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp (264310 => 264311)


--- trunk/Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp	2020-07-13 19:16:25 UTC (rev 264310)
+++ trunk/Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp	2020-07-13 19:42:46 UTC (rev 264311)
@@ -641,7 +641,7 @@
     if (!args.atEnd())
         return Color();
 
-    return makeSimpleColor(toSRGBA(HSLA<float> { static_cast<float>(colorArray[0]), static_cast<float>(colorArray[1]), static_cast<float>(colorArray[2]), static_cast<float>(alpha) }));
+    return convertToComponentBytes(toSRGBA(HSLA<float> { static_cast<float>(colorArray[0]), static_cast<float>(colorArray[1]), static_cast<float>(colorArray[2]), static_cast<float>(alpha) }));
 }
 
 static Color parseColorFunctionParameters(CSSParserTokenRange& range)

Modified: trunk/Source/WebCore/editing/cocoa/DataDetection.mm (264310 => 264311)


--- trunk/Source/WebCore/editing/cocoa/DataDetection.mm	2020-07-13 19:16:25 UTC (rev 264310)
+++ trunk/Source/WebCore/editing/cocoa/DataDetection.mm	2020-07-13 19:42:46 UTC (rev 264311)
@@ -627,7 +627,7 @@
                         // so the color will appear on light and dark backgrounds, since only one color can be specified.
                         hsla.lightness = 0.5f;
                         hsla.alpha *= 0.38f;
-                        auto underlineColor = makeSimpleColor(toSRGBA(hsla));
+                        auto underlineColor = convertToComponentBytes(toSRGBA(hsla));
 
                         anchorElement->setInlineStyleProperty(CSSPropertyColor, CSSValueCurrentcolor);
                         anchorElement->setInlineStyleProperty(CSSPropertyTextDecorationColor, serializationForCSS(underlineColor));

Modified: trunk/Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp (264310 => 264311)


--- trunk/Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp	2020-07-13 19:16:25 UTC (rev 264310)
+++ trunk/Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp	2020-07-13 19:42:46 UTC (rev 264311)
@@ -1315,17 +1315,17 @@
 
 void CanvasRenderingContext2DBase::setShadow(float width, float height, float blur, float grayLevel, float alpha)
 {
-    setShadow(FloatSize(width, height), blur, makeSimpleColor(SRGBA { grayLevel, grayLevel, grayLevel, alpha }));
+    setShadow(FloatSize(width, height), blur, convertToComponentBytes(SRGBA { grayLevel, grayLevel, grayLevel, alpha }));
 }
 
 void CanvasRenderingContext2DBase::setShadow(float width, float height, float blur, float r, float g, float b, float a)
 {
-    setShadow(FloatSize(width, height), blur, makeSimpleColor(SRGBA { r, g, b, a }));
+    setShadow(FloatSize(width, height), blur, convertToComponentBytes(SRGBA { r, g, b, a }));
 }
 
 void CanvasRenderingContext2DBase::setShadow(float width, float height, float blur, float c, float m, float y, float k, float a)
 {
-    setShadow(FloatSize(width, height), blur, makeSimpleColor(toSRGBA(CMYKA { c, m, y, k, a })));
+    setShadow(FloatSize(width, height), blur, convertToComponentBytes(toSRGBA(CMYKA { c, m, y, k, a })));
 }
 
 void CanvasRenderingContext2DBase::clearShadow()

Modified: trunk/Source/WebCore/html/canvas/CanvasStyle.cpp (264310 => 264311)


--- trunk/Source/WebCore/html/canvas/CanvasStyle.cpp	2020-07-13 19:16:25 UTC (rev 264310)
+++ trunk/Source/WebCore/html/canvas/CanvasStyle.cpp	2020-07-13 19:42:46 UTC (rev 264311)
@@ -94,12 +94,12 @@
 }
 
 CanvasStyle::CanvasStyle(const SRGBA<float>& colorComponents)
-    : m_style(makeSimpleColor(colorComponents))
+    : m_style(convertToComponentBytes(colorComponents))
 {
 }
 
 CanvasStyle::CanvasStyle(const CMYKA<float>& colorComponents)
-    : m_style(CMYKAColor { makeSimpleColor(toSRGBA(colorComponents)), colorComponents })
+    : m_style(CMYKAColor { convertToComponentBytes(toSRGBA(colorComponents)), colorComponents })
 {
 }
 
@@ -155,7 +155,7 @@
 
 bool CanvasStyle::isEquivalent(const SRGBA<float>& components) const
 {
-    return WTF::holds_alternative<Color>(m_style) && WTF::get<Color>(m_style) == makeSimpleColor(components);
+    return WTF::holds_alternative<Color>(m_style) && WTF::get<Color>(m_style) == convertToComponentBytes(components);
 }
 
 bool CanvasStyle::isEquivalent(const CMYKA<float>& components) const

Modified: trunk/Source/WebCore/platform/graphics/Color.cpp (264310 => 264311)


--- trunk/Source/WebCore/platform/graphics/Color.cpp	2020-07-13 19:16:25 UTC (rev 264310)
+++ trunk/Source/WebCore/platform/graphics/Color.cpp	2020-07-13 19:42:46 UTC (rev 264311)
@@ -91,7 +91,7 @@
 
     float multiplier = std::min(1.0f, v + 0.33f) / v;
 
-    return makeSimpleColor(SRGBA { multiplier * r, multiplier * g, multiplier * b, a });
+    return convertToComponentBytes(SRGBA { multiplier * r, multiplier * g, multiplier * b, a });
 }
 
 Color Color::darkened() const
@@ -105,7 +105,7 @@
     float v = std::max({ r, g, b });
     float multiplier = std::max(0.0f, (v - 0.33f) / v);
 
-    return makeSimpleColor(SRGBA { multiplier * r, multiplier * g, multiplier * b, a });
+    return convertToComponentBytes(SRGBA { multiplier * r, multiplier * g, multiplier * b, a });
 }
 
 float Color::lightness() const

Modified: trunk/Source/WebCore/platform/graphics/SimpleColor.h (264310 => 264311)


--- trunk/Source/WebCore/platform/graphics/SimpleColor.h	2020-07-13 19:16:25 UTC (rev 264310)
+++ trunk/Source/WebCore/platform/graphics/SimpleColor.h	2020-07-13 19:42:46 UTC (rev 264311)
@@ -41,14 +41,4 @@
     return clampToComponentBytes<SRGBA>(r, g, b, a);
 }
 
-constexpr ColorBuilder<SRGBA<uint8_t>> makeSimpleColor(SRGBA<uint8_t> sRGBA)
-{
-    return sRGBA;
-}
-
-inline ColorBuilder<SRGBA<uint8_t>> makeSimpleColor(const SRGBA<float>& sRGBA)
-{
-    return convertToComponentBytes(sRGBA);
-}
-
 } // namespace WebCore

Modified: trunk/Source/WebCore/platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp (264310 => 264311)


--- trunk/Source/WebCore/platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp	2020-07-13 19:16:25 UTC (rev 264310)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp	2020-07-13 19:42:46 UTC (rev 264311)
@@ -80,7 +80,7 @@
         componentArray[i] = component;
     }
 
-    return makeSimpleColor(SRGBA { componentArray[1], componentArray[2], componentArray[3], componentArray[0] });
+    return convertToComponentBytes(SRGBA { componentArray[1], componentArray[2], componentArray[3], componentArray[0] });
 }
 
 Ref<InbandGenericCue> InbandTextTrackPrivateAVF::processCueAttributes(CFAttributedStringRef attributedString)

Modified: trunk/Source/WebCore/platform/graphics/cairo/NativeImageCairo.cpp (264310 => 264311)


--- trunk/Source/WebCore/platform/graphics/cairo/NativeImageCairo.cpp	2020-07-13 19:16:25 UTC (rev 264310)
+++ trunk/Source/WebCore/platform/graphics/cairo/NativeImageCairo.cpp	2020-07-13 19:42:46 UTC (rev 264311)
@@ -54,7 +54,7 @@
         return Color();
 
     unsigned* pixel = reinterpret_cast_ptr<unsigned*>(cairo_image_surface_get_data(image.get()));
-    return makeSimpleColor(unpremultiplied(asSRGBA(Packed::ARGB { *pixel })));
+    return unpremultiplied(asSRGBA(Packed::ARGB { *pixel }));
 }
 
 void drawNativeImage(const NativeImagePtr& image, GraphicsContext& context, const FloatRect& destRect, const FloatRect& srcRect, const IntSize& imageSize, const ImagePaintingOptions& options)

Modified: trunk/Source/WebCore/platform/graphics/filters/FilterOperations.cpp (264310 => 264311)


--- trunk/Source/WebCore/platform/graphics/filters/FilterOperations.cpp	2020-07-13 19:16:25 UTC (rev 264310)
+++ trunk/Source/WebCore/platform/graphics/filters/FilterOperations.cpp	2020-07-13 19:42:46 UTC (rev 264311)
@@ -117,7 +117,7 @@
             return false;
     }
 
-    color = makeSimpleColor(sRGBAColor);
+    color = convertToComponentBytes(sRGBAColor);
     return true;
 }
 
@@ -136,7 +136,7 @@
             return false;
     }
 
-    color = makeSimpleColor(sRGBAColor);
+    color = convertToComponentBytes(sRGBAColor);
     return true;
 }
 

Modified: trunk/Source/WebCore/platform/graphics/mac/ColorMac.mm (264310 => 264311)


--- trunk/Source/WebCore/platform/graphics/mac/ColorMac.mm	2020-07-13 19:16:25 UTC (rev 264310)
+++ trunk/Source/WebCore/platform/graphics/mac/ColorMac.mm	2020-07-13 19:42:46 UTC (rev 264311)
@@ -62,11 +62,12 @@
     return useOldAquaFocusRingColor;
 }
 
-static SRGBA<uint8_t> makeSimpleColorFromNSColor(NSColor *color)
+static Optional<SRGBA<uint8_t>> makeSimpleColorFromNSColor(NSColor *color)
 {
     // FIXME: ExtendedColor - needs to handle color spaces.
 
-    ASSERT_ARG(color, color);
+    if (!color)
+        return WTF::nullopt;
 
     CGFloat redComponent;
     CGFloat greenComponent;
@@ -97,26 +98,16 @@
     [rgbColor getRed:&redComponent green:&greenComponent blue:&blueComponent alpha:&alpha];
     END_BLOCK_OBJC_EXCEPTIONS
 
-    return makeSimpleColor(SRGBA { static_cast<float>(redComponent), static_cast<float>(greenComponent), static_cast<float>(blueComponent), static_cast<float>(alpha) });
+    return convertToComponentBytes(SRGBA { static_cast<float>(redComponent), static_cast<float>(greenComponent), static_cast<float>(blueComponent), static_cast<float>(alpha) });
 }
 
 Color colorFromNSColor(NSColor *color)
 {
-    if (!color)
-        return { };
-
-    // FIXME: ExtendedColor - needs to handle color spaces.
-
     return makeSimpleColorFromNSColor(color);
 }
 
 Color semanticColorFromNSColor(NSColor *color)
 {
-    if (!color)
-        return { };
-
-    // FIXME: ExtendedColor - needs to handle color spaces.
-
     return Color(makeSimpleColorFromNSColor(color), Color::Semantic);
 }
 

Modified: trunk/Source/WebCore/platform/graphics/win/PlatformContextDirect2D.cpp (264310 => 264311)


--- trunk/Source/WebCore/platform/graphics/win/PlatformContextDirect2D.cpp	2020-07-13 19:16:25 UTC (rev 264310)
+++ trunk/Source/WebCore/platform/graphics/win/PlatformContextDirect2D.cpp	2020-07-13 19:42:46 UTC (rev 264311)
@@ -132,7 +132,7 @@
 
 COMPtr<ID2D1SolidColorBrush> PlatformContextDirect2D::brushWithColor(const D2D1_COLOR_F& color)
 {
-    auto colorKey = makeSimpleColor(SRGBA { color.r, color.g, color.b, color.a });
+    auto colorKey = convertToComponentBytes(SRGBA { color.r, color.g, color.b, color.a });
 
     if (!colorKey) {
         if (!m_zeroBrush)

Modified: trunk/Source/WebCore/platform/ios/ColorIOS.mm (264310 => 264311)


--- trunk/Source/WebCore/platform/ios/ColorIOS.mm	2020-07-13 19:16:25 UTC (rev 264310)
+++ trunk/Source/WebCore/platform/ios/ColorIOS.mm	2020-07-13 19:42:46 UTC (rev 264311)
@@ -47,7 +47,7 @@
 
     [color getRed:&redComponent green:&greenComponent blue:&blueComponent alpha:&alpha];
 
-    return makeSimpleColor(SRGBA { static_cast<float>(redComponent), static_cast<float>(greenComponent), static_cast<float>(blueComponent), static_cast<float>(alpha) });
+    return convertToComponentBytes(SRGBA { static_cast<float>(redComponent), static_cast<float>(greenComponent), static_cast<float>(blueComponent), static_cast<float>(alpha) });
 }
 
 } // namespace WebCore

Modified: trunk/Source/WebKit/ChangeLog (264310 => 264311)


--- trunk/Source/WebKit/ChangeLog	2020-07-13 19:16:25 UTC (rev 264310)
+++ trunk/Source/WebKit/ChangeLog	2020-07-13 19:42:46 UTC (rev 264311)
@@ -1,3 +1,14 @@
+2020-07-13  Sam Weinig  <[email protected]>
+
+        Replace single argument makeSimpleColor uses with their implementation
+        https://bugs.webkit.org/show_bug.cgi?id=214240
+
+        Reviewed by Darin Adler.
+
+        * UIProcess/API/wpe/WebKitColor.cpp:
+        (webkitColorToWebCoreColor):
+        Replace makeSimpleColor with convertToComponentBytes.
+
 2020-07-13  Per Arne Vollan  <[email protected]>
 
         Crash under WebKit::LaunchServicesDatabaseManager::didConnect()

Modified: trunk/Source/WebKit/UIProcess/API/wpe/WebKitColor.cpp (264310 => 264311)


--- trunk/Source/WebKit/UIProcess/API/wpe/WebKitColor.cpp	2020-07-13 19:16:25 UTC (rev 264310)
+++ trunk/Source/WebKit/UIProcess/API/wpe/WebKitColor.cpp	2020-07-13 19:42:46 UTC (rev 264311)
@@ -75,7 +75,7 @@
 
 const WebCore::Color webkitColorToWebCoreColor(WebKitColor* color)
 {
-    return WebCore::makeSimpleColor(WebCore::SRGBA { static_cast<float>(color->red), static_cast<float>(color->green), static_cast<float>(color->blue), static_cast<float>(color->alpha) });
+    return WebCore::convertToComponentBytes(WebCore::SRGBA { static_cast<float>(color->red), static_cast<float>(color->green), static_cast<float>(color->blue), static_cast<float>(color->alpha) });
 }
 
 void webkitColorFillFromWebCoreColor(const WebCore::Color& webCoreColor, WebKitColor* color)

Modified: trunk/Tools/ChangeLog (264310 => 264311)


--- trunk/Tools/ChangeLog	2020-07-13 19:16:25 UTC (rev 264310)
+++ trunk/Tools/ChangeLog	2020-07-13 19:42:46 UTC (rev 264311)
@@ -1,3 +1,14 @@
+2020-07-13  Sam Weinig  <[email protected]>
+
+        Replace single argument makeSimpleColor uses with their implementation
+        https://bugs.webkit.org/show_bug.cgi?id=214240
+
+        Reviewed by Darin Adler.
+
+        * TestWebKitAPI/Tests/WebCore/ColorTests.cpp:
+        (TestWebKitAPI::TEST):
+        Replace makeSimpleColor with convertToComponentBytes.
+
 2020-07-13  Sihui Liu  <[email protected]>
 
         Text manipulation does not observe manipulated text after update

Modified: trunk/Tools/TestWebKitAPI/Tests/WebCore/ColorTests.cpp (264310 => 264311)


--- trunk/Tools/TestWebKitAPI/Tests/WebCore/ColorTests.cpp	2020-07-13 19:16:25 UTC (rev 264310)
+++ trunk/Tools/TestWebKitAPI/Tests/WebCore/ColorTests.cpp	2020-07-13 19:42:46 UTC (rev 264311)
@@ -46,7 +46,7 @@
     
     EXPECT_FLOAT_EQ(color.lightness(), hslaColor.lightness);
     
-    auto roundTrippedColor = makeSimpleColor(toSRGBA(hslaColor));
+    auto roundTrippedColor = convertToComponentBytes(toSRGBA(hslaColor));
     EXPECT_EQ(color, roundTrippedColor);
 }
 
@@ -62,7 +62,7 @@
 
     EXPECT_FLOAT_EQ(color.lightness(), hslaColor.lightness);
 
-    auto roundTrippedColor = makeSimpleColor(toSRGBA(hslaColor));
+    auto roundTrippedColor = convertToComponentBytes(toSRGBA(hslaColor));
     EXPECT_EQ(color, roundTrippedColor);
 }
 
@@ -78,7 +78,7 @@
 
     EXPECT_FLOAT_EQ(color.lightness(), hslaColor.lightness);
 
-    auto roundTrippedColor = makeSimpleColor(toSRGBA(hslaColor));
+    auto roundTrippedColor = convertToComponentBytes(toSRGBA(hslaColor));
     EXPECT_EQ(color, roundTrippedColor);
 }
 
@@ -94,7 +94,7 @@
 
     EXPECT_FLOAT_EQ(color.lightness(), hslaColor.lightness);
 
-    auto roundTrippedColor = makeSimpleColor(toSRGBA(hslaColor));
+    auto roundTrippedColor = convertToComponentBytes(toSRGBA(hslaColor));
     EXPECT_EQ(color, roundTrippedColor);
 }
 
@@ -110,7 +110,7 @@
 
     EXPECT_FLOAT_EQ(color.lightness(), hslaColor.lightness);
 
-    auto roundTrippedColor = makeSimpleColor(toSRGBA(hslaColor));
+    auto roundTrippedColor = convertToComponentBytes(toSRGBA(hslaColor));
     EXPECT_EQ(color, roundTrippedColor);
 }
 
@@ -126,7 +126,7 @@
     
     EXPECT_FLOAT_EQ(color.lightness(), hslaColor.lightness);
 
-    auto roundTrippedColor = makeSimpleColor(toSRGBA(hslaColor));
+    auto roundTrippedColor = convertToComponentBytes(toSRGBA(hslaColor));
     EXPECT_EQ(color, roundTrippedColor);
 }
 
@@ -142,7 +142,7 @@
 
     EXPECT_FLOAT_EQ(color.lightness(), hslaColor.lightness);
 
-    auto roundTrippedColor = makeSimpleColor(toSRGBA(hslaColor));
+    auto roundTrippedColor = convertToComponentBytes(toSRGBA(hslaColor));
     EXPECT_EQ(color, roundTrippedColor);
 }
 
@@ -158,7 +158,7 @@
 
     EXPECT_FLOAT_EQ(color.lightness(), hslaColor.lightness);
 
-    auto roundTrippedColor = makeSimpleColor(toSRGBA(hslaColor));
+    auto roundTrippedColor = convertToComponentBytes(toSRGBA(hslaColor));
     EXPECT_EQ(color, roundTrippedColor);
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to