Bug 311587

Summary: [first-letter] Hovering over ::first-letter text shows pointer cursor instead of I-beam
Product: WebKit Reporter: alan <zalan>
Component: New BugsAssignee: alan <zalan>
Status: RESOLVED FIXED    
Severity: Normal CC: koivisto, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
[fast-cq]Patch none

alan
Reported 2026-04-06 12:32:27 PDT
ssia
Attachments
Patch (5.66 KB, patch)
2026-04-06 12:36 PDT, alan
no flags
Patch (5.68 KB, patch)
2026-04-07 09:12 PDT, alan
no flags
[fast-cq]Patch (6.62 KB, patch)
2026-04-07 12:01 PDT, alan
no flags
alan
Comment 1 2026-04-06 12:36:27 PDT
Antti Koivisto
Comment 2 2026-04-07 08:12:09 PDT
Comment on attachment 478936 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=478936&action=review > Source/WebCore/rendering/RenderTextFragment.cpp:119 > + if (textNode()) > + return RenderText::nodeForHitTest(); > + > + // The anonymous first-letter text has no DOM node. Resolve to the DOM text > + // node via the remaining fragment so cursor and selection work. > + if (auto* parent = dynamicDowncast<RenderBoxModelObject>(this->parent()); parent && parent->isFirstLetter()) { > + if (auto* remainingText = parent->firstLetterRemainingText()) > + return remainingText->textNode(); > + } > + return RenderText::nodeForHitTest(); > +} could test !textNode() instead and have one less return paths.
alan
Comment 3 2026-04-07 09:12:35 PDT
alan
Comment 4 2026-04-07 12:01:51 PDT
Created attachment 478955 [details] [fast-cq]Patch
EWS
Comment 5 2026-04-07 12:07:02 PDT
Committed 310730@main (ff9a8d3fa6f2): <https://commits.webkit.org/310730@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 478955 [details].
Radar WebKit Bug Importer
Comment 6 2026-04-07 12:08:12 PDT
Note You need to log in before you can comment on or make changes to this bug.