Title: [229741] trunk/Source/WebCore
Revision
229741
Author
timothy_hor...@apple.com
Date
2018-03-19 23:26:36 -0700 (Mon, 19 Mar 2018)

Log Message

Apply some SDK checks in LocalDefaultSystemAppearance
https://bugs.webkit.org/show_bug.cgi?id=183767
<rdar://problem/38649611>

Reviewed by Zalan Bujtas.

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

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (229740 => 229741)


--- trunk/Source/WebCore/ChangeLog	2018-03-20 05:34:48 UTC (rev 229740)
+++ trunk/Source/WebCore/ChangeLog	2018-03-20 06:26:36 UTC (rev 229741)
@@ -1,3 +1,16 @@
+2018-03-19  Tim Horton  <timothy_hor...@apple.com>
+
+        Apply some SDK checks in LocalDefaultSystemAppearance
+        https://bugs.webkit.org/show_bug.cgi?id=183767
+        <rdar://problem/38649611>
+
+        Reviewed by Zalan Bujtas.
+
+        * platform/mac/LocalDefaultSystemAppearance.h:
+        * platform/mac/LocalDefaultSystemAppearance.mm:
+        (WebCore::LocalDefaultSystemAppearance::LocalDefaultSystemAppearance):
+        (WebCore::LocalDefaultSystemAppearance::~LocalDefaultSystemAppearance):
+
 2018-03-19  Chris Dumez  <cdu...@apple.com>
 
         Have one service worker process per security origin

Modified: trunk/Source/WebCore/platform/mac/LocalDefaultSystemAppearance.h (229740 => 229741)


--- trunk/Source/WebCore/platform/mac/LocalDefaultSystemAppearance.h	2018-03-20 05:34:48 UTC (rev 229740)
+++ trunk/Source/WebCore/platform/mac/LocalDefaultSystemAppearance.h	2018-03-20 06:26:36 UTC (rev 229741)
@@ -42,7 +42,9 @@
     LocalDefaultSystemAppearance(bool useSystemAppearance);
     ~LocalDefaultSystemAppearance();
 private:
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400
     RetainPtr<NSAppearance> m_savedSystemAppearance;
+#endif
 };
     
 }

Modified: trunk/Source/WebCore/platform/mac/LocalDefaultSystemAppearance.mm (229740 => 229741)


--- trunk/Source/WebCore/platform/mac/LocalDefaultSystemAppearance.mm	2018-03-20 05:34:48 UTC (rev 229740)
+++ trunk/Source/WebCore/platform/mac/LocalDefaultSystemAppearance.mm	2018-03-20 06:26:36 UTC (rev 229741)
@@ -32,16 +32,21 @@
 namespace WebCore {
     
 LocalDefaultSystemAppearance::LocalDefaultSystemAppearance(bool useSystemAppearance)
-    : m_savedSystemAppearance()
 {
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400
     m_savedSystemAppearance = [NSAppearance currentAppearance];
     [NSAppearance setCurrentAppearance:useSystemAppearance ? [NSApp effectiveAppearance] : [NSAppearance appearanceNamed:NSAppearanceNameAqua]];
+#else
+    UNUSED_PARAM(useSystemAppearance);
+#endif
 }
 
 LocalDefaultSystemAppearance::~LocalDefaultSystemAppearance()
 {
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400
     if (m_savedSystemAppearance)
         [NSAppearance setCurrentAppearance:m_savedSystemAppearance.get()];
+#endif
 }
     
 }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to