Last Comment Bug 714346 - Zooming out on pages adds white line to top of content
: Zooming out on pages adds white line to top of content
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Layout: View Rendering (show other bugs)
: 9 Branch
: All All
: -- normal (vote)
: mozilla13
Assigned To: Timothy Nikkel (:tnikkel)
:
: Jet Villegas (:jet)
Mentors:
Depends on:
Blocks: 615794
  Show dependency treegraph
 
Reported: 2011-12-30 13:17 PST by Jesper Hansen
Modified: 2012-02-29 11:25 PST (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
testcase (419 bytes, text/html)
2011-12-30 13:17 PST, Jesper Hansen
no flags Details
patch (1.82 KB, patch)
2012-02-25 01:18 PST, Timothy Nikkel (:tnikkel)
no flags Details | Diff | Splinter Review
Part 1. Stop checking useless return values to make control flow simpler. (4.19 KB, patch)
2012-02-26 22:08 PST, Timothy Nikkel (:tnikkel)
mats: review+
Details | Diff | Splinter Review
Part 2. Leave the presshell when we stop adding display items with frames from the child document. (1.84 KB, patch)
2012-02-26 22:09 PST, Timothy Nikkel (:tnikkel)
mats: review+
Details | Diff | Splinter Review

Description Jesper Hansen 2011-12-30 13:17:59 PST
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
Comment 1 Timothy Nikkel (:tnikkel) 2012-02-25 01:15:19 PST
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).
Comment 2 Timothy Nikkel (:tnikkel) 2012-02-25 01:18:39 PST
Created attachment 600634 [details] [diff] [review]
patch

We always have a frame in the only problematic case, so just use it if its there.
Comment 3 Timothy Nikkel (:tnikkel) 2012-02-25 01:19:05 PST
Bug 615794 introduced this snapping.
Comment 4 Timothy Nikkel (:tnikkel) 2012-02-26 22:08:30 PST
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.
Comment 5 Timothy Nikkel (:tnikkel) 2012-02-26 22:09:42 PST
Created attachment 600842 [details] [diff] [review]
Part 2. Leave the presshell when we stop adding display items with frames from the child document.
Comment 6 Mats Palmgren (:mats) 2012-02-28 21:50:49 PST
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

Note You need to log in before you can comment on or make changes to this bug.