Changeset 165454 in webkit
- Timestamp:
- Mar 11, 2014, 4:00:19 PM (11 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r165437 r165454 1 2014-03-11 Beth Dakin <bdakin@apple.com> 2 3 _pageExtendedBackgroundColor should not be exposed on WKWebView 4 https://bugs.webkit.org/show_bug.cgi?id=130093 5 6 Reviewed by Simon Fraser. 7 8 Added comment indicating that _pageExtendedBackgroundColor is deprecated. 9 * UIProcess/API/Cocoa/WKViewPrivate.h: 10 11 _pageExtendedBackgroundColor now returns nil, but the conversation functionality 12 is maintained with a convenience method pageExtendedBackgroundColor. 13 * UIProcess/API/Cocoa/WKWebView.mm: 14 (-[WKWebView pageExtendedBackgroundColor]): 15 (-[WKWebView _didCommitLayerTree:WebKit::]): 16 (-[WKWebView _pageExtendedBackgroundColor]): 17 18 Added comment indicating that _pageExtendedBackgroundColor is deprecated. 19 * UIProcess/API/Cocoa/WKWebViewPrivate.h: 20 21 Return nil. 22 * UIProcess/API/ios/WKViewIOS.mm: 23 (-[WKView _pageExtendedBackgroundColor]): 24 1 25 2014-03-11 Jae Hyun Park <jaepark@webkit.org> 2 26 -
trunk/Source/WebKit2/UIProcess/API/Cocoa/WKViewPrivate.h
r165297 r165454 49 49 50 50 @property (nonatomic, setter=_setBackgroundExtendsBeyondPage:) BOOL _backgroundExtendsBeyondPage; 51 52 // This is deprecated and should be removed entirely: <rdar://problem/16294704>. 51 53 @property (readonly) UIColor *_pageExtendedBackgroundColor; 52 54 -
trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm
r165434 r165454 376 376 } 377 377 378 // This is a convenience method that will convert _page->pageExtendedBackgroundColor() from a WebCore::Color to a UIColor *. 379 - (UIColor *)pageExtendedBackgroundColor 380 { 381 WebCore::Color color = _page->pageExtendedBackgroundColor(); 382 if (!color.isValid()) 383 return nil; 384 385 return [UIColor colorWithRed:(color.red() / 255.0) green:(color.green() / 255.0) blue:(color.blue() / 255.0) alpha:(color.alpha() / 255.0)]; 386 } 387 378 388 - (void)_didCommitLayerTree:(const WebKit::RemoteLayerTreeTransaction&)layerTreeTransaction 379 389 { … … 387 397 [_scrollView setZoomScale:layerTreeTransaction.pageScaleFactor()]; 388 398 389 if (UIColor *pageExtendedBackgroundColor = [self _pageExtendedBackgroundColor]) {399 if (UIColor *pageExtendedBackgroundColor = [self pageExtendedBackgroundColor]) { 390 400 if ([self _backgroundExtendsBeyondPage]) 391 401 [_scrollView setBackgroundColor:pageExtendedBackgroundColor]; … … 904 914 - (UIColor *)_pageExtendedBackgroundColor 905 915 { 916 // This is deprecated. 917 return nil; 918 } 919 920 - (void)_setBackgroundExtendsBeyondPage:(BOOL)backgroundExtends 921 { 922 _page->setBackgroundExtendsBeyondPage(backgroundExtends); 923 } 924 925 - (BOOL)_backgroundExtendsBeyondPage 926 { 927 return _page->backgroundExtendsBeyondPage(); 928 } 929 930 - (void)_beginInteractiveObscuredInsetsChange 931 { 932 ASSERT(!_isChangingObscuredInsetsInteractively); 933 _isChangingObscuredInsetsInteractively = YES; 934 } 935 936 - (void)_endInteractiveObscuredInsetsChange 937 { 938 ASSERT(_isChangingObscuredInsetsInteractively); 939 _isChangingObscuredInsetsInteractively = NO; 940 [self _updateVisibleContentRects]; 941 } 942 943 #else 944 945 #pragma mark - OS X-specific methods 946 947 - (NSColor *)_pageExtendedBackgroundColor 948 { 906 949 WebCore::Color color = _page->pageExtendedBackgroundColor(); 907 950 if (!color.isValid()) 908 951 return nil; 909 952 910 return [UIColor colorWithRed:(color.red() / 255.0) green:(color.green() / 255.0) blue:(color.blue() / 255.0) alpha:(color.alpha() / 255.0)];911 }912 913 - (void)_setBackgroundExtendsBeyondPage:(BOOL)backgroundExtends914 {915 _page->setBackgroundExtendsBeyondPage(backgroundExtends);916 }917 918 - (BOOL)_backgroundExtendsBeyondPage919 {920 return _page->backgroundExtendsBeyondPage();921 }922 923 - (void)_beginInteractiveObscuredInsetsChange924 {925 ASSERT(!_isChangingObscuredInsetsInteractively);926 _isChangingObscuredInsetsInteractively = YES;927 }928 929 - (void)_endInteractiveObscuredInsetsChange930 {931 ASSERT(_isChangingObscuredInsetsInteractively);932 _isChangingObscuredInsetsInteractively = NO;933 [self _updateVisibleContentRects];934 }935 936 #else937 938 #pragma mark - OS X-specific methods939 940 - (NSColor *)_pageExtendedBackgroundColor941 {942 WebCore::Color color = _page->pageExtendedBackgroundColor();943 if (!color.isValid())944 return nil;945 946 953 return nsColor(color); 947 954 } -
trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h
r165434 r165454 73 73 74 74 @property (nonatomic, setter=_setBackgroundExtendsBeyondPage:) BOOL _backgroundExtendsBeyondPage; 75 76 // This is deprecated and should be removed entirely: <rdar://problem/16294704>. 75 77 @property (readonly) UIColor *_pageExtendedBackgroundColor; 76 78 -
trunk/Source/WebKit2/UIProcess/API/ios/WKViewIOS.mm
r164937 r165454 369 369 - (UIColor *)_pageExtendedBackgroundColor 370 370 { 371 WebCore::Color color = [_contentView page]->pageExtendedBackgroundColor(); 372 if (!color.isValid()) 373 return nil; 374 375 return [UIColor colorWithRed:(color.red() / 255.0) green:(color.green() / 255.0) blue:(color.blue() / 255.0) alpha:(color.alpha() / 255.0)]; 371 // This is deprecated. 372 return nil; 376 373 } 377 374
Note:
See TracChangeset
for help on using the changeset viewer.