Closed Bug 600148 Opened 14 years ago Closed 14 years ago

white lines with plugin, zoom, and scrolling

Categories

(Core :: Layout, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Tracking Status
blocking2.0 --- betaN+

People

(Reporter: tnikkel, Assigned: tnikkel)

References

Details

Attachments

(2 files)

Attached file testcase
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.
Attached patch patchSplinter Review
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)
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+
blocking2.0: --- → ?
Attachment #478989 - Flags: approval2.0?
I went through them. I don't think there are any issues like the one of this bug among them.
Comment on attachment 478989 [details] [diff] [review] patch Doesn't need approval, since this blocks.
Attachment #478989 - Flags: approval2.0?
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.

Attachment

General

Created:
Updated:
Size: