Closed
Bug 577850
Opened 14 years ago
Closed 14 years ago
A gradient applied to SVG Text element should render as if the objectBoundingBox spans the entire Text content
Categories
(Core :: SVG, defect)
Core
SVG
Tracking
()
RESOLVED
FIXED
mozilla2.0b4
People
(Reporter: sebastian, Assigned: longsonr)
Details
Attachments
(3 files)
1.03 KB,
image/svg+xml
|
Details | |
9.64 KB,
image/png
|
Details | |
10.22 KB,
patch
|
roc
:
review+
dbaron
:
approval2.0+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.99 Safari/533.4 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:2.0b1) Gecko/20100630 Firefox/4.0b1 (.NET CLR 3.5.30729) Mozilla doesn't comply with this quote from SVG 1.1 specification (Second Edition): "It is possible to apply a gradient, pattern, clipping path, mask or filter to text. When one of these facilities is applied to text and keyword 'objectBoundingBox' is used (see Object bounding box units) to specify a graphical effect relative to the "object bounding box", then the object bounding box units are computed relative to the entire ‘text’ element in all cases, even when different effects are applied to different ‘tspan’ elements within the same ‘text’ element." Reproducible: Always Steps to Reproduce: Create a text-element with a fill attribute referring an gradient. The referred gradient should have the attribute gradientUnits="objectBoundingBox" (default). The text-element should have several textPath or tspan children with some offset. Actual Results: The gradient is now treated as if each child (textPath/tspan) have it's own bounding box. It's reapplied for each child. Expected Results: The gradient should be applied as if it's a single bounding box covers all children within entire text-element.
Assignee | ||
Comment 1•14 years ago
|
||
Can you use the attachment link above to attach a testcase please?
Reporter | ||
Comment 2•14 years ago
|
||
Here's a test case that shows the gradient repeating for each text segment. Comparing it with WebKit browsers should make the issue apparent.
Assignee | ||
Comment 3•14 years ago
|
||
Would you mind attaching a screenshot from a WebKit browser?
Assignee | ||
Comment 4•14 years ago
|
||
The comment 0 quote is from here: http://www.w3.org/TR/SVG/text.html, this text is also present in the 1st edition.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Reporter | ||
Comment 5•14 years ago
|
||
Assignee | ||
Comment 6•14 years ago
|
||
Assignee: nobody → longsonr
Attachment #461779 -
Flags: review?(roc)
Assignee | ||
Updated•14 years ago
|
OS: Windows XP → All
Hardware: x86 → All
Assignee | ||
Comment 7•14 years ago
|
||
Comment on attachment 461779 [details] [diff] [review] patch with reftest The patch isn't quite right. While it works for text, tspan and textPath it won't work for glyphs as nsSVGGlyphFrame isn't an nsSVGTextContainerFrame.
Attachment #461779 -
Flags: review?(roc)
Assignee | ||
Comment 8•14 years ago
|
||
Comment on attachment 461779 [details] [diff] [review] patch with reftest comment 7 is wrong, it does work for glyphs as the aFrame->GetContent()->IsNodeOfType(nsINode::eTEXT) line moves us to the nsSVGGlyphFrame parent which is a nsSVGTextContainerFrame.
Attachment #461779 -
Flags: review?(roc)
Comment on attachment 461779 [details] [diff] [review] patch with reftest Nice
Attachment #461779 -
Flags: review?(roc) → review+
Assignee | ||
Comment 10•14 years ago
|
||
Comment on attachment 461779 [details] [diff] [review] patch with reftest Simple patch with test. Should be low risk.
Attachment #461779 -
Flags: approval2.0?
Attachment #461779 -
Flags: approval2.0? → approval2.0+
Assignee | ||
Comment 11•14 years ago
|
||
pushed http://hg.mozilla.org/mozilla-central/rev/81c119fb86c7
Status: NEW → RESOLVED
Closed: 14 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.0b4
Reporter | ||
Comment 12•14 years ago
|
||
In Beta 4, the original test case still fails on the lower textPath samples.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 13•14 years ago
|
||
Please raise a new bug if there are still issues with this functionality.
Status: REOPENED → RESOLVED
Closed: 14 years ago → 14 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•