Closed
Bug 1241394
Opened 9 years ago
Closed 9 years ago
"Scroll of Lorem Ipsum" demo does not scroll
Categories
(Core :: Layout, defect)
Core
Layout
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])
Reporter | ||
Comment 1•9 years ago
|
||
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)
Reporter | ||
Comment 2•9 years ago
|
||
(Given that this testcase makes heavy use of 3d transforms, I wonder if bug 1226904 might be the source of the regression...)
Comment 3•9 years ago
|
||
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)
Comment 4•9 years ago
|
||
Standalone html works as expected....
Comment 5•9 years ago
|
||
Iframe version is reproduced the problem
Comment 6•9 years ago
|
||
[Tracking Requested - why for this release]:
status-firefox44:
--- → unaffected
status-firefox45:
--- → affected
status-firefox-esr38:
--- → unaffected
status-firefox-esr45:
--- → ?
tracking-firefox45:
--- → ?
tracking-firefox46:
--- → ?
Comment 7•9 years ago
|
||
Aurora45. 0a2 is not affected, because the bunch of offending patch was backed out(m-a cset 64ec448f156d) now.
Reporter | ||
Comment 8•9 years ago
|
||
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.
Assignee | ||
Comment 10•9 years ago
|
||
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.
Assignee | ||
Comment 11•9 years ago
|
||
Reduced the testcase a fair bit and made it static.
It scrolls in some mouse positions, but not others...
Assignee | ||
Comment 12•9 years ago
|
||
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.
Reporter | ||
Comment 13•9 years ago
|
||
(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.
Assignee | ||
Comment 14•9 years ago
|
||
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.
Assignee | ||
Comment 15•9 years ago
|
||
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)
Assignee | ||
Comment 16•9 years ago
|
||
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!).
Assignee | ||
Updated•9 years ago
|
Attachment #8710819 -
Attachment is obsolete: true
Assignee | ||
Comment 17•9 years ago
|
||
Setting num=1 results in much simpler generated HTML that still reproduces a bug.
Hit testing: https://pastebin.mozilla.org/8857327
Assignee | ||
Comment 18•9 years ago
|
||
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.
Assignee | ||
Comment 19•9 years ago
|
||
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
Assignee | ||
Comment 20•9 years ago
|
||
Thinker, can you please try write a patch for this?
Comment 21•9 years ago
|
||
(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)
Updated•9 years ago
|
Attachment #8710843 -
Flags: review?(tlee) → review+
Comment 22•9 years ago
|
||
Attachment #8711073 -
Flags: review?(matt.woodrow)
Assignee | ||
Comment 25•9 years ago
|
||
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+
Comment 26•9 years ago
|
||
--
Attachment #8711073 [details] [diff] - Attachment is obsolete: true
Attachment #8711329 -
Flags: review?(matt.woodrow)
Updated•9 years ago
|
Attachment #8711073 -
Attachment is obsolete: true
Comment 27•9 years ago
|
||
(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.
Assignee | ||
Comment 28•9 years ago
|
||
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+
Comment 29•9 years ago
|
||
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → matt.woodrow
Comment 30•9 years ago
|
||
Updated•9 years ago
|
Flags: in-testsuite+
Comment 31•9 years ago
|
||
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?
Assignee | ||
Comment 32•9 years ago
|
||
(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.
Comment 33•9 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/26b29cf7a373
https://hg.mozilla.org/mozilla-central/rev/f41f716ccf4f
https://hg.mozilla.org/mozilla-central/rev/0df7afe205c5
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla46
Assignee | ||
Comment 36•9 years ago
|
||
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.
Description
•