Last Comment Bug 726928 - SVG elements disappear while zooming
: SVG elements disappear while zooming
: regression
Product: Core
Classification: Components
Component: SVG (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla13
Assigned To: Jonathan Watt [:jwatt]
: Jet Villegas (:jet)
: 726911 727150 (view as bug list)
Depends on:
Blocks: 614732
  Show dependency treegraph
Reported: 2012-02-13 23:29 PST by Alex
Modified: 2012-02-17 18:06 PST (History)
8 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Affected SVG file (49.88 KB, image/svg+xml)
2012-02-13 23:29 PST, Alex
no flags Details
patch (6.60 KB, patch)
2012-02-16 10:56 PST, Jonathan Watt [:jwatt]
dholbert: review+
Details | Diff | Splinter Review

Description Alex 2012-02-13 23:29:29 PST
Created attachment 596936 [details]
Affected SVG file

In the latest nightly, zooming in or out of the attached SVG file results in elements disappearing.

It's more noticeable while zooming out, as elements start disappearing on the first step. While zooming in it takes up to 4 increments for things to start vanishing. When zooming out, elements start vanishing from the right side, and when zooming in they start vanishing from the left side.

It doesn't occur in a nightly build from about a week ago, fallout from bug 614732?
Comment 1 Cameron McCormack (:heycam) 2012-02-13 23:43:41 PST
Might be just the same as bug 726911 which I filed earlier today.
Comment 2 Alice0775 White 2012-02-14 00:44:42 PST
Confirmed on the following str.
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0a1) Gecko/20120213 Firefox/13.0a1 ID:20120213031153
Mozilla/5.0 (X11; Linux i686; rv:13.0a1) Gecko/20120213 Firefox/13.0a1 ID:20120213031153

Reproducible: Always

Steps to Reproduce#1:
1. Start Firefox with new profile
2. Open
3. Zoom out (Ctrl -), Zoom out (Ctrl -) ...

Regression window(m-c)
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0a1) Gecko/20120210 Firefox/13.0a1 ID:20120210172614
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0a1) Gecko/20120211 Firefox/13.0a1 ID:20120211031145

Regression window(m-i)
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0a1) Gecko/20120209 Firefox/13.0a1 ID:20120209212515
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0a1) Gecko/20120210 Firefox/13.0a1 ID:20120210043613
Comment 3 Jonathan Watt [:jwatt] 2012-02-14 05:46:09 PST
Thanks, both of you, for the bug reports. I'll fix the issue here, Cam, since blocking and CCs are already set.
Comment 4 Jonathan Watt [:jwatt] 2012-02-14 05:47:15 PST
*** Bug 726911 has been marked as a duplicate of this bug. ***
Comment 5 Jonathan Watt [:jwatt] 2012-02-14 10:53:39 PST
*** Bug 727150 has been marked as a duplicate of this bug. ***
Comment 6 Jonathan Watt [:jwatt] 2012-02-16 10:56:38 PST
Created attachment 597898 [details] [diff] [review]
Comment 7 Daniel Holbert [:dholbert] 2012-02-16 12:23:19 PST
Comment on attachment 597898 [details] [diff] [review]

> nsPoint
> nsSVGUtils::TransformOuterSVGPointToChildFrame(nsPoint aPoint,
>                                                const gfxMatrix& aFrameToCanvasTM,
>                                                nsPresContext* aPresContext)
>+  gfxMatrix canvasDevToFrameUserSpace = aFrameToCanvasTM;
>+  canvasDevToFrameUserSpace.Invert();
>+  NS_ABORT_IF_FALSE(!canvasDevToFrameUserSpace.IsSingular(),
>+                    "Callers must check for singular matrix");

Nit: This seems a little late to be performing this assertion (_after_ the Invert call).

Seems like it'd be better to check this first-thing, and check the passed-in "aFrameToCanvasTM" instead of your copy.
  const gfxMatrix canvasDevToFrameUserSpace = gfxMatrix(aFrameToCanvasTM).Invert();

r=me either way
Comment 8 Daniel Holbert [:dholbert] 2012-02-16 12:24:55 PST
>   const gfxMatrix canvasDevToFrameUserSpace = gfxMatrix(aFrameToCanvasTM).Invert();

(oops, ignore that line -- I was going to suggest making the canvasDevToFrameUserSpace declaration a one-liner, something like the above, but I decided it wasn't worth suggesting, and accidentally left the possible-line-of-code there :)  )
Comment 9 Ed Morley [:emorley] 2012-02-17 18:06:19 PST

Note You need to log in before you can comment on or make changes to this bug.