Title: [264585] trunk
Revision
264585
Author
[email protected]
Date
2020-07-19 15:39:50 -0700 (Sun, 19 Jul 2020)

Log Message

Rename Color::transparent to Color::transparentBlack to more clearly state what it is
https://bugs.webkit.org/show_bug.cgi?id=214522

Reviewed by Darin Adler.

Source/WebCore:

* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::colorValue const):
* accessibility/AccessibilityObject.h:
* css/CSSValuePool.cpp:
(WebCore::StaticCSSValuePool::StaticCSSValuePool):
(WebCore::CSSValuePool::createColorValue):
* editing/EditingStyle.cpp:
(WebCore::cssValueToColor):
* html/HTMLInputElement.cpp:
(WebCore::autoFillStrongPasswordMaskImage):
* html/InputType.cpp:
(WebCore::InputType::valueAsColor const):
* html/canvas/CanvasRenderingContext2DBase.cpp:
(WebCore::CanvasRenderingContext2DBase::State::State):
(WebCore::CanvasRenderingContext2DBase::clearRect):
(WebCore::CanvasRenderingContext2DBase::setShadow):
(WebCore::CanvasRenderingContext2DBase::clearShadow):
(WebCore::CanvasRenderingContext2DBase::applyShadow):
* inspector/InspectorOverlay.cpp:
(WebCore::drawShapeHighlight):
* inspector/agents/InspectorDOMAgent.cpp:
(WebCore::parseColor):
* layout/displaytree/DisplayPainter.cpp:
(WebCore::Display::paintBoxDecoration):
* page/CaptionUserPreferencesMediaAF.cpp:
(WebCore::CaptionUserPreferencesMediaAF::captionsWindowCSS const):
* page/DebugPageOverlays.cpp:
(WebCore::drawRightAlignedText):
* page/FrameSnapshotting.cpp:
(WebCore::snapshotNode):
* page/FrameView.cpp:
(WebCore::FrameView::recalculateBaseBackgroundColor):
* page/PageOverlay.h:
* page/TextIndicator.cpp:
(WebCore::estimatedBackgroundColorForRange):
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::shadowForBlending):
* platform/graphics/Color.h:
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
* platform/graphics/cg/ColorCG.cpp:
(WebCore::cachedCGColor):
* platform/graphics/cg/NativeImageCG.cpp:
(WebCore::nativeImageSinglePixelSolidColor):
* platform/graphics/filters/FilterOperation.cpp:
(WebCore::DropShadowFilterOperation::blend):
* platform/graphics/mac/ColorMac.mm:
(WebCore::nsColor):
* platform/graphics/nicosia/NicosiaPaintingEngineBasic.cpp:
(Nicosia::PaintingEngineBasic::paint):
* platform/graphics/nicosia/NicosiaPaintingEngineThreaded.cpp:
(Nicosia::paintLayer):
* platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp:
(WebCore::TextureMapperPlatformLayerBuffer::paintToTextureMapper):
* platform/ios/WebVideoFullscreenControllerAVKit.mm:
(VideoFullscreenControllerContext::requestVideoContentLayer):
(VideoFullscreenControllerContext::returnVideoContentLayer):
(VideoFullscreenControllerContext::didSetupFullscreen):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::paintIncompleteImageOutline const):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintResizer):
* rendering/RenderListMarker.cpp:
(WebCore::RenderListMarker::paint):
* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::platformActiveSelectionBackgroundColor const):
(WebCore::RenderThemeIOS::platformInactiveSelectionBackgroundColor const):
* rendering/RenderTreeAsText.cpp:
(WebCore::RenderTreeAsText::writeRenderObject):
* rendering/mathml/RenderMathMLMenclose.cpp:
(WebCore::RenderMathMLMenclose::paint):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::visitedDependentColor const):
* rendering/style/RenderStyle.h:
(WebCore::RenderStyle::initialStrokeColor):
(WebCore::RenderStyle::initialBackgroundColor):
* style/StyleBuilderCustom.h:
(WebCore::Style::BuilderCustom::applyTextOrBoxShadowValue):
* style/StyleBuilderState.cpp:
(WebCore::Style::BuilderState::createFilterOperations):
* svg/SVGStopElement.cpp:
(WebCore::SVGStopElement::stopColorIncludingOpacity const):
* testing/Internals.cpp:
(WebCore::Internals::setViewIsTransparent):
(WebCore::Internals::setViewBaseBackgroundColor):
Color::transparent to Color::transparentBlack.

Source/WebKit:

* Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties):
* UIProcess/API/ios/WKWebViewIOS.mm:
(scrollViewBackgroundColor):
(-[WKWebView _setOpaqueInternal:]):
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::setDrawsBackground):
* UIProcess/WebPageProxy.cpp:
(WebKit::m_transcodingQueue):
* WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp:
(webkitWebPageDidReceiveMessage):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::snapshotNode):
* WebProcess/cocoa/VideoFullscreenManager.mm:
(WebKit::VideoFullscreenManager::enterVideoFullscreenForVideoElement):
Color::transparent to Color::transparentBlack.

Source/WebKitLegacy/win:

* WebCoreSupport/WebFrameLoaderClient.cpp:
(WebFrameLoaderClient::transitionToCommittedForNewPage):
* WebFrame.cpp:
(WebFrame::updateBackground):
Color::transparent to Color::transparentBlack.

Tools:

* TestWebKitAPI/cocoa/TestPDFDocument.mm:
(TestWebKitAPI::TestPDFPage::colorAtPoint const):
Update for rename from Color::transparent to Color::transparentBlack.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (264584 => 264585)


--- trunk/Source/WebCore/ChangeLog	2020-07-19 20:07:07 UTC (rev 264584)
+++ trunk/Source/WebCore/ChangeLog	2020-07-19 22:39:50 UTC (rev 264585)
@@ -1,5 +1,99 @@
 2020-07-19  Sam Weinig  <[email protected]>
 
+        Rename Color::transparent to Color::transparentBlack to more clearly state what it is
+        https://bugs.webkit.org/show_bug.cgi?id=214522
+
+        Reviewed by Darin Adler.
+
+        * accessibility/AccessibilityNodeObject.cpp:
+        (WebCore::AccessibilityNodeObject::colorValue const):
+        * accessibility/AccessibilityObject.h:
+        * css/CSSValuePool.cpp:
+        (WebCore::StaticCSSValuePool::StaticCSSValuePool):
+        (WebCore::CSSValuePool::createColorValue):
+        * editing/EditingStyle.cpp:
+        (WebCore::cssValueToColor):
+        * html/HTMLInputElement.cpp:
+        (WebCore::autoFillStrongPasswordMaskImage):
+        * html/InputType.cpp:
+        (WebCore::InputType::valueAsColor const):
+        * html/canvas/CanvasRenderingContext2DBase.cpp:
+        (WebCore::CanvasRenderingContext2DBase::State::State):
+        (WebCore::CanvasRenderingContext2DBase::clearRect):
+        (WebCore::CanvasRenderingContext2DBase::setShadow):
+        (WebCore::CanvasRenderingContext2DBase::clearShadow):
+        (WebCore::CanvasRenderingContext2DBase::applyShadow):
+        * inspector/InspectorOverlay.cpp:
+        (WebCore::drawShapeHighlight):
+        * inspector/agents/InspectorDOMAgent.cpp:
+        (WebCore::parseColor):
+        * layout/displaytree/DisplayPainter.cpp:
+        (WebCore::Display::paintBoxDecoration):
+        * page/CaptionUserPreferencesMediaAF.cpp:
+        (WebCore::CaptionUserPreferencesMediaAF::captionsWindowCSS const):
+        * page/DebugPageOverlays.cpp:
+        (WebCore::drawRightAlignedText):
+        * page/FrameSnapshotting.cpp:
+        (WebCore::snapshotNode):
+        * page/FrameView.cpp:
+        (WebCore::FrameView::recalculateBaseBackgroundColor):
+        * page/PageOverlay.h:
+        * page/TextIndicator.cpp:
+        (WebCore::estimatedBackgroundColorForRange):
+        * page/animation/CSSPropertyAnimation.cpp:
+        (WebCore::shadowForBlending):
+        * platform/graphics/Color.h:
+        * platform/graphics/ca/GraphicsLayerCA.cpp:
+        (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
+        * platform/graphics/cg/ColorCG.cpp:
+        (WebCore::cachedCGColor):
+        * platform/graphics/cg/NativeImageCG.cpp:
+        (WebCore::nativeImageSinglePixelSolidColor):
+        * platform/graphics/filters/FilterOperation.cpp:
+        (WebCore::DropShadowFilterOperation::blend):
+        * platform/graphics/mac/ColorMac.mm:
+        (WebCore::nsColor):
+        * platform/graphics/nicosia/NicosiaPaintingEngineBasic.cpp:
+        (Nicosia::PaintingEngineBasic::paint):
+        * platform/graphics/nicosia/NicosiaPaintingEngineThreaded.cpp:
+        (Nicosia::paintLayer):
+        * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp:
+        (WebCore::TextureMapperPlatformLayerBuffer::paintToTextureMapper):
+        * platform/ios/WebVideoFullscreenControllerAVKit.mm:
+        (VideoFullscreenControllerContext::requestVideoContentLayer):
+        (VideoFullscreenControllerContext::returnVideoContentLayer):
+        (VideoFullscreenControllerContext::didSetupFullscreen):
+        * rendering/RenderImage.cpp:
+        (WebCore::RenderImage::paintIncompleteImageOutline const):
+        * rendering/RenderLayer.cpp:
+        (WebCore::RenderLayer::paintResizer):
+        * rendering/RenderListMarker.cpp:
+        (WebCore::RenderListMarker::paint):
+        * rendering/RenderThemeIOS.mm:
+        (WebCore::RenderThemeIOS::platformActiveSelectionBackgroundColor const):
+        (WebCore::RenderThemeIOS::platformInactiveSelectionBackgroundColor const):
+        * rendering/RenderTreeAsText.cpp:
+        (WebCore::RenderTreeAsText::writeRenderObject):
+        * rendering/mathml/RenderMathMLMenclose.cpp:
+        (WebCore::RenderMathMLMenclose::paint):
+        * rendering/style/RenderStyle.cpp:
+        (WebCore::RenderStyle::visitedDependentColor const):
+        * rendering/style/RenderStyle.h:
+        (WebCore::RenderStyle::initialStrokeColor):
+        (WebCore::RenderStyle::initialBackgroundColor):
+        * style/StyleBuilderCustom.h:
+        (WebCore::Style::BuilderCustom::applyTextOrBoxShadowValue):
+        * style/StyleBuilderState.cpp:
+        (WebCore::Style::BuilderState::createFilterOperations):
+        * svg/SVGStopElement.cpp:
+        (WebCore::SVGStopElement::stopColorIncludingOpacity const):
+        * testing/Internals.cpp:
+        (WebCore::Internals::setViewIsTransparent):
+        (WebCore::Internals::setViewBaseBackgroundColor):
+        Color::transparent to Color::transparentBlack.
+
+2020-07-19  Sam Weinig  <[email protected]>
+
         Remove ColorBuilder
         https://bugs.webkit.org/show_bug.cgi?id=214521
 

Modified: trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp (264584 => 264585)


--- trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp	2020-07-19 20:07:07 UTC (rev 264584)
+++ trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp	2020-07-19 22:39:50 UTC (rev 264585)
@@ -1995,13 +1995,13 @@
 SRGBA<uint8_t> AccessibilityNodeObject::colorValue() const
 {
 #if !ENABLE(INPUT_TYPE_COLOR)
-    return Color::transparent;
+    return Color::transparentBlack;
 #else
     if (!isColorWell())
-        return Color::transparent;
+        return Color::transparentBlack;
 
     if (!is<HTMLInputElement>(node()))
-        return Color::transparent;
+        return Color::transparentBlack;
 
     return downcast<HTMLInputElement>(*node()).valueAsColor().toSRGBALossy<uint8_t>();
 #endif

Modified: trunk/Source/WebCore/accessibility/AccessibilityObject.h (264584 => 264585)


--- trunk/Source/WebCore/accessibility/AccessibilityObject.h	2020-07-19 20:07:07 UTC (rev 264584)
+++ trunk/Source/WebCore/accessibility/AccessibilityObject.h	2020-07-19 22:39:50 UTC (rev 264585)
@@ -403,7 +403,7 @@
     void elementsFromAttribute(Vector<Element*>&, const QualifiedName&) const override;
 
     // Only if isColorWell()
-    SRGBA<uint8_t> colorValue() const override { return Color::transparent; }
+    SRGBA<uint8_t> colorValue() const override { return Color::transparentBlack; }
 
     AccessibilityRole roleValue() const override { return m_role; }
     String rolePlatformString() const override;

Modified: trunk/Source/WebCore/css/CSSValuePool.cpp (264584 => 264585)


--- trunk/Source/WebCore/css/CSSValuePool.cpp	2020-07-19 20:07:07 UTC (rev 264584)
+++ trunk/Source/WebCore/css/CSSValuePool.cpp	2020-07-19 22:39:50 UTC (rev 264585)
@@ -44,7 +44,7 @@
     m_unsetValue.construct(CSSValue::StaticCSSValue);
     m_revertValue.construct(CSSValue::StaticCSSValue);
 
-    m_transparentColor.construct(CSSValue::StaticCSSValue, Color::transparent);
+    m_transparentColor.construct(CSSValue::StaticCSSValue, Color::transparentBlack);
     m_whiteColor.construct(CSSValue::StaticCSSValue, Color::white);
     m_blackColor.construct(CSSValue::StaticCSSValue, Color::black);
 
@@ -92,7 +92,7 @@
 Ref<CSSPrimitiveValue> CSSValuePool::createColorValue(const Color& color)
 {
     // These are the empty and deleted values of the hash table.
-    if (color == Color::transparent)
+    if (color == Color::transparentBlack)
         return staticCSSValuePool->m_transparentColor.get();
     if (color == Color::white)
         return staticCSSValuePool->m_whiteColor.get();

Modified: trunk/Source/WebCore/editing/EditingStyle.cpp (264584 => 264585)


--- trunk/Source/WebCore/editing/EditingStyle.cpp	2020-07-19 20:07:07 UTC (rev 264584)
+++ trunk/Source/WebCore/editing/EditingStyle.cpp	2020-07-19 22:39:50 UTC (rev 264585)
@@ -391,7 +391,7 @@
 static Color cssValueToColor(CSSValue* colorValue)
 {
     if (!is<CSSPrimitiveValue>(colorValue))
-        return Color::transparent;
+        return Color::transparentBlack;
     
     CSSPrimitiveValue& primitiveColor = downcast<CSSPrimitiveValue>(*colorValue);
     if (primitiveColor.isRGBColor())

Modified: trunk/Source/WebCore/html/HTMLInputElement.cpp (264584 => 264585)


--- trunk/Source/WebCore/html/HTMLInputElement.cpp	2020-07-19 20:07:07 UTC (rev 264584)
+++ trunk/Source/WebCore/html/HTMLInputElement.cpp	2020-07-19 22:39:50 UTC (rev 264585)
@@ -2056,7 +2056,7 @@
     firstStop.position = CSSValuePool::singleton().createValue(50, CSSUnitType::CSS_PERCENTAGE);
 
     CSSGradientColorStop secondStop;
-    secondStop.color = CSSValuePool::singleton().createColorValue(Color::transparent);
+    secondStop.color = CSSValuePool::singleton().createColorValue(Color::transparentBlack);
     secondStop.position = CSSValuePool::singleton().createValue(100, CSSUnitType::CSS_PERCENTAGE);
 
     auto gradient = CSSLinearGradientValue::create(CSSGradientRepeat::NonRepeating, CSSGradientType::CSSLinearGradient);

Modified: trunk/Source/WebCore/html/InputType.cpp (264584 => 264585)


--- trunk/Source/WebCore/html/InputType.cpp	2020-07-19 20:07:07 UTC (rev 264584)
+++ trunk/Source/WebCore/html/InputType.cpp	2020-07-19 22:39:50 UTC (rev 264585)
@@ -1116,7 +1116,7 @@
 
 Color InputType::valueAsColor() const
 {
-    return Color::transparent;
+    return Color::transparentBlack;
 }
 
 void InputType::selectColor(StringView)

Modified: trunk/Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp (264584 => 264585)


--- trunk/Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp	2020-07-19 20:07:07 UTC (rev 264584)
+++ trunk/Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp	2020-07-19 22:39:50 UTC (rev 264585)
@@ -172,7 +172,7 @@
     , lineJoin(MiterJoin)
     , miterLimit(10)
     , shadowBlur(0)
-    , shadowColor(Color::transparent)
+    , shadowColor(Color::transparentBlack)
     , globalAlpha(1)
     , globalComposite(CompositeOperator::SourceOver)
     , globalBlend(BlendMode::Normal)
@@ -1207,7 +1207,7 @@
     if (shouldDrawShadows()) {
         context->save();
         saved = true;
-        context->setLegacyShadow(FloatSize(), 0, Color::transparent);
+        context->setLegacyShadow(FloatSize(), 0, Color::transparentBlack);
     }
     if (state().globalAlpha != 1) {
         if (!saved) {
@@ -1305,7 +1305,7 @@
 
 void CanvasRenderingContext2DBase::setShadow(float width, float height, float blur, const String& colorString, Optional<float> alpha)
 {
-    Color color = Color::transparent;
+    Color color = Color::transparentBlack;
     if (!colorString.isNull()) {
         color = parseColorOrCurrentColor(colorString, canvasBase());
         if (!color.isValid())
@@ -1331,7 +1331,7 @@
 
 void CanvasRenderingContext2DBase::clearShadow()
 {
-    setShadow(FloatSize(), 0, Color::transparent);
+    setShadow(FloatSize(), 0, Color::transparentBlack);
 }
 
 void CanvasRenderingContext2DBase::setShadow(const FloatSize& offset, float blur, const Color& color)
@@ -1359,7 +1359,7 @@
         float height = state().shadowOffset.height();
         c->setLegacyShadow(FloatSize(width, -height), state().shadowBlur, state().shadowColor);
     } else
-        c->setLegacyShadow(FloatSize(), 0, Color::transparent);
+        c->setLegacyShadow(FloatSize(), 0, Color::transparentBlack);
 }
 
 bool CanvasRenderingContext2DBase::shouldDrawShadows() const

Modified: trunk/Source/WebCore/inspector/InspectorOverlay.cpp (264584 => 264585)


--- trunk/Source/WebCore/inspector/InspectorOverlay.cpp	2020-07-19 20:07:07 UTC (rev 264584)
+++ trunk/Source/WebCore/inspector/InspectorOverlay.cpp	2020-07-19 22:39:50 UTC (rev 264585)
@@ -302,7 +302,7 @@
         LayoutRect shapeBounds = shapeOutsideInfo->computedShapePhysicalBoundingBox();
         FloatQuad shapeQuad = renderer->localToAbsoluteQuad(FloatRect(shapeBounds));
         contentsQuadToCoordinateSystem(mainView, containingView, shapeQuad, InspectorOverlay::CoordinateSystem::Document);
-        drawOutlinedQuad(context, shapeQuad, shapeHighlightColor, Color::transparent, bounds);
+        drawOutlinedQuad(context, shapeQuad, shapeHighlightColor, Color::transparentBlack, bounds);
         return;
     }
 

Modified: trunk/Source/WebCore/inspector/agents/InspectorDOMAgent.cpp (264584 => 264585)


--- trunk/Source/WebCore/inspector/agents/InspectorDOMAgent.cpp	2020-07-19 20:07:07 UTC (rev 264584)
+++ trunk/Source/WebCore/inspector/agents/InspectorDOMAgent.cpp	2020-07-19 22:39:50 UTC (rev 264585)
@@ -131,13 +131,13 @@
 static Color parseColor(const JSON::Object* colorObject)
 {
     if (!colorObject)
-        return Color::transparent;
+        return Color::transparentBlack;
 
     int r = 0;
     int g = 0;
     int b = 0;
     if (!colorObject->getInteger("r", r) || !colorObject->getInteger("g", g) || !colorObject->getInteger("b", b))
-        return Color::transparent;
+        return Color::transparentBlack;
 
     double a = 1.0;
     if (!colorObject->getDouble("a", a))

Modified: trunk/Source/WebCore/layout/displaytree/DisplayPainter.cpp (264584 => 264585)


--- trunk/Source/WebCore/layout/displaytree/DisplayPainter.cpp	2020-07-19 20:07:07 UTC (rev 264584)
+++ trunk/Source/WebCore/layout/displaytree/DisplayPainter.cpp	2020-07-19 22:39:50 UTC (rev 264585)
@@ -71,7 +71,7 @@
             context.drawLine(start, end);
         };
 
-        context.setFillColor(Color::transparent);
+        context.setFillColor(Color::transparentBlack);
 
         auto decorationBoxWidth = decorationBoxSize.width();
         auto decorationBoxHeight = decorationBoxSize.height();

Modified: trunk/Source/WebCore/page/CaptionUserPreferencesMediaAF.cpp (264584 => 264585)


--- trunk/Source/WebCore/page/CaptionUserPreferencesMediaAF.cpp	2020-07-19 20:07:07 UTC (rev 264584)
+++ trunk/Source/WebCore/page/CaptionUserPreferencesMediaAF.cpp	2020-07-19 22:39:50 UTC (rev 264585)
@@ -271,7 +271,7 @@
 
     Color windowColor(color.get());
     if (!windowColor.isValid())
-        windowColor = Color::transparent;
+        windowColor = Color::transparentBlack;
 
     bool important = behavior == kMACaptionAppearanceBehaviorUseValue;
     CGFloat opacity = MACaptionAppearanceGetWindowOpacity(kMACaptionAppearanceDomainUser, &behavior);

Modified: trunk/Source/WebCore/page/DebugPageOverlays.cpp (264584 => 264585)


--- trunk/Source/WebCore/page/DebugPageOverlays.cpp	2020-07-19 20:07:07 UTC (rev 264584)
+++ trunk/Source/WebCore/page/DebugPageOverlays.cpp	2020-07-19 22:39:50 UTC (rev 264585)
@@ -167,7 +167,7 @@
     float textBaselineFromTop = 14;
 
     TextRun textRun = TextRun(text);
-    context.setFillColor(Color::transparent);
+    context.setFillColor(Color::transparentBlack);
     float textWidth = context.drawText(font, textRun, { });
     context.setFillColor(Color::black);
     context.drawText(font, textRun, boxLocation + FloatSize(-(textWidth + textGap), textBaselineFromTop));

Modified: trunk/Source/WebCore/page/FrameSnapshotting.cpp (264584 => 264585)


--- trunk/Source/WebCore/page/FrameSnapshotting.cpp	2020-07-19 20:07:07 UTC (rev 264584)
+++ trunk/Source/WebCore/page/FrameSnapshotting.cpp	2020-07-19 22:39:50 UTC (rev 264585)
@@ -151,7 +151,7 @@
 
     ScopedFramePaintingState state(frame, &node);
 
-    frame.view()->setBaseBackgroundColor(Color::transparent);
+    frame.view()->setBaseBackgroundColor(Color::transparentBlack);
     frame.view()->setNodeToDraw(&node);
 
     LayoutRect topLevelRect;

Modified: trunk/Source/WebCore/page/FrameView.cpp (264584 => 264585)


--- trunk/Source/WebCore/page/FrameView.cpp	2020-07-19 20:07:07 UTC (rev 264584)
+++ trunk/Source/WebCore/page/FrameView.cpp	2020-07-19 22:39:50 UTC (rev 264585)
@@ -380,7 +380,7 @@
     m_usesDarkAppearance = usingDarkAppearance;
     Optional<Color> backgroundColor;
     if (m_isTransparent)
-        backgroundColor = Color(Color::transparent);
+        backgroundColor = Color(Color::transparentBlack);
     updateBackgroundRecursively(backgroundColor);
 }
 

Modified: trunk/Source/WebCore/page/PageOverlay.h (264584 => 264585)


--- trunk/Source/WebCore/page/PageOverlay.h	2020-07-19 20:07:07 UTC (rev 264584)
+++ trunk/Source/WebCore/page/PageOverlay.h	2020-07-19 22:39:50 UTC (rev 264585)
@@ -144,7 +144,7 @@
     OverlayType m_overlayType;
     IntRect m_overrideFrame;
 
-    Color m_backgroundColor { Color::transparent };
+    Color m_backgroundColor { Color::transparentBlack };
     PageOverlayID m_pageOverlayID;
 
     bool m_shouldIgnoreMouseEventsOutsideBounds { true };

Modified: trunk/Source/WebCore/page/TextIndicator.cpp (264584 => 264585)


--- trunk/Source/WebCore/page/TextIndicator.cpp	2020-07-19 20:07:07 UTC (rev 264584)
+++ trunk/Source/WebCore/page/TextIndicator.cpp	2020-07-19 22:39:50 UTC (rev 264585)
@@ -221,7 +221,7 @@
 
 static Color estimatedBackgroundColorForRange(const SimpleRange& range, const Frame& frame)
 {
-    auto estimatedBackgroundColor = frame.view() ? frame.view()->documentBackgroundColor() : Color::transparent;
+    auto estimatedBackgroundColor = frame.view() ? frame.view()->documentBackgroundColor() : Color::transparentBlack;
 
     RenderElement* renderer = nullptr;
     auto commonAncestor = commonInclusiveAncestor(range.start.container, range.end.container);
@@ -245,7 +245,7 @@
             return estimatedBackgroundColor;
 
         auto visitedDependentBackgroundColor = style.visitedDependentColor(CSSPropertyBackgroundColor);
-        if (visitedDependentBackgroundColor != Color::transparent)
+        if (visitedDependentBackgroundColor != Color::transparentBlack)
             parentRendererBackgroundColors.append(visitedDependentBackgroundColor);
     }
     parentRendererBackgroundColors.reverse();

Modified: trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp (264584 => 264585)


--- trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp	2020-07-19 20:07:07 UTC (rev 264584)
+++ trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp	2020-07-19 22:39:50 UTC (rev 264585)
@@ -766,10 +766,10 @@
 
 static inline const ShadowData* shadowForBlending(const ShadowData* srcShadow, const ShadowData* otherShadow)
 {
-    static NeverDestroyed<ShadowData> defaultShadowData(LayoutPoint(), 0, 0, ShadowStyle::Normal, false, Color::transparent);
-    static NeverDestroyed<ShadowData> defaultInsetShadowData(LayoutPoint(), 0, 0, ShadowStyle::Inset, false, Color::transparent);
-    static NeverDestroyed<ShadowData> defaultWebKitBoxShadowData(LayoutPoint(), 0, 0, ShadowStyle::Normal, true, Color::transparent);
-    static NeverDestroyed<ShadowData> defaultInsetWebKitBoxShadowData(LayoutPoint(), 0, 0, ShadowStyle::Inset, true, Color::transparent);
+    static NeverDestroyed<ShadowData> defaultShadowData(LayoutPoint(), 0, 0, ShadowStyle::Normal, false, Color::transparentBlack);
+    static NeverDestroyed<ShadowData> defaultInsetShadowData(LayoutPoint(), 0, 0, ShadowStyle::Inset, false, Color::transparentBlack);
+    static NeverDestroyed<ShadowData> defaultWebKitBoxShadowData(LayoutPoint(), 0, 0, ShadowStyle::Normal, true, Color::transparentBlack);
+    static NeverDestroyed<ShadowData> defaultInsetWebKitBoxShadowData(LayoutPoint(), 0, 0, ShadowStyle::Inset, true, Color::transparentBlack);
 
     if (srcShadow)
         return srcShadow;

Modified: trunk/Source/WebCore/platform/graphics/Color.h (264584 => 264585)


--- trunk/Source/WebCore/platform/graphics/Color.h	2020-07-19 20:07:07 UTC (rev 264584)
+++ trunk/Source/WebCore/platform/graphics/Color.h	2020-07-19 22:39:50 UTC (rev 264585)
@@ -145,12 +145,12 @@
     WEBCORE_EXPORT operator D2D1_VECTOR_4F() const;
 #endif
 
+    static constexpr auto transparentBlack = SRGBA<uint8_t> { };
     static constexpr auto black = SRGBA<uint8_t> { 0, 0, 0 };
     static constexpr auto white = SRGBA<uint8_t> { 255, 255, 255 };
     static constexpr auto darkGray = SRGBA<uint8_t> { 128, 128, 128 };
     static constexpr auto gray = SRGBA<uint8_t> { 160, 160, 160 };
     static constexpr auto lightGray = SRGBA<uint8_t> { 192, 192, 192 };
-    static constexpr auto transparent = SRGBA<uint8_t> { };
     static constexpr auto cyan = SRGBA<uint8_t> { 0, 255, 255 };
     static constexpr auto yellow = SRGBA<uint8_t> { 255, 255, 0 };
     static constexpr auto red = SRGBA<uint8_t> { 255, 0, 0 };

Modified: trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp (264584 => 264585)


--- trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp	2020-07-19 20:07:07 UTC (rev 264584)
+++ trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp	2020-07-19 22:39:50 UTC (rev 264585)
@@ -3785,7 +3785,7 @@
     if (color.isValid())
         m_layer->setBackgroundColor(color);
     else
-        m_layer->setBackgroundColor(Color::transparent);
+        m_layer->setBackgroundColor(Color::transparentBlack);
 }
 
 void GraphicsLayerCA::getDebugBorderInfo(Color& color, float& width) const

Modified: trunk/Source/WebCore/platform/graphics/cg/ColorCG.cpp (264584 => 264585)


--- trunk/Source/WebCore/platform/graphics/cg/ColorCG.cpp	2020-07-19 20:07:07 UTC (rev 264584)
+++ trunk/Source/WebCore/platform/graphics/cg/ColorCG.cpp	2020-07-19 22:39:50 UTC (rev 264585)
@@ -118,7 +118,7 @@
 {
     if (color.isInline()) {
         switch (Packed::RGBA { color.asInline() }.value) {
-        case Packed::RGBA { Color::transparent }.value: {
+        case Packed::RGBA { Color::transparentBlack }.value: {
             static CGColorRef transparentCGColor = leakCGColor(color);
             return transparentCGColor;
         }

Modified: trunk/Source/WebCore/platform/graphics/cg/NativeImageCG.cpp (264584 => 264585)


--- trunk/Source/WebCore/platform/graphics/cg/NativeImageCG.cpp	2020-07-19 20:07:07 UTC (rev 264584)
+++ trunk/Source/WebCore/platform/graphics/cg/NativeImageCG.cpp	2020-07-19 22:39:50 UTC (rev 264585)
@@ -64,7 +64,7 @@
     CGContextDrawImage(bitmapContext.get(), CGRectMake(0, 0, 1, 1), image.get());
 
     if (!pixel[3])
-        return Color::transparent;
+        return Color::transparentBlack;
 
     return clampToComponentBytes<SRGBA>(pixel[0] * 255 / pixel[3], pixel[1] * 255 / pixel[3], pixel[2] * 255 / pixel[3], pixel[3]);
 }

Modified: trunk/Source/WebCore/platform/graphics/filters/FilterOperation.cpp (264584 => 264585)


--- trunk/Source/WebCore/platform/graphics/filters/FilterOperation.cpp	2020-07-19 20:07:07 UTC (rev 264584)
+++ trunk/Source/WebCore/platform/graphics/filters/FilterOperation.cpp	2020-07-19 22:39:50 UTC (rev 264585)
@@ -305,12 +305,12 @@
         return DropShadowFilterOperation::create(
             WebCore::blend(m_location, IntPoint(), progress),
             WebCore::blend(m_stdDeviation, 0, progress),
-            WebCore::blend(m_color, Color::transparent, progress));
+            WebCore::blend(m_color, Color::transparentBlack, progress));
 
     const DropShadowFilterOperation* fromOperation = downcast<DropShadowFilterOperation>(from);
     IntPoint fromLocation = fromOperation ? fromOperation->location() : IntPoint();
     int fromStdDeviation = fromOperation ? fromOperation->stdDeviation() : 0;
-    Color fromColor = fromOperation ? fromOperation->color() : Color::transparent;
+    Color fromColor = fromOperation ? fromOperation->color() : Color::transparentBlack;
     
     return DropShadowFilterOperation::create(
         WebCore::blend(fromLocation, m_location, progress),

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


--- trunk/Source/WebCore/platform/graphics/mac/ColorMac.mm	2020-07-19 20:07:07 UTC (rev 264584)
+++ trunk/Source/WebCore/platform/graphics/mac/ColorMac.mm	2020-07-19 22:39:50 UTC (rev 264585)
@@ -115,7 +115,7 @@
 {
     if (color.isInline()) {
         switch (Packed::RGBA { color.asInline() }.value) {
-        case Packed::RGBA { Color::transparent }.value: {
+        case Packed::RGBA { Color::transparentBlack }.value: {
             static NSColor *clearColor = [[NSColor colorWithSRGBRed:0 green:0 blue:0 alpha:0] retain];
             return clearColor;
         }

Modified: trunk/Source/WebCore/platform/graphics/nicosia/NicosiaPaintingEngineBasic.cpp (264584 => 264585)


--- trunk/Source/WebCore/platform/graphics/nicosia/NicosiaPaintingEngineBasic.cpp	2020-07-19 20:07:07 UTC (rev 264584)
+++ trunk/Source/WebCore/platform/graphics/nicosia/NicosiaPaintingEngineBasic.cpp	2020-07-19 22:39:50 UTC (rev 264585)
@@ -56,7 +56,7 @@
 
             if (supportsAlpha) {
                 context.setCompositeOperation(CompositeOperator::Copy);
-                context.fillRect(IntRect(IntPoint::zero(), sourceRect.size()), Color::transparent);
+                context.fillRect(IntRect(IntPoint::zero(), sourceRect.size()), Color::transparentBlack);
                 context.setCompositeOperation(CompositeOperator::SourceOver);
             }
 

Modified: trunk/Source/WebCore/platform/graphics/nicosia/NicosiaPaintingEngineThreaded.cpp (264584 => 264585)


--- trunk/Source/WebCore/platform/graphics/nicosia/NicosiaPaintingEngineThreaded.cpp	2020-07-19 20:07:07 UTC (rev 264584)
+++ trunk/Source/WebCore/platform/graphics/nicosia/NicosiaPaintingEngineThreaded.cpp	2020-07-19 22:39:50 UTC (rev 264585)
@@ -47,7 +47,7 @@
 
     if (supportsAlpha) {
         context.setCompositeOperation(CompositeOperator::Copy);
-        context.fillRect(IntRect(IntPoint::zero(), sourceRect.size()), Color::transparent);
+        context.fillRect(IntRect(IntPoint::zero(), sourceRect.size()), Color::transparentBlack);
         context.setCompositeOperation(CompositeOperator::SourceOver);
     }
 

Modified: trunk/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp (264584 => 264585)


--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp	2020-07-19 20:07:07 UTC (rev 264584)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp	2020-07-19 22:39:50 UTC (rev 264585)
@@ -113,7 +113,7 @@
         ASSERT(!m_texture);
         if (m_holePunchClient)
             m_holePunchClient->setVideoRectangle(enclosingIntRect(modelViewMatrix.mapRect(targetRect)));
-        texmapGL.drawSolidColor(targetRect, modelViewMatrix, Color::transparent, false);
+        texmapGL.drawSolidColor(targetRect, modelViewMatrix, Color::transparentBlack, false);
         return;
     }
 

Modified: trunk/Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm (264584 => 264585)


--- trunk/Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm	2020-07-19 20:07:07 UTC (rev 264584)
+++ trunk/Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm	2020-07-19 22:39:50 UTC (rev 264585)
@@ -256,7 +256,7 @@
 #if PLATFORM(IOS_FAMILY)
     ASSERT(isUIThread());
     WebThreadRun([protectedThis = makeRefPtr(this), this, videoFullscreenLayer = retainPtr([m_videoFullscreenView layer])] () mutable {
-        [videoFullscreenLayer setBackgroundColor:cachedCGColor(WebCore::Color::transparent)];
+        [videoFullscreenLayer setBackgroundColor:cachedCGColor(WebCore::Color::transparentBlack)];
         m_fullscreenModel->setVideoFullscreenLayer(videoFullscreenLayer.get(), [protectedThis = WTFMove(protectedThis), this] () mutable {
             dispatch_async(dispatch_get_main_queue(), [protectedThis = WTFMove(protectedThis), this] {
                 if (!m_interface)
@@ -276,7 +276,7 @@
 #if PLATFORM(IOS_FAMILY)
     ASSERT(isUIThread());
     WebThreadRun([protectedThis = makeRefPtr(this), this, videoFullscreenLayer = retainPtr([m_videoFullscreenView layer])] () mutable {
-        [videoFullscreenLayer setBackgroundColor:cachedCGColor(WebCore::Color::transparent)];
+        [videoFullscreenLayer setBackgroundColor:cachedCGColor(WebCore::Color::transparentBlack)];
         m_fullscreenModel->setVideoFullscreenLayer(nil, [protectedThis = WTFMove(protectedThis), this] () mutable {
             dispatch_async(dispatch_get_main_queue(), [protectedThis = WTFMove(protectedThis), this] {
                 if (!m_interface)
@@ -300,7 +300,7 @@
     });
 #else
     WebThreadRun([protectedThis = makeRefPtr(this), this, videoFullscreenLayer = retainPtr([m_videoFullscreenView layer])] () mutable {
-        [videoFullscreenLayer setBackgroundColor:cachedCGColor(WebCore::Color::transparent)];
+        [videoFullscreenLayer setBackgroundColor:cachedCGColor(WebCore::Color::transparentBlack)];
         m_fullscreenModel->setVideoFullscreenLayer(videoFullscreenLayer.get(), [protectedThis = WTFMove(protectedThis), this] () mutable {
             dispatch_async(dispatch_get_main_queue(), [protectedThis = WTFMove(protectedThis), this] {
                 m_interface->enterFullscreen();

Modified: trunk/Source/WebCore/rendering/RenderImage.cpp (264584 => 264585)


--- trunk/Source/WebCore/rendering/RenderImage.cpp	2020-07-19 20:07:07 UTC (rev 264584)
+++ trunk/Source/WebCore/rendering/RenderImage.cpp	2020-07-19 22:39:50 UTC (rev 264585)
@@ -470,7 +470,7 @@
     GraphicsContext& context = paintInfo.context();
     context.setStrokeStyle(SolidStroke);
     context.setStrokeColor(Color::lightGray);
-    context.setFillColor(Color::transparent);
+    context.setFillColor(Color::transparentBlack);
     context.drawRect(snapRectToDevicePixels(LayoutRect({ paintOffset.x() + leftBorder + leftPadding, paintOffset.y() + topBorder + topPadding }, contentSize), document().deviceScaleFactor()), borderWidth);
 }
 

Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (264584 => 264585)


--- trunk/Source/WebCore/rendering/RenderLayer.cpp	2020-07-19 20:07:07 UTC (rev 264584)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp	2020-07-19 22:39:50 UTC (rev 264585)
@@ -4125,7 +4125,7 @@
         largerCorner.setSize(LayoutSize(largerCorner.width() + 1_lu, largerCorner.height() + 1_lu));
         context.setStrokeColor(SRGBA<uint8_t> { 217, 217, 217 });
         context.setStrokeThickness(1.0f);
-        context.setFillColor(Color::transparent);
+        context.setFillColor(Color::transparentBlack);
         context.drawRect(snappedIntRect(largerCorner));
     }
 }

Modified: trunk/Source/WebCore/rendering/RenderListMarker.cpp (264584 => 264585)


--- trunk/Source/WebCore/rendering/RenderListMarker.cpp	2020-07-19 20:07:07 UTC (rev 264584)
+++ trunk/Source/WebCore/rendering/RenderListMarker.cpp	2020-07-19 22:39:50 UTC (rev 264585)
@@ -1175,7 +1175,7 @@
         context.drawEllipse(markerRect);
         return;
     case ListStyleType::Circle:
-        context.setFillColor(Color::transparent);
+        context.setFillColor(Color::transparentBlack);
         context.drawEllipse(markerRect);
         return;
     case ListStyleType::Square:

Modified: trunk/Source/WebCore/rendering/RenderThemeIOS.mm (264584 => 264585)


--- trunk/Source/WebCore/rendering/RenderThemeIOS.mm	2020-07-19 20:07:07 UTC (rev 264584)
+++ trunk/Source/WebCore/rendering/RenderThemeIOS.mm	2020-07-19 22:39:50 UTC (rev 264585)
@@ -1129,12 +1129,12 @@
 
 Color RenderThemeIOS::platformActiveSelectionBackgroundColor(OptionSet<StyleColor::Options>) const
 {
-    return Color::transparent;
+    return Color::transparentBlack;
 }
 
 Color RenderThemeIOS::platformInactiveSelectionBackgroundColor(OptionSet<StyleColor::Options>) const
 {
-    return Color::transparent;
+    return Color::transparentBlack;
 }
 
 static Optional<Color>& cachedFocusRingColor()

Modified: trunk/Source/WebCore/rendering/RenderTreeAsText.cpp (264584 => 264585)


--- trunk/Source/WebCore/rendering/RenderTreeAsText.cpp	2020-07-19 20:07:07 UTC (rev 264584)
+++ trunk/Source/WebCore/rendering/RenderTreeAsText.cpp	2020-07-19 22:39:50 UTC (rev 264585)
@@ -245,17 +245,17 @@
             // Do not dump invalid or transparent backgrounds, since that is the default.
             Color backgroundColor = o.style().visitedDependentColor(CSSPropertyBackgroundColor);
             if (!equalIgnoringSemanticColor(o.parent()->style().visitedDependentColor(CSSPropertyBackgroundColor), backgroundColor)
-                && backgroundColor != Color::transparent)
+                && backgroundColor != Color::transparentBlack)
                 ts << " [bgcolor=" << serializationForRenderTreeAsText(backgroundColor) << "]";
             
             Color textFillColor = o.style().visitedDependentColor(CSSPropertyWebkitTextFillColor);
             if (!equalIgnoringSemanticColor(o.parent()->style().visitedDependentColor(CSSPropertyWebkitTextFillColor), textFillColor)
-                && textFillColor != color && textFillColor != Color::transparent)
+                && textFillColor != color && textFillColor != Color::transparentBlack)
                 ts << " [textFillColor=" << serializationForRenderTreeAsText(textFillColor) << "]";
 
             Color textStrokeColor = o.style().visitedDependentColor(CSSPropertyWebkitTextStrokeColor);
             if (!equalIgnoringSemanticColor(o.parent()->style().visitedDependentColor(CSSPropertyWebkitTextStrokeColor), textStrokeColor)
-                && textStrokeColor != color && textStrokeColor != Color::transparent)
+                && textStrokeColor != color && textStrokeColor != Color::transparentBlack)
                 ts << " [textStrokeColor=" << serializationForRenderTreeAsText(textStrokeColor) << "]";
 
             if (o.parent()->style().textStrokeWidth() != o.style().textStrokeWidth() && o.style().textStrokeWidth() > 0)

Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLMenclose.cpp (264584 => 264585)


--- trunk/Source/WebCore/rendering/mathml/RenderMathMLMenclose.cpp	2020-07-19 20:07:07 UTC (rev 264584)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLMenclose.cpp	2020-07-19 22:39:50 UTC (rev 264585)
@@ -221,7 +221,7 @@
     paintInfo.context().setStrokeThickness(thickness);
     paintInfo.context().setStrokeStyle(SolidStroke);
     paintInfo.context().setStrokeColor(style().visitedDependentColorWithColorFilter(CSSPropertyColor));
-    paintInfo.context().setFillColor(Color::transparent);
+    paintInfo.context().setFillColor(Color::transparentBlack);
     paintInfo.applyTransform(AffineTransform().translate(paintOffset + location()));
 
     // In the MathML in HTML5 implementation note, the "left" notation is described as follows:

Modified: trunk/Source/WebCore/rendering/style/RenderStyle.cpp (264584 => 264585)


--- trunk/Source/WebCore/rendering/style/RenderStyle.cpp	2020-07-19 20:07:07 UTC (rev 264584)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.cpp	2020-07-19 22:39:50 UTC (rev 264585)
@@ -2059,7 +2059,7 @@
     // we're returning unvisited info for a visited link, but given our restriction that the alpha values
     // have to match, it makes more sense to return the unvisited background color if specified than it
     // does to return black. This behavior matches what Firefox 4 does as well.
-    if (colorProperty == CSSPropertyBackgroundColor && visitedColor == Color::transparent)
+    if (colorProperty == CSSPropertyBackgroundColor && visitedColor == Color::transparentBlack)
         return unvisitedColor;
 
     // Take the alpha from the unvisited color, but get the RGB values from the visited color.

Modified: trunk/Source/WebCore/rendering/style/RenderStyle.h (264584 => 264585)


--- trunk/Source/WebCore/rendering/style/RenderStyle.h	2020-07-19 20:07:07 UTC (rev 264584)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.h	2020-07-19 22:39:50 UTC (rev 264585)
@@ -1320,7 +1320,7 @@
     const Color& visitedLinkStrokeColor() const { return m_rareInheritedData->visitedLinkStrokeColor; }
     void setHasExplicitlySetStrokeColor(bool v) { SET_VAR(m_rareInheritedData, hasSetStrokeColor, static_cast<unsigned>(v)); }
     bool hasExplicitlySetStrokeColor() const { return m_rareInheritedData->hasSetStrokeColor; };
-    static Color initialStrokeColor() { return Color::transparent; }
+    static Color initialStrokeColor() { return Color::transparentBlack; }
     Color computedStrokeColor() const;
 
     float strokeMiterLimit() const { return m_rareInheritedData->miterLimit; }
@@ -1601,7 +1601,7 @@
     static float initialPerspective() { return 0; }
     static Length initialPerspectiveOriginX() { return Length(50.0f, Percent); }
     static Length initialPerspectiveOriginY() { return Length(50.0f, Percent); }
-    static Color initialBackgroundColor() { return Color::transparent; }
+    static Color initialBackgroundColor() { return Color::transparentBlack; }
     static Color initialTextEmphasisColor() { return currentColor(); }
     static TextEmphasisFill initialTextEmphasisFill() { return TextEmphasisFill::Filled; }
     static TextEmphasisMark initialTextEmphasisMark() { return TextEmphasisMark::None; }

Modified: trunk/Source/WebCore/style/StyleBuilderCustom.h (264584 => 264585)


--- trunk/Source/WebCore/style/StyleBuilderCustom.h	2020-07-19 20:07:07 UTC (rev 264584)
+++ trunk/Source/WebCore/style/StyleBuilderCustom.h	2020-07-19 22:39:50 UTC (rev 264585)
@@ -833,7 +833,7 @@
         else
             color = builderState.style().color();
 
-        auto shadowData = makeUnique<ShadowData>(LayoutPoint(x, y), blur, spread, shadowStyle, property == CSSPropertyWebkitBoxShadow, color.isValid() ? color : Color::transparent);
+        auto shadowData = makeUnique<ShadowData>(LayoutPoint(x, y), blur, spread, shadowStyle, property == CSSPropertyWebkitBoxShadow, color.isValid() ? color : Color::transparentBlack);
         if (property == CSSPropertyTextShadow)
             builderState.style().setTextShadow(WTFMove(shadowData), !isFirstEntry); // add to the list if this is not the first entry
         else

Modified: trunk/Source/WebCore/style/StyleBuilderState.cpp (264584 => 264585)


--- trunk/Source/WebCore/style/StyleBuilderState.cpp	2020-07-19 20:07:07 UTC (rev 264584)
+++ trunk/Source/WebCore/style/StyleBuilderState.cpp	2020-07-19 22:39:50 UTC (rev 264585)
@@ -266,7 +266,7 @@
             if (item.color)
                 color = colorFromPrimitiveValueWithResolvedCurrentColor(*item.color);
 
-            operations.operations().append(DropShadowFilterOperation::create(location, blur, color.isValid() ? color : Color::transparent));
+            operations.operations().append(DropShadowFilterOperation::create(location, blur, color.isValid() ? color : Color::transparentBlack));
             break;
         }
         default:

Modified: trunk/Source/WebCore/svg/SVGStopElement.cpp (264584 => 264585)


--- trunk/Source/WebCore/svg/SVGStopElement.cpp	2020-07-19 20:07:07 UTC (rev 264584)
+++ trunk/Source/WebCore/svg/SVGStopElement.cpp	2020-07-19 22:39:50 UTC (rev 264585)
@@ -88,7 +88,7 @@
 Color SVGStopElement::stopColorIncludingOpacity() const
 {
     if (!renderer())
-        return Color::transparent;
+        return Color::transparentBlack;
 
     auto& style = renderer()->style();
     auto& svgStyle = style.svgStyle();

Modified: trunk/Source/WebCore/testing/Internals.cpp (264584 => 264585)


--- trunk/Source/WebCore/testing/Internals.cpp	2020-07-19 20:07:07 UTC (rev 264584)
+++ trunk/Source/WebCore/testing/Internals.cpp	2020-07-19 22:39:50 UTC (rev 264585)
@@ -1960,7 +1960,7 @@
         return Exception { InvalidAccessError };
     Optional<Color> backgroundColor;
     if (transparent)
-        backgroundColor = Color(Color::transparent);
+        backgroundColor = Color(Color::transparentBlack);
     document->view()->updateBackgroundRecursively(backgroundColor);
     return { };
 }
@@ -1980,7 +1980,7 @@
         return Exception { InvalidAccessError };
 
     if (colorValue == "transparent") {
-        document->view()->setBaseBackgroundColor(Color::transparent);
+        document->view()->setBaseBackgroundColor(Color::transparentBlack);
         return { };
     }
     if (colorValue == "white") {

Modified: trunk/Source/WebKit/ChangeLog (264584 => 264585)


--- trunk/Source/WebKit/ChangeLog	2020-07-19 20:07:07 UTC (rev 264584)
+++ trunk/Source/WebKit/ChangeLog	2020-07-19 22:39:50 UTC (rev 264585)
@@ -1,5 +1,29 @@
 2020-07-19  Sam Weinig  <[email protected]>
 
+        Rename Color::transparent to Color::transparentBlack to more clearly state what it is
+        https://bugs.webkit.org/show_bug.cgi?id=214522
+
+        Reviewed by Darin Adler.
+
+        * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm:
+        (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties):
+        * UIProcess/API/ios/WKWebViewIOS.mm:
+        (scrollViewBackgroundColor):
+        (-[WKWebView _setOpaqueInternal:]):
+        * UIProcess/Cocoa/WebViewImpl.mm:
+        (WebKit::WebViewImpl::setDrawsBackground):
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::m_transcodingQueue):
+        * WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp:
+        (webkitWebPageDidReceiveMessage):
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::snapshotNode):
+        * WebProcess/cocoa/VideoFullscreenManager.mm:
+        (WebKit::VideoFullscreenManager::enterVideoFullscreenForVideoElement):
+        Color::transparent to Color::transparentBlack.
+
+2020-07-19  Sam Weinig  <[email protected]>
+
         Remove ColorBuilder
         https://bugs.webkit.org/show_bug.cgi?id=214521
 

Modified: trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm (264584 => 264585)


--- trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm	2020-07-19 20:07:07 UTC (rev 264584)
+++ trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm	2020-07-19 22:39:50 UTC (rev 264585)
@@ -92,7 +92,7 @@
     , cornerRadius(0)
     , borderWidth(0)
     , opacity(1)
-    , backgroundColor(WebCore::Color::transparent)
+    , backgroundColor(WebCore::Color::transparentBlack)
     , borderColor(WebCore::Color::black)
     , edgeAntialiasingMask(kCALayerLeftEdge | kCALayerRightEdge | kCALayerBottomEdge | kCALayerTopEdge)
     , customAppearance(WebCore::GraphicsLayer::CustomAppearance::None)

Modified: trunk/Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm (264584 => 264585)


--- trunk/Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm	2020-07-19 20:07:07 UTC (rev 264584)
+++ trunk/Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm	2020-07-19 22:39:50 UTC (rev 264585)
@@ -489,7 +489,7 @@
 static WebCore::Color scrollViewBackgroundColor(WKWebView *webView)
 {
     if (!webView.opaque)
-        return WebCore::Color::transparent;
+        return WebCore::Color::transparentBlack;
 
 #if HAVE(OS_DARK_MODE_SUPPORT)
     WebCore::LocalCurrentTraitCollection localTraitCollection(webView.traitCollection);
@@ -1415,7 +1415,7 @@
 
     Optional<WebCore::Color> backgroundColor;
     if (!opaque)
-        backgroundColor = WebCore::Color(WebCore::Color::transparent);
+        backgroundColor = WebCore::Color(WebCore::Color::transparentBlack);
     _page->setBackgroundColor(backgroundColor);
 
     [self _updateScrollViewBackground];

Modified: trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm (264584 => 264585)


--- trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm	2020-07-19 20:07:07 UTC (rev 264584)
+++ trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm	2020-07-19 22:39:50 UTC (rev 264585)
@@ -1501,7 +1501,7 @@
 {
     Optional<WebCore::Color> backgroundColor;
     if (!drawsBackground)
-        backgroundColor = WebCore::Color(WebCore::Color::transparent);
+        backgroundColor = WebCore::Color(WebCore::Color::transparentBlack);
     m_page->setBackgroundColor(backgroundColor);
 
     // Make sure updateLayer gets called on the web view.

Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.cpp (264584 => 264585)


--- trunk/Source/WebKit/UIProcess/WebPageProxy.cpp	2020-07-19 20:07:07 UTC (rev 264584)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.cpp	2020-07-19 22:39:50 UTC (rev 264585)
@@ -500,7 +500,7 @@
     RELEASE_LOG_IF_ALLOWED(Loading, "constructor:");
 
     if (!m_configuration->drawsBackground())
-        m_backgroundColor = Color(Color::transparent);
+        m_backgroundColor = Color(Color::transparentBlack);
 
     updateActivityState();
     updateThrottleState();

Modified: trunk/Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp (264584 => 264585)


--- trunk/Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp	2020-07-19 20:07:07 UTC (rev 264584)
+++ trunk/Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp	2020-07-19 22:39:50 UTC (rev 264585)
@@ -746,7 +746,7 @@
                 Color savedBackgroundColor;
                 if (transparentBackground) {
                     savedBackgroundColor = frameView->baseBackgroundColor();
-                    frameView->setBaseBackgroundColor(Color::transparent);
+                    frameView->setBaseBackgroundColor(Color::transparentBlack);
                 }
                 snapshotImage = webPage->scaledSnapshotWithOptions(snapshotRect, 1, snapshotOptions | SnapshotOptionsShareable);
                 if (transparentBackground)

Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp (264584 => 264585)


--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp	2020-07-19 20:07:07 UTC (rev 264584)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp	2020-07-19 22:39:50 UTC (rev 264585)
@@ -2492,7 +2492,7 @@
     graphicsContext->translate(-snapshotRect.location());
 
     Color savedBackgroundColor = frameView->baseBackgroundColor();
-    frameView->setBaseBackgroundColor(Color::transparent);
+    frameView->setBaseBackgroundColor(Color::transparentBlack);
     frameView->setNodeToDraw(&node);
 
     frameView->paintContentsForSnapshot(*graphicsContext, snapshotRect, FrameView::ExcludeSelection, FrameView::DocumentCoordinates);

Modified: trunk/Source/WebKit/WebProcess/cocoa/VideoFullscreenManager.mm (264584 => 264585)


--- trunk/Source/WebKit/WebProcess/cocoa/VideoFullscreenManager.mm	2020-07-19 20:07:07 UTC (rev 264584)
+++ trunk/Source/WebKit/WebProcess/cocoa/VideoFullscreenManager.mm	2020-07-19 22:39:50 UTC (rev 264585)
@@ -275,7 +275,7 @@
         [videoLayer setDelegate:[WebActionDisablingCALayerDelegate shared]];
         [videoLayer setName:@"Web Video Fullscreen Layer"];
         [videoLayer setPosition:CGPointMake(0, 0)];
-        [videoLayer setBackgroundColor:cachedCGColor(WebCore::Color::transparent)];
+        [videoLayer setBackgroundColor:cachedCGColor(WebCore::Color::transparentBlack)];
 
         // Set a scale factor here to make convertRect:toLayer:nil take scale factor into account. <rdar://problem/18316542>.
         // This scale factor is inverted in the hosting process.

Modified: trunk/Source/WebKitLegacy/win/ChangeLog (264584 => 264585)


--- trunk/Source/WebKitLegacy/win/ChangeLog	2020-07-19 20:07:07 UTC (rev 264584)
+++ trunk/Source/WebKitLegacy/win/ChangeLog	2020-07-19 22:39:50 UTC (rev 264585)
@@ -1,3 +1,16 @@
+2020-07-19  Sam Weinig  <[email protected]>
+
+        Rename Color::transparent to Color::transparentBlack to more clearly state what it is
+        https://bugs.webkit.org/show_bug.cgi?id=214522
+
+        Reviewed by Darin Adler.
+
+        * WebCoreSupport/WebFrameLoaderClient.cpp:
+        (WebFrameLoaderClient::transitionToCommittedForNewPage):
+        * WebFrame.cpp:
+        (WebFrame::updateBackground):
+        Color::transparent to Color::transparentBlack.
+
 2020-07-17  Sam Weinig  <[email protected]>
 
         Remove final vestigates of SimpleColor

Modified: trunk/Source/WebKitLegacy/win/WebCoreSupport/WebFrameLoaderClient.cpp (264584 => 264585)


--- trunk/Source/WebKitLegacy/win/WebCoreSupport/WebFrameLoaderClient.cpp	2020-07-19 20:07:07 UTC (rev 264584)
+++ trunk/Source/WebKitLegacy/win/WebCoreSupport/WebFrameLoaderClient.cpp	2020-07-19 22:39:50 UTC (rev 264585)
@@ -960,7 +960,7 @@
     view->frameRect(&pixelRect);
     Optional<Color> backgroundColor;
     if (view->transparent())
-        backgroundColor = Color(Color::transparent);
+        backgroundColor = Color(Color::transparentBlack);
     FloatRect logicalFrame(pixelRect);
     logicalFrame.scale(1.0f / view->deviceScaleFactor());
     core(m_webFrame)->createView(enclosingIntRect(logicalFrame).size(), backgroundColor, /* fixedLayoutSize */ { }, /* fixedVisibleContentRect */ { });

Modified: trunk/Source/WebKitLegacy/win/WebFrame.cpp (264584 => 264585)


--- trunk/Source/WebKitLegacy/win/WebFrame.cpp	2020-07-19 20:07:07 UTC (rev 264584)
+++ trunk/Source/WebKitLegacy/win/WebFrame.cpp	2020-07-19 22:39:50 UTC (rev 264585)
@@ -2137,7 +2137,7 @@
 
     Optional<Color> backgroundColor;
     if (webView()->transparent())
-        backgroundColor = Color(Color::transparent);
+        backgroundColor = Color(Color::transparentBlack);
     coreFrame->view()->updateBackgroundRecursively(backgroundColor);
 }
 

Modified: trunk/Tools/ChangeLog (264584 => 264585)


--- trunk/Tools/ChangeLog	2020-07-19 20:07:07 UTC (rev 264584)
+++ trunk/Tools/ChangeLog	2020-07-19 22:39:50 UTC (rev 264585)
@@ -1,3 +1,14 @@
+2020-07-19  Sam Weinig  <[email protected]>
+
+        Rename Color::transparent to Color::transparentBlack to more clearly state what it is
+        https://bugs.webkit.org/show_bug.cgi?id=214522
+
+        Reviewed by Darin Adler.
+
+        * TestWebKitAPI/cocoa/TestPDFDocument.mm:
+        (TestWebKitAPI::TestPDFPage::colorAtPoint const):
+        Update for rename from Color::transparent to Color::transparentBlack.
+
 2020-07-19  Michael Catanzaro  <[email protected]>
 
         cpp.py:3688: FutureWarning: Possible nested set at position 101

Modified: trunk/Tools/TestWebKitAPI/cocoa/TestPDFDocument.mm (264584 => 264585)


--- trunk/Tools/TestWebKitAPI/cocoa/TestPDFDocument.mm	2020-07-19 20:07:07 UTC (rev 264584)
+++ trunk/Tools/TestWebKitAPI/cocoa/TestPDFDocument.mm	2020-07-19 22:39:50 UTC (rev 264585)
@@ -144,7 +144,7 @@
     auto a = pixel[i + 3];
 
     if (!a)
-        return WebCore::Color::transparent;
+        return WebCore::Color::transparentBlack;
     return WebCore::clampToComponentBytes<WebCore::SRGBA>(r * 255 / a, g * 255 / a, b * 255 / a, a);
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to