[webdriver] test_clip_huge_element_to_viewport expects innerWidth, but screenshots clip to the visual viewport
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 65/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- html, javascript
- Domain
- testing
Research direction
Read webdriver/tests/classic/take_element_screenshot/screenshot.py::test_clip_huge_element_to_viewport and compare its expected screenshot width with the visual viewport width when classic scroll bars are present. Check how the test handles devicePixelRatio and the existing visual viewport height expectation; done means the width expectation matches the reported screenshot dimensions for both classic and overlay scroll bars.
Written by the indexing model from the issue text.
Description
webdriver/tests/classic/take_element_screenshot/screenshot.py::test_clip_huge_element_to_viewport expects the screenshot of a 32768 × 32768 px element to be window.innerWidth × window.visualViewport.height, times devicePixelRatio.
Since w3c/webdriver#1951, draw a bounding box from the framebuffer clips to the visual viewport, whose width doesn't include a classic vertical scroll bar. With classic scroll bars, which the huge element gets in both directions, the expected width would be window.visualViewport.width, as the height already is since 5ec7567c1e (Mozilla bug 2013176).
WebKit on macOS with classic scroll bars returns 1566 × 1028 where the test expects 1600 × 1028: its width is visualViewport.width × devicePixelRatio. With overlay scroll bars, the two widths are the same, and the test passes.
Should the test use window.visualViewport.width for the width too? cc @Sameem-baba
- Dominant language
- HTML
- Stars
- 6.3k
- Forks
- 4.1k
- Avg merge
- 17h 20m
- Merged PRs (30d)
- 841
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from web-platform-tests/wpt
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
web-platform-tests/wpt#65844 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
web-platform-tests/wpt#65836 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
web-platform-tests/wpt#65831 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
web-platform-tests/wpt#65826 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
web-platform-tests/wpt#65823 ·
Maintainers usually reply within 1 day
All issues in web-platform-tests/wpt
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
enhancement good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
agent/scanner bug stage/010-actionable
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
torch-spyre/spyre-inference#1849 ·
Maintainers usually reply within 2 days
-
tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day