Capture full size screenshot is broken: Incorrect pixel dimensions

1,739 views
Skip to first unread message

guest271314

unread,
Jan 10, 2021, 11:08:48 AM1/10/21
to Chrome DevTools
Steps to reproduce:

2. CTRL+SHIFT+I (open DevTools).
3. Take note of document.body.clientHeight (2718) an document.body.clientWidth (1009).  Both initial values are incorrect, which we shall prove in the next steps.
4. CTRL+SHIFT+P (run command)
5. Type "Capture full size screenshot" then press ENTER
6. Take note of the resulting image pixel dimensions (1009 x 2718)

The resulting screenshot pixel dimensions are incorrect. That fact is observable at the clipped bottom of the image.

7. Open Mozilla Firefox or Nightly, repeat 1.
9. Type ":screenshot --fullpage" then press ENTER
10. Take note of the resulting image pixel dimensions (1015 x 2752)

References: 


- Puppeteer takes partial page screenshot instead of full page #1273 https://github.com/puppeteer/puppeteer/issues/1273#issuecomment-703360535 et al.

See also

- Getting wrong window height in chrome https://stackoverflow.com/q/65453475

- CSS max-width has inaccurate pixel precision https://stackoverflow.com/q/65470317

Chromium 89.0.4384.0 (Developer Build) (64-bit) #841827

developer.mozilla.org_en-US_.png

Firefox 84

Screen Shot 2021-01-10 at 07.41.31-fullpage.png

guest271314

unread,
Jan 10, 2021, 11:16:50 AM1/10/21
to Chrome DevTools
Reply all
Reply to author
Forward
0 new messages