Closed
Bug 600148
Opened 14 years ago
Closed 14 years ago
white lines with plugin, zoom, and scrolling
Categories
(Core :: Layout, defect)
Core
Layout
Tracking
()
RESOLVED
FIXED
Tracking | Status | |
---|---|---|
blocking2.0 | --- | betaN+ |
People
(Reporter: tnikkel, Assigned: tnikkel)
References
Details
Attachments
(2 files)
257 bytes,
text/html
|
Details | |
1.10 KB,
patch
|
dbaron
:
review+
|
Details | Diff | Splinter Review |
Open the attached testcase. Zoom in four times (so 1.5x zoom). Scroll down with the mouse wheel. I get a white line in the blue box on Windows and Linux.
In nsObjectFrame::ComputeWidgetGeometry we compute the bounds of the plugin using nsRect::ToNearestPixels, but later we compute the offset of the plugin using nsPoint::ToNearestPixels. The top left of the bounds would usually be the same as the plugin offset but nsRect::ToNearestPixels uses NSToIntRoundUp and nsPoint::ToNearestPixels uses NSToIntRound, so they differ when rounding 0.5 on negative numbers.
Changeset 9c33280093f8 of bug 596414 exposed this problem, but isn't the cause. Before that changeset we never removed the area of plugin widgets from the area to update on the parent widget, so this bug was hidden.
This is really a followup to bug 503814, where we changed nsRect::ToNearestPixels to use NSToIntRoundUp instead of NSToIntRound. I even said in that bug that we should look at other NSToIntRound call sites to convert to NSToIntRoundUp.
Assignee | ||
Comment 1•14 years ago
|
||
I tried to write a test for this, but I cannot reproduce the issue using the test plugin.
Assignee: nobody → tnikkel
Attachment #478989 -
Flags: review?(dbaron)
Assignee | ||
Comment 2•14 years ago
|
||
I took a look at the other uses of nsPoint::ToNearestPixels, I don't think any of them should have a problem with this change.
Comment on attachment 478989 [details] [diff] [review]
patch
r=dbaron
Did you go through all the other NSToIntRound callsites? If not, somebody should...
Attachment #478989 -
Flags: review?(dbaron) → review+
Assignee | ||
Updated•14 years ago
|
blocking2.0: --- → ?
Assignee | ||
Updated•14 years ago
|
Attachment #478989 -
Flags: approval2.0?
Assignee | ||
Comment 4•14 years ago
|
||
I went through them. I don't think there are any issues like the one of this bug among them.
blocking2.0: ? → betaN+
Comment on attachment 478989 [details] [diff] [review]
patch
Doesn't need approval, since this blocks.
Attachment #478989 -
Flags: approval2.0?
Assignee | ||
Comment 6•14 years ago
|
||
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•