Changeset 165454 in webkit


Ignore:
Timestamp:
Mar 11, 2014, 4:00:19 PM (11 years ago)
Author:
Beth Dakin
Message:

_pageExtendedBackgroundColor should not be exposed on WKWebView
https://bugs.webkit.org/show_bug.cgi?id=130093

Reviewed by Simon Fraser.

Added comment indicating that _pageExtendedBackgroundColor is deprecated.

  • UIProcess/API/Cocoa/WKViewPrivate.h:

_pageExtendedBackgroundColor now returns nil, but the conversation functionality
is maintained with a convenience method pageExtendedBackgroundColor.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView pageExtendedBackgroundColor]):
(-[WKWebView _didCommitLayerTree:WebKit::]):
(-[WKWebView _pageExtendedBackgroundColor]):

Added comment indicating that _pageExtendedBackgroundColor is deprecated.

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:

Return nil.

  • UIProcess/API/ios/WKViewIOS.mm:

(-[WKView _pageExtendedBackgroundColor]):

Location:
trunk/Source/WebKit2
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r165437 r165454  
     12014-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
    1252014-03-11  Jae Hyun Park  <jaepark@webkit.org>
    226
  • trunk/Source/WebKit2/UIProcess/API/Cocoa/WKViewPrivate.h

    r165297 r165454  
    4949
    5050@property (nonatomic, setter=_setBackgroundExtendsBeyondPage:) BOOL _backgroundExtendsBeyondPage;
     51
     52// This is deprecated and should be removed entirely: <rdar://problem/16294704>.
    5153@property (readonly) UIColor *_pageExtendedBackgroundColor;
    5254
  • trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm

    r165434 r165454  
    376376}
    377377
     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
    378388- (void)_didCommitLayerTree:(const WebKit::RemoteLayerTreeTransaction&)layerTreeTransaction
    379389{
     
    387397        [_scrollView setZoomScale:layerTreeTransaction.pageScaleFactor()];
    388398
    389     if (UIColor *pageExtendedBackgroundColor = [self _pageExtendedBackgroundColor]) {
     399    if (UIColor *pageExtendedBackgroundColor = [self pageExtendedBackgroundColor]) {
    390400        if ([self _backgroundExtendsBeyondPage])
    391401            [_scrollView setBackgroundColor:pageExtendedBackgroundColor];
     
    904914- (UIColor *)_pageExtendedBackgroundColor
    905915{
     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{
    906949    WebCore::Color color = _page->pageExtendedBackgroundColor();
    907950    if (!color.isValid())
    908951        return nil;
    909952
    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)backgroundExtends
    914 {
    915     _page->setBackgroundExtendsBeyondPage(backgroundExtends);
    916 }
    917 
    918 - (BOOL)_backgroundExtendsBeyondPage
    919 {
    920     return _page->backgroundExtendsBeyondPage();
    921 }
    922 
    923 - (void)_beginInteractiveObscuredInsetsChange
    924 {
    925     ASSERT(!_isChangingObscuredInsetsInteractively);
    926     _isChangingObscuredInsetsInteractively = YES;
    927 }
    928 
    929 - (void)_endInteractiveObscuredInsetsChange
    930 {
    931     ASSERT(_isChangingObscuredInsetsInteractively);
    932     _isChangingObscuredInsetsInteractively = NO;
    933     [self _updateVisibleContentRects];
    934 }
    935 
    936 #else
    937 
    938 #pragma mark - OS X-specific methods
    939 
    940 - (NSColor *)_pageExtendedBackgroundColor
    941 {
    942     WebCore::Color color = _page->pageExtendedBackgroundColor();
    943     if (!color.isValid())
    944         return nil;
    945 
    946953    return nsColor(color);
    947954}
  • trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h

    r165434 r165454  
    7373
    7474@property (nonatomic, setter=_setBackgroundExtendsBeyondPage:) BOOL _backgroundExtendsBeyondPage;
     75
     76// This is deprecated and should be removed entirely: <rdar://problem/16294704>.
    7577@property (readonly) UIColor *_pageExtendedBackgroundColor;
    7678
  • trunk/Source/WebKit2/UIProcess/API/ios/WKViewIOS.mm

    r164937 r165454  
    369369- (UIColor *)_pageExtendedBackgroundColor
    370370{
    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;
    376373}
    377374
Note: See TracChangeset for help on using the changeset viewer.