[chromedriver] Fix element screenshot scroll for RTL page
For some RTL page with 0 document.documentElement.scrollLeft and non 0 document.body.scrollLeft, we should not take the document.body.scrollLeft to calculate DevTools page.capturescreenshot depending on doctype. Instead, we can use window.pageXOffset and pageYOffset that should work with any doctype. Bug: chromedriver:3625 Change-Id: I38a06b854d26d6039c89b74d89509ef39a9bc18d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2482048Reviewed-by:John Chen <johnchen@chromium.org> Commit-Queue: Shengfa Lin <shengfa@google.com> Cr-Commit-Position: refs/heads/master@{#818532}
Showing
Please register or sign in to comment