Closed Bug 1241394 Opened 9 years ago Closed 9 years ago

"Scroll of Lorem Ipsum" demo does not scroll

Categories

(Core :: Layout, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla46
Tracking Status
firefox44 --- unaffected
firefox45 --- unaffected
firefox46 + fixed
firefox-esr38 --- unaffected

People

(Reporter: dholbert, Assigned: mattwoodrow)

References

Details

(Keywords: regression)

Attachments

(5 files, 2 obsolete files)

STR: 1. Load http://codepen.io/anon/pen/obpepj 2. Try to scroll (mouse over the old-fashioned looking text, and use scrollwheel) EXPECTED RESULTS: Text should scroll. ACTUAL RESULTS: Text does not scroll. Tracking down a regression range... (Note: the original source of this demo is http://codepen.io/browles/pen/pgdMbK -- I forked it to create the "anon" version linked above in my STR, just in case browles's version changes out from under us [as I believe codepens can do])
Mozregression gives me this range: 19:56.09 LOG: MainThread main INFO Got as far as we can go bisecting nightlies... 19:56.09 LOG: MainThread Bisector INFO Last good revision: 35b211eaad1fa828064514c547057e4400e24459 (2015-12-25) 19:56.09 LOG: MainThread Bisector INFO First bad revision: 4a559a618d6798eb9a8fdc559f5a7a00085e2062 (2015-12-26) 19:56.09 LOG: MainThread Bisector INFO Pushlog: https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=35b211eaad1fa828064514c547057e4400e24459&tochange=4a559a618d6798eb9a8fdc559f5a7a00085e2062 ...and then after switching to inbound builds: 23:17.73 LOG: MainThread Bisector INFO Narrowed inbound regression window from [35b211ea, 3c5e7567] (3 revisions) to [35b211ea, 691f2e68] (2 revisions) (~1 steps left) 23:17.73 LOG: MainThread main INFO Oh noes, no (more) inbound revisions :( 23:17.73 LOG: MainThread Bisector INFO Last good revision: 35b211eaad1fa828064514c547057e4400e24459 23:17.73 LOG: MainThread Bisector INFO First bad revision: 691f2e687e46d1b166b88b0a3f9dbd480bff9afa 23:17.73 LOG: MainThread Bisector INFO Pushlog: https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=35b211eaad1fa828064514c547057e4400e24459&tochange=691f2e687e46d1b166b88b0a3f9dbd480bff9afa This is still a pretty wide range. Alice, if you can reproduce: could you see if you can get mozregression to cooperate & produce a smaller range? (I'm suspicious of my mozregression install, given that it gave me a mozilla-central link, after supposedly bisecting mozilla-inbound builds...)
Flags: needinfo?(alice0775)
(Given that this testcase makes heavy use of 3d transforms, I wonder if bug 1226904 might be the source of the regression...)
m-i regression range: https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=6c49bb716593014c07d3736ea2124f74bfe3bb06&tochange=691f2e687e46d1b166b88b0a3f9dbd480bff9afa Via local build, Last Good: f40c0da4e4ce (w/ patch 691f2e687e46) First Bad: f950b7a04741 (w/ patch 691f2e687e46) Triggered by: f950b7a04741 Thinker K.F. Li — Bug 1226904 - Fix boundary checking for leaves collecting. r=roc
Blocks: 1226904
Flags: needinfo?(alice0775)
Attached file standalone.html
Standalone html works as expected....
Attached file Iframe version
Iframe version is reproduced the problem
[Tracking Requested - why for this release]:
Aurora45. 0a2 is not affected, because the bunch of offending patch was backed out(m-a cset 64ec448f156d) now.
Thanks, Alice! Also, FWIW -- you said "Standalone html works as expected....", but I can't scroll that attachment on my machine (w/ either scrollwheel or scrollbar). I'm using Linux Nightly 46.0a1 (2016-01-20). So if you can scroll that attachment w/ scrollwheel (sounds like it?), maybe this manifests slightly differently on different platforms.
See Also: → 1241445
ni=thinker per comment 3
Flags: needinfo?(tlee)
Do you have e10s/APZ enabled Daniel? With it enabled I see the same as Alice: standalone.html works with the scrollwheel (but not scrollbars), iframe version doesn't scroll at all. Without it enabled I see the same as you: Neither version scroll with the scrollwheel, can't test scrollbars as they are hidden on OSX until you scroll.
Attached file Reduced testcase
Reduced the testcase a fair bit and made it static. It scrolls in some mouse positions, but not others...
Hit test when we fail to scroll: https://pastebin.mozilla.org/8857319 The first frame we mark as hit is line 25, the BackgroundColor for 'container'. Then after that we hit the text item (line 48). 'container' is outside of the scroll container, so that's why scrolling isn't working.
(In reply to Matt Woodrow (:mattwoodrow) from comment #10) > Do you have e10s/APZ enabled Daniel? Ah, good question. I was using a profile that had e10s disabled. The "standalone" version is WFM when I enable e10s -- so, my results match what you describe in comment 10.
Attached patch fuzzy-equal-depth (obsolete) — Splinter Review
The computed depths for the content are: https://pastebin.mozilla.org/8857326 The calculation was coming up with a depth difference of 0.0000077, in favour of the non-scrolled background being in front. We probably can't afford to be that accurate, given floating points limitations. Using a fuzzy comparison of 0.1 fixes the reduced test case, but not the original. We need a test for this, going to try figure out how hit test testing works.
This fixes the reduced test case, but not the original report. Test confirmed to fail without the patch, and passes with. I may not get to that this week since it's after 5pm on Friday now.
Attachment #8710843 - Flags: review?(tlee)
Thinker, the code for hit testing based on depth is new isn't it? Would it be possible to just back that out without backing the rest of the code out? That might be a possible solution for reducing the number of regressions on Aurora if necessary (hopefully not!).
Attachment #8710819 - Attachment is obsolete: true
Setting num=1 results in much simpler generated HTML that still reproduces a bug. Hit testing: https://pastebin.mozilla.org/8857327
This page creates two copies (top and bottom) of the scrolled content for each segment of the curled ends. 'num' controls the number of segments in each curled end. Hit testing is hitting the copy content before it hits the normal content, so we don't scroll. The copied content should be overflow:hidden so that you only see a small bit of it (which is how it renders), so hit testing should be working with this too.
There are two nsDisplayTransforms created for the clipped copied content, lines 75 and 76. Clipping for preserve-3d contexts must always be on the root of the context (anything that triggers clipping on intermediate/leaf elements also disables preserve-3d). The code for doing hit testing on preserve-3d leaf elements [1] looks like it checks the clip for the leaf element (which should always be empty). Instead I think we want to check the clip on the preserve-3d root to get correct hit testing. [1] http://mxr.mozilla.org/mozilla-central/source/layout/base/nsDisplayList.cpp#1939
Thinker, can you please try write a patch for this?
(In reply to Matt Woodrow (:mattwoodrow) from comment #19) > There are two nsDisplayTransforms created for the clipped copied content, > lines 75 and 76. > > Clipping for preserve-3d contexts must always be on the root of the context > (anything that triggers clipping on intermediate/leaf elements also disables > preserve-3d). > > The code for doing hit testing on preserve-3d leaf elements [1] looks like > it checks the clip for the leaf element (which should always be empty). The list includes not only leaves, it also include elements not participating any preserve-3d rendering context. Checking the clip is applied to no participating ones, for leaves their |alwaysIntersect| is always true. By the way, I will look into it.
Flags: needinfo?(tlee)
Attachment #8710843 - Flags: review?(tlee) → review+
Attachment #8711073 - Flags: review?(matt.woodrow)
Tracking for 46, recent regression.
Comment on attachment 8711073 [details] [diff] [review] Check clip for the children of the establisher Review of attachment 8711073 [details] [diff] [review]: ----------------------------------------------------------------- Adding another test would be good. Should be able to copy my test for the basic structure. Does the test case work properly now?
Attachment #8711073 - Flags: review?(matt.woodrow) → review+
-- Attachment #8711073 [details] [diff] - Attachment is obsolete: true
Attachment #8711329 - Flags: review?(matt.woodrow)
Attachment #8711073 - Attachment is obsolete: true
(In reply to Thinker Li [:sinker] from comment #26) > Created attachment 8711329 [details] [diff] [review] > Check clip for the children of the establisher, v2 > > -- > Attachment #8711073 [details] [diff] [diff] - Attachment is obsolete: true Add a testcase. https://bugzilla.mozilla.org/attachment.cgi?id=8710335 work correctly. But it is too complicated, I made a new testcase for the root cause.
Comment on attachment 8711329 [details] [diff] [review] Check clip for the children of the establisher, v2 Review of attachment 8711329 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/tests/mochitest/general/test_pointerPreserves3DClip.html @@ +1,1 @@ > +<!DOCTYPE HTML> Needs the license header
Attachment #8711329 - Flags: review?(matt.woodrow) → review+
Assignee: nobody → matt.woodrow
Flags: in-testsuite+
Comment on attachment 8711329 [details] [diff] [review] Check clip for the children of the establisher, v2 Review of attachment 8711329 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/tests/mochitest/general/test_pointerPreserves3DClip.html @@ +1,1 @@ > +<!DOCTYPE HTML> I don't see any mochitest having license header. So, do we really need it for mochitest?
(In reply to Thinker Li [:sinker] from comment #31) > I don't see any mochitest having license header. So, do we really need it > for mochitest? You're right. I landed it without the header.
This still looks quite bad with APZ, I've filed bug 1242821 for that.
See Also: → 1242821
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: