Subpixel snapping is inconsistent in certain conditions
Reported by
bouvrett...@gmail.com,
Nov 25 2016
|
||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.99 Safari/537.36 Example URL: See attached Steps to reproduce the problem: 1. Load the attached HTML example. 2. Try to resize the window's width and observe the 2 first checkboxes stay still while the 6 other checkboxes "animate". What is the expected behavior? Either: 1) All checkboxes "animate" as previously described in Issue 668351 2) Or checkboxes keep equal sizes while fluidly performing their pixel-snapping What went wrong? This behavior can cause some layout to appear inconsistent while the browser thinks that all checkboxes have the same size, they do not. 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: 54.0.2840.99 Channel: stable OS Version: 6.1 (Windows 7, Windows Server 2008 R2) Flash Version: Shockwave Flash 23.0 r0
,
Nov 28 2016
I agree that it seems like a bug that the checkboxes get inconsistent sizes. But I think the layout is fine here (there's no inconsistencies in the getBoundingClientRect results). Presumably this is happening because the checkbox has height:9.6px and the pixel snapping will produce different results depending on the vertical position. So depending on the exact position, the visual size may end up rounding up (10px) or rounding down (9px). Perhaps the checkbox painting code in NativeThemeBase::PaintCheckbox should be doing it's own pixel snapping of some sort in order to ensure consistent size regardless of position? Is this code owned by paint or DOM team? I don't see this issue in Firefox or Edge, but that's because they don't allow the visual appearance of checkboxes to change size (although they do still allow the layout size to change - so this is only a visual difference with Chrome, probably not observable from JS).
,
Nov 28 2016
Paint owns anything with a name like PaintCheckbox, I would think, so it's on us. I agree we should be keeping the size constant while snapping position, so this may just be a bug in using the wrong snapping routine.
,
Dec 2 2016
,
Dec 11 2017
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue. Sorry for the inconvenience if the bug really should have been left as Available. If you change it back, also remove the "Hotlist-Recharge-Cold" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Dec 11 2017
|
||||||
►
Sign in to add a comment |
||||||
Comment 1 by chrishtr@chromium.org
, Nov 28 2016Labels: -OS-Windows OS-All
Status: Untriaged (was: Unconfirmed)