WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
REOPENED
139258
dominant-baseline in an SVG <text> tag is not inherited by its children <tspan> tags
https://bugs.webkit.org/show_bug.cgi?id=139258
Summary
dominant-baseline in an SVG <text> tag is not inherited by its children <tspa...
Said Abou-Hallawa
Reported
2014-12-04 09:51:47 PST
Open the following svg <svg xmlns="
http://www.w3.org/2000/svg
"> <line x1="0" y1="200" x2="100%" y2="200" style="stroke:rgb(255,0,0);stroke-width:1" /> <text x="20" y="200" dominant-baseline="central" font-size="50px"> foo<tspan>bar </tspan><tspan>baz</tspan> </text> </svg> Result: The first word "foo" is the only text which is rendered with alignment equal to "central". The rest of the text in the <tspan> tags is rendered with alignment equal to "alphabetic". The w3c specs
http://www.w3.org/TR/SVG/text.html
says about the value "auto" of the dominant-baseline, which is the default: "If this property occurs on a ‘tspan’, ‘tref’, ‘altGlyph’ or ‘textPath’ element, then the dominant-baseline and the baseline-table components remain the same as those of the parent text content element." So it is expected to have all the text in the <tspan> tags in the svg above to be rendered with the same alignment as the parent text content element's alignment.
Attachments
result
(19.94 KB, image/png)
2014-12-04 09:54 PST
,
Said Abou-Hallawa
no flags
Details
expected
(19.72 KB, image/png)
2014-12-04 09:54 PST
,
Said Abou-Hallawa
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Said Abou-Hallawa
Comment 1
2014-12-04 09:54:27 PST
Created
attachment 242573
[details]
result
Said Abou-Hallawa
Comment 2
2014-12-04 09:54:50 PST
Created
attachment 242574
[details]
expected
Radar WebKit Bug Importer
Comment 3
2014-12-04 09:55:42 PST
<
rdar://problem/19144671
>
Yan Wong
Comment 4
2020-04-25 03:52:23 PDT
dominant-baseline should be inherited in SVG 2, so this is an SVG 2 improvement, which would be welcome in webkit. It *is* inherited in the latest version of Chrome and Firefox. See
https://www.fxsitecompat.dev/en-CA/docs/2019/dominant-baseline-is-now-inherited-from-its-parent-element/
Ahmad Saleem
Comment 5
2023-05-13 06:35:30 PDT
https://src.chromium.org/viewvc/blink?view=revision&revision=199970
^ This makes us pass following test case -
https://jsfiddle.net/azLe745x/
but it regresses following: imported/w3c/web-platform-tests/svg/styling/presentation-attributes-irrelevant.html imported/w3c/web-platform-tests/svg/styling/presentation-attributes-relevant.html imported/w3c/web-platform-tests/svg/styling/presentation-attributes-unknown.html With following failing: dominant-baseline presentation attribute supported on a irrelevant element dominant-baseline presentation attribute supported on a relevant element dominant-baseline presentation attribute supported on an unknown SVG element
Ahmad Saleem
Comment 6
2023-05-28 15:58:32 PDT
(In reply to Ahmad Saleem from
comment #5
)
>
https://src.chromium.org/viewvc/blink?view=revision&revision=199970
> > ^ This makes us pass following test case -
https://jsfiddle.net/azLe745x/
> > but it regresses following: > > imported/w3c/web-platform-tests/svg/styling/presentation-attributes- > irrelevant.html > imported/w3c/web-platform-tests/svg/styling/presentation-attributes-relevant. > html > imported/w3c/web-platform-tests/svg/styling/presentation-attributes-unknown. > html > > With following failing: > > dominant-baseline presentation attribute supported on a irrelevant element > dominant-baseline presentation attribute supported on a relevant element > dominant-baseline presentation attribute supported on an unknown SVG element
Running these tests directly from WPT on Minibrowser where I have Blink patch merged does not show them failing when I do merge. :-( I do have other SVG patches, which can mess with my internal build, so I think I can try doing draft PR. Any suggestion?
EWS
Comment 7
2023-06-26 13:10:07 PDT
Committed
265525@main
(0ed9d940afc3): <
https://commits.webkit.org/265525@main
> Reviewed commits have been landed. Closing PR #14833 and removing active labels.
Ahmad Saleem
Comment 8
2023-07-04 09:54:32 PDT
***
Bug 249085
has been marked as a duplicate of this bug. ***
Ahmad Saleem
Comment 9
2023-07-07 14:03:53 PDT
***
Bug 217564
has been marked as a duplicate of this bug. ***
WebKit Commit Bot
Comment 10
2023-07-19 03:33:42 PDT
Re-opened since this is blocked by
bug 259335
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug