Changeset 251858 in webkit


Ignore:
Timestamp:
Oct 31, 2019 10:39:51 AM (4 years ago)
Author:
Wenson Hsieh
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):

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r251855 r251858  
     12019-10-30  Wenson Hsieh  <wenson_hsieh@apple.com>
     2
     3        [iOS] imported/mozilla/svg/text/textpath-selection.svg is still flaky
     4        https://bugs.webkit.org/show_bug.cgi?id=203659
     5        <rdar://problem/52124292>
     6
     7        Reviewed by Tim Horton.
     8
     9        This test still fails in some internal test runner configurations, because the iOS text selection grabber dots
     10        sometimes show up in the actual result and not in the expectation. This still happens even after suppressing
     11        UITextSelectionView during ref test snapshotting in r251526, since the selection grabber dots are embedded as
     12        subviews of the text interaction container view, rather than UITextSelectionView itself, so hiding
     13        UITextSelectionView does not affect the visibility of these grabber views (UITextRangeView's -startGrabber and
     14        -endGrabber).
     15
     16        To address this, we augment the change made in r251526 to apply to the start and end grabber views as well.
     17
     18        * WebKitTestRunner/ios/PlatformWebViewIOS.mm:
     19        (WTR::PlatformWebView::windowSnapshotImage):
     20
    1212019-10-31  Alex Christensen  <achristensen@webkit.org>
    222
  • trunk/Tools/WebKitTestRunner/ios/PlatformWebViewIOS.mm

    r251526 r251858  
    3838#import <wtf/BlockObjCExceptions.h>
    3939#import <wtf/RetainPtr.h>
     40#import <wtf/Vector.h>
    4041#import <wtf/WeakObjCPtr.h>
    4142
     
    325326    RELEASE_ASSERT(viewSize.height);
    326327
    327     BOOL shouldUnhideSelectionView = NO;
    328     WeakObjCPtr<UIView> selectionView = [platformView() valueForKeyPath:@"_currentContentView.interactionAssistant.selectionView"];
     328    UIView *selectionView = [platformView() valueForKeyPath:@"_currentContentView.interactionAssistant.selectionView"];
     329    UIView *startGrabberView = [selectionView valueForKeyPath:@"rangeView.startGrabber"];
     330    UIView *endGrabberView = [selectionView valueForKeyPath:@"rangeView.endGrabber"];
     331    Vector<WeakObjCPtr<UIView>, 3> viewsToUnhide;
    329332    if (![selectionView isHidden]) {
    330         shouldUnhideSelectionView = YES;
    331333        [selectionView setHidden:YES];
     334        viewsToUnhide.uncheckedAppend(selectionView);
     335    }
     336
     337    if (![startGrabberView isHidden]) {
     338        [startGrabberView setHidden:YES];
     339        viewsToUnhide.uncheckedAppend(startGrabberView);
     340    }
     341
     342    if (![endGrabberView isHidden]) {
     343        [endGrabberView setHidden:YES];
     344        viewsToUnhide.uncheckedAppend(endGrabberView);
    332345    }
    333346
     
    372385    RELEASE_ASSERT(result);
    373386#endif
    374     if (shouldUnhideSelectionView)
    375         [selectionView setHidden:NO];
     387    for (auto view : viewsToUnhide)
     388        [view setHidden:NO];
    376389
    377390    return result;
Note: See TracChangeset for help on using the changeset viewer.