Title: [248568] branches/safari-608-branch/Source/WebKit
Revision
248568
Author
[email protected]
Date
2019-08-12 16:42:16 -0700 (Mon, 12 Aug 2019)

Log Message

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

    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-branch/Source/WebKit/ChangeLog (248567 => 248568)


--- branches/safari-608-branch/Source/WebKit/ChangeLog	2019-08-12 23:42:13 UTC (rev 248567)
+++ branches/safari-608-branch/Source/WebKit/ChangeLog	2019-08-12 23:42:16 UTC (rev 248568)
@@ -1,5 +1,36 @@
 2019-08-12  Alan Coon  <[email protected]>
 
+        Cherry-pick r248436. rdar://problem/54093228
+
+    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-12  Alan Coon  <[email protected]>
+
         Cherry-pick r248393. rdar://problem/54066682
 
     Regression(r247784) ResourceLoadStatisticsMemoryStore / ResourceLoadStatisticsPersistentStorage may get destroyed on the wrong thread

Modified: branches/safari-608-branch/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm (248567 => 248568)


--- branches/safari-608-branch/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm	2019-08-12 23:42:13 UTC (rev 248567)
+++ branches/safari-608-branch/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm	2019-08-12 23:42:16 UTC (rev 248568)
@@ -710,9 +710,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-branch/Source/WebKit/WebProcess/WebPage/WebPage.h (248567 => 248568)


--- branches/safari-608-branch/Source/WebKit/WebProcess/WebPage/WebPage.h	2019-08-12 23:42:13 UTC (rev 248567)
+++ branches/safari-608-branch/Source/WebKit/WebProcess/WebPage/WebPage.h	2019-08-12 23:42:16 UTC (rev 248568)
@@ -1630,7 +1630,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