Last Comment Bug 312232 - getScreenCTM fails somehow in xulrunner builds
: getScreenCTM fails somehow in xulrunner builds
Status: RESOLVED FIXED
: fixed1.8
Product: Core
Classification: Components
Component: SVG (show other bugs)
: 1.8 Branch
: x86 Linux
: -- normal (vote)
: ---
Assigned To: General SVG Bugs
: Hixie (not reading bugmail)
: Jet Villegas (:jet)
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-10-12 14:38 PDT by Rob Adams
Modified: 2005-10-14 17:22 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Simple test case. Click on the black square. Should show coordinates. (16.14 KB, application/zip)
2005-10-12 14:41 PDT, Rob Adams
no flags Details
initialize the return value in GetViewboxToViewportTransform (605 bytes, patch)
2005-10-13 10:32 PDT, Rob Adams
jwatt: review-
Details | Diff | Splinter Review
Style change and also update nsSVGMarkerElement::GetViewboxToViewportTransform as well (1.85 KB, patch)
2005-10-13 14:51 PDT, Rob Adams
jwatt: review+
tor: superreview+
asa: approval1.8rc1+
Details | Diff | Splinter Review

Description Rob Adams 2005-10-12 14:38:23 PDT
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a1) Gecko/20051012 Firefox/1.6a1
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a1) Gecko/20051012 Firefox/1.6a1

Under XULRunner, for some reason calling getScreenCTM fails: 
[JavaScript Error: "uncaught exception: [Exception... "Component returned
failure code: 0xbfaaeeac [nsIDOMSVGLocatable.getScreenCTM]"  nsresult:
"0xbfaaeeac (<unknown>)"  location: "JS frame ::
https://bugzilla.mozilla.org/attachment.cgi?id=197708 :: doDrag :: line 11" 
data: no]"]

Load https://bugzilla.mozilla.org/attachment.cgi?id=197708 in an iframe for
example in any xulrunner application.

I'll also attach a very minimal xulapp testcase that also shows the problem. 
Click on the black square in the test case.

Reproducible: Always
Comment 1 Rob Adams 2005-10-12 14:41:23 PDT
Created attachment 199351 [details]
Simple test case.  Click on the black square.  Should show coordinates.
Comment 2 Benjamin Smedberg [:bsmedberg] 2005-10-12 14:46:53 PDT
Is this perhaps a problem with any document loaded in a toplevel window (not in
a <xul:browser>, <iframe>, whatever)? What happens when you load the equivalent
SVG using firefox -chrome "http://whateverurl.svg"?
Comment 3 Rob Adams 2005-10-12 14:54:11 PDT
I apologize; this appears to only happen in my personal build.  I'll mess around
with it more.
Comment 4 Rob Adams 2005-10-13 10:30:45 PDT
Ok this is caused by an unitialized return value in GetViewboxToViewportTransform.

Trivial patch to be attached.
Comment 5 Rob Adams 2005-10-13 10:32:25 PDT
Created attachment 199436 [details] [diff] [review]
initialize the return value in GetViewboxToViewportTransform
Comment 6 Jonathan Watt [:jwatt] 2005-10-13 14:49:28 PDT
Comment on attachment 199436 [details] [diff] [review]
initialize the return value in GetViewboxToViewportTransform 

Please just initialize at the declaration point. And please fix up the same
method on nsSVGMarkerElement while you're there.
Comment 7 Rob Adams 2005-10-13 14:51:19 PDT
Created attachment 199467 [details] [diff] [review]
Style change and also update nsSVGMarkerElement::GetViewboxToViewportTransform as well
Comment 8 Jonathan Watt [:jwatt] 2005-10-13 14:52:57 PDT
Comment on attachment 199467 [details] [diff] [review]
Style change and also update nsSVGMarkerElement::GetViewboxToViewportTransform as well

r=me and requesting sr from tor.
Comment 9 Benjamin Smedberg [:bsmedberg] 2005-10-14 10:06:55 PDT
Comment on attachment 199467 [details] [diff] [review]
Style change and also update nsSVGMarkerElement::GetViewboxToViewportTransform as well

jwatt/tor, can one of you land this on trunk for readams?
Comment 10 Jonathan Watt [:jwatt] 2005-10-14 10:32:47 PDT
Done.

The patch is an obviously correct three line patch (exclucing the indentation
changes) to prevent us from returning an uninitialized nsresult. Up until
relatively recently we returned the correct value without any problems, so the
risk from this patch is very small. The value SVG authors, especially in chrome,
is significant I would think.
Comment 11 Jonathan Watt [:jwatt] 2005-10-14 17:22:39 PDT
checked in on branch

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