RESOLVED FIXED Bug 181115
REGRESSION(r224460): Text fields sometimes get "messed up"
https://bugs.webkit.org/show_bug.cgi?id=181115
Summary REGRESSION(r224460): Text fields sometimes get "messed up"
Michael Catanzaro
Reported 2017-12-21 18:55:36 PST
Created attachment 330089 [details] Screencast showing problem Text fields sometimes get "messed up" in 2.19.3. This is a regression from 2.18, but unfortunately I have no clue when it was introduced. This problem is hard to describe, so refer to the attached screencast. It looks like some graphics tiling problem. Text is being rendered in the wrong place. In the screencast, I hit the Enter key. I don't type a period: it just appears in the wrong place. Then I press the down arrow key, and then the right arrow key several times. Unfortunately I do not know how to reproduce this problem.
Attachments
Screencast showing problem (211.33 KB, video/webm)
2017-12-21 18:55 PST, Michael Catanzaro
no flags
Another screencast (184.53 KB, video/webm)
2017-12-21 19:00 PST, Michael Catanzaro
no flags
Another screencast (448.42 KB, video/webm)
2017-12-21 19:00 PST, Michael Catanzaro
no flags
Patch (1.87 KB, patch)
2018-01-08 01:05 PST, Carlos Garcia Campos
zalan: review+
Patch for landing (1.65 KB, patch)
2018-01-09 02:14 PST, Carlos Garcia Campos
no flags
Michael Catanzaro
Comment 1 2017-12-21 19:00:20 PST
Created attachment 330091 [details] Another screencast
Michael Catanzaro
Comment 2 2017-12-21 19:00:33 PST
Created attachment 330092 [details] Another screencast
Zan Dobersek
Comment 3 2017-12-22 23:07:40 PST
Bisected this down to r224460, bug #179279. The regression is due to m_paintOffset now being adjusted for scroll position in case of an overflow clip in computeOffsets() before it's then used to calculate the clip rect in computeClipRect(), while before this was done in reverse order. Not sure whether this is intentional or not, so input from Zalan or Antti is welcome in order to get this addressed.
Zan Dobersek
Comment 4 2017-12-22 23:07:56 PST
(In reply to Zan Dobersek from comment #3) > Bisected this down to r224460, bug #179279. https://trac.webkit.org/changeset/224460/webkit
zalan
Comment 5 2017-12-23 08:52:04 PST
(In reply to Zan Dobersek from comment #3) > Bisected this down to r224460, bug #179279. > > The regression is due to m_paintOffset now being adjusted for scroll > position in case of an overflow clip in computeOffsets() before it's then > used to calculate the clip rect in computeClipRect(), while before this was > done in reverse order. > > Not sure whether this is intentional or not, so input from Zalan or Antti is > welcome in order to get this addressed. No, it's definitely not intentional. Do you happen to have a cross platform test reduction? I could take a look at it.
Michael Catanzaro
Comment 6 2017-12-23 09:58:43 PST
(In reply to Zan Dobersek from comment #3) > Bisected this down to r224460, bug #179279. Wow, that must have taken a while... thank you.
Michael Catanzaro
Comment 7 2018-01-02 15:43:10 PST
(In reply to zalan from comment #5) > No, it's definitely not intentional. Do you happen to have a cross platform > test reduction? I could take a look at it. I think all text entries are broken for GTK, including the comment entry on this Bugzilla. But even though I've been frustrated by this bug for several weeks, I'm still not quite sure what exactly is needed to trigger the bug. Zan must have figured it out in order to bisect it.
Michael Catanzaro
Comment 8 2018-01-05 07:56:07 PST
(I don't normally use Bugzilla priorities, but I will here, because we really can't release 2.20 until we figure out how to fix this.)
Carlos Garcia Campos
Comment 9 2018-01-08 01:05:38 PST
Michael Catanzaro
Comment 10 2018-01-08 05:52:40 PST
Thanks a bunch! Maybe Zalan will review it?
zalan
Comment 11 2018-01-08 07:23:47 PST
(In reply to Michael Catanzaro from comment #10) > Thanks a bunch! > > Maybe Zalan will review it? will surely do today.
Simon Fraser (smfr)
Comment 12 2018-01-08 08:25:46 PST
Comment on attachment 330671 [details] Patch Is it possible to make a test case? It's odd that this broke GTK but not mac, and having a test case for mac would be good.
zalan
Comment 13 2018-01-08 08:52:44 PST
Comment on attachment 330671 [details] Patch I think having paintOffsetForClipRect = m_paintOffset + renderer.scrollPosition(); is more correct/explicit than what we had pre r224460. Also, with this patch, computeOffsets() does not actually computes all the offsets and could lead to incorrect assumptions in the future.
Carlos Garcia Campos
Comment 14 2018-01-09 00:20:32 PST
(In reply to Simon Fraser (smfr) from comment #12) > Comment on attachment 330671 [details] > Patch > > Is it possible to make a test case? It's odd that this broke GTK but not > mac, and having a test case for mac would be good. Antti suggested the same yesterday and I tried to write a test, but I was unable to reproduce the issue with a tests case. I don't know if it is because there are force repaints/layouts in WTR that don't normally happen.
Carlos Garcia Campos
Comment 15 2018-01-09 02:14:58 PST
Created attachment 330801 [details] Patch for landing This makes more sense now, thanks Zalan, Antti!
Carlos Garcia Campos
Comment 16 2018-01-09 02:57:14 PST
Radar WebKit Bug Importer
Comment 17 2018-01-09 02:58:18 PST
zalan
Comment 18 2018-01-09 06:59:50 PST
(In reply to Carlos Garcia Campos from comment #15) > Created attachment 330801 [details] > Patch for landing > > This makes more sense now, thanks Zalan, Antti! Thanks for fixing it.
Note You need to log in before you can comment on or make changes to this bug.