Double background images when temporarily inserting block-level content in a span
Reported by
peter.kr...@mathjax.org,
Jul 13 2016
|
||||||||
Issue descriptionUserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.106 Safari/537.36 Example URL: http://codepen.io/pkra/pen/mEqwAz Steps to reproduce the problem: Look at the minimal example or: 1. Create a span and give it a background-image 2. inject an hr and trigger reflow (reflow is important!) 3. remove the hr 4. notice that the duplicate background persist. What is the expected behavior? The background image should not be duplicated. What went wrong? The background image was duplicated. Does it occur on multiple sites: Yes Is it a problem with a plugin? No Did this work before? No Does this work in other browsers? No WebKit-based browsers (e.g., Safari 9) Chrome version: 51.0.2704.106 Channel: stable OS Version: Ubuntu 16.04 Flash Version: Shockwave Flash 22.0 r0 This does not happen on Firefox or IE9+/Edge.
,
Jul 13 2016
This might be a CSS or layout bug. I'll dig deeper.
,
Jul 13 2016
If you just run the "inject an hr" portion you get a result that differs from Firefox. We draw the background image for both sub-sections of the span (interrupted by the hr) while Firefox only draws it for the end of the span. Safari matches us, which is not surprising since this behavior probably hasn't changed since the WebKit days. Now clearly we should not do something different for the same content just because it was mutated and then un-mutated. My guess is that we are modifying the layout tree in response to the <hr> and then not reverting it when the hr is removed, and that the modification in question copies the CSS to the 2 sub-portions of the span. While superficially it seems like background image seems like it shouldn't be copied if it's not repeated, what do you do about center center positioned backgrounds? Turns out Firefox does something I would never expect and can't even figure out how to implement. Open the attached file to see. For now I'm calling this a layout bug. We should end up in the same state when the hr is added and removed.
,
Jul 14 2016
,
Jul 17 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
,
Jul 27 2017
,
Jul 30
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
,
Aug 1
Still repros, both in legacy and NG. |
||||||||
►
Sign in to add a comment |
||||||||
Comment 1 by dtapu...@chromium.org
, Jul 13 2016