Bug 199168 - An SVG element inside a position: absolute element won't update until a layout change
Summary: An SVG element inside a position: absolute element won't update until a layou...
Status: RESOLVED DUPLICATE of bug 254090
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-06-24 11:35 PDT by Tim Guan-tin Chien [:timdream]
Modified: 2023-05-08 07:02 PDT (History)
6 users (show)

See Also:


Attachments
test.html (1.38 KB, text/html)
2019-06-24 11:35 PDT, Tim Guan-tin Chien [:timdream]
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Guan-tin Chien [:timdream] 2019-06-24 11:35:30 PDT
Created attachment 372776 [details]
test.html

Summary:
A SVG element inside a position: absolute element is misplaced by text-align: center

Steps To Reproduce:
1. Load the test case
2. Observe that the position of the SVG triangle is diffferent even though the DOM+CSS state is exactly the same.
3. Trigger layout by change the window width.
4. Observe that the SVGs on case #2 and #4 is misplaced again.

Notes:
There are two bugs here. 

First, svg is set to display: block in the UA sheet; setting the property to the same value shouldn’t hav any effect but apparently it does. It was also not being placed correctly — the position of a block element inside another block element shouldn’t be affected by the |text-align| property.

Second: unset the “no-op” value should restore the layout but it did not until re-layout.
Comment 1 Tim Guan-tin Chien [:timdream] 2019-06-24 11:36:22 PDT
Tested on STP Release 84 (Safari 13.0, WebKit 14608.1.25.2)

Turned out the positioning issue is not valid but the relayout issue is. See https://bugzilla.mozilla.org/show_bug.cgi?id=1558357#c2 for discussion.

Was filed as rdar://51602694.
Comment 2 Ahmad Saleem 2023-05-08 01:54:17 PDT
@Simon & @Said - for some reason, I am not able to reproduce this bug in STP169, can you confirm whether it is not reproducible for you as well.
Comment 3 zalan 2023-05-08 07:01:50 PDT
Progressed at 261859@main
Comment 4 zalan 2023-05-08 07:02:29 PDT

*** This bug has been marked as a duplicate of bug 254090 ***