Closed Bug 635302 Opened 14 years ago Closed 14 years ago

Content flips vertically when scrolled with opacity on two levels

Categories

(Core :: Graphics, defect)

x86_64
macOS
defect
Not set
normal

Tracking

()

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

People

(Reporter: MattN, Assigned: mattwoodrow)

References

()

Details

(Keywords: regression, Whiteboard: [hardblocker])

Attachments

(2 files, 3 obsolete files)

Attached file Reduced testcase
When a semi-transparent element contains another semi-transparent element, and the inner element has content that scrolls (ie. overflow:auto), the inner content will flip vertically when scrolled if accelerated layers is on. See reduced testcase based on usage in the Angel LMS.
Uh... yeah. This is bad. This needs to block.
blocking2.0: --- → ?
Keywords: regression
This probably has something to do with obscure y axis logic in OpenGL when using framebuffer. This testcase I believe but lead to two container layers both using intermediate surfaces.
Assignee: nobody → joe
blocking2.0: ? → final+
Whiteboard: [hardblocker]
Did some regression testing on a Mac, found: 2010 11 15 030805 edf41ff32f08 good 2010 11 16 030753 a42e9b001bc8 bad http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=edf41ff32f08&tochange=a42e9b001bc8
Attached patch Better flipping logic (obsolete) — Splinter Review
Reasoning: When double buffering is enabled, we have a Y-flip set on the viewport transform *at all times*. Since our layout co-ordinate system is already the opposite to GL's, this actually results in drawing happening the right way up. When blitting between framebuffers, or framebuffers and the window (there should be no difference) we want to have no flip. For this reason we need to pass true to BindAndDrawQuad at all times in the blit pass to add a second flip (on top of the viewport transform) to cancel each other out. Passing flip=true to disable flipping is crazy, we need to rewrite this. For the single buffered case (not used in any supported configuration), all drawing is down upside-down (without the underlying Y flip), so we need to pass false to BindAndDrawQuad when blitting to stop inversions happening. The only flip in this situation is when blitting the final data to the window, which is handled by LayerManager.
Attachment #513588 - Flags: review?(joe)
Filed bug 635383 since I'm sick of these bugs that keep appearing.
Assignee: joe → matt.woodrow+bugzilla
Comment on attachment 513588 [details] [diff] [review] Better flipping logic aaaaaaaaaaaahhhhhhhhhhhhhhhhhhh test please
Attachment #513588 - Flags: review?(joe) → review+
Attached patch Tests (obsolete) — Splinter Review
First attempt at a test. This catches the actual logic issue, but still fails (on mac at least) due to bizarre padding differences between <canvas> and <div>. Can someone else please take a look at this and see if they can figure it out, making guesses at css code isn't very productive for me.
We need to add canvas { display: block; } For some reason, canvases are inline by default, and therefore they get placed on the line along with everything else. We then put, below the canvas, room for the descender.
Whiteboard: [hardblocker] → [hardblocker][needs landing]
I can help land this tonight, if I'm not incapacitated by my birthday party.
Attached patch Tests v2 (obsolete) — Splinter Review
Tests passes on mac now. \o/
Attachment #513624 - Attachment is obsolete: true
Attachment #513657 - Flags: review?(joe)
Comment on attachment 513657 [details] [diff] [review] Tests v2 >diff --git a/layout/reftests/bugs/635302-1.html b/layout/reftests/bugs/635302-1.html >\ No newline at end of file May as well fix this before landing. woohoo! thanks, Matt!
Attachment #513657 - Flags: review?(joe) → review+
Whiteboard: [hardblocker][needs landing] → [hardblocker][needs landing][has patch]
http://hg.mozilla.org/mozilla-central/rev/6bad6cd2dded both patches, with newline added. Added a plausible-to-me commit message. Easier when people provide their own in the patch, though! :-)
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Whiteboard: [hardblocker][needs landing][has patch] → [hardblocker]
Backed out because it was failing its own test: http://hg.mozilla.org/mozilla-central/rev/61c6c43d9630
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
What platforms did the test fail on?
Attached patch Combined patchSplinter Review
Combined both patches. Changed the logic to check IsDrawingFlipped() since our reftest mode is happier that way. Changed some of the opacity/colour values in the test to stop differences in blending causing single bit colour differences.
Attachment #513588 - Attachment is obsolete: true
Attachment #513657 - Attachment is obsolete: true
Attachment #513801 - Flags: review+
Should this be landed again?
Status: REOPENED → RESOLVED
Closed: 14 years ago14 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: