WebKit Bugzilla
Attachment 371897 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-20190611164308.patch (text/plain), 4.98 KB, created by
Timothy Hatcher
on 2019-06-11 16:43:09 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Timothy Hatcher
Created:
2019-06-11 16:43:09 PDT
Size:
4.98 KB
patch
obsolete
>Subversion Revision: 246334 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index b72163a079b2c2a8f08a5dc59a00a7ad6f0e2f58..47ab29cadd4a719acd236179d057769eb0b044c6 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,13 @@ >+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 Tim Horton. >+ >+ * WebCore.xcodeproj/project.pbxproj: Make LocalCurrentTraitCollection.h a private header. >+ > 2019-06-11 Michael Catanzaro <mcatanzaro@igalia.com> > > Unreviewed build warning fixes >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index cadb9675658769f77bfae7c82b2afc2fbfabf664..e8ebbe517ae1a4919bb18bd4622f977aeb404237 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 Tim Horton. >+ >+ 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/WebCore/WebCore.xcodeproj/project.pbxproj b/Source/WebCore/WebCore.xcodeproj/project.pbxproj >index 8f7d3ca2dcb221ad45bf3584c17676582962c650..b65799a57d2ed21679394f15aad6888570f41657 100644 >--- a/Source/WebCore/WebCore.xcodeproj/project.pbxproj >+++ b/Source/WebCore/WebCore.xcodeproj/project.pbxproj >@@ -621,7 +621,7 @@ > 1C21E57D183ED1FF001C289D /* IOSurfacePool.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C21E57B183ED1FF001C289D /* IOSurfacePool.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 1C24EEA51C729CE40080F8FC /* FontFaceSet.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C24EEA31C729CE40080F8FC /* FontFaceSet.h */; }; > 1C24EEA91C72A7B40080F8FC /* JSFontFaceSet.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C24EEA71C72A7B40080F8FC /* JSFontFaceSet.h */; }; >- 1C43DE6B22AB4B8A001527D9 /* LocalCurrentTraitCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C43DE6822AB4B8A001527D9 /* LocalCurrentTraitCollection.h */; }; >+ 1C43DE6B22AB4B8A001527D9 /* LocalCurrentTraitCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C43DE6822AB4B8A001527D9 /* LocalCurrentTraitCollection.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 1C6626111C6E7CA600AB527C /* FontFace.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C66260F1C6E7CA600AB527C /* FontFace.h */; }; > 1C73A7132185757E004CCEA5 /* TextUnderlineOffset.h in Headers */ = {isa = PBXBuildFile; fileRef = 1CB6B4FB217B83940093B9CD /* TextUnderlineOffset.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 1C73A71521857587004CCEA5 /* TextDecorationThickness.h in Headers */ = {isa = PBXBuildFile; fileRef = 1CB6B4F8217B83930093B9CD /* TextDecorationThickness.h */; settings = {ATTRIBUTES = (Private, ); }; }; >diff --git a/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm b/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm >index a1beb77b0ec1fd680e8c3824feb83187359a0a4a..9ab7c52f0839fb28e3ecb1ba5a3c51373e97d281 100644 >--- a/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm >+++ b/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm >@@ -155,6 +155,7 @@ > #import <UIKit/UIApplication.h> > #import <WebCore/FrameLoaderTypes.h> > #import <WebCore/InspectorOverlay.h> >+#import <WebCore/LocalCurrentTraitCollection.h> > #import <WebCore/ScrollableArea.h> > #import <WebCore/WebBackgroundTaskController.h> > #import <WebCore/WebSQLiteDatabaseTrackerClient.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 = WebCore::Color::white; >+#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