Closed
Bug 448906
Opened 17 years ago
Closed 16 years ago
SVG objects with patterned fills in files saved by some versions of Inkscape show incorrect patterns in Firefox 3.0.1
Categories
(Core :: SVG, defect)
Core
SVG
Tracking
()
RESOLVED
FIXED
| Tracking | Status | |
|---|---|---|
| status1.9.2 | --- | beta1-fixed |
People
(Reporter: will.pittenger1+mozbugzilla, Assigned: longsonr)
References
()
Details
Attachments
(8 files, 1 obsolete file)
|
2.66 KB,
image/png
|
Details | |
|
1.77 KB,
image/png
|
Details | |
|
20.79 KB,
image/svg+xml
|
Details | |
|
774 bytes,
image/svg+xml
|
Details | |
|
767 bytes,
image/svg+xml
|
Details | |
|
987 bytes,
image/svg+xml
|
Details | |
|
987 bytes,
image/svg+xml
|
Details | |
|
5.60 KB,
patch
|
roc
:
review+
roc
:
approval1.9.2+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1
Build Identifier:
Examine the fill for the checkered pattern in the start/finish line of the page given. It should be a checker board with white and black squares alternating. For me, it doesn't show that. Instead, I see the attached images. The first shows what I see. The second shows what should be visible. The third is the problem SVG with everything except that object deleted.
Reproducible: Always
Steps to Reproduce:
1. View the SVG
Actual Results:
Pattern won't be displayed correctly
Expected Results:
Checker board pattern to display as alternating white and black squares
| Reporter | ||
Comment 1•17 years ago
|
||
This shows what I see when I use FF 3.0.1 to view the SVG.
| Reporter | ||
Comment 2•17 years ago
|
||
| Reporter | ||
Comment 3•17 years ago
|
||
Comment 4•16 years ago
|
||
Even more reduced testcase.
Referencing a transformed pattern from a transformed element via |xlink:href| causes the problem.
<rect/> -> <pattern
@xlink:href -> <pattern/>
/>
Comment 5•16 years ago
|
||
Even more reduced testcase.
Referencing a transformed pattern from a transformed element directly doesn't causes the problem.
<rect/> -> <pattern/>
Updated•16 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows XP → All
Hardware: x86 → All
Version: unspecified → Trunk
Comment 6•16 years ago
|
||
Mysteriously, rendering pattern referenced directly is failed when |xlink:href|ed pattern was rendered before.
<rect/> -> <pattern
@xlink:href -> <pattern/>
/>
<rect/> -> <pattern/>
both are wrong rendering.
Updated•16 years ago
|
Attachment #399678 -
Attachment description: Testcase (broken) → Testcase 1 (broken)
Updated•16 years ago
|
Attachment #399679 -
Attachment description: Testcase (works) → Testcase 2 (works)
Comment 7•16 years ago
|
||
Rendering |xlink:href|ed pattern is when pattern referenced directly was rendered before.
<rect/> -> <pattern/>
<rect/> -> <pattern
@xlink:href -> <pattern/>
/>
both are O.K.
| Assignee | ||
Comment 8•16 years ago
|
||
Assignee: nobody → longsonr
Attachment #408268 -
Flags: review?(roc)
| Assignee | ||
Comment 9•16 years ago
|
||
Thanks for the testcases Takeshi. I would not have been able to fix this without them.
if (!mPaintLoopFlag) {
mPaintLoopFlag = PR_TRUE;
Should we be setting/checking mPaintLoopFlag on patternFrame?
Should we just be calling nsSVGPatternFrame::PaintPattern on patternFrame instead?
| Assignee | ||
Comment 11•16 years ago
|
||
(In reply to comment #10)
> if (!mPaintLoopFlag) {
> mPaintLoopFlag = PR_TRUE;
>
> Should we be setting/checking mPaintLoopFlag on patternFrame?
I can change this as it's the only member variable that paintPattern sets and I guess it does make more sense to set it on the pattern you're rendering. However, I don't think it makes much difference. If there is a loop then either you come back round to the current frame or the linked frame and you'll see the flag set at some point either on the current frame or the linked frame.
>
> Should we just be calling nsSVGPatternFrame::PaintPattern on patternFrame
> instead?
This we can't do. We need to start from the current frame not the linked frame to get pattern attributes. e.g. with pattern x="3" xlink:href="..." we need to get x="3"
| Assignee | ||
Comment 12•16 years ago
|
||
Attachment #408268 -
Attachment is obsolete: true
Attachment #408293 -
Flags: review?(roc)
Attachment #408268 -
Flags: review?(roc)
Attachment #408293 -
Flags: review?(roc) → review+
| Assignee | ||
Comment 13•16 years ago
|
||
Status: NEW → RESOLVED
Closed: 16 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
| Assignee | ||
Comment 14•16 years ago
|
||
Comment on attachment 408293 [details] [diff] [review]
patternFrame->mPaintLoop
I think it might be worth taking this in 1.9.2 although I don't know how prevalent this is in Inkscape generated files. Pretty simple low risk fix that includes a test.
Attachment #408293 -
Flags: approval1.9.2?
Attachment #408293 -
Flags: approval1.9.2? → approval1.9.2+
| Assignee | ||
Comment 15•16 years ago
|
||
status1.9.2:
--- → beta1-fixed
You need to log in
before you can comment on or make changes to this bug.
Description
•