Bug 140515 - [WK2] Add support for fully editable WKWebView
Summary: [WK2] Add support for fully editable WKWebView
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified OS X 10.10
: P2 Normal
Assignee: Enrica Casucci
Depends on:
Reported: 2015-01-15 15:09 PST by Enrica Casucci
Modified: 2015-01-15 15:42 PST (History)
2 users (show)

See Also:

Patch (9.30 KB, patch)
2015-01-15 15:24 PST, Enrica Casucci
andersca: 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 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]
Comment 2 Anders Carlsson 2015-01-15 15:29:52 PST
Comment on attachment 244718 [details]

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.