Changeset 163042 in webkit
- Timestamp:
- Jan 29, 2014 2:46:59 PM (10 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r163038 r163042 1 2014-01-29 Anders Carlsson <andersca@apple.com> 2 3 Make WKWebView limp along on OS X 4 https://bugs.webkit.org/show_bug.cgi?id=127857 5 6 Reviewed by Tim Horton. 7 8 On Mac, create a WKView and add it as a subview of the WKWebVew so we'll actually get something 9 on screen when creating a WKWebView. 10 11 * UIProcess/API/Cocoa/WKWebView.mm: 12 (-[WKWebView initWithFrame:configuration:]): 13 Create a WKView. 14 15 (-[WKWebView resizeSubviewsWithOldSize:]): 16 Resize the WKView. 17 18 * UIProcess/API/mac/WKView.mm: 19 (-[WKView initWithFrame:configuration:]): 20 Add new initializer. 21 22 * UIProcess/API/mac/WKViewInternal.h: 23 Use a class extension for internal methods and add the new initializer. 24 1 25 2014-01-29 Brady Eidson <beidson@apple.com> 2 26 -
trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm
r163037 r163042 49 49 #endif 50 50 51 #if PLATFORM(MAC) && !PLATFORM(IOS) 52 #import "WKViewInternal.h" 53 #endif 54 51 55 @implementation WKWebView { 52 56 RetainPtr<WKWebViewConfiguration> _configuration; … … 61 65 BOOL _hasStaticMinimumLayoutSize; 62 66 #endif 67 #if PLATFORM(MAC) && !PLATFORM(IOS) 68 RetainPtr<WKView> _wkView; 69 #endif 63 70 } 64 71 … … 78 85 [_configuration setProcessClass:adoptNS([[WKProcessClass alloc] init]).get()]; 79 86 87 CGRect bounds = self.bounds; 88 80 89 #if PLATFORM(IOS) 81 CGRect bounds = self.bounds;82 83 90 _scrollView = adoptNS([[WKScrollView alloc] initWithFrame:bounds]); 84 91 [_scrollView setInternalDelegate:self]; … … 98 105 99 106 [self _frameOrBoundsChanged]; 107 #endif 108 109 #if PLATFORM(MAC) && !PLATFORM(IOS) 110 _wkView = [[WKView alloc] initWithFrame:bounds configuration:_configuration.get()]; 111 [self addSubview:_wkView.get()]; 112 _page = WebKit::toImpl([_wkView pageRef]); 100 113 #endif 101 114 … … 266 279 } 267 280 268 #pragma mark Internal269 270 281 - (void)_frameOrBoundsChanged 271 282 { … … 294 305 #endif 295 306 307 #pragma mark OS X-specific methods 308 309 #if PLATFORM(MAC) && !PLATFORM(IOS) 310 311 - (void)resizeSubviewsWithOldSize:(NSSize)oldSize 312 { 313 [_wkView setFrame:self.bounds]; 314 } 315 316 #endif 317 296 318 @end 297 319 -
trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm
r163003 r163042 55 55 #import "WKFullScreenWindowController.h" 56 56 #import "WKPrintingView.h" 57 #import "WKProcessClassInternal.h" 57 58 #import "WKStringCF.h" 58 59 #import "WKTextInputWindowController.h" 59 60 #import "WKViewInternal.h" 60 61 #import "WKViewPrivate.h" 62 #import "WKWebViewConfiguration.h" 61 63 #import "WebBackForwardList.h" 62 64 #import "WebContext.h" … … 147 149 }; 148 150 149 @interface WKView ()150 - (void)_accessibilityRegisterUIProcessTokens;151 - (void)_disableComplexTextInputIfNecessary;152 - (float)_intrinsicDeviceScaleFactor;153 - (void)_postFakeMouseMovedEventForFlagsChangedEvent:(NSEvent *)flagsChangedEvent;154 - (void)_setDrawingAreaSize:(NSSize)size;155 - (void)_setPluginComplexTextInputState:(PluginComplexTextInputState)pluginComplexTextInputState;156 @end157 158 151 @interface WKViewData : NSObject { 159 152 @public … … 265 258 266 259 #if WK_API_ENABLED 260 261 - (instancetype)initWithFrame:(CGRect)frame configuration:(WKWebViewConfiguration *)configuration 262 { 263 return [self initWithFrame:frame contextRef:toAPI(configuration.processClass->_context.get()) pageGroupRef:nullptr]; 264 } 267 265 268 266 - (id)initWithFrame:(NSRect)frame processGroup:(WKProcessGroup *)processGroup browsingContextGroup:(WKBrowsingContextGroup *)browsingContextGroup … … 2190 2188 #endif 2191 2189 2192 @end2193 2194 @implementation WKView (Internal)2195 2196 2190 - (std::unique_ptr<WebKit::DrawingAreaProxy>)_createDrawingAreaProxy 2197 2191 { -
trunk/Source/WebKit2/UIProcess/API/mac/WKViewInternal.h
r162984 r163042 31 31 #import <wtf/Vector.h> 32 32 33 @class WKWebViewConfiguration; 34 33 35 namespace IPC { 34 36 class DataReference; … … 51 53 @class WKFullScreenWindowController; 52 54 53 @interface WKView (Internal) 55 @interface WKView () 56 #if WK_API_ENABLED 57 - (instancetype)initWithFrame:(CGRect)frame configuration:(WKWebViewConfiguration *)configuration; 58 #endif 59 54 60 - (std::unique_ptr<WebKit::DrawingAreaProxy>)_createDrawingAreaProxy; 55 61 - (BOOL)_isFocused;
Note: See TracChangeset
for help on using the changeset viewer.