Last Comment Bug 735141 - Bottom of tall image within scrollable div not drawn until text below image is in view
: Bottom of tall image within scrollable div not drawn until text below image i...
Status: VERIFIED FIXED
[qa!]
: regression
Product: Core
Classification: Components
Component: Layout: View Rendering (show other bugs)
: 13 Branch
: x86_64 All
: -- normal (vote)
: mozilla14
Assigned To: Robert O'Callahan (:roc) (email my personal email if necessary)
:
Mentors:
Depends on:
Blocks: 727661
  Show dependency treegraph
 
Reported: 2012-03-12 20:18 PDT by Zack Weinberg (:zwol)
Modified: 2012-05-09 06:10 PDT (History)
8 users (show)
roc: in‑testsuite+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
+
verified


Attachments
test case (504 bytes, text/html)
2012-03-12 20:18 PDT, Zack Weinberg (:zwol)
no flags Details
fix (2.96 KB, patch)
2012-03-18 21:33 PDT, Robert O'Callahan (:roc) (email my personal email if necessary)
tnikkel: review+
akeybl: approval‑mozilla‑aurora+
Details | Diff | Splinter Review

Description Zack Weinberg (:zwol) 2012-03-12 20:18:24 PDT
Created attachment 605285 [details]
test case

The attached test case contains a scrollable div, containing an image (just a big maroon rectangle) that is taller than the fixed height of the div, and text on either side of it. Make the browser window big enough that the entire div is visible, then scroll it up and down.

When I do this, scrolling down from the top, the part of the image that was below the bottom of the container is not drawn until the text below the image scrolls into view; scrolling up from the bottom, the part of the image that started above the top of the container is not drawn until the text above the image is also visible.  If the window loses input focus, any missing part of the image is also redrawn (AFAIK this still causes a total repaint, so it's not surprising).

This seems to be peculiar to scrollable containers; it does not happen if it's the entire <body> being scrolled (or perhaps I should say, it does not happen if the scrollbar belongs to the entire content area).

It may also be specific to Linux and/or my video drivers; however, disabling layer acceleration does not make the problem go away.
Comment 1 Zack Weinberg (:zwol) 2012-03-12 20:19:59 PDT
Oh, I should have said, this happens for me with a debug build of http://hg.mozilla.org/mozilla-central/rev/dfcb11712ec2 .  It does NOT happen with Firefox 10 on the same machine. I have not tried anything in between.
Comment 2 Zack Weinberg (:zwol) 2012-03-12 20:23:45 PDT
Does not happen for me with 11.0 (latest beta) either, but that's on my Mac.
Comment 3 Zack Weinberg (:zwol) 2012-03-12 20:25:28 PDT
One last addendum: it must be a bitmap image; it does not happen with <div style="width:300px;height:800px;background:#800"></div> in place of the <img>.
Comment 4 Alice0775 White 2012-03-12 22:33:42 PDT
Regression window(m-c),
Works:
http://hg.mozilla.org/mozilla-central/rev/a853f4017192
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0a1) Gecko/20120216 Firefox/13.0a1 ID:20120216031231
Fails:
http://hg.mozilla.org/mozilla-central/rev/31fa580e684c
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0a1) Gecko/20120216 Firefox/13.0a1 ID:20120216024649
Pushlog:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=a853f4017192&tochange=31fa580e684c


Regression window(m-i),
Works:
http://hg.mozilla.org/integration/mozilla-inbound/rev/04caa247e11a
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0a1) Gecko/20120215 Firefox/13.0a1 ID:20120215195653
Fails:
http://hg.mozilla.org/integration/mozilla-inbound/rev/db2216c57498
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0a1) Gecko/20120215 Firefox/13.0a1 ID:20120215201853
Pushlog:
http://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=04caa247e11a&tochange=db2216c57498

Suspected:
56c8584839b3	Robert O'Callahan — Bug 727661. We should only optimize ThebesLayers to ColorLayers or ImageLayers for brand-new layers (ThebesLayers with no currently valid data). Otherwise we risk ColorLayers being a deoptimization if there is valid content in the layer that doesn't happen to be visible but might become visible later, or if the layer contents are only temporarily a solid color and will soon need a buffer again. r=tn
Comment 5 Alex Keybl [:akeybl] 2012-03-16 12:46:04 PDT
This is a regression in 13, so we'd definitely consider taking a fix on Aurora. That being said, I don't see a need to track for the release as it's not yet clear that this testcase represents a common use case on the internet.
Comment 6 Timothy Nikkel (:tnikkel) 2012-03-16 13:33:03 PDT
I set the flag on this bug because it had a simple testcase. No doubt Zack reduced it from something he came across. Bug 733337 also regressed from the same patch and Stuart mentioned a page he came across that was likely caused by the same bug on irc which we didnt file because I think it was likely to be fixed by one of these two bugs. So I think this is common.
Comment 7 Zack Weinberg (:zwol) 2012-03-16 14:31:51 PDT
The test case here was originally meant to be the minimal test case for a completely different bug involving horizontal box sizing.  That bug has so far been unreproducible away from the computer where it was first spotted, but I noticed this bug while playing with the test case.

So I can't say that I have seen this bug in the wild.
Comment 8 Timothy Nikkel (:tnikkel) 2012-03-16 14:53:46 PDT
Ah, okay. Well the two other examples I mentioned were 'from the wild' so to speak.
Comment 9 Robert O'Callahan (:roc) (email my personal email if necessary) 2012-03-18 21:33:09 PDT
Created attachment 607062 [details] [diff] [review]
fix
Comment 10 Timothy Nikkel (:tnikkel) 2012-03-18 22:23:14 PDT
Comment on attachment 607062 [details] [diff] [review]
fix

I knew it was something like this, but didn't see it when I looked over the code before.
Comment 11 Robert O'Callahan (:roc) (email my personal email if necessary) 2012-03-19 00:28:16 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/0fe31dd7bbc5
Comment 12 Robert O'Callahan (:roc) (email my personal email if necessary) 2012-03-19 03:27:40 PDT
Backed out due to test failures:
https://hg.mozilla.org/integration/mozilla-inbound/rev/07ac03710f04

The Mac test failure is just a detail of scrollbar rendering. I can make that go away by making the test use overflow:hidden. The Android failures don't make any sense; the image is a different color in test vs reference. I'll disable the test on Android.
Comment 13 Robert O'Callahan (:roc) (email my personal email if necessary) 2012-03-19 03:59:05 PDT
https://tbpl.mozilla.org/?tree=Try&rev=e55e982828a2
Comment 14 Robert O'Callahan (:roc) (email my personal email if necessary) 2012-03-20 00:57:21 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/9ce5ce7ac5a6
Comment 15 Matt Brubeck (:mbrubeck) 2012-03-20 10:40:40 PDT
https://hg.mozilla.org/mozilla-central/rev/9ce5ce7ac5a6
Comment 16 Robert O'Callahan (:roc) (email my personal email if necessary) 2012-03-20 11:52:56 PDT
Comment on attachment 607062 [details] [diff] [review]
fix

Review of attachment 607062 [details] [diff] [review]:
-----------------------------------------------------------------

Fix regression that landed on Aurora.

Risk analysis: very simple code change, very bad regression.
Comment 17 Alex Keybl [:akeybl] 2012-03-20 13:21:30 PDT
Comment on attachment 607062 [details] [diff] [review]
fix

[Triage Comment]
Since we've gotten reports of this bug externally and we now have a low risk fix in hand, we'll track for 13 and approve for Aurora uplift.
Comment 18 Robert O'Callahan (:roc) (email my personal email if necessary) 2012-03-21 18:48:19 PDT
https://hg.mozilla.org/releases/mozilla-aurora/rev/ed87206d099a
Comment 19 Paul Silaghi, QA [:pauly] 2012-05-09 06:10:18 PDT
Verified fixed on Firefox 13b2:
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20100101 Firefox/13.0
Mozilla/5.0 (X11; Linux i686; rv:13.0) Gecko/20100101 Firefox/13.0
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:13.0) Gecko/20100101 Firefox/13.0

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