Skip to content
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

UI-side Compositing: PDF scrollbars are not draggable and don't grow when hovered #11880

Merged
merged 1 commit into from Mar 23, 2023

Conversation

rr-codes
Copy link
Contributor

@rr-codes rr-codes commented Mar 23, 2023

6d3572a

UI-side Compositing: PDF scrollbars are not draggable and don't grow when hovered
https://bugs.webkit.org/show_bug.cgi?id=254363
rdar://105908418

Reviewed by Tim Horton.

For some reason, when UI-side compositing is enabled, the scrollbar's layer's backing store
is larger than the layer itself when viewing a zoomed-in PDF. This causes the scrollbar's
appearance's y-value to be offset by some amount.

This PR works around this by clearing the contents of the layer so that CoreAnimation creates
a new backing store whenever the frame's change, which forces the new backing store to have the
correct size.

* Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::updateScrollbars):

Canonical link: https://commits.webkit.org/262043@main

562bfa8

Misc iOS, tvOS & watchOS macOS Linux Windows
βœ… πŸ§ͺ style βœ… πŸ›  ios βœ… πŸ›  mac βœ… πŸ›  wpe βœ… πŸ›  wincairo
βœ… πŸ›  ios-sim βœ… πŸ›  mac-AS-debug βœ… πŸ§ͺ wpe-wk2
βœ… πŸ§ͺ webkitperl   πŸ§ͺ ios-wk2 βœ… πŸ§ͺ api-mac βœ… πŸ›  gtk
  πŸ§ͺ api-ios βœ… πŸ§ͺ mac-wk1   πŸ§ͺ gtk-wk2
βœ… πŸ›  tv βœ… πŸ§ͺ mac-wk2 ⏳ πŸ§ͺ api-gtk
βœ… πŸ›  tv-sim   πŸ§ͺ mac-AS-debug-wk2
βœ… πŸ›  watch βœ… πŸ§ͺ mac-wk2-stress
βœ… πŸ›  πŸ§ͺ merge βœ… πŸ›  watch-sim

@rr-codes rr-codes requested a review from cdumez as a code owner March 23, 2023 20:32
@rr-codes rr-codes self-assigned this Mar 23, 2023
@rr-codes rr-codes added the PDF For bugs in WebKit's built-in PDF support. label Mar 23, 2023
Copy link
Contributor

@hortont424 hortont424 left a comment

Choose a reason for hiding this comment

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

I still wish we knew what was going on here.

@rr-codes rr-codes added the merge-queue Applied to send a pull request to merge-queue label Mar 23, 2023
…when hovered

https://bugs.webkit.org/show_bug.cgi?id=254363
rdar://105908418

Reviewed by Tim Horton.

For some reason, when UI-side compositing is enabled, the scrollbar's layer's backing store
is larger than the layer itself when viewing a zoomed-in PDF. This causes the scrollbar's
appearance's y-value to be offset by some amount.

This PR works around this by clearing the contents of the layer so that CoreAnimation creates
a new backing store whenever the frame's change, which forces the new backing store to have the
correct size.

* Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::updateScrollbars):

Canonical link: https://commits.webkit.org/262043@main
@webkit-commit-queue
Copy link
Collaborator

Committed 262043@main (6d3572a): https://commits.webkit.org/262043@main

Reviewed commits have been landed. Closing PR #11880 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit 6d3572a into WebKit:main Mar 23, 2023
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Mar 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PDF For bugs in WebKit's built-in PDF support.
Projects
None yet
4 participants