Closed
Bug 593182
Opened 14 years ago
Closed 14 years ago
SVG element inside a SVG document is not rendered if it is moved
Categories
(Core :: SVG, defect)
Core
SVG
Tracking
()
RESOLVED
DUPLICATE
of bug 571863
Tracking | Status | |
---|---|---|
blocking2.0 | --- | final+ |
People
(Reporter: Jeremie, Assigned: dholbert)
References
Details
(Keywords: regression, testcase)
Attachments
(4 files)
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:2.0b6pre) Gecko/20100902 Firefox/4.0b6pre
Build Identifier: Mozilla/5.0 (X11; Linux x86_64; rv:2.0b6pre) Gecko/20100902 Firefox/4.0b6pre
If you have an SVG element inside a SVG document, the SVG element is not rendered if you try to change it's X and Y attributes with a script or a SMIL animations
Reproducible: Always
Steps to Reproduce:
1. See the 3 tests case
Actual Results:
For the first TC : You can see a red square and a blue square
For the second TC : You can see a red square and a green square
For the third TC : You can see a red square and a green square
Expected Results:
For the first TC : You should see a green square and a blue square
For the second TC : You should see a green square moving from right to left to overlap the red square and showing the blue square
For the third TC : You should see a green square moving from right to left to overlap the red square and showing the blue square
The first TC is a simple change made with javascript on the window load event
The second TC is a scripted animation that update the X attribute of the SVG element every 20ms
The third TC is a SMIL animation that update the X attribute of the SVG element during 3s.
For each test case, if you force a reflow (by changing the size of your window for exemple), you should be able to see the SVG element to it's current position.
Why 3 test case ?
The first is the simplest test case.
The second is the animated version of the first. This due to webkit that pass the first test but have a bug when there is an animation (there are rendering artifacts)
The third test case is here to demonstrate that script animations and declarative animations act the same on SVG element.
Opera pass all those tests without any problems.
Reporter | ||
Comment 1•14 years ago
|
||
Reporter | ||
Comment 2•14 years ago
|
||
Reporter | ||
Comment 3•14 years ago
|
||
Assignee | ||
Updated•14 years ago
|
Version: unspecified → Trunk
Assignee | ||
Updated•14 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 4•14 years ago
|
||
FYI. Firefox 3.6 passes first and second tests.
Assignee | ||
Comment 5•14 years ago
|
||
My mozilla-central nightly fails all 3 tests. Adding regression keywords.
Keywords: regression,
regressionwindow-wanted
Updated•14 years ago
|
blocking2.0: --- → ?
Comment 6•14 years ago
|
||
Regression range for the first test: http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=af0f0615944e&tochange=4b18d31e83f4
Second test has the same range.
now the problem is... nothing in there jumps out at me. Daniel, any ideas?
Keywords: regressionwindow-wanted
Comment 7•14 years ago
|
||
Ah, perhaps bug 545550?
Assignee | ||
Comment 9•14 years ago
|
||
Yup, that sounds like a likely candidate, then. Putting this on my list.
Assignee: nobody → dholbert
Status: NEW → ASSIGNED
blocking2.0: ? → final+
Comment 10•14 years ago
|
||
Is this fixed by my patch in bug 571863?
Assignee | ||
Comment 11•14 years ago
|
||
(In reply to comment #10)
> Is this fixed by my patch in bug 571863?
No, but it gets us a step closer. Your patch doesn't affect testcase 1, but it partly fixes #2 & #3.
Behavior on testcases 2/3:
- Opera: Green rect slides leftwards, covering red & revealing blue
- m-c: No animation -- unmoving [redrect] [greenrect]
- m-c + patch: Right edge of green rect collapses towards its left edge, making it disappear. (behavior is as if we were animating its width to 0)
Assignee | ||
Comment 12•14 years ago
|
||
Testcases 1 & 2 both become fixed if I add back this line
aSVGElement->DidChangeLength(mAttrEnum, aDoSetAttr);
to nsSVGLength2::SetBaseValueString().
(see also bug 601934 comment 3)
Comment 13•14 years ago
|
||
(In reply to comment #12)
> Testcases 1 & 2 both become fixed if I add back this line
> aSVGElement->DidChangeLength(mAttrEnum, aDoSetAttr);
> to nsSVGLength2::SetBaseValueString().
Is that with or without bug 571863?
Assignee | ||
Comment 14•14 years ago
|
||
Without. Adding that patch gets me the partial-fix on testcase 3 that I mentioned in comment 11.
Assignee | ||
Comment 15•14 years ago
|
||
The key thing that nsSVGSVGElement::DidChangeLength gets us (and that we lack without it) is a call to InvalidateTransformNotifyFrame().
If I add the DidChangeLength call (per comment 12) but skip its call to InvalidateTransformNotifyFrame, the bug remains.
Assignee | ||
Comment 16•14 years ago
|
||
Testcase 3 becomes completely fixed if I simply add an impl of
nsSVGSVGElement::DidAnimateLength
Assignee | ||
Comment 17•14 years ago
|
||
(to call InvalidateTransformNotifyFrame, that is)
Assignee | ||
Comment 18•14 years ago
|
||
Here's the fix so far.
Still todo:
- Make reftests from this bug's testcases
- I think we need a DidAnimateEnum() method, as noted in the patch. (First I want to make a test that's broken due to the current lack of DidAnimateEnum, though.)
- I fear that all the other "// We don't need to call DidChange* here" comments from http://hg.mozilla.org/mozilla-central/rev/165e0bfa8352 may be incorrect, too -- at least, the ones in places that could be targeting a custom impl of DidChange* (like nsSVGSVGElement's DidChange* methods, all of which call InvalidateTransformNotifyFrame)
Comment 19•14 years ago
|
||
Comment 16 is the wrong thing to do. I'll change bug 571863 to work.
Comment 20•14 years ago
|
||
bug 571863 should now fix testcase 3 on its own.
Comment 21•14 years ago
|
||
OK bug 571863 now completely fixes testcase 2 and testcase 3 on its own.
Comment 22•14 years ago
|
||
I think it fixes the hedgehog too unless I'm missing something.
Comment 23•14 years ago
|
||
Oh and it fixes testcase 1 as well so that's a full house :-)
Updated•14 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → DUPLICATE
Assignee | ||
Comment 25•14 years ago
|
||
(In reply to comment #21)
(In reply to comment #22)
(In reply to comment #23)
Yay, that's great news!
You need to log in
before you can comment on or make changes to this bug.
Description
•