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

Issue 747672 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Sep 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 1
Type: Bug-Regression



Sign in to add a comment

Absolute positioned SVG doesn't render after refresh

Reported by marco.ba...@gmail.com, Jul 22 2017

Issue description

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

Steps to reproduce the problem:
1. Put the files online; the images in a folder called "beelden"
2. Open in Chrome
3. Refresh and afterwards do a Hard Refresh
You can already test this at http://aspectusaurei.nl/test.html

What is the expected behavior?
Both images "Aspectus Aurei" and "Marcus Panifex me fecit" should render

What went wrong?
After a refresh the svg image with the text "Marcus Panifex me fecit" disappears. After a Hard Refresh it will reappear.
You can test this at http://aspectusaurei.nl/test.html

Did this work before? Yes 

Does this work in other browsers? Yes

Chrome version: 59.0.3071.115  Channel: stable
OS Version: OS X 10.12.5
Flash Version: 

With the files locally there seems to be no problem. The problem only occurs when the files are online.
 
aspectusaurei1.svg
19.5 KB Download
mefecit.svg
30.4 KB Download
test.html
808 bytes View Download
results.jpg
243 KB View Download

Comment 1 by woxxom@gmail.com, Jul 22 2017

Broken in 48.0.2538.0
Bisect info: 354613 (good) - 354624 (bad)
https://chromium.googlesource.com/chromium/src/+log/e9db8061..6b1707c8?pretty=fuller
Suspecting r354615 "Revalidate using the same Resource, attempt #3"

Repro note: open http://aspectusaurei.nl/test.html and refresh it five times in 1 second intervals.

Cc: brajkumar@chromium.org
Components: Blink>SVG
Labels: M-62 hasbisect OS-Linux OS-Windows
Owner: japhet@chromium.org
Status: Assigned (was: Unconfirmed)
Able to reproduce this issue on Windows-10 and Ubuntu 14.04 using chrome latest stable #59.0.3071.115.

As per the bisect information provided in the comment #1 assigning to the concerned person.

japhet@ - Could you please check whether this is caused with respect to your change, if not please help us in assigning it to the right owner. 

Thanks!


Components: -Blink>SVG Blink>Loader
Labels: -Pri-2 -M-62 ReleaseBlock-Stable M-60 Pri-1
Missing content justifies release blocking. Marking it so.

Comment 4 by japhet@chromium.org, Jul 24 2017

Labels: -ReleaseBlock-Stable -M-60 ReleaseBlock-Beta M-62
Given that this bug has been present on stable for well over a year, I'm inclined to mark this as needed for the next branch, rather than trying to block an already-branched released on it. Therefore, RB-Beta for M62.

Comment 5 by ajha@chromium.org, Jul 25 2017

Cc: mkwst@chromium.org
Cc'ing  mkwst@ as well for inputs.
Tested on latest Canary #62.0.3168.0 on Windows 7, Mac 10.12.6 and Ubuntu 14.04. Issue is still reproducible 

@japhet -- Is there any latest update on this. Thanks.

Comment 7 by japhet@chromium.org, Jul 31 2017

Cc: hirosh...@chromium.org

Comment 8 by japhet@chromium.org, Jul 31 2017

Has anyone been able to reproduce this locally? As far as I can tell, I've got my local server sending the exact same headers and body as http://aspectusaurei.nl is, but I can't get the bug to reproduce. I don't immediately see what I'm missing.
Hmm, this seems to be caused by the combination of SVG + revalidation + style. If I removed the <style> element entirely, then the SVG image is shown as expected...minimizing.
Minimized test case (both "position: absolute" and "width: 100%" are required).

<div style="position: absolute">
<img style="width: 100%" src="http://aspectusaurei.nl/beelden/mefecit.svg" onload="onLoad()">
</div>
<script>
function onLoad() {
  // Always outputs 454.
  console.log(document.getElementsByTagName('img')[0].naturalWidth);

  // 454 when loaded for the first time or reloaded with cache disabled.
  // 0 when reloaded normally.
  console.log(document.getElementsByTagName('img')[0].width);
}
</script>

Components: Blink>Layout
When I added "width: 100%" or "width: 1000px" etc. to <div>, then the image was shown and the img's width seen from JavaScript became non-zero:

<div style="position: absolute; width: 100%">
<img style="width: 100%" src="http://aspectusaurei.nl/beelden/mefecit.svg" onload="onLoad()">
</div>

Comment 12 by ajha@chromium.org, Aug 7 2017

Friendly ping to get an update on this issue marked as Beta blocker. I am still able to reproduce the issue on the latest canary(62.0.3178.0) on Windows-10 using http://aspectusaurei.nl/test.html.
We are branching in few days. Please have a fix ASAP.
Just to Update,
Able to reproduce the issue on Windows 10 with stable #60.0.3112.101, beta #61.0.3163.49, 
dev #62.0.3192.0, canary #62.0.3193.0

Since this issue marked as Beta blocker, japhet@ could you please look into this issue.


Status: Started (was: Assigned)
I've got a fix: https://chromium-review.googlesource.com/c/chromium/src/+/634131, haven't finished the regression test yet, though.

Comment 16 by ajha@chromium.org, Aug 30 2017

Just to update, M-62 would be branched on 08/31. Friendly ping for an update to land the CL before branch point. 

Thank you!
Labels: -ReleaseBlock-Beta ReleaseBlock-Stable
The fix is slowed down in review, I may miss the branch point.

This bug is fairly painful when it triggers, but it requires a fairly unusual set of circumstance to trigger (which is probably how it was on stable for over a year before being reported).

Bumping to RB-Stable, will make sure I get a fix merged. Sorry for the delay :/
Project Member

Comment 18 by bugdroid1@chromium.org, Aug 31 2017

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

commit 379d0b2a6c3a03aa61f2eb7c15392ca6d59b4cc2
Author: Nate Chapin <japhet@chromium.org>
Date: Thu Aug 31 19:04:37 2017

Don't use an SVGImage's size info if it's being revalidated

The sizing info isn't expected to be available yet, and it might get
used if we layout during revalidation. In that case, when the 
revalidation completes, the intrinisic size won't change, so a
relayout won't happen, which can result in the SVGImage being in a 0x0
parent.

Bug:  747672 
Test: http/tests/svg/svgimage-revalidation.html
Change-Id: I1649b67f8f03eae7999f2c461ab1bb64a7cb2d88
Reviewed-on: https://chromium-review.googlesource.com/634131
Commit-Queue: Nate Chapin <japhet@chromium.org>
Reviewed-by: Hiroshige Hayashizaki <hiroshige@chromium.org>
Cr-Commit-Position: refs/heads/master@{#498942}
[add] https://crrev.com/379d0b2a6c3a03aa61f2eb7c15392ca6d59b4cc2/third_party/WebKit/LayoutTests/http/tests/svg/resources/rect-100x100-delayed-304.php
[add] https://crrev.com/379d0b2a6c3a03aa61f2eb7c15392ca6d59b4cc2/third_party/WebKit/LayoutTests/http/tests/svg/resources/rect-100x100.svg
[add] https://crrev.com/379d0b2a6c3a03aa61f2eb7c15392ca6d59b4cc2/third_party/WebKit/LayoutTests/http/tests/svg/svgimage-revalidation-expected.html
[add] https://crrev.com/379d0b2a6c3a03aa61f2eb7c15392ca6d59b4cc2/third_party/WebKit/LayoutTests/http/tests/svg/svgimage-revalidation.html
[modify] https://crrev.com/379d0b2a6c3a03aa61f2eb7c15392ca6d59b4cc2/third_party/WebKit/Source/core/layout/LayoutImage.cpp
[modify] https://crrev.com/379d0b2a6c3a03aa61f2eb7c15392ca6d59b4cc2/third_party/WebKit/Source/core/loader/resource/ImageResourceContent.cpp
[modify] https://crrev.com/379d0b2a6c3a03aa61f2eb7c15392ca6d59b4cc2/third_party/WebKit/Source/core/loader/resource/ImageResourceContent.h

Status: Fixed (was: Started)
This landed before the branch, so no merge should be required.

I opened https://bugs.chromium.org/p/chromium/issues/detail?id=761026 to explore a better design for this fix.
Labels: Merge-TBD
[Auto-generated comment by a script] We noticed that this issue is targeted for M-62; it appears the fix may have landed after branch point, meaning a merge might be required. Please confirm if a merge is required here - if so add Merge-Request-62 label, otherwise remove Merge-TBD label. Thanks.
Labels: -Merge-TBD

Sign in to add a comment