Semantic colors don't update when accessibility Increase Contrast mode is enabled.
[WebKit-https.git] / Source / WebKit / UIProcess / Cocoa / WebViewImpl.mm
index 77a0928..16c1982 100644 (file)
@@ -1311,6 +1311,8 @@ WebViewImpl::WebViewImpl(NSView <WebViewImplDelegate> *view, WKWebView *outerWeb
 
     m_page->setAddsVisitedLinks(processPool.historyClient().addsVisitedLinks());
 
+    m_page->setUseDarkAppearance(effectiveAppearanceIsDark());
+
     m_page->initializeWebPage();
 
     registerDraggedTypes();
@@ -5013,6 +5015,11 @@ bool WebViewImpl::useSystemAppearance()
     return m_page->useSystemAppearance();
 }
 
+void WebViewImpl::effectiveAppearanceDidChange()
+{
+    setUseDarkAppearance(effectiveAppearanceIsDark());
+}
+
 bool WebViewImpl::effectiveAppearanceIsDark()
 {
 #if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400