Title: [251858] trunk/Tools
- Revision
- 251858
- Author
- [email protected]
- Date
- 2019-10-31 10:39:51 -0700 (Thu, 31 Oct 2019)
Log Message
[iOS] imported/mozilla/svg/text/textpath-selection.svg is still flaky
https://bugs.webkit.org/show_bug.cgi?id=203659
<rdar://problem/52124292>
Reviewed by Tim Horton.
This test still fails in some internal test runner configurations, because the iOS text selection grabber dots
sometimes show up in the actual result and not in the expectation. This still happens even after suppressing
UITextSelectionView during ref test snapshotting in r251526, since the selection grabber dots are embedded as
subviews of the text interaction container view, rather than UITextSelectionView itself, so hiding
UITextSelectionView does not affect the visibility of these grabber views (UITextRangeView's -startGrabber and
-endGrabber).
To address this, we augment the change made in r251526 to apply to the start and end grabber views as well.
* WebKitTestRunner/ios/PlatformWebViewIOS.mm:
(WTR::PlatformWebView::windowSnapshotImage):
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (251857 => 251858)
--- trunk/Tools/ChangeLog 2019-10-31 17:37:56 UTC (rev 251857)
+++ trunk/Tools/ChangeLog 2019-10-31 17:39:51 UTC (rev 251858)
@@ -1,3 +1,23 @@
+2019-10-30 Wenson Hsieh <[email protected]>
+
+ [iOS] imported/mozilla/svg/text/textpath-selection.svg is still flaky
+ https://bugs.webkit.org/show_bug.cgi?id=203659
+ <rdar://problem/52124292>
+
+ Reviewed by Tim Horton.
+
+ This test still fails in some internal test runner configurations, because the iOS text selection grabber dots
+ sometimes show up in the actual result and not in the expectation. This still happens even after suppressing
+ UITextSelectionView during ref test snapshotting in r251526, since the selection grabber dots are embedded as
+ subviews of the text interaction container view, rather than UITextSelectionView itself, so hiding
+ UITextSelectionView does not affect the visibility of these grabber views (UITextRangeView's -startGrabber and
+ -endGrabber).
+
+ To address this, we augment the change made in r251526 to apply to the start and end grabber views as well.
+
+ * WebKitTestRunner/ios/PlatformWebViewIOS.mm:
+ (WTR::PlatformWebView::windowSnapshotImage):
+
2019-10-31 Alex Christensen <[email protected]>
CMake build should make WebKit framework able to be used by Safari
Modified: trunk/Tools/WebKitTestRunner/ios/PlatformWebViewIOS.mm (251857 => 251858)
--- trunk/Tools/WebKitTestRunner/ios/PlatformWebViewIOS.mm 2019-10-31 17:37:56 UTC (rev 251857)
+++ trunk/Tools/WebKitTestRunner/ios/PlatformWebViewIOS.mm 2019-10-31 17:39:51 UTC (rev 251858)
@@ -37,6 +37,7 @@
#import <pal/spi/cocoa/QuartzCoreSPI.h>
#import <wtf/BlockObjCExceptions.h>
#import <wtf/RetainPtr.h>
+#import <wtf/Vector.h>
#import <wtf/WeakObjCPtr.h>
@interface WKWebView (Details)
@@ -324,13 +325,25 @@
RELEASE_ASSERT(viewSize.width);
RELEASE_ASSERT(viewSize.height);
- BOOL shouldUnhideSelectionView = NO;
- WeakObjCPtr<UIView> selectionView = [platformView() valueForKeyPath:@"_currentContentView.interactionAssistant.selectionView"];
+ UIView *selectionView = [platformView() valueForKeyPath:@"_currentContentView.interactionAssistant.selectionView"];
+ UIView *startGrabberView = [selectionView valueForKeyPath:@"rangeView.startGrabber"];
+ UIView *endGrabberView = [selectionView valueForKeyPath:@"rangeView.endGrabber"];
+ Vector<WeakObjCPtr<UIView>, 3> viewsToUnhide;
if (![selectionView isHidden]) {
- shouldUnhideSelectionView = YES;
[selectionView setHidden:YES];
+ viewsToUnhide.uncheckedAppend(selectionView);
}
+ if (![startGrabberView isHidden]) {
+ [startGrabberView setHidden:YES];
+ viewsToUnhide.uncheckedAppend(startGrabberView);
+ }
+
+ if (![endGrabberView isHidden]) {
+ [endGrabberView setHidden:YES];
+ viewsToUnhide.uncheckedAppend(endGrabberView);
+ }
+
#if HAVE(IOSURFACE)
__block bool isDone = false;
__block RetainPtr<CGImageRef> result;
@@ -371,8 +384,8 @@
auto result = adoptCF(CGImageCreate(bufferWidth, bufferHeight, 8, 32, rowBytes, sRGBSpace, kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host, provider.get(), 0, false, kCGRenderingIntentDefault));
RELEASE_ASSERT(result);
#endif
- if (shouldUnhideSelectionView)
- [selectionView setHidden:NO];
+ for (auto view : viewsToUnhide)
+ [view setHidden:NO];
return result;
END_BLOCK_OBJC_EXCEPTIONS;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes