Bug 125667

Summary: WK2: Add support for inline candidates on iOS
Product: WebKit Reporter: Enrica Casucci <enrica>
Component: WebKit2Assignee: Enrica Casucci <enrica>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: Unspecified   
Attachments:
Description Flags
Patch benjamin: review+

Description Enrica Casucci 2013-12-12 16:40:39 PST
We need to support the equivalent of input methods on iOS using WebKit2
Comment 1 Enrica Casucci 2013-12-12 16:51:22 PST
Created attachment 219135 [details]
Patch
Comment 2 Benjamin Poulain 2013-12-12 17:36:27 PST
Comment on attachment 219135 [details]
Patch

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

> Source/WebKit2/UIProcess/WebPageProxy.h:1124
> +    void revealSelection();

What about renaming this to notifyRevealedSelection, and renaming WebChromeClient::notifyRevealedSelectionByScrollingFrame to WebChromeClient::notifyRevealedSelection()?

> Source/WebKit2/UIProcess/API/ios/WKInteractionView.mm:1413
> +    _markedText = (_page->editorState().hasComposition) ? _page->editorState().markedText : String();

String() -> nil?

> Source/WebKit2/WebProcess/WebPage/WebPage.cpp:634
> +            result.lastMarkedRect = compositionRects[compositionRects.size() - 1].rect();

I think you can just use compositionRects.last().rect() here.
Comment 3 Enrica Casucci 2013-12-13 11:46:35 PST
(In reply to comment #2)
Thanks for the review.
> (From update of attachment 219135 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=219135&action=review
> 
> > Source/WebKit2/UIProcess/WebPageProxy.h:1124
> > +    void revealSelection();
> 
> What about renaming this to notifyRevealedSelection, and renaming WebChromeClient::notifyRevealedSelectionByScrollingFrame to WebChromeClient::notifyRevealedSelection()?
Yes, I'll do that.
> 
> > Source/WebKit2/UIProcess/API/ios/WKInteractionView.mm:1413
> > +    _markedText = (_page->editorState().hasComposition) ? _page->editorState().markedText : String();
> 
> String() -> nil?
the compiler complains. Not sure I understand why....
> 
> > Source/WebKit2/WebProcess/WebPage/WebPage.cpp:634
> > +            result.lastMarkedRect = compositionRects[compositionRects.size() - 1].rect();
> 
> I think you can just use compositionRects.last().rect() here.
Done.
Comment 4 Enrica Casucci 2013-12-13 11:50:16 PST
Actually I will rename the WebChromeClient method in a later patch.
I also want to remove the WebFrame parameter that is unused in both WebKit2 and WebKit1 implementations.
Comment 5 Enrica Casucci 2013-12-13 14:08:48 PST
Committed revision 160566.