Bug 225726 - [macOS] experimental "Use theme color for scroll area background" isn't working
Summary: [macOS] experimental "Use theme color for scroll area background" isn't working
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Devin Rousso
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-05-12 18:05 PDT by Devin Rousso
Modified: 2021-05-13 16:11 PDT (History)
12 users (show)

See Also:


Attachments
Patch (3.53 KB, patch)
2021-05-12 18:09 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff
Patch (3.56 KB, patch)
2021-05-13 15:06 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Devin Rousso 2021-05-12 18:05:19 PDT
.
Comment 1 Devin Rousso 2021-05-12 18:05:35 PDT
<rdar://problem/77933000>
Comment 2 Devin Rousso 2021-05-12 18:09:07 PDT
Created attachment 428442 [details]
Patch
Comment 3 Tim Horton 2021-05-12 19:34:55 PDT
Comment on attachment 428442 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=428442&action=review

> Source/WebCore/rendering/RenderLayerCompositor.cpp:-3997
> -                m_layerForOverhangAreas->setCustomAppearance(GraphicsLayer::CustomAppearance::ScrollingOverhang);

"CustomAppearance::ScrollingOverhang" can we get rid of this now?
Comment 4 Simon Fraser (smfr) 2021-05-12 20:38:05 PDT
Comment on attachment 428442 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=428442&action=review

> Source/WebCore/rendering/RenderLayerCompositor.cpp:3889
> +        if (page().settings().useThemeColorForScrollAreaBackgroundColor())
> +            backgroundColor = page().themeColor();
> +        if (page().settings().useSampledPageTopColorForScrollAreaBackgroundColor() && !backgroundColor.isValid())
> +            backgroundColor = page().sampledPageTopColor();
> +        if (!backgroundColor.isValid())
> +            backgroundColor = m_rootExtendedBackgroundColor;

Would be nicer to wrap this in a lambda that returns a Color.

>> Source/WebCore/rendering/RenderLayerCompositor.cpp:-3997
>> -                m_layerForOverhangAreas->setCustomAppearance(GraphicsLayer::CustomAppearance::ScrollingOverhang);
> 
> "CustomAppearance::ScrollingOverhang" can we get rid of this now?

It seems no? The backgroundShouldExtendBeyondPage setting has a default value of false.
Comment 5 Tim Horton 2021-05-12 21:09:49 PDT
Comment on attachment 428442 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=428442&action=review

>>> Source/WebCore/rendering/RenderLayerCompositor.cpp:-3997
>>> -                m_layerForOverhangAreas->setCustomAppearance(GraphicsLayer::CustomAppearance::ScrollingOverhang);
>> 
>> "CustomAppearance::ScrollingOverhang" can we get rid of this now?
> 
> It seems no? The backgroundShouldExtendBeyondPage setting has a default value of false.

OH, I missed the code in updateLayerForOverhangAreasBackgroundColor that sets it, and thought this removed the setCustomAppearance() :D
Comment 6 Devin Rousso 2021-05-13 15:06:59 PDT
Created attachment 428567 [details]
Patch
Comment 7 EWS 2021-05-13 16:11:14 PDT
Committed r277459 (237703@main): <https://commits.webkit.org/237703@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 428567 [details].