commit | 37440f42d26f280db8a0f147b187743af202fd76 | [log] [tgz] |
---|---|---|
author | Andrew Nicols <andrewrn@gmail.com> | Fri Dec 18 17:29:18 2020 |
committer | Chromium LUCI CQ <chromium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Fri Dec 18 17:29:18 2020 |
tree | bebefbebccf1764d910b558465950f402af19f4e | |
parent | bea9aa57a2af6aee7666503dbdb373a6a3d6666f [diff] |
[chromedriver] Round dimensions when calculating element size Improve detection of elements partially outside the viewport and return their correct height. When an element is only visible on the edge by between 0 and 0.5 the WebRect casts the visible width/height to 0, causing an ElementNotInteractable exception to be thrown with 'element has zero size'. This change updates the size calculation to round the intersection of the window and element under test in the same way that is performed when storing the Element Region into a WebRect object. This has the effect that the getElementRegion() function falls back to returning the clientRect size instead of the visible subregion when calculating the visible portion. R=johnchen@chromium.org, shengfa@google.com Bug: chromedriver:3682 Change-Id: I5868c6d61ea56f5d229b0681f679670174dedf48 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2594837 Reviewed-by: Shengfa Lin <shengfa@google.com> Reviewed-by: John Chen <johnchen@chromium.org> Auto-Submit: Andrew Nicols <andrewrn@gmail.com> Commit-Queue: Shengfa Lin <shengfa@google.com> Cr-Commit-Position: refs/heads/master@{#838465}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.