Title: [248457] branches/safari-608.1-branch/Source/WebKit
Revision
248457
Author
[email protected]
Date
2019-08-08 22:01:15 -0700 (Thu, 08 Aug 2019)

Log Message

Cherry-pick r248436. rdar://problem/54093232

    Set WKWebView opaque based on drawsBackground in PageConfiguration.
    https://bugs.webkit.org/show_bug.cgi?id=200528

    Reviewed by Tim Horton.

    * UIProcess/API/Cocoa/WKWebView.mm:
    (-[WKWebView _initializeWithConfiguration:]): Set self.opaque = NO when !self.opaque || !pageConfiguration->drawsBackground().
    It is almost impossible to have !self.opaque be NO at this point, since we are still inside initWithFrame:. A subclass could
    override opaque and return NO, but checking pageConfiguration's drawsBackground is a good alternative.
    * WebProcess/WebPage/WebPage.h: Remove unused m_drawsBackground member.

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

Modified Paths

Diff

Modified: branches/safari-608.1-branch/Source/WebKit/ChangeLog (248456 => 248457)


--- branches/safari-608.1-branch/Source/WebKit/ChangeLog	2019-08-09 02:11:18 UTC (rev 248456)
+++ branches/safari-608.1-branch/Source/WebKit/ChangeLog	2019-08-09 05:01:15 UTC (rev 248457)
@@ -1,3 +1,34 @@
+2019-08-08  Kocsen Chung  <[email protected]>
+
+        Cherry-pick r248436. rdar://problem/54093232
+
+    Set WKWebView opaque based on drawsBackground in PageConfiguration.
+    https://bugs.webkit.org/show_bug.cgi?id=200528
+    
+    Reviewed by Tim Horton.
+    
+    * UIProcess/API/Cocoa/WKWebView.mm:
+    (-[WKWebView _initializeWithConfiguration:]): Set self.opaque = NO when !self.opaque || !pageConfiguration->drawsBackground().
+    It is almost impossible to have !self.opaque be NO at this point, since we are still inside initWithFrame:. A subclass could
+    override opaque and return NO, but checking pageConfiguration's drawsBackground is a good alternative.
+    * WebProcess/WebPage/WebPage.h: Remove unused m_drawsBackground member.
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248436 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2019-08-08  Timothy Hatcher  <[email protected]>
+
+            Set WKWebView opaque based on drawsBackground in PageConfiguration.
+            https://bugs.webkit.org/show_bug.cgi?id=200528
+
+            Reviewed by Tim Horton.
+
+            * UIProcess/API/Cocoa/WKWebView.mm:
+            (-[WKWebView _initializeWithConfiguration:]): Set self.opaque = NO when !self.opaque || !pageConfiguration->drawsBackground().
+            It is almost impossible to have !self.opaque be NO at this point, since we are still inside initWithFrame:. A subclass could
+            override opaque and return NO, but checking pageConfiguration's drawsBackground is a good alternative.
+            * WebProcess/WebPage/WebPage.h: Remove unused m_drawsBackground member.
+
 2019-08-08  Alan Coon  <[email protected]>
 
         Revert r248039. rdar://problem/54087592

Modified: branches/safari-608.1-branch/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm (248456 => 248457)


--- branches/safari-608.1-branch/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm	2019-08-09 02:11:18 UTC (rev 248456)
+++ branches/safari-608.1-branch/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm	2019-08-09 05:01:15 UTC (rev 248457)
@@ -705,9 +705,10 @@
 
     _page = [_contentView page];
     [self _dispatchSetDeviceOrientation:deviceOrientation()];
-    if (!self.opaque)
-        _page->setBackgroundColor(WebCore::Color(WebCore::Color::transparent));
 
+    if (!self.opaque || !pageConfiguration->drawsBackground())
+        self.opaque = NO;
+
     [_contentView layer].anchorPoint = CGPointZero;
     [_contentView setFrame:bounds];
     [_scrollView addSubview:_contentView.get()];

Modified: branches/safari-608.1-branch/Source/WebKit/WebProcess/WebPage/WebPage.h (248456 => 248457)


--- branches/safari-608.1-branch/Source/WebKit/WebProcess/WebPage/WebPage.h	2019-08-09 02:11:18 UTC (rev 248456)
+++ branches/safari-608.1-branch/Source/WebKit/WebProcess/WebPage/WebPage.h	2019-08-09 05:01:15 UTC (rev 248457)
@@ -1627,7 +1627,6 @@
     HashMap<uint64_t, RefPtr<WebCore::TextCheckingRequest>> m_pendingTextCheckingRequestMap;
 
     bool m_useFixedLayout { false };
-    bool m_drawsBackground { true };
 
     WebCore::Color m_underlayColor;
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to