Border width is not rounded correctly when page is zoomed
Reported by
jakub.fr...@gmail.com,
Oct 26 2017
|
||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36 OPR/48.0.2685.39 Steps to reproduce the problem: 1. Create new block element. 2. Put border 5px style on it (also breaks for every integer not divisible by 4). 3. Look at div's border width in inspector - it's calculated as 4.8px (for 5px test case). What is the expected behavior? Rendered border width should be the same as written in CSS, especially for values without floating point. What went wrong? Border's width was scaled to rendered "zoomed in" page, but when code is trying to "bring it back" to regular (so, not scaled) size there is some sort of rounding error happening. Did this work before? No Does this work in other browsers? No Firefox - also borders are displayed incorrectly - test case shows 4.8px of border's width. Chrome version: 61.0.3163.100 Channel: stable OS Version: 10.0 Flash Version: Bug created as a result of previous one (which I believe was set to 'wontfix' because of "component" option which was set incorrectly) - https://bugs.chromium.org/p/chromium/issues/detail?id=696215#c7
,
Oct 27 2017
,
Oct 27 2017
I can't reproduce using your test.html and the steps in the report. I assume you used zoom somewhere, but it's not part of the repro steps in the report. Please specify the exact steps you followed. Also, please consider that if Firefox's behaviour is identical to Chrome's, it is quite likely that the behaviour is correct.
,
Oct 27 2017
Right. First of all, if you have looked into the link to "previous issue" then you should see the comment made by "pfeldman@chromium.org": "The issue here is that the page is zoomed it to 125%. window.getComputedStyle($0).borderWidth gives me 4.8. Looks like we are trying to render border with the counting number of pixels and work it back to show as computed. For 125% zoom, we have: Math.floor(5 * 1.25) / 1.25 == 4.8" I don't know if there is any other way to reproduce it (maybe it's possible to ask somebody from the linked issue?) - on my machine I have setup as follows: I'm on Win 10 and in Display settings (Settings->System->Display) I have chosen "125%: option under "Scale and layout" -> "Change the size of text, apps, and other items" (see attachment). Well, what will be the way to check if "that behaviour is correct"? By literally reading w3 standard or is there a more sophisticated approach? Hard to believe it's working as it should - as you can see on result.png this behaviour is causing layout errors (it's not possible to implement a layout without "holes" or overlapping elements which is a huge discomfort for users with scaled views).
,
Oct 27 2017
Thank you for providing more feedback. Adding requester "gracec@chromium.org" to the cc list and removing "Needs-Feedback" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Oct 30 2017
Tested the issue on Win-10 using chrome reported version #61.0.3163.100, latest stable #62.0.3202.75 and latest canary #64.0.3253.0. Attached a screen cast and screenshot for reference. Following are the steps followed to reproduce the issue. ------------ 1. Opened the attached file "test2.html" and zoomed the display to 125%. 2. Observed that rendered border width was 951.2 x 50 px as per the attached screenshot. jakub.freisler@ - Could you please check the attached screen cast or screenshot and please let us know if anything missed from our side to reproduce the issue. Thanks...!!
,
Oct 30 2017
Thanks krajshree@ you helped me realise one thing - machine on which I was testing both files (test.html & test2.html) wasn't connected to the internet for some time now and chrome's version there was still 56.0.2924.87. Now, I confirm that in newest stable release (61) everything works as expected, so somewhere between releases 56-61 it has had been fixed - and firefox still fails. Sorry for confusion and thank you guys for your work!
,
Oct 30 2017
Thank you for providing more feedback. Adding requester "krajshree@chromium.org" to the cc list and removing "Needs-Feedback" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Oct 31 2017
jakub.freisler@ Thanks for the feedback. As per comment 7, as everything is working as expected, can you please confirm if we can close this issue? Thanks..
,
Oct 31 2017
susanjuniab@ Sure - I'm confirming that everything works as expected and this issue can be closed.
,
Oct 31 2017
Thank you for providing more feedback. Adding requester "susanjuniab@chromium.org" to the cc list and removing "Needs-Feedback" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Oct 31 2017
Closing the issue as per #10. |
||||||||
►
Sign in to add a comment |
||||||||
Comment 1 by jakub.fr...@gmail.com
, Oct 26 2017726 bytes
726 bytes View Download
353 bytes
353 bytes View Download
3.7 KB
3.7 KB View Download
6.5 KB
6.5 KB View Download