Changeset 243496 in webkit
- Timestamp:
- Mar 26, 2019 8:58:36 AM (5 years ago)
- Location:
- trunk/Tools
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r243491 r243496 1 2019-03-25 Alexey Proskuryakov <ap@apple.com> 2 3 Address NSWindow sometimes using WebKitTestRunnerEvent too early 4 https://bugs.webkit.org/show_bug.cgi?id=196211 5 rdar://problem/49110552 6 7 Reviewed by Tim Horton. 8 9 * WebKitTestRunner/TestController.cpp: (WTR::TestController::initialize): 10 Make sure that EventSenderProxy always exists when running tests. We used to create 11 it when resetting before the first test, which is a bit too late. 12 13 * WebKitTestRunner/TestController.h: 14 * WebKitTestRunner/cocoa/TestControllerCocoa.mm: 15 (WTR::TestController::platformCreateWebView): 16 (WTR::TestController::platformCreateOtherPage): 17 (WTR::TestController::finishCreatingPlatformWebView): 18 * WebKitTestRunner/mac/PlatformWebViewMac.mm: 19 (WTR::PlatformWebView::PlatformWebView): 20 Moved some code that made NSWindow use NSEvent during web view creation. We may 21 need to move more if some other case us found, but this is enough for now. 22 1 23 2019-03-26 Carlos Garcia Campos <cgarcia@igalia.com> 2 24 -
trunk/Tools/WebKitTestRunner/TestController.cpp
r243482 r243496 459 459 WKRetainPtr<WKStringRef> pageGroupIdentifier(AdoptWK, WKStringCreateWithUTF8CString("WebKitTestRunnerPageGroup")); 460 460 m_pageGroup.adopt(WKPageGroupCreateWithIdentifier(pageGroupIdentifier.get())); 461 462 m_eventSenderProxy = std::make_unique<EventSenderProxy>(this); 461 463 } 462 464 -
trunk/Tools/WebKitTestRunner/TestController.h
r243181 r243496 454 454 static void runModal(PlatformWebView*); 455 455 456 #if PLATFORM(COCOA) 457 static void finishCreatingPlatformWebView(PlatformWebView*, const TestOptions&); 458 #endif 459 456 460 static const char* libraryPathForTesting(); 457 461 static const char* platformLibraryPathForTesting(); -
trunk/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm
r242727 r243496 167 167 168 168 m_mainWebView = std::make_unique<PlatformWebView>(copiedConfiguration.get(), options); 169 finishCreatingPlatformWebView(m_mainWebView.get(), options); 169 170 170 171 if (options.punchOutWhiteBackgroundsInDarkMode) … … 179 180 WKWebViewConfiguration *newConfiguration = [[globalWebViewConfiguration copy] autorelease]; 180 181 newConfiguration._relatedWebView = static_cast<WKWebView*>(parentView->platformView()); 181 return new PlatformWebView(newConfiguration, options); 182 PlatformWebView* view = new PlatformWebView(newConfiguration, options); 183 finishCreatingPlatformWebView(view, options); 184 return view; 185 } 186 187 // Code that needs to run after TestController::m_mainWebView is initialized goes into this function. 188 void TestController::finishCreatingPlatformWebView(PlatformWebView* view, const TestOptions& options) 189 { 190 #if PLATFORM(MAC) 191 if (options.shouldShowWebView) 192 [view->platformWindow() orderFront:nil]; 193 else 194 [view->platformWindow() orderBack:nil]; 195 #endif 182 196 } 183 197 -
trunk/Tools/WebKitTestRunner/mac/PlatformWebViewMac.mm
r242339 r243496 81 81 [m_window setCollectionBehavior:NSWindowCollectionBehaviorStationary]; 82 82 [[m_window contentView] addSubview:m_view]; 83 if (m_options.shouldShowWebView)84 [m_window orderFront:nil];85 else86 [m_window orderBack:nil];87 83 [m_window setReleasedWhenClosed:NO]; 88 84 }
Note: See TracChangeset
for help on using the changeset viewer.