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

Certain tiles on Browser.html new tab page not clickable #22216

Closed
atouchet opened this issue Nov 18, 2018 · 3 comments
Closed

Certain tiles on Browser.html new tab page not clickable #22216

atouchet opened this issue Nov 18, 2018 · 3 comments

Comments

@atouchet
Copy link
Contributor

@atouchet atouchet commented Nov 18, 2018

URL: https://servo.org/bhtml-newtab/newtab.html

Steps to reproduce:

  1. Load https://servo.org/bhtml-newtab/newtab.html in a window.
  2. Try to click on the tiles.
  3. Only the bottom and rightmost tiles can be clicked on. It appears that the first ~840 horizontal pixels cannot be clicked on. This is consistent if the window is resized.

This issue first occurred in the 2018-11-11 nightly build. Tested in Windows 10.

@jdm
Copy link
Member

@jdm jdm commented Nov 18, 2018

This is a regression from #22156.

@jdm
Copy link
Member

@jdm jdm commented Nov 18, 2018

@jdm
Copy link
Member

@jdm jdm commented Feb 5, 2019

<html>
<head>
    <meta charset="utf-8">
    <title>Servo about:newtab</title>
    <style>
      * {
      margin: 0;
      padding: 0;
      border-width: 0;
      }

      .tiles {
      background-color: red;
      overflow: hidden;
      }
      .tile-image {
      background-color: green;
      border: 1px solid black;
      height: 100px;
      width: 160px;
      }
    </style>
</head>
<body>
  <div id="bg" class="tiles">
    <a id="anchor" target="_blank" rel="noopener noreferrer" href="https://duckduckgo.com/html/">
      <div id="tile" class="tile-image duckduckgo"></div>
    </a>
  </div>
  <script>
    onload = function() {
      console.log(document.elementFromPoint(10, 10).id);
    };
  </script>
</body>

In Firefox and pre-regression Servo this prints tile. In nightly Servo this prints bg.

bors-servo added a commit that referenced this issue Feb 6, 2019
Ensure transparent hit test region is sized and positioned correctly.

This addresses some edge cases that were missed by #22156. Specifically, in some cases the transparent region was being placed in the display list in front of the scrollable content, rather than behind it, and the size of the region did not account for parent stacking context.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #22073 and fix #22216.
- [x] There are tests for these changes

<!-- 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/22839)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this issue Feb 6, 2019
Ensure transparent hit test region is sized and positioned correctly.

This addresses some edge cases that were missed by #22156. Specifically, in some cases the transparent region was being placed in the display list in front of the scrollable content, rather than behind it, and the size of the region did not account for parent stacking context.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #22073 and fix #22216.
- [x] There are tests for these changes

<!-- 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/22839)
<!-- Reviewable:end -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants
You can’t perform that action at this time.