Skip to content

Commit

Permalink
Conform to new selectionClipRect method in UIAsyncTextInput
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=264551
rdar://118217775

Reviewed by Wenson Hsieh.

Continuing adoption of more parts of the UIAsyncTextInput protocol

* Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _selectionClipRectInternal]):
(-[WKContentView _selectionClipRect]):
(-[WKContentView selectionClipRect]):

Canonical link: https://commits.webkit.org/270544@main
  • Loading branch information
megangardner committed Nov 10, 2023
1 parent ac0c2a6 commit ac9787d
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
Original file line number Diff line number Diff line change
Expand Up @@ -2611,7 +2611,7 @@ - (UIView *)inputViewForWebView
return [_inputPeripheral assistantView];
}

- (CGRect)_selectionClipRect
- (CGRect)_selectionClipRectInternal
{
if (_page->waitingForPostLayoutEditorStateUpdateAfterFocusingElement())
return _focusedElementInformation.interactionRect;
Expand All @@ -2622,6 +2622,12 @@ - (CGRect)_selectionClipRect
return CGRectNull;
}

- (CGRect)_selectionClipRect
{
RELEASE_ASSERT_ASYNC_TEXT_INTERACTIONS_DISABLED();
return [self _selectionClipRectInternal];
}

static BOOL isBuiltInScrollViewPanGestureRecognizer(UIGestureRecognizer *recognizer)
{
static Class scrollViewPanGestureClass;
Expand Down Expand Up @@ -12088,6 +12094,11 @@ - (void)selectTextForContextMenuWithLocationInView:(CGPoint)locationInView compl

#endif // ENABLE(REVEAL)

- (CGRect)selectionClipRect
{
return [self _selectionClipRectInternal];
}

#endif // HAVE(UI_ASYNC_TEXT_INTERACTION)

@end
Expand Down

0 comments on commit ac9787d

Please sign in to comment.