New issue
Advanced search Search tips

Issue 753522 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 586383
Owner: ----
Closed: Aug 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Compat



Sign in to add a comment

Canvas background on stand-alone SVG not always painted correctly

Reported by amelia.b...@gmail.com, Aug 8 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36

Example URL:
https://oreillymedia.github.io/Using_SVG/ch18-interaction-files/gem-click-game-misses.svg

Steps to reproduce the problem:
1. Create a .svg file that uses CSS background (color or image) on the :root element, set with an external CSS stylesheet.
2. Open it in Chrome. If need be, refresh the tab. The behavior is really flaky, it seems to happen about half the time.
3. If you get a version where the background isn't being drawn, open Dev Tools. Confirm that the style is correctly being parsed. Try changing the background style.

What is the expected behavior?
The root element of an SVG file is drawn with CSS backgrounds and borders, whether the style is set inline, via external CSS, or via Dev Tools.

What went wrong?
Sometimes (it's flaky), the CSS background for the SVG canvas isn't drawn at all.  In that case, even changing the styles in Dev Tools does not seem to force a re-paint.

Does it occur on multiple sites: N/A

Is it a problem with a plugin? N/A 

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 60.0.3112.90  Channel: stable
OS Version: 10.0
Flash Version: 

Twitter poll confirms that it wasn't just me:
https://twitter.com/AmeliasBrain/status/895022662258262016

People are having problems on various OS (see comments), so it's not just a Windows thing, either.
 

Comment 1 by f...@opera.com, Aug 8 2017

Components: Blink>Paint>Invalidation Blink>SVG
Labels: OS-Linux OS-Mac
Mergedinto: 586383
Status: Duplicate (was: Unconfirmed)
This looks like a dupe of  issue 586383  - that was (reportedly) about embedding through <object>, but the setup and symptoms appears to be the same ('background' of an <svg> that is the document element/root.) In this case it's probably that the first paint races with the load of the CSS file (disabling cache in DevTools seems to support that theory, since it makes the issue reproduce consistently - at least for me.)
Thanks for the merge. I *did* search for duplicates, I swear...!  But "SVG background" turns up a lot of other results, so I missed the relevant one.

Sign in to add a comment