WebKit Bugzilla
Attachment 371889 Details for
Bug 198769
: Flash when tapping compose button after switching to/from dark mode without restarting Mail
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-198769-20190611160353.patch (text/plain), 2.56 KB, created by
Timothy Hatcher
on 2019-06-11 16:03:54 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Timothy Hatcher
Created:
2019-06-11 16:03:54 PDT
Size:
2.56 KB
patch
obsolete
>Subversion Revision: 246334 >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index cadb9675658769f77bfae7c82b2afc2fbfabf664..cafb64a09c7bd99487cc2e555d8c70ab93f4b450 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,19 @@ >+2019-06-11 Timothy Hatcher <timothy@apple.com> >+ >+ Flash when tapping compose button after switching to/from dark mode without restarting Mail. >+ https://bugs.webkit.org/show_bug.cgi?id=198769 >+ rdar://problem/51370037 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Accessing a dynamic color outside a normal UIView choke point without setting >+ UITraitCollection.currentTraitCollection first can cause undefined results. >+ Use LocalCurrentTraitCollection inside scrollViewBackgroundColor when accessing >+ the dynamic system UIColors. Also use systemBackgroundColor instead of white. >+ >+ * UIProcess/API/Cocoa/WKWebView.mm: >+ (scrollViewBackgroundColor): >+ > 2019-06-11 Michael Catanzaro <mcatanzaro@igalia.com> > > Unreviewed build warning fixes >diff --git a/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm b/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm >index a1beb77b0ec1fd680e8c3824feb83187359a0a4a..eb7e0f749cfd68b83acbc48281c1a0d8a7332000 100644 >--- a/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm >+++ b/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm >@@ -141,6 +141,7 @@ > #if PLATFORM(IOS_FAMILY) > #import "InteractionInformationAtPosition.h" > #import "InteractionInformationRequest.h" >+#import "LocalCurrentTraitCollection.h" > #import "ProcessThrottler.h" > #import "RemoteLayerTreeDrawingAreaProxy.h" > #import "RemoteScrollingCoordinatorProxy.h" >@@ -1702,10 +1703,22 @@ static WebCore::Color scrollViewBackgroundColor(WKWebView *webView) > if (!webView.opaque) > return WebCore::Color::transparent; > >+#if HAVE(OS_DARK_MODE_SUPPORT) >+ WebCore::LocalCurrentTraitCollection localTraitCollection(webView.traitCollection); >+#endif >+ > WebCore::Color color = baseScrollViewBackgroundColor(webView); > >- if (!color.isValid()) >- color = webView->_contentView ? [webView->_contentView backgroundColor].CGColor : UIColor.whiteColor.CGColor; >+ if (!color.isValid() && webView->_contentView) >+ color = [webView->_contentView backgroundColor].CGColor; >+ >+ if (!color.isValid()) { >+#if HAVE(OS_DARK_MODE_SUPPORT) >+ color = UIColor.systemBackgroundColor.CGColor; >+#else >+ color = Color::whiteColor; >+#endif >+ } > > CGFloat zoomScale = contentZoomScale(webView); > CGFloat minimumZoomScale = [webView->_scrollView minimumZoomScale];
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 198769
:
371889
|
371891
|
371892
|
371893
|
371897