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

Issue 665912 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Nov 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug-Regression



Sign in to add a comment

svg render issues when resizing window

Reported by hernanto...@gmail.com, Nov 16 2016

Issue description

Chrome Version       : 54.0.2840.87
OS Version: Windows 10.0
URLs (if applicable) : http://codepen.io/airnan/pen/LbRNRa
Other browsers tested:
  Add OK or FAIL after other browsers where you have tested this issue:
     Safari 5: OK
  Firefox 4.x: OK
     IE 10: OK
     EDGE: OK

What steps will reproduce the problem?
1. open url
2. resize window horizontally
3. the svg renders incorrectly

What is the expected result?
Svg to resize without glitching the white rectangle

What happens instead of that?
The white rectangle gets cropped, blinks or disappears completely.

Please provide any additional information below. Attach a screenshot if
possible.

UserAgentString: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.87 Safari/537.36



 
screenshot.jpg
181 KB View Download
Labels: M-54

Comment 2 by f...@opera.com, Nov 17 2016

Components: Blink>SVG
Labels: -OS-Windows
Status: Available (was: Unconfirmed)

Comment 3 by f...@opera.com, Nov 17 2016

Attaching reduced standalone TC.
svg-resize-repaint-bug-iframe.html
447 bytes View Download

Comment 4 by f...@opera.com, Nov 21 2016

Labels: -Type-Bug -Pri-3 Pri-1 Type-Bug-Regression
Owner: f...@opera.com
Status: Assigned (was: Available)
Figured out that this is a regression (bisected to 971a9c9725e293bd89b7cb1475acdc502065e6b3, similar to  issue 649760 .)
Project Member

Comment 5 by bugdroid1@chromium.org, Nov 21 2016

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

commit 69d94df4b088b45440f335e6be53399b80e7292f
Author: fs <fs@opera.com>
Date: Mon Nov 21 20:14:55 2016

Repaint SVG subtree on viewport changes (resize)

When the (outermost) <svg> is sized using percentages, and an ancestor
changes size, the LayoutSVGRoot will be marked for layout (even though
the dimension/initial viewport changes.)
Since changed dimensions can imply a new scale factor (for instance from
interactions with a viewBox) or previously clipped content being
exposed, we need to issue paint invalidations for the entire SVG.

BUG= 665912 

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

[add] https://crrev.com/69d94df4b088b45440f335e6be53399b80e7292f/third_party/WebKit/LayoutTests/paint/invalidation/svg/resize-svg-invalidate-children-2-expected.txt
[add] https://crrev.com/69d94df4b088b45440f335e6be53399b80e7292f/third_party/WebKit/LayoutTests/paint/invalidation/svg/resize-svg-invalidate-children-2.html
[modify] https://crrev.com/69d94df4b088b45440f335e6be53399b80e7292f/third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.cpp

Comment 6 by f...@opera.com, Nov 22 2016

Status: Fixed (was: Assigned)

Comment 7 by f...@opera.com, Nov 24 2016

Labels: Merge-Request-56

Comment 8 by dimu@chromium.org, Nov 24 2016

Labels: -Merge-Request-56 Merge-Approved-56 Hotlist-Merge-Approved
Your change meets the bar and is auto-approved for M56 (branch: 2924)
Project Member

Comment 9 by bugdroid1@chromium.org, Nov 24 2016

Labels: -merge-approved-56 merge-merged-2924
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c349060927de152998f689e80b03d3a8866ab0bb

commit c349060927de152998f689e80b03d3a8866ab0bb
Author: Fredrik Söderquist <fs@opera.com>
Date: Thu Nov 24 12:39:29 2016

Repaint SVG subtree on viewport changes (resize)

When the (outermost) <svg> is sized using percentages, and an ancestor
changes size, the LayoutSVGRoot will be marked for layout (even though
the dimension/initial viewport changes.)
Since changed dimensions can imply a new scale factor (for instance from
interactions with a viewBox) or previously clipped content being
exposed, we need to issue paint invalidations for the entire SVG.

BUG= 665912 

Review-Url: https://codereview.chromium.org/2511353002
Cr-Commit-Position: refs/heads/master@{#433622}
(cherry picked from commit 69d94df4b088b45440f335e6be53399b80e7292f)

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

Cr-Commit-Position: refs/branch-heads/2924@{#93}
Cr-Branched-From: 3a87aecc31cd1ffe751dd72c04e5a96a1fc8108a-refs/heads/master@{#433059}

[add] https://crrev.com/c349060927de152998f689e80b03d3a8866ab0bb/third_party/WebKit/LayoutTests/paint/invalidation/svg/resize-svg-invalidate-children-2-expected.txt
[add] https://crrev.com/c349060927de152998f689e80b03d3a8866ab0bb/third_party/WebKit/LayoutTests/paint/invalidation/svg/resize-svg-invalidate-children-2.html
[modify] https://crrev.com/c349060927de152998f689e80b03d3a8866ab0bb/third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.cpp

Cc: tkonch...@chromium.org
Labels: TE-Verified-M56 TE-Verified-56.0.2924.10
Tested the same on win10 mac and Linux using chrome version 56.0.2924.10 with the html file given in comment #3 - Observed green color rectangle with no rendering issue on resizing the window 

Please find the screen cast

Fix works as expected
Recording #12.mp4
573 KB View Download

Sign in to add a comment