Bug 210778

Summary: EventHandler::selectCursor() has broken resize over coordinate conversion code
Product: WebKit Reporter: Simon Fraser (smfr) <simon.fraser>
Component: UI EventsAssignee: Simon Fraser (smfr) <simon.fraser>
Severity: Normal CC: esprehn+autocc, ews-watchlist, fred.wang, glenn, gyuyoung.kim, kondapallykalyan, mitz, pdr, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=101857
Description Flags
zalan: review+
Patch none

Description Simon Fraser (smfr) 2020-04-20 19:46:49 PDT
This looks really wrong, and is broken:

                if (FrameView* view = m_frame.view())
                    inResizer = layer->isPointInResizeControl(view->windowToContents(roundedIntPoint(result.localPoint())));

Why windowToContents() on the localPoint from a HitTestResult?
Comment 1 Simon Fraser (smfr) 2020-04-20 21:19:39 PDT
This is apparent in this very textfield, where you get the iBeam cursor over the resizer.
Comment 2 Simon Fraser (smfr) 2020-04-23 11:51:50 PDT
Weirdly result.localPoint() is not local when set by RenderBlock::updateHitTestResult()
Comment 3 Radar WebKit Bug Importer 2020-04-23 13:45:18 PDT
Comment 4 Simon Fraser (smfr) 2020-04-23 15:20:45 PDT
Created attachment 397390 [details]
Comment 5 Simon Fraser (smfr) 2020-04-23 15:21:02 PDT
*** Bug 156234 has been marked as a duplicate of this bug. ***
Comment 6 zalan 2020-04-23 15:25:41 PDT
Comment on attachment 397390 [details]

View in context: https://bugs.webkit.org/attachment.cgi?id=397390&action=review

> Source/WebCore/page/EventHandler.cpp:1546
> +            // FIXME: With right right-aligned text in a box, the renderer here is usually a RenderText, which prevents showing the resize cursor: webkit.org/b/210935.

too many rights.

> Source/WebCore/page/EventHandler.cpp:1547
> +            if (auto layer = downcast<RenderLayerModelObject>(*renderer).layer()) {

not sure what the WebKit style at this point, but I'd prefer auto* layer =
Comment 7 zalan 2020-04-23 15:26:23 PDT
> not sure what the WebKit style at this point, but I'd prefer auto* layer =
what the WebKit style is even
Comment 8 Simon Fraser (smfr) 2020-04-23 15:29:44 PDT
Created attachment 397392 [details]
Comment 9 EWS 2020-04-23 18:08:52 PDT
Committed r260615: <https://trac.webkit.org/changeset/260615>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 397392 [details].