This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 29775 - Wrong wording in spec, mess in "visible width" vs "visible height", and copy/paste bugs.
Summary: Wrong wording in spec, mess in "visible width" vs "visible height", and copy/...
Status: NEW
Alias: None
Product: Browser Test/Tools WG
Classification: Unclassified
Component: WebDriver (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: Browser Testing and Tools WG
QA Contact: Browser Testing and Tools WG
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 20860
  Show dependency treegraph
 
Reported: 2016-08-17 12:08 UTC by Aleksey
Modified: 2016-08-17 12:44 UTC (History)
2 users (show)

See Also:


Attachments

Description Aleksey 2016-08-17 12:08:19 UTC
The specification in a few placed contains something like this:

"
Let visible width be element’s bounding rectangle’s (max(x coordinate, x coordinate + width dimension) – the current browsing context’s innerWidth).
"

E.g. here:
https://www.w3.org/TR/webdriver/#element-interactability

Let's suppose we have rectangle with x = 1, and width = 6,
and viewPort innerWidth is 10.

According to this formula:

visible_width = max(1, 1 + 6) - 10 = -3 (MINUS 3).

And then we have x center point at 1 - 3/2 = -0.5 (MINUS 0.5 which is out of the element boundaries).

Maybe there should be such a wording:
"
Let visible width be element’s bounding rectangle’s (min(max(x coordinate, x coordinate + width dimension), the current browsing context’s innerWidth)).
"

================

Also there are everywhere mess between visible width and height, like this:

"
Let vertical centre offset be (visible width / 2.0). // height and not width must be here

Let horizontal centre offset be (visible height / 2.0). // width and not height must be here.

Let centre point be a pair of rect’s (rectangle x coordinate + horizontal centre offset) and (rectangle y coordinate + vertical centre offset)
"

================

Also there is copy/paste bugs. Like: "
Let visible width be element’s bounding rectangle’s (max(x coordinate, x coordinate + width dimension) – the current browsing context’s innerWidth).

Let visible height be element’s bounding rectangle’s (max(y coordinate, y coordinate + height dimension) – the current browsing context’s innerWidth).
"

The second sentence contains innerWidth again instead of innerHeight.
Comment 1 Aleksey 2016-08-17 12:44:13 UTC
More exactly the x center should be calculated as:

0.5 * (max(0, min(x, x + width)) + min(innerWidth, max(x, x + width)))