[Extra zoom mode] Add plumbing for next and previous focusable element rects
authorwenson_hsieh@apple.com <wenson_hsieh@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 26 Mar 2018 19:09:33 +0000 (19:09 +0000)
committerwenson_hsieh@apple.com <wenson_hsieh@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 26 Mar 2018 19:09:33 +0000 (19:09 +0000)
commit16befa21f67cdb1c35fe590dd4b6037159df095f
tree9468cd3d52552feeb1871309a6a6af4125fa1f16
parente5fa5c9845efc7aa5c12b0fe9e1f17b72aebcebd
[Extra zoom mode] Add plumbing for next and previous focusable element rects
https://bugs.webkit.org/show_bug.cgi?id=184016
Work towards <rdar://problem/38758727>

Reviewed by Tim Horton.

When building up AssistedNodeInformation, we currently compute the element rect of the current focused element,
as well as flags indicating whether or not there are next or previous focusable elements. For
<rdar://problem/38758727>, we additionally send the rects of the next or previous focusable elements as well.

* Shared/AssistedNodeInformation.cpp:
(WebKit::AssistedNodeInformation::encode const):
(WebKit::AssistedNodeInformation::decode):

IPC support for nextNodeRect and previousNodeRect.

* Shared/AssistedNodeInformation.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::elementRectInRootViewCoordinates):

Add a helper to compute an element's rect in root view coordinates. We use this to compute the rects of the
current focused element as well as those of the next and previous elements, if any.

(WebKit::WebPage::getAssistedNodeInformation):
(WebKit::hasAssistableElement): Deleted.

Since we need the next or previous focusable element to get its rect, we don't need this helper anymore.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@229982 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/ChangeLog
Source/WebKit/Shared/AssistedNodeInformation.cpp
Source/WebKit/Shared/AssistedNodeInformation.h
Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm