Closed
Bug 472244
Opened 16 years ago
Closed 16 years ago
Reftest layout/reftests/reftest-sanity/zoom-invalidation.html fails on Tinderbox
Categories
(Testing :: Reftest, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla1.9.2
People
(Reporter: roc, Assigned: roc)
References
Details
Attachments
(1 file)
7.03 KB,
patch
|
dbaron
:
review+
vlad
:
review+
|
Details | Diff | Splinter Review |
The test passed on my Mac, but it failed on the Tinderbox Mac test machine: http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1231205144.1231208392.15342.gz#err0
Assignee | ||
Comment 1•16 years ago
|
||
... and now it fails on my machine too. Weird. Actually I think it's random, which is bad, since MozReftestInvalidate was supposed to make it not random.
Assignee | ||
Comment 2•16 years ago
|
||
OK, I found and fixed the randomness. The problem is that after load has fired, even though we flush reflows and invalidates and repaints there could still be a pending MozAfterPaint event with the full window dimensions in it. That will cause reftest to repaint the entire canvas, so we have to delay firing MozReftestInvalidate until after that MozAfterPaint has been received. Now to fix the actual zoom-invalidate.html test ...
Assignee | ||
Comment 3•16 years ago
|
||
OK, I had this code to round the repaint rectangle edges to "device pixels": var left = Math.floor(roundTo(r.left*scale, 0.001))/scale; var top = Math.floor(roundTo(r.top*scale, 0.001))/scale; var right = Math.ceil(roundTo(r.right*scale, 0.001))/scale; var bottom = Math.ceil(roundTo(r.bottom*scale, 0.001))/scale; Problem is, drawWindow takes integer parameters (in CSS pixels) so this code goes all wrong as XPConnect rounds values. I need to think about what we can do here. Maybe drawWindow's parameters need to be floats...
Assignee | ||
Comment 4•16 years ago
|
||
Okay, this patch has two parts. The main part is to delay attaching our MozAfterPaint listener and firing MozReftestInvalidate until after any MozAfterPaint triggered by load-event activity has been flushed. The other part is to make the parameters to drawWindow floats; this lets us draw at "device pixel" boundaries even when those don't align with CSS pixel boundaries in the zoomed content.
Attachment #355555 -
Flags: review?(dbaron)
Assignee | ||
Comment 5•16 years ago
|
||
Comment on attachment 355555 [details] [diff] [review] fix Need vlad's review on the drawWindow change.
Attachment #355555 -
Flags: review?(vladimir)
Comment on attachment 355555 [details] [diff] [review] fix r=dbaron, although it might be clearer to name that function rather than having a 15 line anonymous function inside a function call
Attachment #355555 -
Flags: review?(dbaron) → review+
Attachment #355555 -
Flags: review?(vladimir) → review+
Comment on attachment 355555 [details] [diff] [review] fix Hey, this'll help mobile as well when doing its zoom stuff. Though, why floats and not doubles? Cairo and gfx math is going to be all in doubles.
Assignee | ||
Comment 8•16 years ago
|
||
Because all the other canvas APIs are float
Assignee | ||
Comment 9•16 years ago
|
||
Pushed 670a3b50dfe0
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Comment 10•15 years ago
|
||
This bug won't land on m-1.9.1, right?
Target Milestone: --- → mozilla1.9.2
Version: unspecified → Trunk
You need to log in
before you can comment on or make changes to this bug.
Description
•