Bug 171377 - SVG does not resize when window height is changed. Ok when width is changed.
Summary: SVG does not resize when window height is changed. Ok when width is changed.
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified macOS 10.12
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-04-27 07:55 PDT by petzoto
Modified: 2022-04-15 14:56 PDT (History)
3 users (show)

See Also:


Attachments
Screen capture of the bug - svg not resized on vertical window resize (312.14 KB, video/mp4)
2017-04-27 07:55 PDT, petzoto
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description petzoto 2017-04-27 07:55:51 PDT
Created attachment 308389 [details]
Screen capture of the bug - svg not resized on vertical window resize

Overview:
When a SVG is placed in a container and the SVG's size is percentage based, it should update its size when the container changes. It fails to do so when the resize is triggered by a vertical size change of the browser window. It works ok when horizontal window size changes.

Steps to Reproduce:
1. Open demo link: http://misc.basta.bg/webkit-svg-bug/ (contains a circle)
2. Resize window by its height ONLY

Expected result:
The circle should resize/realign to fit the window

Actual Result:
The circle doesn't resize/realign.

Tested on the latest webkit nightly:
Version 10.1 (12603.1.30.0.34, r215857)

Additional Information:
Different scenarios when it is working OK (bug does not occur):
- When you resize window by width
- Make the SVG absolute positioned
- If you change the container size with JS/CSS (not vertical window resize)

Demo code loaded in this pen for easy testing:
https://codepen.io/anon/pen/MmJqZy

I'm also attaching demo of the behavior.
Comment 1 petzoto 2017-04-27 08:00:20 PDT
Sorry, wrong codepen link, correct is this one:
https://codepen.io/anon/pen/YVNRNy
Comment 2 Radar WebKit Bug Importer 2022-04-05 12:51:35 PDT
<rdar://problem/91310482>
Comment 3 Smoley 2022-04-15 14:56:50 PDT
This does not reproduce for me on latest macOS
macOS 12.4 beta (21F5048e) testing with https://codepen.io/anon/pen/YVNRNy.