Skip to content

Commit

Permalink
Unreviewed, fix the internal tvOS build after 270746@main
Browse files Browse the repository at this point in the history
Move the declaration of `-_internalAdjustSelectionWithOffset:lengthDelta:completionHandler` out of
the `HAVE(UI_WK_DOCUMENT_CONTEXT)` compile-time guard, so that it can be called on tvOS as well.
This method doesn't actually depend on `HAVE(UI_WK_DOCUMENT_CONTEXT)` at all, so it can be used in
the `HAVE(UI_ASYNC_TEXT_INTERACTION)` section. Note that this method doesn't actually depend on
`UIWKDocumentContext` at all.

* Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _internalAdjustSelectionWithOffset:lengthDelta:completionHandler:]):
(-[WKContentView adjustSelectionWithDelta:completionHandler:]):

Canonical link: https://commits.webkit.org/270790@main
  • Loading branch information
whsieh committed Nov 15, 2023
1 parent 7068fc9 commit 4c7d687
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
Original file line number Diff line number Diff line change
Expand Up @@ -10037,13 +10037,6 @@ - (void)_removeContextMenuHintContainerIfPossible
return webRequest;
}

- (void)_internalAdjustSelectionWithOffset:(NSInteger)offset lengthDelta:(NSInteger)lengthDelta completionHandler:(void (^)(void))completionHandler
{
_page->updateSelectionWithDelta(offset, lengthDelta, [capturedCompletionHandler = makeBlockPtr(completionHandler)] {
capturedCompletionHandler();
});
}

- (void)adjustSelectionWithDelta:(NSRange)deltaRange completionHandler:(void (^)(void))completionHandler
{
RELEASE_ASSERT_ASYNC_TEXT_INTERACTIONS_DISABLED();
Expand Down Expand Up @@ -10073,7 +10066,14 @@ - (void)selectPositionAtPoint:(CGPoint)point withContextRequest:(UIWKDocumentReq
}];
}

#endif
#endif // HAVE(UI_WK_DOCUMENT_CONTEXT)

- (void)_internalAdjustSelectionWithOffset:(NSInteger)offset lengthDelta:(NSInteger)lengthDelta completionHandler:(void (^)(void))completionHandler
{
_page->updateSelectionWithDelta(offset, lengthDelta, [capturedCompletionHandler = makeBlockPtr(completionHandler)] {
capturedCompletionHandler();
});
}

- (void)insertTextPlaceholderWithSize:(CGSize)size completionHandler:(void (^)(UITextPlaceholder *))completionHandler
{
Expand Down

0 comments on commit 4c7d687

Please sign in to comment.