This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
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.
More exactly the x center should be calculated as: 0.5 * (max(0, min(x, x + width)) + min(innerWidth, max(x, x + width)))