Closed Bug 915093 Opened 11 years ago Closed 11 years ago

gradients/patterns in SVG glyphs inherited from context with -moz-objectStroke do not scale according to page zoom

Categories

(Core :: Layout: Text and Fonts, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla26

People

(Reporter: jfkthame, Assigned: jfkthame)

Details

Attachments

(1 file)

STR:

With gfx.font_rendering.opentype_svg.enabled = true, load

  layout/reftests/text-svgglyphs/svg-glyph-objectgradient.svg

and zoom in/out. Note how the gradient stroke/fill does not scale as the page is zoomed; it appears to stay fixed at its "original" size, and a different part of the gradient shows within the glyphs depending on the zoom level.

This looks very much like the issue reported and fixed in bug 798839, but since then, we have enabled the new CSS-frame-based SVG text support (bug 655877, preffed on in bug 839955), and I think that is where it broke again. Unfortunately, due to bug 871961, we didn't have test coverage to detect this. (Also, I'm not sure whether the test would have been working correctly at that time, due to bug 801467. But that's all fixed now.)

Anyhow, the behavior is currently broken, and causes svg-glyph-objectgradient-zoom.svg to fail across all platforms if we try to re-enable the reftests.
Hmm, to be more precise, it looks like this is only affecting a gradient specified using -moz-objectStroke. The gradient specified via -moz-objectFill does not have the problem. So only the two lower glyphs (squares) in the testcase exhibit the bug.
Could be a mistake with unit conversion (e.g., getting the wrong one of CSS pixels vs. device pixels).  Or not.
Looks like nsSVGTextFrame2::SetupCairoStroke just needs the same fix as nsSVGGlyphFrame got in bug 798839. With this, the gradients in the testcase scale as expected when zooming.
Attachment #802987 - Flags: review?(roc)
Assignee: nobody → jfkthame
Summary: gradients in SVG glyphs do not scale according to page zoom → gradients/patterns in SVG glyphs inherited from context with -moz-objectStroke do not scale according to page zoom
https://hg.mozilla.org/mozilla-central/rev/3a27531afc85
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: