Title: [277459] trunk/Source/WebCore
- Revision
- 277459
- Author
- drou...@apple.com
- Date
- 2021-05-13 16:11:06 -0700 (Thu, 13 May 2021)
Log Message
[macOS] experimental "Use theme color for scroll area background" isn't working
https://bugs.webkit.org/show_bug.cgi?id=225726
<rdar://problem/77933000>
Reviewed by Tim Horton.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateLayerForOverhangAreasBackgroundColor):
(WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
Fix last remaining `m_layerForOverhangAreas->setBackgroundColor` to use the helper function
`RenderLayerCompositor::updateLayerForOverhangAreasBackgroundColor` instead so that all
paths that update the overscroll area color check the experimental settings too.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (277458 => 277459)
--- trunk/Source/WebCore/ChangeLog 2021-05-13 23:03:56 UTC (rev 277458)
+++ trunk/Source/WebCore/ChangeLog 2021-05-13 23:11:06 UTC (rev 277459)
@@ -1,3 +1,18 @@
+2021-05-13 Devin Rousso <drou...@apple.com>
+
+ [macOS] experimental "Use theme color for scroll area background" isn't working
+ https://bugs.webkit.org/show_bug.cgi?id=225726
+ <rdar://problem/77933000>
+
+ Reviewed by Tim Horton.
+
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::updateLayerForOverhangAreasBackgroundColor):
+ (WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
+ Fix last remaining `m_layerForOverhangAreas->setBackgroundColor` to use the helper function
+ `RenderLayerCompositor::updateLayerForOverhangAreasBackgroundColor` instead so that all
+ paths that update the overscroll area color check the experimental settings too.
+
2021-05-13 Megan Gardner <megan_gard...@apple.com>
Add textIndicator bounce for AppHighlights on scroll.
Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp (277458 => 277459)
--- trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp 2021-05-13 23:03:56 UTC (rev 277458)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp 2021-05-13 23:11:06 UTC (rev 277459)
@@ -3879,15 +3879,24 @@
return;
Color backgroundColor;
- if (page().settings().useThemeColorForScrollAreaBackgroundColor())
- backgroundColor = page().themeColor();
- if (page().settings().useSampledPageTopColorForScrollAreaBackgroundColor() && !backgroundColor.isValid())
- backgroundColor = page().sampledPageTopColor();
- if (!backgroundColor.isValid())
- backgroundColor = m_rootExtendedBackgroundColor;
- m_layerForOverhangAreas->setBackgroundColor(backgroundColor);
+ if (m_renderView.settings().backgroundShouldExtendBeyondPage()) {
+ backgroundColor = ([&] {
+ if (page().settings().useThemeColorForScrollAreaBackgroundColor()) {
+ if (auto themeColor = page().themeColor(); themeColor.isValid())
+ return themeColor;
+ }
+ if (page().settings().useSampledPageTopColorForScrollAreaBackgroundColor()) {
+ if (auto sampledPageTopColor = page().sampledPageTopColor(); sampledPageTopColor.isValid())
+ return sampledPageTopColor;
+ }
+
+ return m_rootExtendedBackgroundColor;
+ })();
+ m_layerForOverhangAreas->setBackgroundColor(backgroundColor);
+ }
+
if (!backgroundColor.isValid())
m_layerForOverhangAreas->setCustomAppearance(GraphicsLayer::CustomAppearance::ScrollingOverhang);
}
@@ -3990,12 +3999,8 @@
m_layerForOverhangAreas->setSize(overhangAreaSize);
m_layerForOverhangAreas->setPosition(FloatPoint(0, topContentInset));
m_layerForOverhangAreas->setAnchorPoint(FloatPoint3D());
+ updateLayerForOverhangAreasBackgroundColor();
- if (m_renderView.settings().backgroundShouldExtendBeyondPage())
- m_layerForOverhangAreas->setBackgroundColor(m_renderView.frameView().documentBackgroundColor());
- else
- m_layerForOverhangAreas->setCustomAppearance(GraphicsLayer::CustomAppearance::ScrollingOverhang);
-
// We want the overhang areas layer to be positioned below the frame contents,
// so insert it below the clip layer.
m_overflowControlsHostLayer->addChildBelow(*m_layerForOverhangAreas, layerForClipping());
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes