WebKit Bugzilla
Attachment 370899 Details for
Bug 198354
: Remove some logic to suppress the text selection assistant during drop
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Tweak API tests
bug-198354-20190529170109.patch (text/plain), 10.00 KB, created by
Wenson Hsieh
on 2019-05-29 17:01:09 PDT
(
hide
)
Description:
Tweak API tests
Filename:
MIME Type:
Creator:
Wenson Hsieh
Created:
2019-05-29 17:01:09 PDT
Size:
10.00 KB
patch
obsolete
>Subversion Revision: 245847 >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 900bbe8f18da4eb8056c2e0bac6d50800c85a7c6..f7a0e5cceea299b59e81f70bd4484aca184e95cb 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,19 @@ >+2019-05-29 Wenson Hsieh <wenson_hsieh@apple.com> >+ >+ Remove some logic to suppress the text selection assistant during drop >+ https://bugs.webkit.org/show_bug.cgi?id=198354 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ This logic was originally added to hide the ranged selection after performing a drop in editable content. >+ However, after r245803, we (1) no longer show the keyboard and/or text selection views when dropping, and (2) >+ the final selection is now a caret, so it's no longer necessary to suppress the selection assistant. >+ >+ * UIProcess/ios/WKContentViewInteraction.h: >+ * UIProcess/ios/WKContentViewInteraction.mm: >+ (-[WKContentView dropInteraction:performDrop:]): >+ (-[WKContentView dropInteraction:concludeDrop:]): >+ > 2019-05-28 Fujii Hironori <Hironori.Fujii@sony.com> > > [WinCairo] REGRESSION(r245186) Crash in NetworkCache::IOChannel::read in http/tests/IndexedDB some tests >diff --git a/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h b/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h >index 08b64d2b1fc505c9d41c02f39372d40c28b603a7..31be4b5d733fa855c6bf68539c4bec9c7c8ff023 100644 >--- a/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h >+++ b/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h >@@ -165,8 +165,7 @@ namespace WebKit { > enum SuppressSelectionAssistantReason : uint8_t { > EditableRootIsTransparentOrFullyClipped = 1 << 0, > FocusedElementIsTooSmall = 1 << 1, >- DropAnimationIsRunning = 1 << 2, >- InteractionIsHappening = 1 << 3 >+ InteractionIsHappening = 1 << 2 > }; > > struct WKSelectionDrawingInfo { >diff --git a/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm b/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm >index 89669dc16f91a574060db195cbe782d222933e78..0d2d62135f1dea74ed4e9c1d8464b3825302f07c 100644 >--- a/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm >+++ b/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm >@@ -6891,9 +6891,7 @@ - (void)dropInteraction:(UIDropInteraction *)interaction performDrop:(id <UIDrop > WebKit::SandboxExtension::HandleArray sandboxExtensionForUpload; > retainedSelf->_page->createSandboxExtensionsIfNeeded(filenames, sandboxExtensionHandle, sandboxExtensionForUpload); > retainedSelf->_page->performDragOperation(capturedDragData, "data interaction pasteboard", WTFMove(sandboxExtensionHandle), WTFMove(sandboxExtensionForUpload)); >- > retainedSelf->_visibleContentViewSnapshot = [retainedSelf snapshotViewAfterScreenUpdates:NO]; >- [retainedSelf _startSuppressingSelectionAssistantForReason:WebKit::DropAnimationIsRunning]; > [UIView performWithoutAnimation:[retainedSelf] { > [retainedSelf->_visibleContentViewSnapshot setFrame:[retainedSelf bounds]]; > [retainedSelf addSubview:retainedSelf->_visibleContentViewSnapshot.get()]; >@@ -6910,7 +6908,6 @@ - (void)dropInteraction:(UIDropInteraction *)interaction item:(UIDragItem *)item > > - (void)dropInteraction:(UIDropInteraction *)interaction concludeDrop:(id <UIDropSession>)session > { >- [self _stopSuppressingSelectionAssistantForReason:WebKit::DropAnimationIsRunning]; > [std::exchange(_visibleContentViewSnapshot, nil) removeFromSuperview]; > [std::exchange(_unselectedContentSnapshot, nil) removeFromSuperview]; > _dragDropInteractionState.clearAllDelayedItemPreviewProviders(); >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index 5cb771224b0e071926c2ed6766563804be0c0cb7..2df18c76d47e9bd5f15ef0713af697cb4bcaa66c 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,19 @@ >+2019-05-29 Wenson Hsieh <wenson_hsieh@apple.com> >+ >+ Remove some logic to suppress the text selection assistant during drop >+ https://bugs.webkit.org/show_bug.cgi?id=198354 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Adjust some API tests that currently check whether or not the selection assistant was suppressed during drop. >+ >+ * TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm: >+ (TestWebKitAPI::TEST): >+ * TestWebKitAPI/cocoa/DragAndDropSimulator.h: >+ * TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm: >+ (-[DragAndDropSimulator _resetSimulatedState]): >+ (-[DragAndDropSimulator _webView:dataInteractionOperationWasHandled:forSession:itemProviders:]): >+ > 2019-05-28 Justin Michaud <justin_michaud@apple.com> > > Attempt to fix JSC test timeouts after adding collectContinuously to WASM tests. >diff --git a/Tools/TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm b/Tools/TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm >index 0876a4b3b242cc6adc7807e63c245eaf54dafbfd..16cbe23f0738bbcd3b87dc819519fb70e6de6e74 100644 >--- a/Tools/TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm >+++ b/Tools/TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm >@@ -370,7 +370,6 @@ TEST(DragAndDropTests, ContentEditableToContentEditable) > loadTestPageAndEnsureInputSession(simulator.get(), @"autofocus-contenteditable"); > [simulator runFrom:CGPointMake(100, 50) to:CGPointMake(100, 300)]; > >- EXPECT_TRUE([simulator suppressedSelectionCommandsDuringDrop]); > EXPECT_EQ([webView stringByEvaluatingJavaScript:@"source.textContent"].length, 0UL); > EXPECT_WK_STREQ("Hello world", [webView stringByEvaluatingJavaScript:@"editor.textContent"].UTF8String); > >@@ -394,7 +393,6 @@ TEST(DragAndDropTests, ContentEditableToTextarea) > loadTestPageAndEnsureInputSession(simulator.get(), @"contenteditable-and-textarea"); > [simulator runFrom:CGPointMake(100, 50) to:CGPointMake(100, 300)]; > >- EXPECT_TRUE([simulator suppressedSelectionCommandsDuringDrop]); > EXPECT_EQ([webView stringByEvaluatingJavaScript:@"source.textContent"].length, 0UL); > EXPECT_WK_STREQ("Hello world", [webView editorValue].UTF8String); > >@@ -455,7 +453,6 @@ TEST(DragAndDropTests, ContentEditableMoveParagraphs) > NSUInteger firstParagraphOffset = [finalTextContent rangeOfString:@"This is the first paragraph"].location; > NSUInteger secondParagraphOffset = [finalTextContent rangeOfString:@"This is the second paragraph"].location; > >- EXPECT_TRUE([simulator suppressedSelectionCommandsDuringDrop]); > EXPECT_FALSE(firstParagraphOffset == NSNotFound); > EXPECT_FALSE(secondParagraphOffset == NSNotFound); > EXPECT_GT(firstParagraphOffset, secondParagraphOffset); >@@ -482,7 +479,6 @@ TEST(DragAndDropTests, TextAreaToInput) > loadTestPageAndEnsureInputSession(simulator.get(), @"textarea-to-input"); > [simulator runFrom:CGPointMake(100, 50) to:CGPointMake(100, 300)]; > >- EXPECT_TRUE([simulator suppressedSelectionCommandsDuringDrop]); > EXPECT_EQ([webView stringByEvaluatingJavaScript:@"source.value"].length, 0UL); > EXPECT_WK_STREQ("Hello world", [webView editorValue].UTF8String); > checkCGRectIsEqualToCGRectWithLogging(CGRectMake(1089, 241, 2, 232), [simulator finalSelectionStartRect]); >@@ -499,8 +495,6 @@ TEST(DragAndDropTests, SinglePlainTextWordTypeIdentifiers) > [webView stringByEvaluatingJavaScript:@"source.selectionEnd = source.value.length"]; > [simulator runFrom:CGPointMake(100, 50) to:CGPointMake(100, 300)]; > >- EXPECT_TRUE([simulator suppressedSelectionCommandsDuringDrop]); >- > NSItemProvider *itemProvider = [simulator sourceItemProviders].firstObject; > NSArray *registeredTypes = [itemProvider registeredTypeIdentifiers]; > EXPECT_EQ(1UL, registeredTypes.count); >@@ -521,8 +515,6 @@ TEST(DragAndDropTests, SinglePlainTextURLTypeIdentifiers) > [webView stringByEvaluatingJavaScript:@"source.selectionEnd = source.value.length"]; > [simulator runFrom:CGPointMake(100, 50) to:CGPointMake(100, 300)]; > >- EXPECT_TRUE([simulator suppressedSelectionCommandsDuringDrop]); >- > NSItemProvider *itemProvider = [simulator sourceItemProviders].firstObject; > NSArray *registeredTypes = [itemProvider registeredTypeIdentifiers]; > EXPECT_EQ(2UL, registeredTypes.count); >diff --git a/Tools/TestWebKitAPI/cocoa/DragAndDropSimulator.h b/Tools/TestWebKitAPI/cocoa/DragAndDropSimulator.h >index 999c118b60e451f8c9cdb6ce6e82e5b57ac1e110..3ad66987eefd20bd6d57fb704ed9dc2b1a2b6a83 100644 >--- a/Tools/TestWebKitAPI/cocoa/DragAndDropSimulator.h >+++ b/Tools/TestWebKitAPI/cocoa/DragAndDropSimulator.h >@@ -113,7 +113,6 @@ typedef NSDictionary<NSNumber *, NSValue *> *ProgressToCGPointValueMap; > @property (nonatomic, readonly) NSArray<UITargetedDragPreview *> *liftPreviews; > @property (nonatomic, readonly) NSArray *dropPreviews; > @property (nonatomic, readonly) NSArray *delayedDropPreviews; >-@property (nonatomic, readonly) BOOL suppressedSelectionCommandsDuringDrop; > > #endif // PLATFORM(IOS_FAMILY) > >diff --git a/Tools/TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm b/Tools/TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm >index f6fb657d3339c620bbef6ca96a7a17287cccb92c..147c36a7f1f25b6fb8f96b7ee8029164ba86a50d 100644 >--- a/Tools/TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm >+++ b/Tools/TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm >@@ -323,7 +323,6 @@ @implementation DragAndDropSimulator { > bool _isDoneWaitingForDelayedDropPreviews; > DragAndDropPhase _phase; > >- BOOL _suppressedSelectionCommandsDuringDrop; > RetainPtr<UIDropProposal> _lastKnownDropProposal; > > BlockPtr<BOOL(_WKActivatedElementInfo *)> _showCustomActionSheetBlock; >@@ -373,7 +372,6 @@ - (void)dealloc > > - (void)_resetSimulatedState > { >- _suppressedSelectionCommandsDuringDrop = NO; > _phase = DragAndDropPhaseBeginning; > _currentProgress = 0; > _isDoneWithCurrentRun = false; >@@ -763,8 +761,6 @@ - (void(^)(BOOL, NSArray *))dropCompletionBlock > > - (void)_webView:(WKWebView *)webView dataInteractionOperationWasHandled:(BOOL)handled forSession:(id)session itemProviders:(NSArray<NSItemProvider *> *)itemProviders > { >- _suppressedSelectionCommandsDuringDrop = [_webView textInputContentView]._shouldSuppressSelectionCommands; >- > if (self.dropCompletionBlock) > self.dropCompletionBlock(handled, itemProviders); >
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 198354
:
370893
| 370899