-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Fix Cursor is not updated when an element position changes #40887
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Cursor is not updated when an element position changes #40887
Conversation
EWS run on previous version of this PR (hash 41c6b9e) |
This needs a test |
@nt1m I did not added test case because, I did not found way of get current cursor displayed on the frame, using getComputedStyle() only returns the defined cursor type in CSS for the element, not the current cursor displayed. |
41c6b9e
to
f9ad8c1
Compare
EWS run on previous version of this PR (hash f9ad8c1) |
f9ad8c1
to
680f59b
Compare
EWS run on previous version of this PR (hash 680f59b)
|
680f59b
to
112cadb
Compare
EWS run on previous version of this PR (hash 112cadb) |
112cadb
to
24fc12c
Compare
EWS run on previous version of this PR (hash 24fc12c) |
24fc12c
to
dd2f9c3
Compare
EWS run on previous version of this PR (hash dd2f9c3)
|
dd2f9c3
to
603c716
Compare
EWS run on previous version of this PR (hash 603c716) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New tests should just use js-test.js
instead of -pre.js
and -post.js
.
603c716
to
d628e58
Compare
Ok, so it looks like |
@smfr could give a review on the code in this pr to solve the cursor change problem ? |
I think this is a reasonable approach, but we need to measure if this additional cursor update per rendering update (which requires a new hit-test) is a performance or power regression. |
Ok, could you schedule a perf test? |
@cdumez could set up a perf this for test this changes impact? |
Ok. I have started Speedometer A/B testing. |
Hey, any updates about the perf testing? |
This is performance neutral on Speedometer 3. |
b30560e
to
5ae3094
Compare
EWS run on previous version of this PR (hash 5ae3094) |
@alanbaradlay @smfr no changes in perf, could be approved? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of a 1s timer, I think we should just wait until the next rendering update. You can find many examples of how to do that in LayoutTests (UIHelper.renderingUpdate)
5ae3094
to
1dbc490
Compare
EWS run on previous version of this PR (hash 1dbc490) |
1dbc490
to
a3172b0
Compare
EWS run on current version of this PR (hash a3172b0) |
Safe-Merge-Queue: Build #51157. |
https://bugs.webkit.org/show_bug.cgi?id=53340 Reviewed by Alan Baradlay. When an element is re-laid out, the cursor does not change its style until the mouse is moved because this triggers EventHandler::selectCursor. This issue is resolved by calling a cursor update function to update the cursor type during document layout. * Source/WebCore/dom/Document.cpp: (WebCore::Document::updateLayout): * LayoutTests/fast/events/mouse-cursor-change-02-expected.txt: Added. * LayoutTests/fast/events/mouse-cursor-change-02.html: Added. * LayoutTests/platform/ios/TestExpectations: * LayoutTests/platform/win/TestExpectations: * LayoutTests/platform/wpe/TestExpectations: Canonical link: https://commits.webkit.org/291948@main
a3172b0
to
1368da9
Compare
Committed 291948@main (1368da9): https://commits.webkit.org/291948@main Reviewed commits have been landed. Closing PR #40887 and removing active labels. |
1368da9
a3172b0