Changeset 179639 in webkit
- Timestamp:
- Feb 4, 2015 2:53:13 PM (9 years ago)
- Location:
- trunk/Tools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r179637 r179639 1 2015-02-04 Simon Fraser <simon.fraser@apple.com> 2 3 WKTR should not use -mainScreen to pick a color profile 4 https://bugs.webkit.org/show_bug.cgi?id=141265 5 6 Reviewed by Tim Horton. 7 8 -[NSScreen mainScreen] depends on the active window, so use the first screen 9 (which is the one we put the window on anyway). 10 11 Do some cleanup in DRT that makes the code look similar. 12 13 * DumpRenderTree/mac/DumpRenderTree.mm: 14 (createWebViewAndOffscreenWindow): 15 * WebKitTestRunner/mac/PlatformWebViewMac.mm: 16 (WTR::PlatformWebView::PlatformWebView): 17 1 18 2015-02-04 Simon Fraser <simon.fraser@apple.com> 2 19 -
trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm
r179450 r179639 705 705 // To make things like certain NSViews, dragging, and plug-ins work, put the WebView a window, but put it off-screen so you don't see it. 706 706 // Put it at -10000, -10000 in "flipped coordinates", since WebCore and the DOM use flipped coordinates. 707 NSRect windowRect = NSOffsetRect(rect, -10000, [(NSScreen *)[[NSScreen screens] objectAtIndex:0] frame].size.height - rect.size.height + 10000); 707 NSScreen *firstScreen = [[NSScreen screens] firstObject]; 708 NSRect windowRect = NSOffsetRect(rect, -10000, [firstScreen frame].size.height - rect.size.height + 10000); 708 709 DumpRenderTreeWindow *window = [[DumpRenderTreeWindow alloc] initWithContentRect:windowRect styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:YES]; 709 710 710 [window setColorSpace:[ [[NSScreen screens] objectAtIndex:0]colorSpace]];711 [window setColorSpace:[firstScreen colorSpace]]; 711 712 [window setCollectionBehavior:NSWindowCollectionBehaviorStationary]; 712 713 [[window contentView] addSubview:webView]; -
trunk/Tools/WebKitTestRunner/mac/PlatformWebViewMac.mm
r178146 r179639 142 142 [m_view setWindowOcclusionDetectionEnabled:NO]; 143 143 144 NSRect windowRect = NSOffsetRect(rect, -10000, [(NSScreen *)[[NSScreen screens] objectAtIndex:0] frame].size.height - rect.size.height + 10000); 144 NSScreen *firstScreen = [[NSScreen screens] objectAtIndex:0]; 145 NSRect windowRect = NSOffsetRect(rect, -10000, [firstScreen frame].size.height - rect.size.height + 10000); 145 146 m_window = [[WebKitTestRunnerWindow alloc] initWithContentRect:windowRect styleMask:NSBorderlessWindowMask backing:(NSBackingStoreType)_NSBackingStoreUnbuffered defer:YES]; 146 147 m_window.platformWebView = this; 147 [m_window setColorSpace:[ [NSScreen mainScreen]colorSpace]];148 [m_window setColorSpace:[firstScreen colorSpace]]; 148 149 [m_window setCollectionBehavior:NSWindowCollectionBehaviorStationary]; 149 150 [[m_window contentView] addSubview:m_view];
Note: See TracChangeset
for help on using the changeset viewer.