Bug 211343 - Page::editableElementsInRect() should return root editable elements
Summary: Page::editableElementsInRect() should return root editable elements
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Daniel Bates
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-05-02 12:58 PDT by Daniel Bates
Modified: 2020-05-02 14:21 PDT (History)
2 users (show)

See Also:


Attachments
Patch (6.67 KB, patch)
2020-05-02 13:12 PDT, Daniel Bates
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.