New issue
Advanced search Search tips

Issue 648564 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Sep 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

Inconsistent rounding of clientWidth & clientHeight properties

Reported by que....@gmail.com, Sep 20 2016

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36

Example URL:
http://jsbin.com/munuvoq/edit?js,output

Steps to reproduce the problem:
1. Navigate to the provided url: http://jsbin.com/munuvoq/edit?js,output 
2. Take a look at computed clientWidth/clientHeight properties

What is the expected behavior?
clientWidth & clientHeight properties are being rounded correctly, e.g. if contents' width is 136.48px then the rounded clientWidth (without paddings) should be 136.

What went wrong?
As for the provided example rounding of 136.48 resulted in 137.

Does it occur on multiple sites: Yes

Is it a problem with a plugin? No 

Did this work before? N/A 

Does this work in other browsers? Yes 

Chrome version: 53.0.2785.116  Channel: stable
OS Version: 10.0
Flash Version: Shockwave Flash 23.0 r0
 
Components: -Blink Blink>Layout

Comment 2 by e...@chromium.org, Sep 21 2016

Status: WontFix (was: Unconfirmed)
clientWidth/Height are not rounded by snapped to the appropriate pixel boundary in either direction as to minimize the difference between specified and actual size.

See the snapping section of https://trac.webkit.org/wiki/LayoutUnit for an explanation of the concept.

Comment 3 by que....@gmail.com, Sep 21 2016

But why for the same content dimensions client properties contain different values?

As in the example content width (actual size) of the first and second blocks is the same but the clientWidth is different. Those blocks don't have paddings and they seem to be equal to each other in everything.

Sign in to add a comment