Changeset 240010 in webkit
- Timestamp:
- Jan 15, 2019 2:53:39 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 21 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/PAL/ChangeLog
r239948 r240010 1 2019-01-15 Tim Horton <timothy_horton@apple.com> 2 3 Cannot tab out of WKWebView on macOS 4 https://bugs.webkit.org/show_bug.cgi?id=161448 5 <rdar://problem/28100085> 6 7 Reviewed by Dean Jackson. 8 9 * pal/spi/mac/NSViewSPI.h: 10 * pal/spi/mac/NSWindowSPI.h: 11 Move some SPI declarations in here from WebKitLegacy. 12 1 13 2019-01-14 Commit Queue <commit-queue@webkit.org> 2 14 -
trunk/Source/WebCore/PAL/pal/spi/mac/NSViewSPI.h
r220979 r240010 29 29 30 30 @interface NSView () <CALayerDelegate> 31 32 - (NSView *)_findLastViewInKeyViewLoop; 33 31 34 @end 32 35 -
trunk/Source/WebCore/PAL/pal/spi/mac/NSWindowSPI.h
r236846 r240010 38 38 @interface NSWindow () 39 39 40 - (id)_oldFirstResponderBeforeBecoming; 40 41 - (id)_newFirstResponderAfterResigning; 41 42 - (void)_setCursorForMouseLocation:(NSPoint)point; -
trunk/Source/WebKit/ChangeLog
r240009 r240010 1 2019-01-15 Tim Horton <timothy_horton@apple.com> 2 3 Cannot tab out of WKWebView on macOS 4 https://bugs.webkit.org/show_bug.cgi?id=161448 5 <rdar://problem/28100085> 6 7 Reviewed by Dean Jackson. 8 9 * UIProcess/WebPageProxy.cpp: 10 (WebKit::WebPageProxy::takeFocus): 11 If the UIDelegate doesn't implement takeFocus, provide a simple default 12 implementation that just uses AppKit's key view loop to move the focus. 13 14 * UIProcess/API/APIUIClient.h: 15 (API::UIClient::takeFocus): 16 * UIProcess/API/C/WKPage.cpp: 17 (WKPageSetPageUIClient): 18 * UIProcess/Cocoa/UIDelegate.h: 19 * UIProcess/Cocoa/UIDelegate.mm: 20 (WebKit::UIDelegate::UIClient::takeFocus): 21 Make API::UIClient's takeFocus return a bool indicating whether the 22 client implements it or not. 23 24 * UIProcess/PageClient.h: 25 * UIProcess/mac/PageClientImplMac.h: 26 * UIProcess/mac/PageClientImplMac.mm: 27 (WebKit::PageClientImpl::takeFocus): 28 Plumb takeFocus to WebViewImpl. 29 30 * UIProcess/Cocoa/WebViewImpl.h: 31 * UIProcess/Cocoa/WebViewImpl.mm: 32 (WebKit::WebViewImpl::takeFocus): 33 Borrow the relevant portion of WebKitLegacy's implementation of takeFocus, 34 shifting focus to the next/previous key view in the window. 35 1 36 2019-01-15 Youenn Fablet <youenn@apple.com> 2 37 -
trunk/Source/WebKit/UIProcess/API/APIUIClient.h
r239134 r240010 82 82 virtual void close(WebKit::WebPageProxy*) { } 83 83 84 virtual void takeFocus(WebKit::WebPageProxy*, WKFocusDirection) {}84 virtual bool takeFocus(WebKit::WebPageProxy*, WKFocusDirection) { return false; } 85 85 virtual void focus(WebKit::WebPageProxy*) { } 86 86 virtual void unfocus(WebKit::WebPageProxy*) { } -
trunk/Source/WebKit/UIProcess/API/C/WKPage.cpp
r239840 r240010 1554 1554 } 1555 1555 1556 voidtakeFocus(WebPageProxy* page, WKFocusDirection direction) final1556 bool takeFocus(WebPageProxy* page, WKFocusDirection direction) final 1557 1557 { 1558 1558 if (!m_client.takeFocus) 1559 return ;1559 return false; 1560 1560 1561 1561 m_client.takeFocus(toAPI(page), direction, m_client.base.clientInfo); 1562 return true; 1562 1563 } 1563 1564 -
trunk/Source/WebKit/UIProcess/Cocoa/UIDelegate.h
r239134 r240010 96 96 void reachedApplicationCacheOriginQuota(WebPageProxy*, const WebCore::SecurityOrigin&, uint64_t currentQuota, uint64_t totalBytesNeeded, Function<void(unsigned long long)>&& completionHandler) final; 97 97 void didResignInputElementStrongPasswordAppearance(WebPageProxy&, API::Object*) final; 98 voidtakeFocus(WebPageProxy*, WKFocusDirection) final;98 bool takeFocus(WebPageProxy*, WKFocusDirection) final; 99 99 #if PLATFORM(MAC) 100 100 void showPage(WebPageProxy*) final; -
trunk/Source/WebKit/UIProcess/Cocoa/UIDelegate.mm
r239625 r240010 467 467 } 468 468 469 voidUIDelegate::UIClient::takeFocus(WebPageProxy*, WKFocusDirection direction)469 bool UIDelegate::UIClient::takeFocus(WebPageProxy*, WKFocusDirection direction) 470 470 { 471 471 if (!m_uiDelegate.m_delegateMethods.webViewTakeFocus) 472 return ;473 474 auto delegate = m_uiDelegate.m_delegate.get(); 475 if (!delegate) 476 return ;472 return false; 473 474 auto delegate = m_uiDelegate.m_delegate.get(); 475 if (!delegate) 476 return false; 477 477 478 478 [(id <WKUIDelegatePrivate>)delegate _webView:m_uiDelegate.m_webView takeFocus:toWKFocusDirection(direction)]; 479 return true; 479 480 } 480 481 -
trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.h
r239558 r240010 33 33 #include "WKLayoutMode.h" 34 34 #include "_WKOverlayScrollbarStyle.h" 35 #include <WebCore/FocusDirection.h> 35 36 #include <WebCore/ScrollTypes.h> 36 37 #include <WebCore/TextIndicatorWindow.h> … … 604 605 bool effectiveAppearanceIsDark(); 605 606 607 void takeFocus(WebCore::FocusDirection); 608 606 609 private: 607 610 #if HAVE(TOUCH_BAR) -
trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm
r239948 r240010 113 113 #import <pal/spi/mac/NSSpellCheckerSPI.h> 114 114 #import <pal/spi/mac/NSTextFinderSPI.h> 115 #import <pal/spi/mac/NSViewSPI.h> 115 116 #import <pal/spi/mac/NSWindowSPI.h> 116 117 #import <sys/stat.h> … … 1569 1570 1570 1571 return true; 1572 } 1573 1574 void WebViewImpl::takeFocus(WebCore::FocusDirection direction) 1575 { 1576 NSView *webView = m_view.getAutoreleased(); 1577 1578 if (direction == FocusDirectionForward) { 1579 // Since we're trying to move focus out of m_webView, and because 1580 // m_webView may contain subviews within it, we ask it for the next key 1581 // view of the last view in its key view loop. This makes m_webView 1582 // behave as if it had no subviews, which is the behavior we want. 1583 [webView.window selectKeyViewFollowingView:[webView _findLastViewInKeyViewLoop]]; 1584 } else 1585 [webView.window selectKeyViewPrecedingView:webView]; 1571 1586 } 1572 1587 -
trunk/Source/WebKit/UIProcess/PageClient.h
r239993 r240010 34 34 #include <WebCore/AlternativeTextClient.h> 35 35 #include <WebCore/EditorClient.h> 36 #include <WebCore/FocusDirection.h> 36 37 #include <WebCore/UserInterfaceLayoutDirection.h> 37 38 #include <WebCore/ValidationBubble.h> … … 311 312 virtual void updateAcceleratedCompositingMode(const LayerTreeContext&) = 0; 312 313 314 virtual void takeFocus(WebCore::FocusDirection) { } 315 313 316 #if PLATFORM(MAC) 314 317 virtual void pluginFocusOrWindowFocusChanged(uint64_t pluginComplexTextInputIdentifier, bool pluginHasFocusAndWindowHasFocus) = 0; -
trunk/Source/WebKit/UIProcess/WebPageProxy.cpp
r239993 r240010 5862 5862 void WebPageProxy::takeFocus(uint32_t direction) 5863 5863 { 5864 m_uiClient->takeFocus(this, (static_cast<FocusDirection>(direction) == FocusDirectionForward) ? kWKFocusDirectionForward : kWKFocusDirectionBackward); 5864 if (m_uiClient->takeFocus(this, (static_cast<FocusDirection>(direction) == FocusDirectionForward) ? kWKFocusDirectionForward : kWKFocusDirectionBackward)) 5865 return; 5866 5867 pageClient().takeFocus(static_cast<FocusDirection>(direction)); 5865 5868 } 5866 5869 -
trunk/Source/WebKit/UIProcess/mac/PageClientImplMac.h
r239972 r240010 263 263 bool windowIsFrontWindowUnderMouse(const NativeWebMouseEvent&) override; 264 264 265 void takeFocus(WebCore::FocusDirection) override; 266 265 267 NSView *m_view; 266 268 WeakPtr<WebViewImpl> m_impl; -
trunk/Source/WebKit/UIProcess/mac/PageClientImplMac.mm
r239689 r240010 958 958 } 959 959 960 void PageClientImpl::takeFocus(WebCore::FocusDirection direction) 961 { 962 m_impl->takeFocus(direction); 963 } 964 960 965 } // namespace WebKit 961 966 -
trunk/Source/WebKitLegacy/mac/ChangeLog
r239948 r240010 1 2019-01-15 Tim Horton <timothy_horton@apple.com> 2 3 Cannot tab out of WKWebView on macOS 4 https://bugs.webkit.org/show_bug.cgi?id=161448 5 <rdar://problem/28100085> 6 7 Reviewed by Dean Jackson. 8 9 * WebCoreSupport/WebChromeClient.mm: 10 * WebView/WebView.mm: 11 Make use of SPI headers. 12 1 13 2019-01-14 Commit Queue <commit-queue@webkit.org> 2 14 -
trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebChromeClient.mm
r238771 r240010 86 86 #import <WebCore/Widget.h> 87 87 #import <WebCore/WindowFeatures.h> 88 #import <pal/spi/mac/NSViewSPI.h> 88 89 #import <wtf/BlockObjCExceptions.h> 89 90 #import <wtf/RefPtr.h> … … 135 136 @end 136 137 #endif 137 138 @interface NSView (WebNSViewDetails)139 - (NSView *)_findLastViewInKeyViewLoop;140 @end141 138 142 139 // For compatibility with old SPI. -
trunk/Source/WebKitLegacy/mac/WebView/WebView.mm
r239904 r240010 376 376 377 377 @interface NSWindow (WebNSWindowDetails) 378 - (id)_oldFirstResponderBeforeBecoming;379 378 - (void)_enableScreenUpdatesIfNeeded; 380 379 - (BOOL)_wrapsCarbonWindow; -
trunk/Tools/ChangeLog
r240006 r240010 1 2019-01-15 Tim Horton <timothy_horton@apple.com> 2 3 Cannot tab out of WKWebView on macOS 4 https://bugs.webkit.org/show_bug.cgi?id=161448 5 <rdar://problem/28100085> 6 7 Reviewed by Dean Jackson. 8 9 Add a test that tabbing into and out of WKWebView works correctly. 10 11 * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: 12 * TestWebKitAPI/Tests/WebKitCocoa/CommandBackForward.mm: 13 (WebKit2_CommandBackForwardTest::SetUp): 14 (-[CommandBackForwardOffscreenWindow isKeyWindow]): Deleted. 15 (-[CommandBackForwardOffscreenWindow isVisible]): Deleted. 16 * TestWebKitAPI/Tests/WebKitCocoa/TabOutOfWebView.mm: Added. 17 (-[FocusableView canBecomeKeyView]): 18 (TEST): 19 * TestWebKitAPI/mac/OffscreenWindow.h: Added. 20 * TestWebKitAPI/mac/OffscreenWindow.mm: Added. 21 (-[OffscreenWindow initWithSize:]): 22 (-[OffscreenWindow isKeyWindow]): 23 (-[OffscreenWindow isVisible]): 24 * TestWebKitAPI/mac/PlatformWebViewMac.mm: 25 (TestWebKitAPI::PlatformWebView::initialize): 26 (-[ActiveOffscreenWindow isKeyWindow]): Deleted. 27 (-[ActiveOffscreenWindow isVisible]): Deleted. 28 Factor ActiveOffscreenWindow out into OffscreenWindow and share it. 29 1 30 2019-01-15 Ryan Haddad <ryanhaddad@apple.com> 2 31 -
trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
r239973 r240010 91 91 2D4CF8BD1D8360CC0001CE8D /* WKThumbnailView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2D4CF8BC1D8360CC0001CE8D /* WKThumbnailView.mm */; }; 92 92 2D51A0C71C8BF00C00765C45 /* DOMHTMLVideoElementWrapper.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2D51A0C51C8BF00400765C45 /* DOMHTMLVideoElementWrapper.mm */; }; 93 2D70059621EDA0C6003463CB /* TabOutOfWebView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2D70059521EDA0C6003463CB /* TabOutOfWebView.mm */; }; 94 2D70059921EDA4D0003463CB /* OffscreenWindow.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2D70059721EDA4D0003463CB /* OffscreenWindow.mm */; }; 93 95 2D838B1F1EEF3A5C009B980E /* WKContentViewEditingActions.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2D838B1E1EEF3A5B009B980E /* WKContentViewEditingActions.mm */; }; 94 96 2DADF26321CB8F32003D3E3A /* GetResourceData.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2DADF26221CB8F32003D3E3A /* GetResourceData.mm */; }; … … 1404 1406 2D61EC3021B0B75C00A7D1CB /* PencilKitTestSPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PencilKitTestSPI.h; sourceTree = "<group>"; }; 1405 1407 2D640B5417875DFF00BFAF99 /* ScrollPinningBehaviors.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScrollPinningBehaviors.cpp; sourceTree = "<group>"; }; 1408 2D70059521EDA0C6003463CB /* TabOutOfWebView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = TabOutOfWebView.mm; sourceTree = "<group>"; }; 1409 2D70059721EDA4D0003463CB /* OffscreenWindow.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = OffscreenWindow.mm; sourceTree = "<group>"; }; 1410 2D70059821EDA4D0003463CB /* OffscreenWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OffscreenWindow.h; sourceTree = "<group>"; }; 1406 1411 2D8104CB1BEC13E70020DA46 /* FindInPage.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = FindInPage.mm; sourceTree = "<group>"; }; 1407 1412 2D838B1E1EEF3A5B009B980E /* WKContentViewEditingActions.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKContentViewEditingActions.mm; sourceTree = "<group>"; }; … … 2559 2564 515BE1701D428BD100DD7C68 /* StoreBlobThenDelete.mm */, 2560 2565 1C734B5220788C4800F430EA /* SystemColors.mm */, 2566 2D70059521EDA0C6003463CB /* TabOutOfWebView.mm */, 2561 2567 F4CD74C720FDB49600DE3794 /* TestURLSchemeHandler.h */, 2562 2568 F4CD74C820FDB49600DE3794 /* TestURLSchemeHandler.mm */, … … 3349 3355 F442851B2140DF2900CCDA22 /* NSFontPanelTesting.h */, 3350 3356 F442851C2140DF2900CCDA22 /* NSFontPanelTesting.mm */, 3357 2D70059821EDA4D0003463CB /* OffscreenWindow.h */, 3358 2D70059721EDA4D0003463CB /* OffscreenWindow.mm */, 3351 3359 BC131884117114B600B69727 /* PlatformUtilitiesMac.mm */, 3352 3360 BC90955C125548AA00083756 /* PlatformWebViewMac.mm */, … … 4116 4124 F442851D2140DF2900CCDA22 /* NSFontPanelTesting.mm in Sources */, 4117 4125 37A22AA71DCAA27200AFBFC4 /* ObservedRenderingProgressEventsAfterCrash.mm in Sources */, 4126 2D70059921EDA4D0003463CB /* OffscreenWindow.mm in Sources */, 4118 4127 7CCE7F251A411AF600447C4C /* OpenAndCloseWindow.mm in Sources */, 4119 4128 CEBCA12F1E3A660100C73293 /* OverrideContentSecurityPolicy.mm in Sources */, … … 4210 4219 7CCE7EA81A411A1900447C4C /* SyntheticBackingScaleFactorWindow.m in Sources */, 4211 4220 1C734B5320788C4800F430EA /* SystemColors.mm in Sources */, 4221 2D70059621EDA0C6003463CB /* TabOutOfWebView.mm in Sources */, 4212 4222 7CCE7F161A411AE600447C4C /* TerminateTwice.cpp in Sources */, 4213 4223 7CCE7EA91A411A1D00447C4C /* TestBrowsingContextLoadDelegate.mm in Sources */, -
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/CommandBackForward.mm
r239631 r240010 28 28 #if PLATFORM(MAC) 29 29 30 #import "OffscreenWindow.h" 30 31 #import "PlatformUtilities.h" 31 32 #import "Test.h" … … 36 37 #import <wtf/RetainPtr.h> 37 38 #import <wtf/mac/AppKitCompatibilityDeclarations.h> 38 39 @interface CommandBackForwardOffscreenWindow : NSWindow40 @end41 42 @implementation CommandBackForwardOffscreenWindow43 - (BOOL)isKeyWindow44 {45 return YES;46 }47 - (BOOL)isVisible48 {49 return YES;50 }51 @end52 39 53 40 enum ArrowDirection { … … 97 84 virtual void SetUp() 98 85 { 99 NSWindow *window = [[CommandBackForwardOffscreenWindow alloc] initWithContentRect:NSMakeRect(0, 0, 100, 100) styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:YES]; 100 [window setColorSpace:[[NSScreen mainScreen] colorSpace]]; 101 [window orderBack:nil]; 102 [window setAutodisplay:NO]; 103 [window setReleasedWhenClosed:NO]; 86 window = adoptNS([[OffscreenWindow alloc] initWithSize:CGSizeMake(100, 100)]); 104 87 } 105 88 }; -
trunk/Tools/TestWebKitAPI/mac/OffscreenWindow.h
r240009 r240010 1 1 /* 2 * Copyright (C) 201 5-2017Apple Inc. All rights reserved.2 * Copyright (C) 2019 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 24 24 */ 25 25 26 # import <wtf/Platform.h>26 #pragma once 27 27 28 28 #if PLATFORM(MAC) 29 29 30 #i f USE(APPLE_INTERNAL_SDK)30 #import <AppKit/AppKit.h> 31 31 32 #import <AppKit/NSWindow_Private.h> 32 @interface OffscreenWindow : NSWindow 33 33 34 #else 34 - (instancetype)init NS_UNAVAILABLE; 35 - (instancetype)initWithContentRect:(NSRect)contentRect styleMask:(NSWindowStyleMask)style backing:(NSBackingStoreType)backingStoreType defer:(BOOL)flag NS_UNAVAILABLE; 36 - (instancetype)initWithContentRect:(NSRect)contentRect styleMask:(NSWindowStyleMask)style backing:(NSBackingStoreType)backingStoreType defer:(BOOL)flag screen:(NSScreen *)screen NS_UNAVAILABLE; 35 37 36 #import <AppKit/NSWindow.h> 37 38 @interface NSWindow () 39 40 - (id)_newFirstResponderAfterResigning; 41 - (void)_setCursorForMouseLocation:(NSPoint)point; 38 - (instancetype)initWithSize:(CGSize)size; 42 39 43 40 @end 44 41 45 enum {46 NSSideUtilityWindowMask = 1 << 9,47 NSSmallWindowMask = 1 << 10,48 _NSCarbonWindowMask = 1 << 25,49 };50 51 42 #endif 52 53 extern NSString *NSWindowWillOrderOnScreenNotification;54 extern NSString *NSWindowWillOrderOffScreenNotification;55 56 #endif // PLATFORM(MAC) -
trunk/Tools/TestWebKitAPI/mac/OffscreenWindow.mm
r240009 r240010 1 1 /* 2 * Copyright (C) 201 5-2017Apple Inc. All rights reserved.2 * Copyright (C) 2019 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 24 24 */ 25 25 26 #import <wtf/Platform.h> 26 #import "config.h" 27 #import "OffscreenWindow.h" 27 28 28 #if PLATFORM(MAC) 29 @implementation OffscreenWindow 29 30 30 #if USE(APPLE_INTERNAL_SDK) 31 - (instancetype)initWithSize:(CGSize)size 32 { 33 NSRect rect = NSMakeRect(0, 0, size.width, size.height); 34 NSRect windowRect = NSOffsetRect(rect, -10000, [(NSScreen *)[[NSScreen screens] objectAtIndex:0] frame].size.height - rect.size.height + 10000); 35 self = [super initWithContentRect:windowRect styleMask:NSWindowStyleMaskBorderless backing:NSBackingStoreBuffered defer:YES]; 36 if (!self) 37 return nil; 31 38 32 #import <AppKit/NSWindow_Private.h> 39 self.colorSpace = [[NSScreen mainScreen] colorSpace]; 40 [self orderBack:nil]; 41 self.autodisplay = NO; 42 self.releasedWhenClosed = NO; 33 43 34 #else 44 return self; 45 } 35 46 36 #import <AppKit/NSWindow.h> 47 - (BOOL)isKeyWindow 48 { 49 return YES; 50 } 37 51 38 @interface NSWindow () 39 40 - (id)_newFirstResponderAfterResigning;41 - (void)_setCursorForMouseLocation:(NSPoint)point; 52 - (BOOL)isVisible 53 { 54 return YES; 55 } 42 56 43 57 @end 44 45 enum {46 NSSideUtilityWindowMask = 1 << 9,47 NSSmallWindowMask = 1 << 10,48 _NSCarbonWindowMask = 1 << 25,49 };50 51 #endif52 53 extern NSString *NSWindowWillOrderOnScreenNotification;54 extern NSString *NSWindowWillOrderOffScreenNotification;55 56 #endif // PLATFORM(MAC) -
trunk/Tools/TestWebKitAPI/mac/PlatformWebViewMac.mm
r215790 r240010 27 27 #import "PlatformWebView.h" 28 28 29 #import "OffscreenWindow.h" 29 30 #import <Carbon/Carbon.h> 30 31 #import <WebKit/WKRetainPtr.h> … … 32 33 #import <wtf/mac/AppKitCompatibilityDeclarations.h> 33 34 34 @interface ActiveOffscreenWindow : NSWindow35 @end36 37 @implementation ActiveOffscreenWindow38 - (BOOL)isKeyWindow39 {40 return YES;41 }42 - (BOOL)isVisible43 {44 return YES;45 }46 @end47 48 35 namespace TestWebKitAPI { 49 36 … … 54 41 [m_view setWindowOcclusionDetectionEnabled:NO]; 55 42 56 NSRect windowRect = NSOffsetRect(rect, -10000, [(NSScreen *)[[NSScreen screens] objectAtIndex:0] frame].size.height - rect.size.height + 10000); 57 m_window = [[ActiveOffscreenWindow alloc] initWithContentRect:windowRect styleMask:NSWindowStyleMaskBorderless backing:NSBackingStoreBuffered defer:YES]; 58 [m_window setColorSpace:[[NSScreen mainScreen] colorSpace]]; 43 m_window = [[OffscreenWindow alloc] initWithSize:NSSizeToCGSize(rect.size)]; 59 44 [[m_window contentView] addSubview:m_view]; 60 [m_window orderBack:nil];61 [m_window setAutodisplay:NO];62 [m_window setReleasedWhenClosed:NO];63 45 } 64 46
Note: See TracChangeset
for help on using the changeset viewer.