Bug 269878
Summary: | baseline-shift initial value should be `0px` rather than `baseline` | ||
---|---|---|---|
Product: | WebKit | Reporter: | Ahmad Saleem <ahmad.saleem792> |
Component: | CSS | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW | ||
Severity: | Normal | CC: | karlcow, ntim, webkit-bug-importer |
Priority: | P2 | Keywords: | InRadar, WPTImpact |
Version: | Safari Technology Preview | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=250012 |
Ahmad Saleem
Hi Team,
As title says, this bug is to fix baseline-shift initial value as per CSS spec.
NOTE - It was in SVG spec but now getting removed in SVG2 but it is in CSS Inline spec, which should be followed.
Old SVG1.1 - https://www.w3.org/TR/SVG11/text.html#BaselineShiftProperty
SVG2 (SVGWG) - https://svgwg.org/svg2-draft/text.html#BaselineShiftProperty
"SVG 2 will deprecate ‘baseline-shift’ and use ‘vertical-align’ instead."
CSS Spec - https://drafts.csswg.org/css-inline-3/#baseline-shift-property
WPT Test - https://wpt.fyi/results/css/css-inline/inheritance.html?label=master&label=experimental&aligned
> Property baseline-shift has initial value 0px
__
It is easy to fix by modifying:
> Source/WebCore/rendering/style/SVGRenderStyle.h
From: static BaselineShift initialBaselineShift() { return BaselineShift::Baseline; }
To: static BaselineShift initialBaselineShift() { return BaselineShift::Length; }
and
From: static SVGLengthValue initialBaselineShiftValue() { return SVGLengthValue(0, SVGLengthType::Number); }
To: static SVGLengthValue initialBaselineShiftValue() { return SVGLengthValue(0, SVGLengthType::Pixels); }
__
Any input is welcome.
Thanks!
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Ahmad Saleem
Web-Spec: https://drafts.csswg.org/css-inline-3/#property-index
Ahmad Saleem
Draft PR - https://github.com/WebKit/WebKit/pull/24908
Radar WebKit Bug Importer
<rdar://problem/123792212>