Bug 165056 - Overlay scrolling with iframe-s broken
Summary: Overlay scrolling with iframe-s broken
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: UI Events (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tomas Popela
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-23 23:36 PST by Milan Crha
Modified: 2017-02-06 22:47 PST (History)
12 users (show)

See Also:


Attachments
/tmp/a.html (462 bytes, text/plain)
2016-11-23 23:37 PST, Milan Crha
no flags Details
test-wk2.c (3.20 KB, text/plain)
2016-11-23 23:38 PST, Milan Crha
no flags Details
wip patch (2.95 KB, patch)
2017-01-31 09:09 PST, Tomas Popela
no flags Details | Formatted Diff | Diff
Patch (8.87 KB, patch)
2017-02-06 02:47 PST, Carlos Garcia Campos
tonikitoo: review+
buildbot: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews100 for mac-elcapitan (913.70 KB, application/zip)
2017-02-06 03:54 PST, Build Bot
no flags Details
Archive of layout-test-results from ews112 for mac-elcapitan (1.64 MB, application/zip)
2017-02-06 04:05 PST, Build Bot
no flags Details
Patch for landing (13.01 KB, patch)
2017-02-06 04:56 PST, Carlos Garcia Campos
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Milan Crha 2016-11-23 23:36:41 PST
Moving this from a downstream bug report:
https://bugzilla.redhat.com/show_bug.cgi?id=1395942

When gtk+ has set overlay scrollbars and the page contains at least one iframe, then the scrolling using the scrollbars with mouse left-click doesn't always work.

Observations:
a) mouse wheel works fine (when hovering mouse above the scroll bar)
b) when the vertical scrollbar is at the very bottom, then it works too
c) when I disable overlay scrollbars [1], then it works no matter what

[1] run the application as:
    $ GTK_OVERLAY_SCROLLING=0 test-wk2
Comment 1 Milan Crha 2016-11-23 23:37:30 PST
Created attachment 295395 [details]
/tmp/a.html
Comment 2 Milan Crha 2016-11-23 23:38:24 PST
Created attachment 295396 [details]
test-wk2.c

This is a reproducer.

Steps:
a) save the previous attachment as /tmp/a.html file
b) compile and run this test-wk2.c as written on the first line of the file

Make sure the overlay scrolling is not off when testing.
Comment 3 Michael Catanzaro 2016-11-24 06:33:40 PST
Note that this bug is highly-noticeable on Igalia's internal Etherpad site.
Comment 5 Michael Catanzaro 2017-01-17 08:35:20 PST
I noticed this recently in Evolution as well. It's very annoying and definitely WebKit's fault.
Comment 6 Carlos Garcia Campos 2017-01-31 08:59:07 PST
This is not specific to GTK+ it happens the same in Safari using overlay scrollbars, so it seems to be a general problem with overlay scrollbars.
Comment 7 Tomas Popela 2017-01-31 09:06:52 PST
(In reply to comment #6)
> This is not specific to GTK+ it happens the same in Safari using overlay
> scrollbars, so it seems to be a general problem with overlay scrollbars.

Yes it's not related to GTK+. I have a WIP patch, but I need to discuss it with someone. The thing is that the event is passed to the subframe even if the mouse pointer is on the scrollbar. Also that's the reason why even the cursors are wrong.
Comment 8 Carlos Garcia Campos 2017-01-31 09:08:02 PST
(In reply to comment #3)
> Note that this bug is highly-noticeable on Igalia's internal Etherpad site.

hmm, are you sure it's the same issue? This is because of frame flattening I think, but in the etherpads it happens even if frame flattening is disabled. What I tried in mac is the etherpad.
Comment 9 Tomas Popela 2017-01-31 09:09:14 PST
Created attachment 300221 [details]
wip patch
Comment 10 Carlos Garcia Campos 2017-01-31 09:15:05 PST
(In reply to comment #9)
> Created attachment 300221 [details]
> wip patch

Ok, definitely the same bug then because that patch makes etherpads work too.
Comment 11 Carlos Garcia Campos 2017-02-06 02:47:45 PST
Created attachment 300700 [details]
Patch
Comment 12 Antonio Gomes 2017-02-06 03:27:26 PST
Comment on attachment 300700 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=300700&action=review

r=me. Lets wait 'till Mac bots pass.

> Source/WebCore/page/EventHandler.cpp:1681
> +    updateLastScrollbarUnderMouse(scrollbar, true);

(I know it is not your code, ) can we name the boolean parameter or add a comment, now that we are touching it?
Comment 13 Build Bot 2017-02-06 03:54:13 PST
Comment on attachment 300700 [details]
Patch

Attachment 300700 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/3012980

New failing tests:
fast/scrolling/scroll-animator-overlay-scrollbars-clicked.html
Comment 14 Build Bot 2017-02-06 03:54:17 PST
Created attachment 300706 [details]
Archive of layout-test-results from ews100 for mac-elcapitan

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews100  Port: mac-elcapitan  Platform: Mac OS X 10.11.6
Comment 15 Build Bot 2017-02-06 04:05:34 PST
Comment on attachment 300700 [details]
Patch

Attachment 300700 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/3012997

New failing tests:
fast/scrolling/scroll-animator-overlay-scrollbars-clicked.html
Comment 16 Build Bot 2017-02-06 04:05:38 PST
Created attachment 300707 [details]
Archive of layout-test-results from ews112 for mac-elcapitan

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews112  Port: mac-elcapitan  Platform: Mac OS X 10.11.6
Comment 17 Carlos Garcia Campos 2017-02-06 04:56:19 PST
Created attachment 300710 [details]
Patch for landing
Comment 18 Carlos Garcia Campos 2017-02-06 22:47:32 PST
Committed r211775: <http://trac.webkit.org/changeset/211775>