New issue
Advanced search Search tips

Issue 765138 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug



Sign in to add a comment

Iframe borders in parent don't work correctly if iframe has a background color internally

Project Member Reported by gman@chromium.org, Sep 14 2017

Issue description

Chrome Version: (copy from chrome://version)
OS: (e.g. Win7, OSX 10.9.5, etc...)

What steps will reproduce the problem?
(1) go to https://jsfiddle.net/greggman/mbdnpx4a/
    or use the attached example
(2) resize the window from the right (change the width of the window)

What is the expected result?

The right border of the iframe is always drawn correctly



What happens instead?

the right border of the iframe appears and disapperas



Works in Firefox
1/2 works in Safari (in Safari on an HD-DPI display the left and right borders change sizes from 1 to 2 pixels 


Note that removing the background color CSS from inside the iframe makes the program go away.
 
iframe-border-issue.html
652 bytes View Download
Components: -Blink>Compositing -Internals>Compositing Blink>Paint
Labels: -Pri-3 PaintTeamTriaged-20170914 BugSource-User OS-Linux OS-Mac OS-Windows Pri-2
Status: Available (was: Untriaged)
Can reproduce on Linux as well (at 100% zoom but not 125%, interestingly). I suspect the issue is not with the border, but rather with the integer snapped iframe overdrawing the sub-pixel positioned border.

Specifically, the iframe is 891.891px big, which no doubt gets rounded up when the border get rounded down.

To be honest, we're unlikely to fix these issues soon.

Comment 2 by gman@chromium.org, Sep 15 2017

Do you know of any workarounds if it's not going to be fixed?

Comment 3 by gman@chromium.org, Sep 15 2017

Also I thought I'd point out that vertically there's no issue. If make the height a percentage and I open the inspector I see height values for the iframe like 79.8 but the bottom border doesn't get overwritten by the iframe contents.

https://jsfiddle.net/greggman/tpxo1zfv/

I doubt it's as simple as making the horizontal handling code the same as the vertical handling code but I just thought I'd point out vertical seems to be working.

Labels: Needs-Bisect M-63
Labels: -Needs-Bisect Needs-Milestone
Status: Untriaged (was: Available)
Able to reproduce the issue on windows 7,Mac 10.12.6 & Ubuntu 14.04 using chrome stable#61.0.3163.91 & latest Canary#63.0.3215.0 as per the below 2 fiddles.
https://jsfiddle.net/greggman/mbdnpx4a/
https://jsfiddle.net/greggman/tpxo1zfv/

Observed right border of the iframe appears and disappears when we resize the window from right side.As same behavior observed from M50 & it is a non regression issue, marking it as Untriaged to get more inputs from dev. Please find the attached screencast for reference.

Thanks..!



765138.mp4
1.5 MB View Download
Status: Available (was: Untriaged)
Re comment #c2,the only workaround I can think of is to use a wider border, but of course that may destroy your aesthetic. 

Re comment #c3, the horizontal and vertical snapping behavior differs I believe because inline layout accumulates differently to vertical layout. It may also have something to do with the need to prefer one dimension over another in computing aspect ratios, although that doesn't seem to apply here.

We've always had these issues because we do not use sub-pixel positioning for everything, and we also round accumulated percentages in ways that drop pixels. e.g. 10 lots of 10% will not always be 100% if the container width is not a multiple of 10.

Zoom makes it all worse.

I've been thinking about how to fix these issues for a long time, but there is no easy fix. Hopefully it will be easier when next generation layout completes. Or we'll keep converting more stuff to sub-pixel and the problems will go away.
Project Member

Comment 7 by sheriffbot@chromium.org, Sep 18

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
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.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Status: Available (was: Untriaged)
Still happening.

Sign in to add a comment