If the search rect does not contain any editable elements and is wholly contained inside a layer then the search can terminate: there are no editable elements in the rect. Doing so is not only an efficiency win, but reduces the false positive rate of mayContainEditableElementsInRect().
Created attachment 396091 [details] Patch
Created attachment 396092 [details] Patch
Created attachment 396093 [details] Patch
Created attachment 396094 [details] Patch
Comment on attachment 396094 [details] Patch Clearing flags on attachment: 396094 Committed r259889: <https://trac.webkit.org/changeset/259889>
All reviewed patches have been landed. Closing bug.
<rdar://problem/61598356>