Skip to content

[gap-decorations] Allow gap decorations to be painted on window resize #53003

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 6, 2025

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Jun 6, 2025

This CL fixes a bug where in some cases gap decorations wouldn't be
resized/painted correctly when the window resized.

The issue seemed to be that using the
ScrollingBackgroundDisplayItemClient for painting the decorations
would cause this issue, because it seemingly doesn't get marked for
invalidation, which causes the code to use the same drawing recorder
that is used when the window first loads, and doesn't create a new one
when the window is resized since UseCachedDrawingIfPossible returns
true for the recorder for that background client. On the flip side,
the DisplayItemClient does get marked for invalidation, so we create
a new recorder for the gap decorations when the window is resized.

Bug: 357648037
Fixed: 422216073
Change-Id: Iabe7ce4fb88e724edd333268ace156299e20c72b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6618134
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Javier Contreras <javiercon@microsoft.com>
Reviewed-by: Sam Davis Omekara <samomekarajr@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1470739}

This CL fixes a bug where in some cases gap decorations wouldn't be
resized/painted correctly when the window resized.

The issue seemed to be that using the
`ScrollingBackgroundDisplayItemClient` for painting the decorations
would cause this issue, because it seemingly doesn't get marked for
invalidation, which causes the code to use the same drawing recorder
that is used when the window first loads, and doesn't create a new one
when the window is resized since `UseCachedDrawingIfPossible` returns
true for the recorder for that background client. On the flip side,
the DisplayItemClient does get marked for invalidation, so we create
a new recorder for the gap decorations when the window is resized.

Bug: 357648037
Fixed: 422216073
Change-Id: Iabe7ce4fb88e724edd333268ace156299e20c72b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6618134
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Javier Contreras <javiercon@microsoft.com>
Reviewed-by: Sam Davis Omekara <samomekarajr@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1470739}
Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review process for this patch is being conducted in the Chromium project.

@chromium-wpt-export-bot chromium-wpt-export-bot merged commit 06069c6 into master Jun 6, 2025
18 checks passed
@chromium-wpt-export-bot chromium-wpt-export-bot deleted the chromium-export-cl-6618134 branch June 6, 2025 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants