Bug 204735 - [PSON] Tooltips from previous page shown on new page
Summary: [PSON] Tooltips from previous page shown on new page
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-12-01 17:09 PST by Michael Catanzaro
Modified: 2019-12-03 01:31 PST (History)
10 users (show)

See Also:


Attachments
Patch (22.37 KB, patch)
2019-12-02 05:48 PST, Carlos Garcia Campos
no flags Details | Formatted Diff | Diff
Patch (23.09 KB, patch)
2019-12-02 05:58 PST, Carlos Garcia Campos
cdumez: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Catanzaro 2019-12-01 17:09:02 PST
We're having trouble with tooltips from a previously-loaded webpage being displayed for a new unrelated web page after loading a new page in the web view. It's easy to reproduce using the Epiphany overview. Hover your mouse cursor over any of the overview items to display a tooltip. Then, using the keyboard, Ctrl+L to focus the address bar, type in any web address, e.g. https://www.gnome.org, and hit Enter to load the page.

With 2.26, the tooltip appears on the new page, but only until the mouse is moved. As soon as the mouse is moved, the tooltip disappears and never comes back.

With 2.27.3, the tooltip has developed aggressive zombie tendencies. It just doesn't want to die 🧟. Move the mouse, it will come back again and again. To avoid the bug, you can hover over some element of the new web page that displays a tooltip and our zombie tooltip will finally die. For example, using https://www.gnome.org as our second page load, you can hover over the GNOME foot in the top-left to get rid of the zombie tooltip. I remember this when testing 2.27.2 and maybe also 2.27.1, so it's an earlier regression. I just never managed to figure out how to reproduce it until now.
Comment 1 Michael Catanzaro 2019-12-01 17:34:08 PST
Well I went to bisect this, but I was able to reproduce the bug in my personal JHBuild environment even when using a pre-2.26 commit of WebKit. So my assumption that the WebKit version difference was to blame for the regression was wrong.

Bug is reproducible with: Epiphany Tech Preview (using 2.27.3), Michael's personal JHBuild environment

Not reproducible with: Fedora 31 system Epiphany
Comment 2 Michael Catanzaro 2019-12-01 18:04:14 PST
Sorry, I think this in an Epiphany regression.
Comment 3 Michael Catanzaro 2019-12-01 18:15:47 PST
(In reply to Michael Catanzaro from comment #2)
> Sorry, I think this in an Epiphany regression.

OK, the problem is PSON. I bisected it in Epiphany to the Epiphany commit reenabling PSON.
Comment 4 Carlos Garcia Campos 2019-12-02 05:35:39 PST
This is not GTK specific. The problem is that WebPage (in the wbe process) is caching the tooltip text to avoid sending IPC messages when the tooltip didn't change. When a new web process is used for the same web view, the tooltip text doesn't really change (it's always null) until a new one is set.
Comment 5 Carlos Garcia Campos 2019-12-02 05:48:11 PST
Created attachment 384612 [details]
Patch
Comment 6 youenn fablet 2019-12-02 05:52:29 PST
Can we add a test?
Comment 7 Carlos Garcia Campos 2019-12-02 05:58:59 PST
Created attachment 384613 [details]
Patch
Comment 8 Carlos Garcia Campos 2019-12-02 06:02:12 PST
(In reply to youenn fablet from comment #6)
> Can we add a test?

I thought about it, but we don't have public API to get the current tooltip text to make a unit test. And I'm not sure it's possible with a layout test either.
Comment 9 Chris Dumez 2019-12-02 08:05:00 PST
Comment on attachment 384613 [details]
Patch

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

> Source/WebKit/ChangeLog:8
> +        The problem is that WebPage (in the wbe process) is caching the tooltip text to avoid sending IPC messages when

Typo: wbe
Comment 10 Michael Catanzaro 2019-12-02 09:09:34 PST
Comment on attachment 384613 [details]
Patch

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

Thanks.

> Source/WebCore/page/ChromeClient.h:210
> +    virtual void mouseDidMoveOverElement(const HitTestResult&, unsigned modifierFlags, const String&, TextDirection) = 0;

The const String& parameter here should be named ("toolTip") since it's not clear from the type what it's for.
Comment 11 Chris Dumez 2019-12-02 09:14:19 PST
(In reply to Michael Catanzaro from comment #10)
> Comment on attachment 384613 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=384613&action=review
> 
> Thanks.
> 
> > Source/WebCore/page/ChromeClient.h:210
> > +    virtual void mouseDidMoveOverElement(const HitTestResult&, unsigned modifierFlags, const String&, TextDirection) = 0;
> 
> The const String& parameter here should be named ("toolTip") since it's not
> clear from the type what it's for.

+1, good catch.
Comment 12 Carlos Garcia Campos 2019-12-03 01:30:27 PST
Committed r253028: <https://trac.webkit.org/changeset/253028>
Comment 13 Radar WebKit Bug Importer 2019-12-03 01:31:20 PST
<rdar://problem/57585196>