Title: [165454] trunk/Source/WebKit2
Revision
165454
Author
[email protected]
Date
2014-03-11 16:00:19 -0700 (Tue, 11 Mar 2014)

Log 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]):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (165453 => 165454)


--- trunk/Source/WebKit2/ChangeLog	2014-03-11 21:51:42 UTC (rev 165453)
+++ trunk/Source/WebKit2/ChangeLog	2014-03-11 23:00:19 UTC (rev 165454)
@@ -1,3 +1,27 @@
+2014-03-11  Beth Dakin  <[email protected]>
+
+        _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]):
+
 2014-03-11  Jae Hyun Park  <[email protected]>
 
         [GTK][CMake] Add HARFBUZZ_INCLUDE_DIRS to WebKit and WebKit2

Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKViewPrivate.h (165453 => 165454)


--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKViewPrivate.h	2014-03-11 21:51:42 UTC (rev 165453)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKViewPrivate.h	2014-03-11 23:00:19 UTC (rev 165454)
@@ -48,6 +48,8 @@
 @property (nonatomic, setter=_setObscuredInsets:) UIEdgeInsets _obscuredInsets;
 
 @property (nonatomic, setter=_setBackgroundExtendsBeyondPage:) BOOL _backgroundExtendsBeyondPage;
+
+// This is deprecated and should be removed entirely: <rdar://problem/16294704>.
 @property (readonly) UIColor *_pageExtendedBackgroundColor;
 
 - (void)_beginInteractiveObscuredInsetsChange;

Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm (165453 => 165454)


--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm	2014-03-11 21:51:42 UTC (rev 165453)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm	2014-03-11 23:00:19 UTC (rev 165454)
@@ -375,6 +375,16 @@
     _isWaitingForNewLayerTreeAfterDidCommitLoad = YES;
 }
 
+// This is a convenience method that will convert _page->pageExtendedBackgroundColor() from a WebCore::Color to a UIColor *.
+- (UIColor *)pageExtendedBackgroundColor
+{
+    WebCore::Color color = _page->pageExtendedBackgroundColor();
+    if (!color.isValid())
+        return nil;
+
+    return [UIColor colorWithRed:(color.red() / 255.0) green:(color.green() / 255.0) blue:(color.blue() / 255.0) alpha:(color.alpha() / 255.0)];
+}
+
 - (void)_didCommitLayerTree:(const WebKit::RemoteLayerTreeTransaction&)layerTreeTransaction
 {
     ASSERT(!_customContentView);
@@ -386,7 +396,7 @@
     if (!layerTreeTransaction.scaleWasSetByUIProcess() && ![_scrollView isZooming] && ![_scrollView isZoomBouncing] && ![_scrollView _isAnimatingZoom])
         [_scrollView setZoomScale:layerTreeTransaction.pageScaleFactor()];
 
-    if (UIColor *pageExtendedBackgroundColor = [self _pageExtendedBackgroundColor]) {
+    if (UIColor *pageExtendedBackgroundColor = [self pageExtendedBackgroundColor]) {
         if ([self _backgroundExtendsBeyondPage])
             [_scrollView setBackgroundColor:pageExtendedBackgroundColor];
     }
@@ -903,11 +913,8 @@
 
 - (UIColor *)_pageExtendedBackgroundColor
 {
-    WebCore::Color color = _page->pageExtendedBackgroundColor();
-    if (!color.isValid())
-        return nil;
-
-    return [UIColor colorWithRed:(color.red() / 255.0) green:(color.green() / 255.0) blue:(color.blue() / 255.0) alpha:(color.alpha() / 255.0)];
+    // This is deprecated.
+    return nil;
 }
 
 - (void)_setBackgroundExtendsBeyondPage:(BOOL)backgroundExtends

Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h (165453 => 165454)


--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h	2014-03-11 21:51:42 UTC (rev 165453)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h	2014-03-11 23:00:19 UTC (rev 165454)
@@ -72,6 +72,8 @@
 @property (nonatomic, setter=_setObscuredInsets:) UIEdgeInsets _obscuredInsets;
 
 @property (nonatomic, setter=_setBackgroundExtendsBeyondPage:) BOOL _backgroundExtendsBeyondPage;
+
+// This is deprecated and should be removed entirely: <rdar://problem/16294704>.
 @property (readonly) UIColor *_pageExtendedBackgroundColor;
 
 - (void)_beginInteractiveObscuredInsetsChange;

Modified: trunk/Source/WebKit2/UIProcess/API/ios/WKViewIOS.mm (165453 => 165454)


--- trunk/Source/WebKit2/UIProcess/API/ios/WKViewIOS.mm	2014-03-11 21:51:42 UTC (rev 165453)
+++ trunk/Source/WebKit2/UIProcess/API/ios/WKViewIOS.mm	2014-03-11 23:00:19 UTC (rev 165454)
@@ -368,11 +368,8 @@
 
 - (UIColor *)_pageExtendedBackgroundColor
 {
-    WebCore::Color color = [_contentView page]->pageExtendedBackgroundColor();
-    if (!color.isValid())
-        return nil;
-
-    return [UIColor colorWithRed:(color.red() / 255.0) green:(color.green() / 255.0) blue:(color.blue() / 255.0) alpha:(color.alpha() / 255.0)];
+    // This is deprecated. 
+    return nil;
 }
 
 - (void)_setBackgroundExtendsBeyondPage:(BOOL)backgroundExtends
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to