w3c / w3c/webdriver

Notion of bounding rectangle is not defined

Open
#1,627 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug Get Element Rect
Dominant language
HTML
Stars
718
Forks
228
PR merge metrics
No merged PRs in 30d

Description

In chapter 12. Elements, section 12.4 State:

bounding rectangle is the following link https://www.w3.org/TR/webdriver/#dfn-bounding-rectangle.
The link does not lead to any definition of bounding rectangle however the text referred by it has link to: https://www.w3.org/TR/geometry-1/
This document has no definition of bounding rectangle either.

Context:
I'm reading the documentation about GetElementRect in order to understand what is the size of the rect.
I see that chrome returns {offsetWidth, offsetHeight} - these are integers ~ {Math.round(getBoundingClientRect.width()), Math.round(getBoundingClientRect.height())}
while Gecko returns non-integer (double) values that seem to be {getBoundingClientRect.width(), getBoundingClientRect.height()}
Which one of these is correct? The documentation gives no clues.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with section 12.4 State and the Get Element Rect definition, then follow the referenced bounding rectangle and Geometry links. Clarify where bounding rectangle is defined and specify whether returned dimensions should be integers or doubles, with the documentation making the expected behavior unambiguous.

Written by the indexing model from the issue text.

Assessment

Tech stack
html
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.