Bug 211343

Summary: Page::editableElementsInRect() should return root editable elements
Product: WebKit Reporter: Daniel Bates <dbates>
Component: WebCore Misc.Assignee: Daniel Bates <dbates>
Status: RESOLVED FIXED    
Severity: Normal CC: simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Daniel Bates 2020-05-02 12:58:41 PDT
Consider a page with the following markup:

<body contenteditable='true' style="margin: 0"><div style='width: 200px; height: 200px; background-color: blue'>Hello World</div></body>

In the rect {10, 10, 20, 20} the <div> is hit and is editable, but Page::editableElementsInRect() return 0 elements because the <div> is not a root editable element: it is a child of a root editable element (<body>). For non form controls, Page::editableElementsInRect() is most meaningful if it returns the root editable element for each hit editable element.
Comment 1 Daniel Bates 2020-05-02 13:03:40 PDT
<rdar://problem/60015801>
Comment 2 Daniel Bates 2020-05-02 13:12:55 PDT
Created attachment 398295 [details]
Patch
Comment 3 Daniel Bates 2020-05-02 14:21:23 PDT
Comment on attachment 398295 [details]
Patch

Clearing flags on attachment: 398295

Committed r261054: <https://trac.webkit.org/changeset/261054>
Comment 4 Daniel Bates 2020-05-02 14:21:25 PDT
All reviewed patches have been landed.  Closing bug.