Zooming out on pages adds white line to top of content

RESOLVED FIXED in mozilla13

Status

()

Core
Layout: View Rendering
RESOLVED FIXED
6 years ago
5 years ago

People

(Reporter: Jesper Hansen, Assigned: tnikkel)

Tracking

9 Branch
mozilla13
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments, 1 obsolete attachment)

(Reporter)

Description

6 years ago
Created attachment 585033 [details]
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
(Assignee)

Comment 1

5 years ago
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).
(Assignee)

Comment 2

5 years ago
Created attachment 600634 [details] [diff] [review]
patch

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)
(Assignee)

Comment 3

5 years ago
Bug 615794 introduced this snapping.
Blocks: 615794
(Assignee)

Comment 4

5 years ago
Created attachment 600841 [details] [diff] [review]
Part 1. Stop checking useless return values to make control flow simpler.

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)
(Assignee)

Updated

5 years ago
Attachment #600841 - Attachment description: Part 1. → Part 1. Stop checking useless return values to make control flow simpler.
(Assignee)

Comment 5

5 years ago
Created attachment 600842 [details] [diff] [review]
Part 2. Leave the presshell when we stop adding display items with frames from the child document.
Attachment #600842 - Flags: review?
(Assignee)

Updated

5 years ago
Attachment #600842 - Flags: review? → review?(matspal)

Updated

5 years ago
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+
(Assignee)

Comment 7

5 years ago
Thanks.

https://hg.mozilla.org/integration/mozilla-inbound/rev/a12f501b5b22
https://hg.mozilla.org/integration/mozilla-inbound/rev/7c29df99aad7
OS: Windows 7 → All
Hardware: x86 → All
https://hg.mozilla.org/mozilla-central/rev/a12f501b5b22
https://hg.mozilla.org/mozilla-central/rev/7c29df99aad7
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla13
You need to log in before you can comment on or make changes to this bug.