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
Incorrect behavior of "cursor: auto" over links #4161
Closed
vitorroriz
wants to merge
1
commit into
WebKit:main
from
vitorroriz:eng/Incorrect-behavior-of-cursor-auto-over-links
Closed
Incorrect behavior of "cursor: auto" over links #4161
vitorroriz
wants to merge
1
commit into
WebKit:main
from
vitorroriz:eng/Incorrect-behavior-of-cursor-auto-over-links
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vitorroriz
force-pushed
the
eng/Incorrect-behavior-of-cursor-auto-over-links
branch
from
September 9, 2022 13:21
b5d767e
to
91c2ae1
Compare
vitorroriz
force-pushed
the
eng/Incorrect-behavior-of-cursor-auto-over-links
branch
2 times, most recently
from
September 9, 2022 15:27
f42598c
to
ef926ac
Compare
https://bugs.webkit.org/show_bug.cgi?id=173909 rdar://99495893 Reviewed by NOBODY (OOPS!). The initial attempt to fix this bug and comply to spec was made at https://commits.webkit.org/253685@main After that, a:any-link no longer depends on 'cursor: auto' for achieving "Hand" (css: pointer) cursor. This is because, according to spec, 'cursor: auto' can only result in default or text cursor. Therefore, 253685@main sets 'cursor: pointer' in the UA stylesheet (html.css). Because of that, a test case for cursor types for recognized text (live-text) was broken. There, we were testing a <img> nested in a <a href="">. Since, this <a> is now selected to have 'cursor: pointer', its nested <img> has no longer 'cursor: auto', which is required for resulting in IBeam (text) cursor for the overlay installed in the img (see EventHandler::selectCursor). Therefore, we are updating the test case here. A <img> inside a <a href="..."> is by default styled with cursor: pointer, and therefore hovering over its overlay doesn't show IBeam (text) cursor, unless user styles its cursor to auto. * LayoutTests/fast/images/text-recognition/mac/cursor-types-for-recognized-text-expected.txt: * LayoutTests/fast/images/text-recognition/mac/cursor-types-for-recognized-text.html: Updating tests. Note that one of the test cases is commented out. As stated in the comment, this would fail due to https://bugs.webkit.org/show_bug.cgi?id=244944 (radar: 99495849). In short, EventHandler::selectCursor will select an IBeam cursor although it shouldn't. This is because Node::canStartSelection() is not false for user-select: none. * LayoutTests/platform/mac-wk2/TestExpectations: Reseting TextExpectations for this test, before set as failure. * Source/WebCore/html/shadow/imageOverlay.css: (div#image-overlay): We should not style cursor for the live-text overlay that is installed on top of images with text. Doing that would disable user to control which cursor is displayed for the text portion of the image, since the overlay is in the shadow tree, hosted by the image element. I.e.: user's cursor style for the image would not be propagated to the overlay.
vitorroriz
force-pushed
the
eng/Incorrect-behavior-of-cursor-auto-over-links
branch
from
September 9, 2022 19:04
ef926ac
to
7aae85f
Compare
webkit-ews-buildbot
added
the
merging-blocked
Applied to prevent a change from being merged
label
Sep 14, 2022
Is this PR reverted the patch? Link since the bug seems to be closed, do we need to reopen bug to land this? |
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
CSS
Cascading Style Sheets implementation
merging-blocked
Applied to prevent a change from being merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
7aae85f
7aae85f