Changeset 238380 in webkit
- Timestamp:
- Nov 19, 2018 1:37:00 PM (5 years ago)
- Location:
- trunk/Tools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r238374 r238380 1 2018-11-19 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 [iOS Debug] Assertion failure in NSComparisonResult UIContentSizeCategoryCompareToCategory() 4 https://bugs.webkit.org/show_bug.cgi?id=190401 5 <rdar://problem/45195285> 6 7 Reviewed by Dean Jackson. 8 9 Work around sporadic UIKit assertions when running API tests that may present a UICalloutBar. Currently, UIKit 10 asks for the `UIApp`’s `-preferredContentSizeCategory` when showing or laying out the callout bar. However, 11 TestWebKitAPI lacks a UIApp altogether, and forcing one to be initialized via `UIApplicationInstantiateSingleton` 12 causes numerous other UIKit and WebKit assertions to be hit. 13 14 In lieu of TestWebKitAPI becoming a real UI application (see https://webkit.org/b/175204), simply don't allow 15 the callout bar to be initialized in TestWKWebView-based API tests. This encompasses all API tests which 16 have some chance of causing the callout bar to be shown by making a ranged text selections during the test. 17 18 * TestWebKitAPI/cocoa/TestWKWebView.mm: 19 (suppressUICalloutBar): 20 (-[TestWKWebView initWithFrame:configuration:addToWindow:]): 21 * TestWebKitAPI/ios/UIKitSPI.h: 22 1 23 2018-11-19 Fujii Hironori <Hironori.Fujii@sony.com> 2 24 -
trunk/Tools/TestWebKitAPI/cocoa/TestWKWebView.mm
r238188 r238380 29 29 #if WK_API_ENABLED 30 30 31 #import "ClassMethodSwizzler.h" 31 32 #import "TestNavigationDelegate.h" 32 33 #import "Utilities.h" … … 186 187 RetainPtr<TestWKWebViewHostWindow> _hostWindow; 187 188 RetainPtr<TestMessageHandler> _testHandler; 189 #if PLATFORM(IOS_FAMILY) 190 std::unique_ptr<TestWebKitAPI::ClassMethodSwizzler> _sharedCalloutBarSwizzler; 191 #endif 188 192 } 189 193 … … 198 202 return [self initWithFrame:frame configuration:configuration addToWindow:YES]; 199 203 } 204 205 #if PLATFORM(IOS_FAMILY) 206 207 static UICalloutBar *suppressUICalloutBar() 208 { 209 return nil; 210 } 211 212 #endif 200 213 201 214 - (instancetype)initWithFrame:(CGRect)frame configuration:(WKWebViewConfiguration *)configuration addToWindow:(BOOL)addToWindow … … 207 220 if (addToWindow) 208 221 [self _setUpTestWindow:frame]; 222 223 #if PLATFORM(IOS_FAMILY) 224 // FIXME: Remove this workaround once <https://webkit.org/b/175204> is fixed. 225 _sharedCalloutBarSwizzler = std::make_unique<TestWebKitAPI::ClassMethodSwizzler>([UICalloutBar class], @selector(sharedCalloutBar), reinterpret_cast<IMP>(suppressUICalloutBar)); 226 #endif 209 227 210 228 return self; -
trunk/Tools/TestWebKitAPI/ios/UIKitSPI.h
r238360 r238380 31 31 32 32 #import <UIKit/UIApplication_Private.h> 33 #import <UIKit/UICalloutBar.h> 33 34 #import <UIKit/UIKeyboard_Private.h> 34 35 #import <UIKit/UIResponder_Private.h> … … 98 99 @end 99 100 101 @interface UICalloutBar : UIView 102 + (UICalloutBar *)sharedCalloutBar; 103 @end 104 100 105 #if ENABLE(DRAG_SUPPORT) 101 106 @protocol UIDragInteractionDelegate_Proposed_SPI_33146803 <UIDragInteractionDelegate>
Note: See TracChangeset
for help on using the changeset viewer.