alignment-baseline has no effect on <text> elements, but the baseline computation code was using its value for all elements, including <text> elements, if present. With useCSS: false this meant that if a style explicitly set alignment-baseline on a <text> element, it would incorrectly be used (and dominant-baseline ignored). With useCSS: true, it's even worse because the computed styles for a <text> element will always include a value (probably auto) for alignment-baseline (because computed styles don't know about the semantics of which attributes affect which elements), so the dominant-baseline value would always be ignored.
So, the fix is to ignore alignment-baseline (and baseline-shift while we're at it, which also has no effect on <text> elements) when processing <text> elements.
This causes a test failure because Chrome (unlike Firefox) incorrectly factors in alignment-baseline on <text> elements, so I updates the expected results to account for it.
alignment-baseline
has no effect on<text>
elements, but the baseline computation code was using its value for all elements, including<text>
elements, if present. WithuseCSS: false
this meant that if a style explicitly setalignment-baseline
on a<text>
element, it would incorrectly be used (anddominant-baseline
ignored). WithuseCSS: true
, it's even worse because the computed styles for a<text>
element will always include a value (probablyauto
) foralignment-baseline
(because computed styles don't know about the semantics of which attributes affect which elements), so thedominant-baseline
value would always be ignored.So, the fix is to ignore
alignment-baseline
(andbaseline-shift
while we're at it, which also has no effect on<text>
elements) when processing<text>
elements.This causes a test failure because Chrome (unlike Firefox) incorrectly factors in
alignment-baseline
on<text>
elements, so I updates the expected results to account for it.