UI process crash when focusing an editable image
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 19 Dec 2018 23:37:02 +0000 (23:37 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 19 Dec 2018 23:37:02 +0000 (23:37 +0000)
commit19807d91cc489768aed0ca1a3516d2e6d299b864
tree82eedf5eab697214eca0937e4da40a303a5b5c70
parenta3ad0bef831937958c643cce9162b930d1a5d9dd
UI process crash when focusing an editable image
https://bugs.webkit.org/show_bug.cgi?id=192839
<rdar://problem/46786670>

Reviewed by Wenson Hsieh.

Source/WebKit:

* SourcesCocoa.txt:
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _requiresKeyboardWhenFirstResponder]):
(-[WKContentView inputView]):
(-[WKContentView requiresAccessoryView]):
(-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):
(-[WKContentView _stopAssistingNode]):
(-[WKContentView _installInkPickerForDrawingViewWithID:]):
(-[WKContentView _uninstallInkPicker]):
* UIProcess/ios/WKInkPickerView.h: Renamed from Source/WebKit/UIProcess/ios/WKInkPickerControl.h.
* UIProcess/ios/WKInkPickerView.mm: Renamed from Source/WebKit/UIProcess/ios/WKInkPickerControl.mm.
(-[WKInkPickerView initWithDrawingView:]):
(-[WKInkPickerView didPickInk]):
(-[WKInkPickerView inlineInkPickerDidToggleRuler:]):
(-[WKInkPickerView inlineInkPicker:didSelectTool:]):
(-[WKInkPickerView inlineInkPicker:didSelectColor:]):
(-[WKInkPickerView inkPickerSize]):
(-[WKInkPickerView layoutSubviews]):
(-[WKInkPickerView sizeThatFits:]):
(-[WKInkPickerView viewControllerForPopoverPresentationFromInlineInkPicker:]):
* WebKit.xcodeproj/project.pbxproj:
Make WKInkPickerView a WKWebView subview instead of an inputView.
Also, don't force the keyboard to be visible when an editable image is focused.

LayoutTests:

* editing/images/basic-editable-image-with-gesture.html: Added.
* editing/images/basic-editable-image-with-gesture-expected.txt: Added.
* resources/ui-helper.js:
(window.UIHelper.stylusTapAt.return.new.Promise):
(window.UIHelper.stylusTapAt):
Add a test that ensures that adding an editable image from a gesture
doesn't crash, and can be drawn on.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239400 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/editing/images/basic-editable-image-with-gesture-expected.txt [new file with mode: 0644]
LayoutTests/editing/images/basic-editable-image-with-gesture.html [new file with mode: 0644]
LayoutTests/resources/ui-helper.js
Source/WebKit/ChangeLog
Source/WebKit/SourcesCocoa.txt
Source/WebKit/UIProcess/ios/WKContentViewInteraction.h
Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
Source/WebKit/UIProcess/ios/WKInkPickerView.h [moved from Source/WebKit/UIProcess/ios/WKInkPickerControl.h with 85% similarity]
Source/WebKit/UIProcess/ios/WKInkPickerView.mm [moved from Source/WebKit/UIProcess/ios/WKInkPickerControl.mm with 82% similarity]
Source/WebKit/WebKit.xcodeproj/project.pbxproj