Title: [164453] trunk/Source/WebKit2
Revision
164453
Author
[email protected]
Date
2014-02-20 15:12:19 -0800 (Thu, 20 Feb 2014)

Log Message

WKPage's setBackgroundExtendsBeyondPage API should be exposed through WKView and 
WKWebView
https://bugs.webkit.org/show_bug.cgi?id=129120

Reviewed by Anders Carlsson.

While we’re in this code, fix up the pageExtendedBackgroundColor to match.
* UIProcess/API/Cocoa/WKViewPrivate.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _pageExtendedBackgroundColor]):
(-[WKWebView _setBackgroundExtendsBeyondPage:]):
(-[WKWebView _backgroundExtendsBeyondPage]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/API/ios/WKViewIOS.mm:
(-[WKView _pageExtendedBackgroundColor]):
(-[WKView _setBackgroundExtendsBeyondPage:]):
(-[WKView _backgroundExtendsBeyondPage]):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (164452 => 164453)


--- trunk/Source/WebKit2/ChangeLog	2014-02-20 23:12:18 UTC (rev 164452)
+++ trunk/Source/WebKit2/ChangeLog	2014-02-20 23:12:19 UTC (rev 164453)
@@ -1,3 +1,23 @@
+2014-02-20  Beth Dakin  <[email protected]>
+
+        WKPage's setBackgroundExtendsBeyondPage API should be exposed through WKView and 
+        WKWebView
+        https://bugs.webkit.org/show_bug.cgi?id=129120
+
+        Reviewed by Anders Carlsson.
+
+        While we’re in this code, fix up the pageExtendedBackgroundColor to match.
+        * UIProcess/API/Cocoa/WKViewPrivate.h:
+        * UIProcess/API/Cocoa/WKWebView.mm:
+        (-[WKWebView _pageExtendedBackgroundColor]):
+        (-[WKWebView _setBackgroundExtendsBeyondPage:]):
+        (-[WKWebView _backgroundExtendsBeyondPage]):
+        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
+        * UIProcess/API/ios/WKViewIOS.mm:
+        (-[WKView _pageExtendedBackgroundColor]):
+        (-[WKView _setBackgroundExtendsBeyondPage:]):
+        (-[WKView _backgroundExtendsBeyondPage]):
+
 2014-02-20  Dean Jackson  <[email protected]>
 
         Add an unresolved WebGLPolicy and an API to resolve it

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


--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKViewPrivate.h	2014-02-20 23:12:18 UTC (rev 164452)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKViewPrivate.h	2014-02-20 23:12:19 UTC (rev 164453)
@@ -47,7 +47,8 @@
 // Define the inset of the scrollview unusable by the web page.
 @property (nonatomic, setter=_setObscuredInsets:) UIEdgeInsets _obscuredInsets;
 
-- (UIColor *)pageExtendedBackgroundColor;
+@property (nonatomic, setter=_setBackgroundExtendsBeyondPage:) BOOL _backgroundExtendsBeyondPage;
+@property (readonly) UIColor *_pageExtendedBackgroundColor;
 
 - (void)_beginInteractiveObscuredInsetsChange;
 - (void)_endInteractiveObscuredInsetsChange;

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


--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm	2014-02-20 23:12:18 UTC (rev 164452)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm	2014-02-20 23:12:19 UTC (rev 164453)
@@ -596,7 +596,7 @@
     _obscuredInsets = obscuredInsets;
 }
 
-- (UIColor *)pageExtendedBackgroundColor
+- (UIColor *)_pageExtendedBackgroundColor
 {
     WebCore::Color color = _page->pageExtendedBackgroundColor();
     if (!color.isValid())
@@ -605,6 +605,16 @@
     return [UIColor colorWithRed:(color.red() / 255.0) green:(color.green() / 255.0) blue:(color.blue() / 255.0) alpha:(color.alpha() / 255.0)];
 }
 
+- (void)_setBackgroundExtendsBeyondPage:(BOOL)backgroundExtends
+{
+    _page->setBackgroundExtendsBeyondPage(backgroundExtends);
+}
+
+- (BOOL)_backgroundExtendsBeyondPage
+{
+    return _page->backgroundExtendsBeyondPage();
+}
+
 - (void)_beginInteractiveObscuredInsetsChange
 {
     ASSERT(!_isChangingObscuredInsetsInteractively);

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


--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h	2014-02-20 23:12:18 UTC (rev 164452)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h	2014-02-20 23:12:19 UTC (rev 164453)
@@ -69,7 +69,8 @@
 // Define the inset of the scrollview unusable by the web page.
 @property (nonatomic, setter=_setObscuredInsets:) UIEdgeInsets _obscuredInsets;
 
-- (UIColor *)pageExtendedBackgroundColor;
+@property (nonatomic, setter=_setBackgroundExtendsBeyondPage:) BOOL _backgroundExtendsBeyondPage;
+@property (readonly) UIColor *_pageExtendedBackgroundColor;
 
 - (void)_beginInteractiveObscuredInsetsChange;
 - (void)_endInteractiveObscuredInsetsChange;

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


--- trunk/Source/WebKit2/UIProcess/API/ios/WKViewIOS.mm	2014-02-20 23:12:18 UTC (rev 164452)
+++ trunk/Source/WebKit2/UIProcess/API/ios/WKViewIOS.mm	2014-02-20 23:12:19 UTC (rev 164453)
@@ -387,9 +387,9 @@
     _isChangingObscuredInsetsInteractively = NO;
 }
 
-- (UIColor *)pageExtendedBackgroundColor
+- (UIColor *)_pageExtendedBackgroundColor
 {
-    WebPageProxy *webPageProxy = toImpl([_contentView _pageRef]);
+    WebPageProxy* webPageProxy = toImpl([_contentView _pageRef]);
     WebCore::Color color = webPageProxy->pageExtendedBackgroundColor();
     if (!color.isValid())
         return nil;
@@ -397,4 +397,16 @@
     return [UIColor colorWithRed:(color.red() / 255.0) green:(color.green() / 255.0) blue:(color.blue() / 255.0) alpha:(color.alpha() / 255.0)];
 }
 
+- (void)_setBackgroundExtendsBeyondPage:(BOOL)backgroundExtends
+{
+    WebPageProxy* webPageProxy = toImpl([_contentView _pageRef]);
+    webPageProxy->setBackgroundExtendsBeyondPage(backgroundExtends);
+}
+
+- (BOOL)_backgroundExtendsBeyondPage
+{
+    WebPageProxy* webPageProxy = toImpl([_contentView _pageRef]);
+    return webPageProxy->backgroundExtendsBeyondPage();
+}
+
 @end
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to