Bug 217564 - Dominant-baseline doesn't work properly when viewBox attribute is present
Summary: Dominant-baseline doesn't work properly when viewBox attribute is present
Status: RESOLVED DUPLICATE of bug 139258
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: Safari 14
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-10-10 16:11 PDT by Guvenc Usanmaz
Modified: 2023-07-07 14:03 PDT (History)
8 users (show)

See Also:


Attachments
Page without using viewBox (normal.html) and with viewBox (buggy.html) (746 bytes, application/zip)
2020-10-10 16:11 PDT, Guvenc Usanmaz
no flags Details
Screenshot (1.28 MB, image/png)
2020-10-19 13:04 PDT, Smoley
no flags Details
Renderings of two different html pages (buggy.html and normal.html) on Safari (53.73 KB, image/png)
2020-10-19 13:37 PDT, Guvenc Usanmaz
no flags Details
Test Case (out of ZIP) (425 bytes, text/html)
2023-07-07 14:01 PDT, Ahmad Saleem
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Guvenc Usanmaz 2020-10-10 16:11:02 PDT
Created attachment 411022 [details]
Page without using viewBox (normal.html) and with viewBox (buggy.html)

When viewBox attribute is used for an SVG element and text elements are present as child of the SVG element, dominant-baseline attribute doesn't behave correctly.

Check two links below. First page contains an SVG element and doesn't use viewbox attribute. In contrast second page has an SVG element with viewbox attribute. Both pages should render similar pages. This is the case for Chrome and Firefox on Android and Linux platforms but not the case for Safari on MacOs or IOS. As can be seen from pages dominant-baseline="central" rule couldn't achieve to center text on blue square. Changing attribute value of dominant-baseline also seems to have no apparent effect on second page (buggy.html).

https://repl.it/@GuvencUsanmaz/WebkitSVGDBaseline1#normal.html
https://repl.it/@GuvencUsanmaz/WebkitSVGDBaseline1#buggy.html

In case links for these two pages go stale contents of these two pages are attached.
Comment 1 Radar WebKit Bug Importer 2020-10-12 17:46:34 PDT
<rdar://problem/70232126>
Comment 2 Smoley 2020-10-19 13:04:51 PDT
Created attachment 411781 [details]
Screenshot
Comment 3 Smoley 2020-10-19 13:05:51 PDT
Thanks for filing. I may be missing a step, but I can't seem to get the test pages to show any content in Safari 14.0 or Chrome. See screenshot.
Comment 4 Guvenc Usanmaz 2020-10-19 13:33:52 PDT
I am sorry for the mistake. I think I gave wrong URLs.

Could you check two URLs below.

https://webkitsvgdbaseline1.guvencusanmaz.repl.co/normal.html
https://webkitsvgdbaseline1.guvencusanmaz.repl.co/buggy.html

I have also added an attechments in my first post where these two html documents could be viewed offline.

I am also attaching a screenshot where buggy page appears on left and normal page appears on right.
Comment 5 Guvenc Usanmaz 2020-10-19 13:37:38 PDT
Created attachment 411790 [details]
Renderings of two different html pages (buggy.html and normal.html) on Safari
Comment 6 Smoley 2020-10-19 13:41:47 PDT
Got it, thanks. I am able to reproduce this with the updated link.
Comment 7 Ahmad Saleem 2023-01-22 03:15:53 PST
I am able still to reproduce this bug in WebKit Trunk (259178@main), which do contain some fixes etc. but it still differs from Chrome Canary 111 and Firefox Nightly 111, which show like normal version.

Test - https://webkitsvgdbaseline1.guvencusanmaz.repl.co/buggy.html
Comment 8 Ahmad Saleem 2023-07-07 14:01:40 PDT
Created attachment 466983 [details]
Test Case (out of ZIP)
Comment 9 Ahmad Saleem 2023-07-07 14:03:53 PDT
(In reply to Ahmad Saleem from comment #8)
> Created attachment 466983 [details]
> Test Case (out of ZIP)

From the Comment 0, I took out this buggy test case and now it works due to dominant-baseline being inherited in WebKit ToT (265838@main).

Marking this as duplicate for bug 139258.

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