Repro steps: Launch Safari (WK2) Nevigate to www.devour.com and start playing a video. Tap and hold inside the video element. Expected No crash and no selection. Actual Attempt to perform block selection and crash.  <rdar://problem/16294534>
Created attachment 226440 [details] Patch
Created attachment 226454 [details] Patch2
Created attachment 226455 [details] Patch3
Comment on attachment 226455 [details] Patch3 View in context: https://bugs.webkit.org/attachment.cgi?id=226455&action=review > Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:562 > - return range; > + return range->collapsed(ASSERT_NO_EXCEPTION) ? nullptr : range; Is this related? > Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:1492 > + if (isHTMLVideoElement(hitNode) || isHTMLAudioElement(hitNode)) > + return; Let's make this explicit. What about adding a flag "canStartSelection" on InteractionInformationAtPosition? > Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:1684 > - m_assistedNode = node; > if (node->hasTagName(WebCore::HTMLNames::selectTag) || node->hasTagName(WebCore::HTMLNames::inputTag) || node->hasTagName(WebCore::HTMLNames::textareaTag) || node->hasEditableStyle()) { > + m_assistedNode = node; > AssistedNodeInformation information; Should we be able to pause the video from a physical keyboard?
Comment on attachment 226455 [details] Patch3 View in context: https://bugs.webkit.org/attachment.cgi?id=226455&action=review >> Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:562 >> + return range->collapsed(ASSERT_NO_EXCEPTION) ? nullptr : range; > > Is this related? Not strictly to the crash, but it is part of improving the block selection experience. In some cases the created range could be collapsed and we don't want to use it for block selection (since it represents a caret selection). >> Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:1492 >> + return; > > Let's make this explicit. > > What about adding a flag "canStartSelection" on InteractionInformationAtPosition? I'll remove this for this patch. I want to make a separate patch that improves blockselection and excludes large blocks. I'll make it part of it. >> Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:1684 >> AssistedNodeInformation information; > > Should we be able to pause the video from a physical keyboard? I don't know. I will test it. I believe that if this is possible in WebKit1 it is handled at the plugin level.
Comment on attachment 226455 [details] Patch3 Okay then.
Committed revision 165506.