WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
130095
[iOS WebKit2] Crash when trying to select inside a video element with longpress.
https://bugs.webkit.org/show_bug.cgi?id=130095
Summary
[iOS WebKit2] Crash when trying to select inside a video element with longpress.
Enrica Casucci
Reported
2014-03-11 15:55:38 PDT
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
>
Attachments
Patch
(2.73 KB, patch)
2014-03-11 15:59 PDT
,
Enrica Casucci
no flags
Details
Formatted Diff
Diff
Patch2
(3.09 KB, patch)
2014-03-11 18:01 PDT
,
Enrica Casucci
no flags
Details
Formatted Diff
Diff
Patch3
(2.58 KB, patch)
2014-03-11 18:02 PDT
,
Enrica Casucci
benjamin
: review+
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Enrica Casucci
Comment 1
2014-03-11 15:59:52 PDT
Created
attachment 226440
[details]
Patch
Enrica Casucci
Comment 2
2014-03-11 18:01:03 PDT
Created
attachment 226454
[details]
Patch2
Enrica Casucci
Comment 3
2014-03-11 18:02:49 PDT
Created
attachment 226455
[details]
Patch3
Benjamin Poulain
Comment 4
2014-03-11 18:35:42 PDT
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?
Enrica Casucci
Comment 5
2014-03-12 09:59:25 PDT
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.
Benjamin Poulain
Comment 6
2014-03-12 13:33:38 PDT
Comment on
attachment 226455
[details]
Patch3 Okay then.
Enrica Casucci
Comment 7
2014-03-12 16:24:22 PDT
Committed revision 165506.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug