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

Add a transparent hit-testing rectangle for scrollable block content. #22156

Merged
merged 1 commit into from Nov 10, 2018

Conversation

Projects
None yet
5 participants
@jdm
Member

jdm commented Nov 9, 2018

This implements the strategy described at servo/webrender#3261 (comment) and which Gecko uses as well. Adding a transparent rectangle below the content and above the background ensures that hit testing correctly associates the background area with the right scrolling node.


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes fix #22073
  • These changes do not require tests because the affected codepath requires user input, and we don't support webdriver tests yet.

This change is Reviewable

@highfive

This comment has been minimized.

highfive commented Nov 9, 2018

Heads up! This PR modifies the following files:

  • @emilio: components/layout/display_list/builder.rs
@highfive

This comment has been minimized.

highfive commented Nov 9, 2018

warning Warning warning

  • These commits modify layout code, but no tests are modified. Please consider adding a test!
@jdm

This comment has been minimized.

Member

jdm commented Nov 9, 2018

@highfive highfive assigned pcwalton and unassigned nox Nov 9, 2018

@jdm

This comment has been minimized.

Member

jdm commented Nov 9, 2018

This allows http://asvd.github.io/dragscroll/ to be scrolled with the trackpad regardless of where the mouse is placed.

@pcwalton

This comment has been minimized.

Contributor

pcwalton commented Nov 10, 2018

r+

@jdm

This comment has been minimized.

Member

jdm commented Nov 10, 2018

@bors-servo r=pcwalton

@bors-servo

This comment has been minimized.

Contributor

bors-servo commented Nov 10, 2018

📌 Commit 1eee3c7 has been approved by pcwalton

@bors-servo

This comment has been minimized.

Contributor

bors-servo commented Nov 10, 2018

⌛️ Testing commit 1eee3c7 with merge b60006a...

bors-servo added a commit that referenced this pull request Nov 10, 2018

Auto merge of #22156 - jdm:wr-scroll, r=pcwalton
Add a transparent hit-testing rectangle for scrollable block content.

This implements the strategy described at servo/webrender#3261 (comment) and which Gecko uses as well. Adding a transparent rectangle below the content and above the background ensures that hit testing correctly associates the background area with the right scrolling node.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #22073
- [x] These changes do not require tests because the affected codepath requires user input, and we don't support webdriver tests yet.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22156)
<!-- Reviewable:end -->
@bors-servo

This comment has been minimized.

Contributor

bors-servo commented Nov 10, 2018

@bors-servo bors-servo merged commit 1eee3c7 into servo:master Nov 10, 2018

2 of 3 checks passed

continuous-integration/appveyor/pr AppVeyor build failed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment