New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 623528 link

Starred by 6 users

Issue metadata

Status: Fixed
Owner:
inactive
Closed: Jul 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug-Regression



Sign in to add a comment

SVG not displayed as content of ::after elements

Reported by l...@codelitt.com, Jun 27 2016

Issue description

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

Example URL:
https://jsfiddle.net/L78wzjxh/

Steps to reproduce the problem:
1. Navigate to https://jsfiddle.net/L78wzjxh/
2. Check the rendered "Label" box

What is the expected behavior?
The rendered "Label" box should display a cross "X" icon to the right

What went wrong?
The cross "X" icon is not displayed. We believe the problem happens when the icon is a SVG file

Does it occur on multiple sites: N/A

Is it a problem with a plugin? No 

Did this work before? Yes We tried with a random Chromium build and it worked as of 48.0.2542.0

Does this work in other browsers? Yes 

Chrome version: 51.0.2704.103  Channel: stable
OS Version: OS X 10.11.0
Flash Version: Shockwave Flash 22.0 r0
 

Comment 1 by f...@opera.com, Jun 27 2016

Components: Blink>SVG
Labels: -OS-Mac
The 'content' URL (image URL) gives me: "You need to sign in or sign up before continuing."

Does this still reproduce when the URL is not access restricted?

I suspect this isn't actually an SVG issue, but I'll put it in that component for the time being.

Comment 2 by l...@codelitt.com, Jun 27 2016

Sorry, stupid mistake to refer to our secured area... It *does* happen when the content URL is not restricted. I'll update the jsfiddle with a version that doesn't use a secured area

Comment 3 by f...@opera.com, Jun 27 2016

Thanks. I'm assuming that will be https://jsfiddle.net/L78wzjxh/1/ ? (Appears to)

Comment 4 by f...@opera.com, Jun 27 2016

And that one is served as text/plain =)

Comment 5 by f...@opera.com, Jun 27 2016

I stashed it on my local webserver, but then the problem did not reproduce.

Comment 6 by l...@codelitt.com, Jun 27 2016

Just updated the jsfiddle with an unrestricted resource URL.

You can also check the problem at this URL: https://lrmunoz.github.io/temp/

Regards,

Luis

Comment 7 by l...@codelitt.com, Jun 27 2016

To clarify, the updated jsfiddle is at: https://jsfiddle.net/L78wzjxh/4/


Also, worth noting that I'm clearing the cache to test the problem

Comment 8 by f...@opera.com, Jun 27 2016

Owner: davve@opera.com
Status: Assigned (was: Unconfirmed)
Thanks! I could reproduce using that URL (actually, both). It does seems to be a bit flaky though. Bisected:

You are probably looking for a change made after 379799 (known good), but no later than 379801 (first known bad).
CHANGELOG URL:
  https://chromium.googlesource.com/chromium/src/+log/84f2cfba1b8749ed115a0cca316c2dca0c12d674..3c7b1342b32dd6174efa9a47a4b476c940462b9c

So I guess it's related to r379801.

Comment 9 by myfonj@gmail.com, Jun 28 2016

What is also strange, for me opening the test page from here or from `data:text/html,<a href="https://lrmunoz.github.io/temp/">click</a>` into a new tab by middle mouse button reliably yields correctly displayed page. Refresh breaks it again. Subsequent refreshes in Canary occasionally repairs it again, approx one in thirty refreshes.

51.0.2704.106 (Official Build) m (64-bit)
53.0.2782.0 (Official Build) canary (64-bit)
New+Tab+Test+SVG+background+icons+-+Google+Chrome_-_20160628170508.png
12.6 KB View Download
Reload+Test+SVG+background+icons+-+Google+Chrome_-_20160628170520.png
12.5 KB View Download

Comment 10 by f...@opera.com, Jun 28 2016

Yes, I observed the same. I suspect the cause has some relation to loading delay/resource handling.

Comment 11 by davve@opera.com, Jul 5 2016

Status: Started (was: Assigned)

Comment 12 by davve@opera.com, Jul 5 2016

I suspect this is:

// TODO(davve): Find out the default object size, if any, in this context.

in LayoutImageResourceStyleImage::imageSize().

The flakiness observed probably depends on when in the painting (invalidation) system the SVG is rendered.
Project Member

Comment 13 by bugdroid1@chromium.org, Jul 8 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/da6dc5be059c4dd6a6b7f1a4ba9c1f12be3d67ae

commit da6dc5be059c4dd6a6b7f1a4ba9c1f12be3d67ae
Author: davve <davve@opera.com>
Date: Fri Jul 08 14:25:03 2016

Fallback to 300x150 instead of 0x0 size for SVG inside content()

Prior to r379801, the fallback 300x150 in SVGImage::dataChanged() was
used. Post r379801 we instead used the empty rect as fallback. Both
are probably wrong but 300x150 matches what we did previously more
closely and we are less likely to end up with an empty image.

BUG= 623528 

Review-Url: https://codereview.chromium.org/2121973002
Cr-Commit-Position: refs/heads/master@{#404374}

[add] https://crrev.com/da6dc5be059c4dd6a6b7f1a4ba9c1f12be3d67ae/third_party/WebKit/LayoutTests/http/tests/misc/resources/svg-no-store.pl
[add] https://crrev.com/da6dc5be059c4dd6a6b7f1a4ba9c1f12be3d67ae/third_party/WebKit/LayoutTests/http/tests/misc/svg-image-in-content-expected.html
[add] https://crrev.com/da6dc5be059c4dd6a6b7f1a4ba9c1f12be3d67ae/third_party/WebKit/LayoutTests/http/tests/misc/svg-image-in-content.html
[modify] https://crrev.com/da6dc5be059c4dd6a6b7f1a4ba9c1f12be3d67ae/third_party/WebKit/Source/core/layout/LayoutImageResourceStyleImage.cpp
[modify] https://crrev.com/da6dc5be059c4dd6a6b7f1a4ba9c1f12be3d67ae/third_party/WebKit/Source/core/layout/LayoutImageResourceStyleImage.h
[modify] https://crrev.com/da6dc5be059c4dd6a6b7f1a4ba9c1f12be3d67ae/third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp

Comment 14 by davve@opera.com, Jul 11 2016

Status: Fixed (was: Started)

Comment 15 by rgoll...@gmail.com, Jul 19 2016

Is there an estimate available for when this fix will be released?

Comment 16 by f...@opera.com, Jul 19 2016

Currently the fix is only in M54 (est. release mid-October), but we should probably try for a merge to M53 (est. release early September.) 
The sooner the better. This adversely affects our UI for a large number of users across all platforms running Chrome.

Comment 18 by rgoll...@gmail.com, Jul 19 2016

Agreed, this fix is critical and is a highly visible problem for all users.

Comment 19 by f...@opera.com, Jul 20 2016

Labels: Merge-Request-53

Comment 20 by dimu@google.com, Jul 20 2016

Labels: -Merge-Request-53 Merge-Approved-53 Hotlist-Merge-Approved
Your change meets the bar and is auto-approved for M53 (branch: 2785)
Project Member

Comment 21 by bugdroid1@chromium.org, Jul 20 2016

Labels: -merge-approved-53 merge-merged-2785
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7815a45a74afc00768f304acc60272ca653bec86

commit 7815a45a74afc00768f304acc60272ca653bec86
Author: Fredrik Söderquist <fs@opera.com>
Date: Wed Jul 20 11:56:26 2016

Fallback to 300x150 instead of 0x0 size for SVG inside content()

Prior to r379801, the fallback 300x150 in SVGImage::dataChanged() was
used. Post r379801 we instead used the empty rect as fallback. Both
are probably wrong but 300x150 matches what we did previously more
closely and we are less likely to end up with an empty image.

BUG= 623528 

Review-Url: https://codereview.chromium.org/2121973002
Cr-Commit-Position: refs/heads/master@{#404374}
(cherry picked from commit da6dc5be059c4dd6a6b7f1a4ba9c1f12be3d67ae)

Review URL: https://codereview.chromium.org/2168603002 .

Cr-Commit-Position: refs/branch-heads/2785@{#243}
Cr-Branched-From: 68623971be0cfc492a2cb0427d7f478e7b214c24-refs/heads/master@{#403382}

[add] https://crrev.com/7815a45a74afc00768f304acc60272ca653bec86/third_party/WebKit/LayoutTests/http/tests/misc/resources/svg-no-store.pl
[add] https://crrev.com/7815a45a74afc00768f304acc60272ca653bec86/third_party/WebKit/LayoutTests/http/tests/misc/svg-image-in-content-expected.html
[add] https://crrev.com/7815a45a74afc00768f304acc60272ca653bec86/third_party/WebKit/LayoutTests/http/tests/misc/svg-image-in-content.html
[modify] https://crrev.com/7815a45a74afc00768f304acc60272ca653bec86/third_party/WebKit/Source/core/layout/LayoutImageResourceStyleImage.cpp
[modify] https://crrev.com/7815a45a74afc00768f304acc60272ca653bec86/third_party/WebKit/Source/core/layout/LayoutImageResourceStyleImage.h
[modify] https://crrev.com/7815a45a74afc00768f304acc60272ca653bec86/third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp

Comment 22 by f...@opera.com, Jul 20 2016

Labels: -Type-Compat Type-Bug-Regression
Labels: TE-Verified-M53 TE-Verified-53.0.2785.30
Tested the issue on windows 7, Linux Ubuntu 14.04 and Mac 10.11.5 using chrome version 53.0.2785.30.Able to see the 'X' icon in label box.
Please find the attached screen shot for the same.

Adding TE-Verified label.

Thanks,
623528.png
81.5 KB View Download

Comment 24 by f...@opera.com, Aug 5 2016

 Issue 634325  has been merged into this issue.

Sign in to add a comment