Bug 140515

Summary: [WK2] Add support for fully editable WKWebView
Product: WebKit Reporter: Enrica Casucci <enrica>
Component: WebKit2Assignee: Enrica Casucci <enrica>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, sam
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: OS X 10.10   
Attachments:
Description Flags
Patch andersca: review+

Description Enrica Casucci 2015-01-15 15:09:17 PST
This tracks the work required to support in WebKit2 the mode where the WKWebView is fully editable.
Comment 1 Enrica Casucci 2015-01-15 15:24:38 PST
Created attachment 244718 [details]
Patch
Comment 2 Anders Carlsson 2015-01-15 15:29:52 PST
Comment on attachment 244718 [details]
Patch

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

What's up with the WKView.mm changes?

> Source/WebKit2/UIProcess/WebPageProxy.cpp:1403
> +    m_process->send(Messages::WebPage::SetEditable(editable), m_pageID);

I think you can bail if m_process->isValid() is false.

> Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h:85
> +@property (nonatomic, setter=_setEditable:) BOOL _editable;

getter should be _isEditable here. Property should still be _editable.

> Source/WebKit2/WebProcess/WebPage/WebPage.cpp:931
> +        // If the WKWebView is made editable and the selection is empty, set it to something.

I'd just say "page" instead of WKWebView here.
Comment 3 Enrica Casucci 2015-01-15 15:38:48 PST
Thanks for the review. I'll address your comments before landing.
> 
> What's up with the WKView.mm changes?
> 
I noticed that some of the methods listed in the comment had been implemented.
Comment 4 Enrica Casucci 2015-01-15 15:42:20 PST
Committed revision 178536.