Closed
Bug 1185266
Opened 9 years ago
Closed 9 years ago
SVG painting of text element does not refresh when styles change
Categories
(Core :: SVG, defect)
Tracking
()
RESOLVED
FIXED
mozilla42
Tracking | Status | |
---|---|---|
firefox42 | --- | fixed |
People
(Reporter: amelia.bellamy.royds, Assigned: heycam)
Details
Attachments
(2 files)
1.08 KB,
image/svg+xml
|
Details | |
3.54 KB,
patch
|
jwatt
:
review+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0 Build ID: 20150630154324 Steps to reproduce: Create SVG text element, fill with a pattern or gradient, then use CSS pseudoclasses to change the fill value. Or animate the content of the paint server (gradient or pattern). See http://codepen.io/AmeliaBR/pen/gpjzEP/ or the attached file (which is the same, just as a stand-alone SVG) (The demo also shows problems with pattern tiling; I'll file a separate bug for that!) Actual results: Text does not re-paint. Expected results: Text should repaint to match the change in paint on shapes with the same styles. I'm surprised I have not noticed this before, so it may be a regression but I'm not sure. I'm using the stable Firefox build (39) on a Win7 system.
Updated•9 years ago
|
Component: Untriaged → SVG
Product: Firefox → Core
Assignee | ||
Comment 1•9 years ago
|
||
I think the issue is that we're looking up the nsSVGEffects::FillProperty off the wrong frame. In nsSVGEffects::GetPaintServer we look up past a text frame to its parent, but this will result in us looking at the <text>'s anonymous block child. We need to look up one step further to the SVGTextFrame. If you modify the test to put a <tspan> around the text content you'll see it works (as we'll be getting the FillProperty off the nsInlineFrame that corresponds to the <tspan> element). The reason the dynamic updates fail is that the nsSVGEffects::UpdateEffects call, which removes the FillProperty so it can be recreated next paint, only removes it from the SVGTextFrame and not its anonymous block child.
Assignee: nobody → cam
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Assignee | ||
Comment 2•9 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=9f2ccd75f979
Attachment #8635850 -
Flags: review?(jwatt)
Updated•9 years ago
|
Attachment #8635850 -
Flags: review?(jwatt) → review+
Comment 4•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/7982972a0f76
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox42:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
You need to log in
before you can comment on or make changes to this bug.
Description
•