Closed Bug 1360568 Opened 7 years ago Closed 7 years ago

dom/events/test/test_bug946632.html | <input> horizontal line scroll targets <input> - got [object HTMLDivElement], expected [object HTMLInputElement]

Categories

(Core :: DOM: Events, defect, P1)

Unspecified
Linux
defect

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: kshriram18, Assigned: kats)

References

Details

Attachments

(1 file)

See Also: → 1335880
raw data from the log in comment 0:
[task 2017-04-28T09:25:37.045168Z] 09:25:37     INFO - TEST-START | dom/events/test/test_bug946632.html
[task 2017-04-28T09:25:37.607909Z] 09:25:37     INFO - TEST-INFO | started process screentopng
[task 2017-04-28T09:25:39.001749Z] 09:25:39     INFO - TEST-INFO | screentopng: exit 0
[task 2017-04-28T09:25:39.008277Z] 09:25:39     INFO - Buffered messages logged at 09:25:37
[task 2017-04-28T09:25:39.008497Z] 09:25:39     INFO - must wait for load
[task 2017-04-28T09:25:39.010396Z] 09:25:39     INFO - TEST-PASS | dom/events/test/test_bug946632.html | <input> vertical line scroll targets container 
[task 2017-04-28T09:25:39.012197Z] 09:25:39     INFO - TEST-PASS | dom/events/test/test_bug946632.html | <input> vertical line scroll container.scrollTop 
[task 2017-04-28T09:25:39.014033Z] 09:25:39     INFO - TEST-PASS | dom/events/test/test_bug946632.html | <input> vertical line scroll container.scrollLeft 
[task 2017-04-28T09:25:39.016892Z] 09:25:39     INFO - TEST-PASS | dom/events/test/test_bug946632.html | <input> horizontal line scroll input.scrollTop 
[task 2017-04-28T09:25:39.018957Z] 09:25:39     INFO - TEST-PASS | dom/events/test/test_bug946632.html | <input> horizontal line scroll input.scrollLeft 
[task 2017-04-28T09:25:39.021048Z] 09:25:39     INFO - Buffered messages finished
[task 2017-04-28T09:25:39.025135Z] 09:25:39     INFO - TEST-UNEXPECTED-FAIL | dom/events/test/test_bug946632.html | <input> horizontal line scroll targets <input> - got [object HTMLDivElement], expected [object HTMLInputElement]
[task 2017-04-28T09:25:39.027219Z] 09:25:39     INFO -     SimpleTest.is@SimpleTest/SimpleTest.js:310:5
[task 2017-04-28T09:25:39.029266Z] 09:25:39     INFO -     check@dom/events/test/test_bug946632.html:90:7
[task 2017-04-28T09:25:39.036176Z] 09:25:39     INFO -     scrollHandler@dom/events/test/test_bug946632.html:67:5
[task 2017-04-28T09:25:39.039547Z] 09:25:39     INFO -     onwheel/<@SimpleTest/EventUtils.js:608:7
[task 2017-04-28T09:25:39.041257Z] 09:25:39     INFO -     setTimeout handler*SimpleTest_setTimeoutShim@SimpleTest/SimpleTest.js:672:12
[task 2017-04-28T09:25:39.042853Z] 09:25:39     INFO -     onwheel@SimpleTest/EventUtils.js:607:5
[task 2017-04-28T09:25:39.044720Z] 09:25:39     INFO - TEST-PASS | dom/events/test/test_bug946632.html | <input> horizontal line scroll input.scrollTop 
[task 2017-04-28T09:25:39.047549Z] 09:25:39     INFO - Not taking screenshot here: see the one that was previously logged
[task 2017-04-28T09:25:39.051645Z] 09:25:39     INFO - TEST-UNEXPECTED-FAIL | dom/events/test/test_bug946632.html | <input> horizontal line scroll input.scrollLeft 
[task 2017-04-28T09:25:39.054621Z] 09:25:39     INFO -     check@dom/events/test/test_bug946632.html:92:7
[task 2017-04-28T09:25:39.057222Z] 09:25:39     INFO -     scrollHandler@dom/events/test/test_bug946632.html:67:5
[task 2017-04-28T09:25:39.058807Z] 09:25:39     INFO -     onwheel/<@SimpleTest/EventUtils.js:608:7
[task 2017-04-28T09:25:39.064296Z] 09:25:39     INFO -     setTimeout handler*SimpleTest_setTimeoutShim@SimpleTest/SimpleTest.js:672:12
[task 2017-04-28T09:25:39.066215Z] 09:25:39     INFO -     onwheel@SimpleTest/EventUtils.js:607:5
[task 2017-04-28T09:25:39.070269Z] 09:25:39     INFO - TEST-PASS | dom/events/test/test_bug946632.html | <input> horizontal line scroll container.scrollTop 
[task 2017-04-28T09:25:39.072016Z] 09:25:39     INFO - Not taking screenshot here: see the one that was previously logged
[task 2017-04-28T09:25:39.073841Z] 09:25:39     INFO - TEST-UNEXPECTED-FAIL | dom/events/test/test_bug946632.html | <input> horizontal line scroll container.scrollLeft - got 10, expected +0
[task 2017-04-28T09:25:39.075614Z] 09:25:39     INFO -     SimpleTest.is@SimpleTest/SimpleTest.js:310:5
[task 2017-04-28T09:25:39.079517Z] 09:25:39     INFO -     check@dom/events/test/test_bug946632.html:94:7
[task 2017-04-28T09:25:39.081175Z] 09:25:39     INFO -     scrollHandler@dom/events/test/test_bug946632.html:67:5
[task 2017-04-28T09:25:39.082754Z] 09:25:39     INFO -     onwheel/<@SimpleTest/EventUtils.js:608:7
[task 2017-04-28T09:25:39.084676Z] 09:25:39     INFO -     setTimeout handler*SimpleTest_setTimeoutShim@SimpleTest/SimpleTest.js:672:12
[task 2017-04-28T09:25:39.086838Z] 09:25:39     INFO -     onwheel@SimpleTest/EventUtils.js:607:5
[task 2017-04-28T09:25:39.089735Z] 09:25:39     INFO - TEST-PASS | dom/events/test/test_bug946632.html | <input> vertical page scroll targets container 
[task 2017-04-28T09:25:39.092211Z] 09:25:39     INFO - TEST-PASS | dom/events/test/test_bug946632.html | <input> vertical line scroll container.scrollTop 
[task 2017-04-28T09:25:39.099427Z] 09:25:39     INFO - TEST-PASS | dom/events/test/test_bug946632.html | <input> vertical line scroll container.scrollLeft 
[task 2017-04-28T09:25:39.105974Z] 09:25:39     INFO - TEST-PASS | dom/events/test/test_bug946632.html | <input> vertical page scroll input.scrollTop 
[task 2017-04-28T09:25:39.108202Z] 09:25:39     INFO - TEST-PASS | dom/events/test/test_bug946632.html | <input> vertical page scroll input.scrollLeft 
[task 2017-04-28T09:25:39.114017Z] 09:25:39     INFO - Not taking screenshot here: see the one that was previously logged
[task 2017-04-28T09:25:39.116228Z] 09:25:39     INFO - TEST-UNEXPECTED-FAIL | dom/events/test/test_bug946632.html | <input> horizontal page scroll targets <input> - got [object HTMLDivElement], expected [object HTMLInputElement]
[task 2017-04-28T09:25:39.118144Z] 09:25:39     INFO -     SimpleTest.is@SimpleTest/SimpleTest.js:310:5
[task 2017-04-28T09:25:39.121727Z] 09:25:39     INFO -     check@dom/events/test/test_bug946632.html:118:7
[task 2017-04-28T09:25:39.127071Z] 09:25:39     INFO -     scrollHandler@dom/events/test/test_bug946632.html:67:5
[task 2017-04-28T09:25:39.129068Z] 09:25:39     INFO -     onwheel/<@SimpleTest/EventUtils.js:608:7
[task 2017-04-28T09:25:39.131574Z] 09:25:39     INFO -     setTimeout handler*SimpleTest_setTimeoutShim@SimpleTest/SimpleTest.js:672:12
[task 2017-04-28T09:25:39.135021Z] 09:25:39     INFO -     onwheel@SimpleTest/EventUtils.js:607:5
[task 2017-04-28T09:25:39.138847Z] 09:25:39     INFO - TEST-PASS | dom/events/test/test_bug946632.html | <input> horizontal page scroll input.scrollTop 
[task 2017-04-28T09:25:39.142681Z] 09:25:39     INFO - Not taking screenshot here: see the one that was previously logged
[task 2017-04-28T09:25:39.144779Z] 09:25:39     INFO - TEST-UNEXPECTED-FAIL | dom/events/test/test_bug946632.html | <input> horizontal page scroll input.scrollLeft 
[task 2017-04-28T09:25:39.148457Z] 09:25:39     INFO -     check@dom/events/test/test_bug946632.html:120:7
[task 2017-04-28T09:25:39.150520Z] 09:25:39     INFO -     scrollHandler@dom/events/test/test_bug946632.html:67:5
[task 2017-04-28T09:25:39.155361Z] 09:25:39     INFO -     onwheel/<@SimpleTest/EventUtils.js:608:7
[task 2017-04-28T09:25:39.158136Z] 09:25:39     INFO -     setTimeout handler*SimpleTest_setTimeoutShim@SimpleTest/SimpleTest.js:672:12
[task 2017-04-28T09:25:39.160463Z] 09:25:39     INFO -     onwheel@SimpleTest/EventUtils.js:607:5
[task 2017-04-28T09:25:39.163870Z] 09:25:39     INFO - TEST-PASS | dom/events/test/test_bug946632.html | <input> horizontal page scroll container.scrollTop 
[task 2017-04-28T09:25:39.168554Z] 09:25:39     INFO - Not taking screenshot here: see the one that was previously logged
[task 2017-04-28T09:25:39.170496Z] 09:25:39     INFO - TEST-UNEXPECTED-FAIL | dom/events/test/test_bug946632.html | <input> horizontal page scroll container.scrollLeft - got 171, expected +0
[task 2017-04-28T09:25:39.172131Z] 09:25:39     INFO -     SimpleTest.is@SimpleTest/SimpleTest.js:310:5
[task 2017-04-28T09:25:39.173742Z] 09:25:39     INFO -     check@dom/events/test/test_bug946632.html:122:7
[task 2017-04-28T09:25:39.175432Z] 09:25:39     INFO -     scrollHandler@dom/events/test/test_bug946632.html:67:5
[task 2017-04-28T09:25:39.182373Z] 09:25:39     INFO -     onwheel/<@SimpleTest/EventUtils.js:608:7
[task 2017-04-28T09:25:39.184280Z] 09:25:39     INFO -     setTimeout handler*SimpleTest_setTimeoutShim@SimpleTest/SimpleTest.js:672:12
[task 2017-04-28T09:25:39.187968Z] 09:25:39     INFO -     onwheel@SimpleTest/EventUtils.js:607:5
[task 2017-04-28T09:25:39.189926Z] 09:25:39     INFO - GECKO(1648) | MEMORY STAT | vsize 604MB | residentFast 97MB | heapAllocated 25MB
[task 2017-04-28T09:25:39.191848Z] 09:25:39     INFO - TEST-OK | dom/events/test/test_bug946632.html | took 863ms


here is the related screenshot:
https://public-artifacts.taskcluster.net/LFgwJyy7TG28Z4akxrRYaA/0/public/test_info//mozilla-test-fail-screenshot_ia3MFa.png



we have issues with <input> in 16.04 as this bug and bug 1335880 seem to fail on <input> elements.

:dvander, I see that you modified this test case a few times, any hints for figuring this out?  Maybe pointers to someone who might know a bit more?
Flags: needinfo?(dvander)
I don't have any immediate ideas... Changes in mouse or screen resolution might make it flaky. 

I had modified these tests to work with APZ. It's possible there are still bugs there but unlikely if the test is generally reliable. They are typically not easy to debug without rr. Someone would have to dump APZ logging info and see why the event is targeting the wrong element.
Flags: needinfo?(dvander)
Setting NI flag on :dvander for comment 3.
Flags: needinfo?(dvander)
Stealing needinfo, I can help you with this since dvander is pretty swamped with other stuff right now. I looked through the log in comment 3 and it mostly looks like it's doing the right thing, however I see this:

[task 2017-04-29T19:58:56.327025Z] 19:58:56 ... HitTestingTreeNode (0xd3c5b200) APZC (0xd1dbc800) ... dispatchtocontentregion=< (x=7, y=5, w=22, h=23); >}) ...

which shows the dispatch-to-content region (for the input field) starts at (x,y) = (7,5). And then when we do the hit test, we have this:

[task 2017-04-29T19:58:56.378187Z] 19:58:56 ... Transformed ParentLayer point (26,309) to layer (5,5)

so we're hit-testing the point (5,5). Which I think means we are actually hitting outside the input field. So one thing to try would be to modify the test to use 7 instead of 5 for the x-offset at [1]. However this might just be a red herring, if you have a log of the test passing with the same APZ logging enabled I can take a look and compare them to see if this theory is correct.

[1] http://searchfox.org/mozilla-central/rev/8b70b0a5038ef9472fe7c53e04a70c978bb06aed/dom/events/test/test_bug946632.html#147
Flags: needinfo?(dvander)
So on IRC :Mavericks pointed me to the log on Ubuntu 12.04 [1], where the test passes. In this log, I see this:

[task 2017-05-02T03:13:32.043712Z] 03:13:32 ... HitTestingTreeNode (0xd30dff00) APZC (0xd3053000) ... dispatchtocontentregion=< (x=5, y=3, w=22, h=23); >}) ...

Here we can see that the dispatchtocontent region starts at (5,3) instead of (7,5) which means that the mousewheel event at 5,5 will go inside the input field. So it looks like Ubuntu 16.04 has thicker border styling or something for input fields which is causing the wheel event to not actually go into the input field as the test intends. I would increase the 5,5 to 7,5 as mentioned in the previous comment and see if that fixes the problem.

[1] https://treeherder.mozilla.org/logviewer.html#?job_id=95787803&repo=try
I did a try run with 16.04 and tried adjusting the 5,5 point to 7,5 with no luck:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=d329bb01b18b3895e48c4def64b06cb61650fa69&selectedJob=97397642

possibly there is something in there that would shed more light?
I can reproduce the failure locally on my Ubuntu 16.04 machine. I'll poke around and see if I can figure out what's going on.
Hm interesting. Locally if I change it to 7,5 the test passes, as I would expect. Not sure why it continued to fail on try. The patch looks correct.

I guess I'll do a try push with that and logging turned on and see what happened.
P1 since I'm guessing we need to move to a newer OS soon. Thanks for helping track this down, kats!
Priority: -- → P1
Just a quick update, I did a try push [1] yesterday with the logging enabled. It looks like the main-thread hit-test is also returning the container div instead of the input element. I'm not sure if the wheel event needs to be moved even more or if there's some reason that's happening. I kicked off another try push to investigate more.

[1] https://treeherder.mozilla.org/#/jobs?repo=try&revision=3dc98498d5bbdcae23a31fb47a5dd99d61bc672d&group_state=expanded&selectedJob=97743464
It looks like 7,5 just wasn't far enough. If I change it to 8,6 [1] the hit-test works properly and the test passes. However, there's a different test that's failing. Not sure if that's tracked somewhere else or if it's intermittent or some other bug. I retriggered it to check intermittency.

[1] https://hg.mozilla.org/try/rev/714c8f905525#l1.13
[2] https://treeherder.mozilla.org/#/jobs?repo=try&revision=e3f503d534554861c4c738c0560a5d338c745194
I am not familiar with the wheel test that is failing, that might be a new failure.
I see some of the previous try pushes in this bug which have APZ logging enabled have the same failure. It's probably because the logging spew is too much and slows things way down in that test. It'll probably be fine if we do it without logging. Here's a try:

https://treeherder.mozilla.org/#/jobs?repo=try&revision=ca126fcc39a0dcdda4c7f1cc47937a911e93de97
And indeed that seems to be green.
Comment on attachment 8866916 [details]
Bug 1360568 - Update wheel event coordinates to account for different styling on Ubuntu 16.04.

https://reviewboard.mozilla.org/r/138520/#review141766

thanks :kats, do we have confidence this will work on all platforms as well as in 12.04 (until we can switch to 16.04 when the other few tests are fixed) ?
Attachment #8866916 - Flags: review?(jmaher) → review+
Good question. I *think* it should be fine but I can do a try push to verify.
Pushed by kgupta@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/20125896c284
Update wheel event coordinates to account for different styling on Ubuntu 16.04. r=jmaher
https://hg.mozilla.org/mozilla-central/rev/20125896c284
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: