Bug 125667 - WK2: Add support for inline candidates on iOS
Summary: WK2: Add support for inline candidates on iOS
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Macintosh Unspecified
: P2 Normal
Assignee: Enrica Casucci
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-12 16:40 PST by Enrica Casucci
Modified: 2013-12-13 14:08 PST (History)
1 user (show)

See Also:


Attachments
Patch (16.14 KB, patch)
2013-12-12 16:51 PST, Enrica Casucci
benjamin: review+
Details | Formatted Diff | Diff

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