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

Make full-page-screenshot resistant to layout shifts #11118

Closed
connorjclark opened this issue Jul 17, 2020 · 1 comment · Fixed by #11536
Closed

Make full-page-screenshot resistant to layout shifts #11118

connorjclark opened this issue Jul 17, 2020 · 1 comment · Fixed by #11536
Assignees

Comments

@connorjclark
Copy link
Collaborator

connorjclark commented Jul 17, 2020

ref #10716 (comment)

Possible fixes:

  • somehow iterate all the elements we gathered w/ bounding rects and do a last-call on their position
  • there's more in that comment but I don't think they are a full solution

wip branch: resolve-nodes

@paulirish
Copy link
Member

Possible fixes:
[...]
there's more in that comment but I don't think they are a full solution

hah yeah from the comment I mentioned the 3 below items

  1. disabling JS
    • we've since looked into this. it almost seems to work. we do a await driver.sendCommand('Emulation.setScriptExecutionDisabled', {value: true}); on either side of GatherRunner.afterPass.. Setting this means the page cannot run JS however our evaluateAsync is immune to that.. However a setTimeout within evaluateAsync will be a problem and unfortunately axe has some (though they're only for splitting up long tasks. lol).
    • we could work around that. but would we still have perfect positions? it's not guaranteed, though mostly edge cases.
  2. keeping the full-size screenshot viewport applied while the elem dimensions are being collected.
    • this is what connor is currently investigating.
  3. The "pause page activity" effort from dgozman is also relevant.
    • relevant but on hold. no news there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants