New issue
Advanced search Search tips

Issue 794290 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Dec 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

Strange rendering order for block|flex|grid|table displayed images with border

Reported by grzybe...@gmail.com, Dec 12 2017

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36

Steps to reproduce the problem:
1. Create two images next to each other.
2. Overlay one over the other one (by negative margin on transform).
3. Apply border to images.
4. Set the display property for images to block|flex|grid|table.

What is the expected behavior?
I would expect render in following order:

1. Border of image underneath.
2. Image underneath.
3. Border or fron image.
4. Front image.

What went wrong?
Rendering order is broken:

I would expect render in following order:

1. Border of image underneath.
2. Border or fron image.
3. Image underneath.
4. Front image.

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 63.0.3239.84  Channel: stable
OS Version: OS X 10.13.2
Flash Version: 

I recreated issue in few lines of css.
https://codepen.io/pawelgrzybek/pen/RxwKWw

Please play around with display (block vs inline)
 
Cc: pbomm...@chromium.org gov...@chromium.org
Components: Blink>CSS
Labels: Needs-Triage-M63 Needs-Bisect
Able to reproduce the issue on latest Chrome stable(63.0.3239.84) and previous stable channels as well i.e., 62.0.3202.94 and 61.0.3163.100 on Windows, Mac and Linux.

Cc: mstensho@chromium.org pdr@chromium.org futhark@chromium.org
Components: -Blink>CSS Blink>Paint
Status: WontFix (was: Unconfirmed)
Same behavior in Firefox. Also happens with text of preceding block painted over successor's border. Doesn't this follow from: https://www.w3.org/TR/CSS22/zindex.html#painting-order ?

Adding pdr@ and mstensho@ to confirm.

It behaves as the reporter expects in WebKit.

But only for images. In WebKit, text from preceeding block also paints over succeeding block's border.

Block-level images should behave like any other block. So, as long as they don't establish a stacking context, are positioned, floated, etc., borders and backgrounds of *all* such objects will be painted before the content inside (i.e. the image in this case). Those are painted in separate passes within each stacking context.

WebKit is wrong.

Sign in to add a comment