Unlike bug 314214 the testcase in the URL does not have percentage types. If you click shift reload then everything is fine. You get a Reflow which initialises the viewport size and then the onload which works. When simply clicking on refresh things happen in the opposite order, you get the onload which fails as the viewport size is uninitialised (zero actually) and then the Reflow which initialises the viewport size too late. This works in Firefox 2, but then that doesn't do reflow in the same way.
Does the result of getScreenCTM depend on layout? If so, shouldn't it be flushing layout?
Created attachment 294277 [details] [diff] [review] patch Spot on Boris. I am all right using the ownerDoc rather than the currentDoc for the flush aren't I.
Comment on attachment 294277 [details] [diff] [review] patch No, you really want to use the current doc, not the owner doc. Furthermore, the flush can run arbitrary script, so you shouldn't really assume that things like the owner doc stay the same across the flush...
Created attachment 294288 [details] [diff] [review] currentDoc
Comment on attachment 294288 [details] [diff] [review] currentDoc Looks great. This method isn't called from layout code, right?
In case that wasn't a clear enough answer. No these methods are not called from layout code.
Comment on attachment 294288 [details] [diff] [review] currentDoc a=beltzner for 1.9
verified fixed using Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9b3pre) Gecko/2008010211 Minefield/3.0b3pre.
https://litmus.mozilla.org/show_test.cgi?id=5068 has been added to the Litmus test suite.
I just noticed that when you load that URL you do get this error in the console - I just wanted to note it: Error: uncaught exception: [Exception... "Component returned failure code: 0x80004001 (NS_ERROR_NOT_IMPLEMENTED) [nsIDOMSVGLocatable.farthestViewportElement]" nsresult: "0x80004001 (NS_ERROR_NOT_IMPLEMENTED)" location: "JS frame :: http://www.w3.org/Graphics/SVG/Test/20061213/svggen/types-basicDOM-01-b.svg :: testSVGLocatable :: line 33" data: no].
Neither GetFarthestViewport nor GetNearestViewportElement are implemented (both are use on that page). I don't think there is a bug for that, so feel free to raise one if you wish.