WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
148409
Layout Test platform/mac/fast/events/content-inset-hit-testing-in-frame.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=148409
Summary
Layout Test platform/mac/fast/events/content-inset-hit-testing-in-frame.html ...
Tim Horton
Reported
2015-08-24 18:22:49 PDT
The following layout test is flaky on Mac WK1 platform/mac/fast/events/content-inset-hit-testing-in-frame.html
Attachments
Patch
(3.63 KB, patch)
2015-08-25 15:23 PDT
,
Tim Horton
bdakin
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Tim Horton
Comment 1
2015-08-24 18:23:40 PDT
I'm looking at this. In the bad case, we hit the iframe, but not the div inside it (we hit the body instead).
Tim Horton
Comment 2
2015-08-24 18:38:57 PDT
Hmm. Render tree dumps for each hit test are exactly the same, we just hit a different node...
Tim Horton
Comment 3
2015-08-24 18:41:16 PDT
Reproduces if you reduce your machine to 1 core, load it (with some while(1)s), and "run-webkit-tests -1 --repeat-each=100000 platform/mac/fast/events/content-inset-hit-testing-in-frame.html".
Tim Horton
Comment 4
2015-08-24 18:44:49 PDT
The hit test *request* point is different (off by the topContentInset): bad case: 20 120 good case: 20 20 why is that racy, though?
Tim Horton
Comment 5
2015-08-24 18:47:29 PDT
setTopContentInset does a layout, and the layout isn't wrong (as evidenced by the render tree dumps being identical)... it's the point mapping that's wrong. I'm not sure where topContentInset gets applied to incoming points, though. Will have to find that.
Tim Horton
Comment 6
2015-08-24 18:55:51 PDT
We do a view->windowToContents() (in EventHandler's documentPointForWindowPoint) and are returned a lie.
Tim Horton
Comment 7
2015-08-25 11:20:24 PDT
OK! In the bad case, the scrollOffset.y() = 100 (the top content inset). In the good case it's 0 (as it should be). Not sure why it takes time for the scrollOffset to adjust to the TCI change. Will continue investigating.
Tim Horton
Comment 8
2015-08-25 11:31:49 PDT
scrollPositionChangedViaPlatformWidgetImpl is happening too late in the bad case.
Tim Horton
Comment 9
2015-08-25 11:40:57 PDT
(In reply to
comment #8
)
> scrollPositionChangedViaPlatformWidgetImpl is happening too late in the bad > case.
In the good case, we get it underneath the layout that setTopContentInset does (like you'd expect). In the bad case, we get it much later, under [NSView viewWillDraw] stuff...
Tim Horton
Comment 10
2015-08-25 13:39:20 PDT
And it looks like this is happening because we have scrollbars forced off until after the test runs (when they should be enabled as soon as we set a top content inset)
Tim Horton
Comment 11
2015-08-25 15:23:22 PDT
Created
attachment 259890
[details]
Patch
Tim Horton
Comment 12
2015-08-25 15:25:02 PDT
This is admittedly pretty icky, and I haven't managed to make a test app to demonstrate the underlying problem.
Tim Horton
Comment 13
2015-08-25 15:52:54 PDT
Comment on
attachment 259890
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=259890&action=review
> Source/WebKit/mac/WebView/WebDynamicScrollBarsView.mm:629 > + [super setContentInsets:edgeInsets];
Mavericks doesn't have this, need an ifdef.
Tim Horton
Comment 14
2015-08-26 11:18:43 PDT
http://trac.webkit.org/changeset/188971
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug