Bug 129690

Summary: [iOS WebKit2]: Next/Prev button in the accessory bar do not work
Product: WebKit Reporter: Enrica Casucci <enrica>
Component: WebKit2Assignee: Enrica Casucci <enrica>
Status: RESOLVED FIXED    
Severity: Normal Keywords: InRadar
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch simon.fraser: review+

Description Enrica Casucci 2014-03-04 11:30:10 PST
This bug track the work required to implement this functionality on iOS.
<rdar://problem/16073569>
Comment 1 Enrica Casucci 2014-03-04 11:34:08 PST
Created attachment 225796 [details]
Patch
Comment 2 Simon Fraser (smfr) 2014-03-04 11:42:50 PST
Comment on attachment 225796 [details]
Patch

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

> Source/WebKit2/UIProcess/WebPageProxy.h:483
> +    void nextAssistedNode(bool isForward);

It's not clear if this is a getter or a command. I think it should be focusNextAssistedNode, or moveToNextAssistedNode. It would also be nice if the param were an enum.

> Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:1594
> +static inline bool hasFocusableNode(Node* startNode, Page* page, bool isForward)
> +{
> +    return nextFocusableNode(startNode, page, isForward) != nil;
> +}
> +
> +void WebPage::nextAssistedNode(bool isForward)
> +{
> +    Node* nextNode = nextFocusableNode(m_assistedNode.get(), m_page.get(), isForward);
> +    if (nextNode)
> +        toElement(nextNode)->focus();
> +}

I think all these Node* should really be Element* (but should be fixed in a subsequent patch)
Comment 3 Enrica Casucci 2014-03-04 14:47:24 PST
Committed revision 165081.