WebKit Bugzilla
Attachment 340147 Details for
Bug 185536
: Cleanup canPerformActionForWebView in relation to the webSelectionAssistant being removed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-185536-20180510165220.patch (text/plain), 3.97 KB, created by
Megan Gardner
on 2018-05-10 16:52:21 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Megan Gardner
Created:
2018-05-10 16:52:21 PDT
Size:
3.97 KB
patch
obsolete
>Index: Source/WebKit/ChangeLog >=================================================================== >--- Source/WebKit/ChangeLog (revision 231676) >+++ Source/WebKit/ChangeLog (working copy) >@@ -1,3 +1,16 @@ >+2018-05-10 Megan Gardner <megan_gardner@apple.com> >+ >+ Cleanup canPerformActionForWebView in relation to the webSelectionAssistant being removed >+ https://bugs.webkit.org/show_bug.cgi?id=185536 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ The _webSelectionAssistant is now always nil, therefor many of these checks are unnecessary. >+ Remove the check for a webSelection and clean up the logic surrounding those checks. >+ >+ * UIProcess/ios/WKContentViewInteraction.mm: >+ (-[WKContentView canPerformActionForWebView:withSender:]): >+ > 2018-05-10 Chris Dumez <cdumez@apple.com> > > [iOS] Release page load process assertion if the screen is locked >Index: Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm >=================================================================== >--- Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (revision 231664) >+++ Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (working copy) >@@ -2209,8 +2209,6 @@ - (BOOL)canPerformAction:(SEL)action wit > > - (BOOL)canPerformActionForWebView:(SEL)action withSender:(id)sender > { >- BOOL hasWebSelection = _webSelectionAssistant && !CGRectIsEmpty(_webSelectionAssistant.get().selectionFrame); >- > if (action == @selector(_arrowKey:)) > return [self isFirstResponder]; > >@@ -2235,11 +2233,11 @@ - (BOOL)canPerformActionForWebView:(SEL) > if (action == @selector(copy:)) { > if (_page->editorState().isInPasswordField) > return NO; >- return hasWebSelection || _page->editorState().selectionIsRange; >+ return _page->editorState().selectionIsRange; > } > > if (action == @selector(_define:)) { >- if (_page->editorState().isInPasswordField || !(hasWebSelection || _page->editorState().selectionIsRange)) >+ if (_page->editorState().isInPasswordField || !_page->editorState().selectionIsRange) > return NO; > > NSUInteger textLength = _page->editorState().postLayoutData().selectedTextLength; >@@ -2266,18 +2264,18 @@ // acceptable, but the interface > return NO; > #endif > >- return hasWebSelection || _page->editorState().selectionIsRange; >+ return _page->editorState().selectionIsRange; > } > > if (action == @selector(_share:)) { >- if (_page->editorState().isInPasswordField || !(hasWebSelection || _page->editorState().selectionIsRange)) >+ if (_page->editorState().isInPasswordField || _page->editorState().selectionIsRange) > return NO; > > return _page->editorState().postLayoutData().selectedTextLength > 0; > } > > if (action == @selector(_addShortcut:)) { >- if (_page->editorState().isInPasswordField || !(hasWebSelection || _page->editorState().selectionIsRange)) >+ if (_page->editorState().isInPasswordField || !_page->editorState().selectionIsRange) > return NO; > > NSString *selectedText = [self selectedText]; >@@ -2311,19 +2309,9 @@ // acceptable, but the interface > } > > if (action == @selector(selectAll:)) { >- if (_page->editorState().selectionIsNone || ![self hasContent]) >- return NO; >- if (!_page->editorState().selectionIsRange) >+ if (!_page->editorState().selectionIsNone && !_page->editorState().selectionIsRange) > return YES; >- // Enable selectAll for non-editable text, where the user can't access >- // this command via long-press to get a caret. >- if (_page->editorState().isContentEditable) >- return NO; >- // Don't attempt selectAll with general web content. >- if (hasWebSelection) >- return NO; >- // FIXME: Only enable if the selection doesn't already span the entire document. >- return YES; >+ return NO; > } > > if (action == @selector(replace:))
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 185536
:
340147
|
340220