Title: [248436] trunk/Source/WebKit
- Revision
- 248436
- Author
- [email protected]
- Date
- 2019-08-08 12:04:36 -0700 (Thu, 08 Aug 2019)
Log Message
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.
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (248435 => 248436)
--- trunk/Source/WebKit/ChangeLog 2019-08-08 19:04:35 UTC (rev 248435)
+++ trunk/Source/WebKit/ChangeLog 2019-08-08 19:04:36 UTC (rev 248436)
@@ -1,3 +1,16 @@
+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 Wenson Hsieh <[email protected]>
[iOS 13] Taps that interrupt momentum scrolling are recognized as clicks
Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm (248435 => 248436)
--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm 2019-08-08 19:04:35 UTC (rev 248435)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm 2019-08-08 19:04:36 UTC (rev 248436)
@@ -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: trunk/Source/WebKit/WebProcess/WebPage/WebPage.h (248435 => 248436)
--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.h 2019-08-08 19:04:35 UTC (rev 248435)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.h 2019-08-08 19:04:36 UTC (rev 248436)
@@ -1631,7 +1631,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