REGRESSION (r170935): WKWebView is always transparent until the first layer tree...
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 10 Jul 2014 23:46:43 +0000 (23:46 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 10 Jul 2014 23:46:43 +0000 (23:46 +0000)
https://bugs.webkit.org/show_bug.cgi?id=134818
<rdar://problem/17632468>

Reviewed by Anders Carlsson.

* UIProcess/API/Cocoa/WKWebView.mm:
(scrollViewBackgroundColor):
r170935 made it so that we would initialize the scroll view background color to an
invalid color until the first layer tree commit. We should go with white instead.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170982 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm

index 774ffbbab9d867ed42cfa6334ed19d48ff945cf2..4bdc9bc65d132d00d822759d6f9e68229e386f00 100644 (file)
@@ -1,3 +1,16 @@
+2014-07-10  Tim Horton  <timothy_horton@apple.com>
+
+        REGRESSION (r170935): WKWebView is always transparent until the first layer tree commit
+        https://bugs.webkit.org/show_bug.cgi?id=134818
+        <rdar://problem/17632468>
+
+        Reviewed by Anders Carlsson.
+
+        * UIProcess/API/Cocoa/WKWebView.mm:
+        (scrollViewBackgroundColor):
+        r170935 made it so that we would initialize the scroll view background color to an
+        invalid color until the first layer tree commit. We should go with white instead.
+
 2014-07-10  Enrica Casucci  <enrica@apple.com>
 
         Add a mechanism to notify the UIProcess when an editing command is done executing.
index 85c49e966208148937991ba5288a6bbc768e5ec3..e56c0b0d14d79ffda20e855cc3dc5f03e2aaa35f 100644 (file)
@@ -679,6 +679,9 @@ static WebCore::Color scrollViewBackgroundColor(WKWebView *webView)
     else
         color = webView->_page->pageExtendedBackgroundColor();
 
+    if (!color.isValid())
+        color = WebCore::Color::white;
+
     CGFloat zoomScale = contentZoomScale(webView);
     CGFloat minimumZoomScale = [webView->_scrollView minimumZoomScale];
     if (zoomScale < minimumZoomScale) {