Closed
Bug 456163
Opened 16 years ago
Closed 16 years ago
Singular matrices with -moz-transform hangs reftests
Categories
(Core :: Layout, defect)
Core
Layout
Tracking
()
RESOLVED
FIXED
mozilla1.9.1b1
People
(Reporter: kschwarz, Assigned: kschwarz)
References
Details
Attachments
(2 files)
303 bytes,
text/html
|
Details | |
3.59 KB,
patch
|
roc
:
review+
roc
:
superreview+
|
Details | Diff | Splinter Review |
When running reftests where one of the reference images has the -moz-transform property specifying a transform that has a singular matrix (e.g. skewing both X and Y by 45 degrees, specifying a matrix of all 1s, etc.), the reftest hangs with the following error:
WARNING: NS_ENSURE_SUCCESS(rv, rv) failed with result 0x80004005: file
../../../../../mozilla-central/content/html/content/src/nsHTMLCanvasElement.cpp,
line 396
JavaScript error: , line 0: uncaught exception: [Exception... "Component
returned failure code: 0x80004005 (NS_ERROR_FAILURE)
[nsIDOMHTMLCanvasElement.toDataURL]" nsresult: "0x80004005 (NS_ERROR_FAILURE)"
location: "JS frame :: chrome://reftest/content/reftest.js :: DocumentLoaded
:: line 469" data: no]
There is no malfunctioning behavior when viewing the page regularly, though. The problems only appear when the page is viewed in a reftest.
Comment 1•16 years ago
|
||
(In reply to comment #0)
> The problems only appear when the page is viewed in a reftest.
Ah, that makes sense -- it's an exception in reftest.js, which is only run during reftests.
The line referenced is:
http://mxr.mozilla.org/seamonkey/source/layout/tools/reftest/reftest.js#469
dump("REFTEST IMAGE 1 (TEST): " + gCanvas1.toDataURL() + "\n");
So, looks like something is failing within toDataURL()... maybe we could reproduce the problem a non-reftest testcase by adding some similar JS to the testcase inside some <script> tags.
Could you attach a sample testcase that demonstrates the problem, when used as a reftest?
Comment 2•16 years ago
|
||
While trying to come up with a testcase here, I got this.
This page somehow causes the complete window to not paint anything at all. Related to this, right?
Assignee | ||
Comment 3•16 years ago
|
||
I'm willing to wager that there's a similarity here. I'm also getting a weird assertion from nsStyleTransformMatrix.cpp saying that somehow we ended up inheriting a value, which makes no sense since nothing in there is inherited. I'll take a look at this one and see what comes up.
Assignee | ||
Comment 4•16 years ago
|
||
Fixes the bug by having nsDisplayTransform::Paint abort early if the underlying matrix is singular. This seems to eliminate all of the problems (reftests no longer hang, testcase now actually renders a page, etc.), but I'm not completely sure I understand why it works. I've requested r/sr on the patch, even though there might be a better fix for the problem, since whether or not it's the best fix it's still a good check to have.
Assignee: nobody → keith
Status: NEW → ASSIGNED
Attachment #339612 -
Flags: superreview?(roc)
Attachment #339612 -
Flags: review?(roc)
Comment on attachment 339612 [details] [diff] [review]
Potential Patch #1
[Checkin: Comment 6]
I guess setting a singular CTM triggers cairo to put the context in an error state, which persists and basically throws away all subsequent drawing.
Attachment #339612 -
Flags: superreview?(roc)
Attachment #339612 -
Flags: superreview+
Attachment #339612 -
Flags: review?(roc)
Attachment #339612 -
Flags: review+
Assignee | ||
Updated•16 years ago
|
Keywords: checkin-needed
Comment 6•16 years ago
|
||
Comment on attachment 339612 [details] [diff] [review]
Potential Patch #1
[Checkin: Comment 6]
I fixed
{
patching file layout/reftests/transform/reftest.list
Hunk #1 FAILED at 0
1 out of 1 hunk FAILED
}
http://hg.mozilla.org/mozilla-central/rev/963156240d43
Attachment #339612 -
Attachment description: Potential Patch #1 → Potential Patch #1
[Checkin: Comment 6]
Updated•16 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Flags: in-testsuite+
Keywords: checkin-needed
OS: Windows Vista → All
Hardware: PC → All
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.1b1
You need to log in
before you can comment on or make changes to this bug.
Description
•