Closed Bug 714346 Opened 13 years ago Closed 12 years ago

Zooming out on pages adds white line to top of content

Categories

(Core :: Web Painting, defect)

9 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla13

People

(Reporter: jesper, Assigned: tnikkel)

References

Details

Attachments

(3 files, 1 obsolete file)

Attached file testcase
White line will magically appear above the content when zooming Maybe 1px height. Zoom levels and results:

0: Nothing
-1: Nothing
-2: White line; top
-3: Nothing
-4: Nothing
-5: White line; top
Component: Layout → Layout: View Rendering
QA Contact: layout → layout.view-rendering
In the nsDisplayClip we snap the clip's bounds to the nearest pixels. It needs the app units per dev pixel value to do this, which it gets from a prescontext. Since clip items are the only item that is allowed to have a null frame it has to get the prescontext from the display list builders current presshell state. This is a problem when we create the display clip in nsSubDocumentFrame::BuildDisplayList because the current presshell state on the builder is the one for the subdocument because we are inbetween the Enter/LeavePresShell calls, but the clip item is the parent documents coordinate space (since it contains the zoom display item and the bounds we pass to it are in parent units).
Attached patch patch (obsolete) — Splinter Review
We always have a frame in the only problematic case, so just use it if its there.
Assignee: nobody → tnikkel
Attachment #600634 - Flags: review?(matspal)
Bug 615794 introduced this snapping.
Blocks: 615794
Actually I think we should just leave the presshell at the right time.

But before we can do that I need to clean up the control flow here instead of making it even more complicated.

We check the rv of a few functions here and have a complicated flow. I think these can only fail in case of OOM. So I removed those checks. The rest is just a re-indenting patch, no other code changes.
Attachment #600634 - Attachment is obsolete: true
Attachment #600634 - Flags: review?(matspal)
Attachment #600841 - Flags: review?(matspal)
Attachment #600841 - Attachment description: Part 1. → Part 1. Stop checking useless return values to make control flow simpler.
Attachment #600842 - Flags: review? → review?(matspal)
Attachment #600841 - Flags: review?(matspal) → review+
Comment on attachment 600842 [details] [diff] [review]
Part 2. Leave the presshell when we stop adding display items with frames from the child document.

r=mats
Attachment #600842 - Flags: review?(matspal) → review+
https://hg.mozilla.org/mozilla-central/rev/a12f501b5b22
https://hg.mozilla.org/mozilla-central/rev/7c29df99aad7
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla13
Component: Layout: View Rendering → Layout: Web Painting
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: