Title: [229706] trunk/Source/WebCore
Revision
229706
Author
megan_gard...@apple.com
Date
2018-03-19 10:29:57 -0700 (Mon, 19 Mar 2018)

Log Message

Ensure local appearance actually mirrors the app's appearance
https://bugs.webkit.org/show_bug.cgi?id=183743

Reviewed by Tim Horton.

Not currently testable, will add tests in a later patch.

Current appearance isn't always accurate by default and needs to be set manually.

* platform/mac/LocalDefaultSystemAppearance.mm:
(WebCore::LocalDefaultSystemAppearance::LocalDefaultSystemAppearance):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (229705 => 229706)


--- trunk/Source/WebCore/ChangeLog	2018-03-19 08:40:56 UTC (rev 229705)
+++ trunk/Source/WebCore/ChangeLog	2018-03-19 17:29:57 UTC (rev 229706)
@@ -1,3 +1,17 @@
+2018-03-19  Megan Gardner  <megan_gard...@apple.com>
+
+        Ensure local appearance actually mirrors the app's appearance
+        https://bugs.webkit.org/show_bug.cgi?id=183743
+
+        Reviewed by Tim Horton.
+
+        Not currently testable, will add tests in a later patch.
+
+        Current appearance isn't always accurate by default and needs to be set manually.
+
+        * platform/mac/LocalDefaultSystemAppearance.mm:
+        (WebCore::LocalDefaultSystemAppearance::LocalDefaultSystemAppearance):
+
 2018-03-19  Zan Dobersek  <zdober...@igalia.com>
 
         Unreviewed GCC 4.9 build-fix after r229672.

Modified: trunk/Source/WebCore/platform/mac/LocalDefaultSystemAppearance.mm (229705 => 229706)


--- trunk/Source/WebCore/platform/mac/LocalDefaultSystemAppearance.mm	2018-03-19 08:40:56 UTC (rev 229705)
+++ trunk/Source/WebCore/platform/mac/LocalDefaultSystemAppearance.mm	2018-03-19 17:29:57 UTC (rev 229706)
@@ -34,10 +34,8 @@
 LocalDefaultSystemAppearance::LocalDefaultSystemAppearance(bool useSystemAppearance)
     : m_savedSystemAppearance()
 {
-    if (!useSystemAppearance) {
-        m_savedSystemAppearance = [NSAppearance currentAppearance];
-        [NSAppearance setCurrentAppearance:[NSAppearance appearanceNamed:NSAppearanceNameAqua]];
-    }
+    m_savedSystemAppearance = [NSAppearance currentAppearance];
+    [NSAppearance setCurrentAppearance:useSystemAppearance ? [NSApp effectiveAppearance] : [NSAppearance appearanceNamed:NSAppearanceNameAqua]];
 }
 
 LocalDefaultSystemAppearance::~LocalDefaultSystemAppearance()
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to