Changeset 246938 in webkit
- Timestamp:
- Jun 28, 2019 2:39:36 PM (5 years ago)
- Location:
- trunk/Source
- Files:
-
- 31 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r246934 r246938 1 2019-06-28 Timothy Hatcher <timothy@apple.com> 2 3 Rename effectiveAppearanceIsInactive and useInactiveAppearance to better match UIUserInterfaceLevel. 4 https://bugs.webkit.org/show_bug.cgi?id=199336 5 rdar://problem/52348938 6 7 Reviewed by Tim Horton. 8 9 * css/StyleColor.h: 10 * dom/Document.cpp: 11 (WebCore::Document::useElevatedUserInterfaceLevel const): 12 (WebCore::Document::styleColorOptions const): 13 (WebCore::Document::useInactiveAppearance const): Deleted. 14 * dom/Document.h: 15 * page/Page.cpp: 16 (WebCore::Page::effectiveAppearanceDidChange): 17 * page/Page.h: 18 (WebCore::Page::useElevatedUserInterfaceLevel const): 19 (WebCore::Page::useInactiveAppearance const): Deleted. 20 * platform/ios/LocalCurrentTraitCollection.h: 21 (WebCore::LocalCurrentTraitCollection::usingElevatedUserInterfaceLevel const): 22 (WebCore::LocalCurrentTraitCollection::usingBaseLevelAppearance const): Deleted. 23 * platform/ios/LocalCurrentTraitCollection.mm: 24 (WebCore::LocalCurrentTraitCollection::LocalCurrentTraitCollection): 25 * rendering/RenderThemeIOS.mm: 26 (WebCore::RenderThemeIOS::systemColor const): 27 * testing/InternalSettings.cpp: 28 (WebCore::InternalSettings::setUseDarkAppearanceInternal): 29 1 30 2019-06-28 Simon Fraser <simon.fraser@apple.com> 2 31 -
trunk/Source/WebCore/css/StyleColor.h
r245072 r246938 56 56 UseSystemAppearance = 1 << 1, 57 57 UseDarkAppearance = 1 << 2, 58 Use InactiveAppearance= 1 << 358 UseElevatedUserInterfaceLevel = 1 << 3 59 59 }; 60 60 -
trunk/Source/WebCore/dom/Document.cpp
r246890 r246938 6959 6959 } 6960 6960 6961 bool Document::use InactiveAppearance() const6961 bool Document::useElevatedUserInterfaceLevel() const 6962 6962 { 6963 6963 if (auto* documentPage = page()) 6964 return documentPage->use InactiveAppearance();6964 return documentPage->useElevatedUserInterfaceLevel(); 6965 6965 return false; 6966 6966 } … … 6973 6973 if (useDarkAppearance(style)) 6974 6974 options.add(StyleColor::Options::UseDarkAppearance); 6975 if (use InactiveAppearance())6976 options.add(StyleColor::Options::Use InactiveAppearance);6975 if (useElevatedUserInterfaceLevel()) 6976 options.add(StyleColor::Options::UseElevatedUserInterfaceLevel); 6977 6977 return options; 6978 6978 } -
trunk/Source/WebCore/dom/Document.h
r246844 r246938 565 565 566 566 WEBCORE_EXPORT bool useSystemAppearance() const; 567 WEBCORE_EXPORT bool use InactiveAppearance() const;567 WEBCORE_EXPORT bool useElevatedUserInterfaceLevel() const; 568 568 WEBCORE_EXPORT bool useDarkAppearance(const RenderStyle*) const; 569 569 -
trunk/Source/WebCore/page/Page.cpp
r246490 r246938 2728 2728 } 2729 2729 2730 void Page::effectiveAppearanceDidChange(bool useDarkAppearance, bool use InactiveAppearance)2730 void Page::effectiveAppearanceDidChange(bool useDarkAppearance, bool useElevatedUserInterfaceLevel) 2731 2731 { 2732 2732 #if HAVE(OS_DARK_MODE_SUPPORT) 2733 if (m_useDarkAppearance == useDarkAppearance && m_use InactiveAppearance == useInactiveAppearance)2733 if (m_useDarkAppearance == useDarkAppearance && m_useElevatedUserInterfaceLevel == useElevatedUserInterfaceLevel) 2734 2734 return; 2735 2735 2736 2736 m_useDarkAppearance = useDarkAppearance; 2737 m_use InactiveAppearance = useInactiveAppearance;2737 m_useElevatedUserInterfaceLevel = useElevatedUserInterfaceLevel; 2738 2738 2739 2739 InspectorInstrumentation::defaultAppearanceDidChange(*this, useDarkAppearance); … … 2743 2743 UNUSED_PARAM(useDarkAppearance); 2744 2744 2745 if (m_use InactiveAppearance == useInactiveAppearance)2746 return; 2747 2748 m_use InactiveAppearance = useInactiveAppearance;2745 if (m_useElevatedUserInterfaceLevel == useElevatedUserInterfaceLevel) 2746 return; 2747 2748 m_useElevatedUserInterfaceLevel = useElevatedUserInterfaceLevel; 2749 2749 2750 2750 appearanceDidChange(); -
trunk/Source/WebCore/page/Page.h
r245778 r246938 381 381 382 382 WEBCORE_EXPORT bool useDarkAppearance() const; 383 bool use InactiveAppearance() const { return m_useInactiveAppearance; }384 WEBCORE_EXPORT void effectiveAppearanceDidChange(bool useDarkAppearance, bool use InactiveAppearance);383 bool useElevatedUserInterfaceLevel() const { return m_useElevatedUserInterfaceLevel; } 384 WEBCORE_EXPORT void effectiveAppearanceDidChange(bool useDarkAppearance, bool useElevatedUserInterfaceLevel); 385 385 bool defaultUseDarkAppearance() const { return m_useDarkAppearance; } 386 386 void setUseDarkAppearanceOverride(Optional<bool>); … … 838 838 839 839 bool m_useSystemAppearance { false }; 840 bool m_use InactiveAppearance{ false };840 bool m_useElevatedUserInterfaceLevel { false }; 841 841 bool m_useDarkAppearance { false }; 842 842 Optional<bool> m_useDarkAppearanceOverride; -
trunk/Source/WebCore/platform/ios/LocalCurrentTraitCollection.h
r246270 r246938 41 41 42 42 public: 43 WEBCORE_EXPORT LocalCurrentTraitCollection(bool useDarkAppearance, bool use BaseLevelAppearance);43 WEBCORE_EXPORT LocalCurrentTraitCollection(bool useDarkAppearance, bool useElevatedUserInterfaceLevel); 44 44 WEBCORE_EXPORT LocalCurrentTraitCollection(UITraitCollection *); 45 45 WEBCORE_EXPORT ~LocalCurrentTraitCollection(); … … 54 54 } 55 55 56 bool using BaseLevelAppearance() const56 bool usingElevatedUserInterfaceLevel() const 57 57 { 58 58 #if HAVE(OS_DARK_MODE_SUPPORT) 59 return m_using BaseLevelAppearance;59 return m_usingElevatedUserInterfaceLevel; 60 60 #else 61 return true;61 return false; 62 62 #endif 63 63 } … … 67 67 RetainPtr<UITraitCollection> m_savedTraitCollection; 68 68 bool m_usingDarkAppearance { false }; 69 bool m_using BaseLevelAppearance { true };69 bool m_usingElevatedUserInterfaceLevel { false }; 70 70 #endif 71 71 }; -
trunk/Source/WebCore/platform/ios/LocalCurrentTraitCollection.mm
r246270 r246938 32 32 namespace WebCore { 33 33 34 LocalCurrentTraitCollection::LocalCurrentTraitCollection(bool useDarkAppearance, bool use BaseLevelAppearance)34 LocalCurrentTraitCollection::LocalCurrentTraitCollection(bool useDarkAppearance, bool useElevatedUserInterfaceLevel) 35 35 { 36 36 #if HAVE(OS_DARK_MODE_SUPPORT) 37 37 m_savedTraitCollection = [PAL::getUITraitCollectionClass() _currentTraitCollection]; 38 38 m_usingDarkAppearance = useDarkAppearance; 39 m_using BaseLevelAppearance = useBaseLevelAppearance;39 m_usingElevatedUserInterfaceLevel = useElevatedUserInterfaceLevel; 40 40 41 41 auto userInterfaceStyleTrait = [PAL::getUITraitCollectionClass() traitCollectionWithUserInterfaceStyle:m_usingDarkAppearance ? UIUserInterfaceStyleDark : UIUserInterfaceStyleLight]; 42 auto backgroundLevelTrait = [PAL::getUITraitCollectionClass() traitCollectionWithUserInterfaceLevel:m_using BaseLevelAppearance ? UIUserInterfaceLevelBase : UIUserInterfaceLevelElevated];42 auto backgroundLevelTrait = [PAL::getUITraitCollectionClass() traitCollectionWithUserInterfaceLevel:m_usingElevatedUserInterfaceLevel ? UIUserInterfaceLevelElevated : UIUserInterfaceLevelBase]; 43 43 auto newTraitCollection = [PAL::getUITraitCollectionClass() traitCollectionWithTraitsFromCollections:@[ m_savedTraitCollection.get(), userInterfaceStyleTrait, backgroundLevelTrait ]]; 44 44 … … 46 46 #else 47 47 UNUSED_PARAM(useDarkAppearance); 48 UNUSED_PARAM(use BaseLevelAppearance);48 UNUSED_PARAM(useElevatedUserInterfaceLevel); 49 49 #endif 50 50 } … … 55 55 m_savedTraitCollection = [PAL::getUITraitCollectionClass() _currentTraitCollection]; 56 56 m_usingDarkAppearance = traitCollection.userInterfaceStyle == UIUserInterfaceStyleDark; 57 m_using BaseLevelAppearance = traitCollection.userInterfaceLevel == UIUserInterfaceLevelBase;57 m_usingElevatedUserInterfaceLevel = traitCollection.userInterfaceLevel == UIUserInterfaceLevelElevated; 58 58 59 59 [PAL::getUITraitCollectionClass() _setCurrentTraitCollection:traitCollection]; -
trunk/Source/WebCore/rendering/RenderThemeIOS.mm
r246270 r246938 1445 1445 return cache.systemStyleColors.ensure(cssValueID, [this, cssValueID, options] () -> Color { 1446 1446 const bool useDarkAppearance = options.contains(StyleColor::Options::UseDarkAppearance); 1447 const bool use InactiveAppearance = options.contains(StyleColor::Options::UseInactiveAppearance);1448 LocalCurrentTraitCollection localTraitCollection(useDarkAppearance, use InactiveAppearance);1447 const bool useElevatedUserInterfaceLevel = options.contains(StyleColor::Options::UseElevatedUserInterfaceLevel); 1448 LocalCurrentTraitCollection localTraitCollection(useDarkAppearance, useElevatedUserInterfaceLevel); 1449 1449 1450 1450 auto cssColorToSelector = [cssValueID] () -> SEL { -
trunk/Source/WebCore/testing/InternalSettings.cpp
r245072 r246938 549 549 #endif 550 550 ASSERT(m_page); 551 m_page->effectiveAppearanceDidChange(useDarkAppearance, m_page->use InactiveAppearance());551 m_page->effectiveAppearanceDidChange(useDarkAppearance, m_page->useElevatedUserInterfaceLevel()); 552 552 } 553 553 -
trunk/Source/WebKit/ChangeLog
r246933 r246938 1 2019-06-28 Timothy Hatcher <timothy@apple.com> 2 3 Rename effectiveAppearanceIsInactive and useInactiveAppearance to better match UIUserInterfaceLevel. 4 https://bugs.webkit.org/show_bug.cgi?id=199336 5 rdar://problem/52348938 6 7 Reviewed by Tim Horton. 8 9 * Shared/WebPageCreationParameters.cpp: 10 (WebKit::WebPageCreationParameters::encode const): 11 (WebKit::WebPageCreationParameters::decode): 12 * Shared/WebPageCreationParameters.h: 13 * UIProcess/API/Cocoa/WKWebView.mm: 14 (-[WKWebView _effectiveUserInterfaceLevelIsElevated]): 15 (-[WKWebView _effectiveAppearanceIsInactive]): Deleted. 16 * UIProcess/API/Cocoa/WKWebViewInternal.h: 17 * UIProcess/Cocoa/WebViewImpl.h: 18 * UIProcess/Cocoa/WebViewImpl.mm: 19 (WebKit::WebViewImpl::effectiveUserInterfaceLevelIsElevated): 20 (WebKit::WebViewImpl::effectiveAppearanceIsInactive): Deleted. 21 * UIProcess/PageClient.h: 22 (WebKit::PageClient::effectiveUserInterfaceLevelIsElevated const): 23 (WebKit::PageClient::effectiveAppearanceIsInactive const): Deleted. 24 * UIProcess/WebPageProxy.cpp: 25 (WebKit::WebPageProxy::creationParameters): 26 (WebKit::WebPageProxy::useElevatedUserInterfaceLevel const): 27 (WebKit::WebPageProxy::effectiveAppearanceDidChange): 28 (WebKit::WebPageProxy::useInactiveAppearance const): Deleted. 29 * UIProcess/WebPageProxy.h: 30 * UIProcess/ios/PageClientImplIOS.h: 31 * UIProcess/ios/PageClientImplIOS.mm: 32 (WebKit::PageClientImpl::effectiveUserInterfaceLevelIsElevated const): 33 (WebKit::PageClientImpl::effectiveAppearanceIsInactive const): Deleted. 34 * UIProcess/mac/PageClientImplMac.h: 35 * UIProcess/mac/PageClientImplMac.mm: 36 (WebKit::PageClientImpl::effectiveUserInterfaceLevelIsElevated const): 37 (WebKit::PageClientImpl::effectiveAppearanceIsInactive const): Deleted. 38 * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: 39 (WKBundlePageSetUseDarkAppearance): 40 * WebProcess/WebPage/WebPage.cpp: 41 (WebKit::m_shrinkToFitContentTimer): 42 (WebKit::WebPage::effectiveAppearanceDidChange): 43 * WebProcess/WebPage/WebPage.h: 44 * WebProcess/WebPage/WebPage.messages.in: 45 1 46 2019-06-28 Jer Noble <jer.noble@apple.com> 2 47 -
trunk/Source/WebKit/Shared/WebPageCreationParameters.cpp
r246347 r246938 79 79 encoder << isProcessSwap; 80 80 encoder << useDarkAppearance; 81 encoder << use InactiveAppearance;81 encoder << useElevatedUserInterfaceLevel; 82 82 83 83 #if PLATFORM(MAC) … … 256 256 if (!decoder.decode(parameters.useDarkAppearance)) 257 257 return WTF::nullopt; 258 if (!decoder.decode(parameters.use InactiveAppearance))258 if (!decoder.decode(parameters.useElevatedUserInterfaceLevel)) 259 259 return WTF::nullopt; 260 260 -
trunk/Source/WebKit/Shared/WebPageCreationParameters.h
r246347 r246938 139 139 140 140 bool useDarkAppearance { false }; 141 bool use InactiveAppearance{ false };141 bool useElevatedUserInterfaceLevel { false }; 142 142 143 143 #if PLATFORM(MAC) -
trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
r246933 r246938 481 481 } 482 482 483 - (BOOL)_effective AppearanceIsInactive483 - (BOOL)_effectiveUserInterfaceLevelIsElevated 484 484 { 485 485 #if HAVE(OS_DARK_MODE_SUPPORT) && !PLATFORM(WATCHOS) 486 return self.traitCollection.userInterfaceLevel != UIUserInterfaceLevelElevated;486 return self.traitCollection.userInterfaceLevel == UIUserInterfaceLevelElevated; 487 487 #else 488 488 return NO; -
trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewInternal.h
r246892 r246938 172 172 173 173 - (BOOL)_effectiveAppearanceIsDark; 174 - (BOOL)_effective AppearanceIsInactive;174 - (BOOL)_effectiveUserInterfaceLevelIsElevated; 175 175 #endif // PLATFORM(IOS_FAMILY) 176 176 -
trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.h
r246224 r246938 600 600 void effectiveAppearanceDidChange(); 601 601 bool effectiveAppearanceIsDark(); 602 bool effective AppearanceIsInactive();602 bool effectiveUserInterfaceLevelIsElevated(); 603 603 604 604 void takeFocus(WebCore::FocusDirection); -
trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm
r246224 r246938 5315 5315 } 5316 5316 5317 bool WebViewImpl::effectiveAppearanceIsInactive() 5318 { 5319 // FIXME: Use the window isKeyWindow state or view first responder status? 5317 bool WebViewImpl::effectiveUserInterfaceLevelIsElevated() 5318 { 5320 5319 return false; 5321 5320 } -
trunk/Source/WebKit/UIProcess/PageClient.h
r246347 r246938 328 328 329 329 virtual bool effectiveAppearanceIsDark() const { return false; } 330 virtual bool effective AppearanceIsInactive() const { return false; }330 virtual bool effectiveUserInterfaceLevelIsElevated() const { return false; } 331 331 332 332 virtual void enterAcceleratedCompositingMode(const LayerTreeContext&) = 0; -
trunk/Source/WebKit/UIProcess/WebPageProxy.cpp
r246856 r246938 7177 7177 parameters.controlledByAutomation = m_controlledByAutomation; 7178 7178 parameters.useDarkAppearance = useDarkAppearance(); 7179 parameters.use InactiveAppearance = useInactiveAppearance();7179 parameters.useElevatedUserInterfaceLevel = useElevatedUserInterfaceLevel(); 7180 7180 #if PLATFORM(MAC) 7181 7181 parameters.colorSpace = pageClient().colorSpace(); … … 8705 8705 } 8706 8706 8707 bool WebPageProxy::use InactiveAppearance() const8708 { 8709 return pageClient().effective AppearanceIsInactive();8707 bool WebPageProxy::useElevatedUserInterfaceLevel() const 8708 { 8709 return pageClient().effectiveUserInterfaceLevelIsElevated(); 8710 8710 } 8711 8711 … … 8715 8715 return; 8716 8716 8717 m_process->send(Messages::WebPage::EffectiveAppearanceDidChange(useDarkAppearance(), use InactiveAppearance()), m_pageID);8717 m_process->send(Messages::WebPage::EffectiveAppearanceDidChange(useDarkAppearance(), useElevatedUserInterfaceLevel()), m_pageID); 8718 8718 } 8719 8719 -
trunk/Source/WebKit/UIProcess/WebPageProxy.h
r246924 r246938 955 955 void effectiveAppearanceDidChange(); 956 956 bool useDarkAppearance() const; 957 bool use InactiveAppearance() const;957 bool useElevatedUserInterfaceLevel() const; 958 958 959 959 #if PLATFORM(COCOA) -
trunk/Source/WebKit/UIProcess/ios/PageClientImplIOS.h
r246347 r246938 143 143 144 144 bool effectiveAppearanceIsDark() const override; 145 bool effective AppearanceIsInactive() const override;145 bool effectiveUserInterfaceLevelIsElevated() const override; 146 146 147 147 void couldNotRestorePageState() override; -
trunk/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm
r246347 r246938 482 482 } 483 483 484 bool PageClientImpl::effective AppearanceIsInactive() const485 { 486 return [m_webView _effective AppearanceIsInactive];484 bool PageClientImpl::effectiveUserInterfaceLevelIsElevated() const 485 { 486 return [m_webView _effectiveUserInterfaceLevelIsElevated]; 487 487 } 488 488 -
trunk/Source/WebKit/UIProcess/mac/PageClientImplMac.h
r245072 r246938 242 242 WebCore::UserInterfaceLayoutDirection userInterfaceLayoutDirection() override; 243 243 bool effectiveAppearanceIsDark() const override; 244 bool effective AppearanceIsInactive() const override;244 bool effectiveUserInterfaceLevelIsElevated() const override; 245 245 246 246 #if ENABLE(DRAG_SUPPORT) -
trunk/Source/WebKit/UIProcess/mac/PageClientImplMac.mm
r245072 r246938 945 945 } 946 946 947 bool PageClientImpl::effective AppearanceIsInactive() const948 { 949 return m_impl->effective AppearanceIsInactive();947 bool PageClientImpl::effectiveUserInterfaceLevelIsElevated() const 948 { 949 return m_impl->effectiveUserInterfaceLevelIsElevated(); 950 950 } 951 951 -
trunk/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp
r245072 r246938 594 594 WebKit::WebPage* webPage = WebKit::toImpl(pageRef); 595 595 if (WebCore::Page* page = webPage ? webPage->corePage() : nullptr) 596 page->effectiveAppearanceDidChange(useDarkAppearance, page->use InactiveAppearance());596 page->effectiveAppearanceDidChange(useDarkAppearance, page->useElevatedUserInterfaceLevel()); 597 597 } 598 598 -
trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp
r246872 r246938 565 565 setPaginationLineGridEnabled(parameters.paginationLineGridEnabled); 566 566 567 effectiveAppearanceDidChange(parameters.useDarkAppearance, parameters.use InactiveAppearance);567 effectiveAppearanceDidChange(parameters.useDarkAppearance, parameters.useElevatedUserInterfaceLevel); 568 568 569 569 if (parameters.isEditable) … … 4657 4657 4658 4658 #if !PLATFORM(GTK) 4659 void WebPage::effectiveAppearanceDidChange(bool useDarkAppearance, bool use InactiveAppearance)4660 { 4661 corePage()->effectiveAppearanceDidChange(useDarkAppearance, use InactiveAppearance);4659 void WebPage::effectiveAppearanceDidChange(bool useDarkAppearance, bool useElevatedUserInterfaceLevel) 4660 { 4661 corePage()->effectiveAppearanceDidChange(useDarkAppearance, useElevatedUserInterfaceLevel); 4662 4662 } 4663 4663 #endif -
trunk/Source/WebKit/WebProcess/WebPage/WebPage.h
r246872 r246938 554 554 #endif 555 555 556 void effectiveAppearanceDidChange(bool useDarkAppearance, bool use InactiveAppearance);556 void effectiveAppearanceDidChange(bool useDarkAppearance, bool useElevatedUserInterfaceLevel); 557 557 558 558 bool windowIsFocused() const; -
trunk/Source/WebKit/WebProcess/WebPage/WebPage.messages.in
r246872 r246938 490 490 #endif 491 491 492 EffectiveAppearanceDidChange(bool useDarkAppearance, bool use InactiveAppearance);492 EffectiveAppearanceDidChange(bool useDarkAppearance, bool useElevatedUserInterfaceLevel); 493 493 494 494 #if PLATFORM(COCOA) -
trunk/Source/WebKitLegacy/mac/ChangeLog
r246925 r246938 1 2019-06-28 Timothy Hatcher <timothy@apple.com> 2 3 Rename effectiveAppearanceIsInactive and useInactiveAppearance to better match UIUserInterfaceLevel. 4 https://bugs.webkit.org/show_bug.cgi?id=199336 5 rdar://problem/52348938 6 7 Reviewed by Tim Horton. 8 9 * WebView/WebView.mm: 10 (-[WebView _commonInitializationWithFrameName:groupName:]): 11 (-[WebView _setUseDarkAppearance:]): 12 (-[WebView _useElevatedUserInterfaceLevel]): 13 (-[WebView _setUseElevatedUserInterfaceLevel:]): 14 (-[WebView _setUseDarkAppearance:useInactiveAppearance:]): 15 (-[WebView _setUseDarkAppearance:useElevatedUserInterfaceLevel:]): 16 (-[WebView _effectiveUserInterfaceLevelIsElevated]): 17 (-[WebView viewDidChangeEffectiveAppearance]): 18 (-[WebView _useInactiveAppearance]): Deleted. 19 (-[WebView _setUseInactiveAppearance:]): Deleted. 20 (-[WebView _effectiveAppearanceIsInactive]): Deleted. 21 * WebView/WebViewPrivate.h: 22 1 23 2019-06-28 Konstantin Tokarev <annulen@yandex.ru> 2 24 -
trunk/Source/WebKitLegacy/mac/WebView/WebView.mm
r246925 r246938 1586 1586 1587 1587 #if HAVE(OS_DARK_MODE_SUPPORT) && PLATFORM(MAC) 1588 _private->page->effectiveAppearanceDidChange(self._effectiveAppearanceIsDark, self._effective AppearanceIsInactive);1588 _private->page->effectiveAppearanceDidChange(self._effectiveAppearanceIsDark, self._effectiveUserInterfaceLevelIsElevated); 1589 1589 #endif 1590 1590 … … 2497 2497 if (!_private || !_private->page) 2498 2498 return; 2499 [self _setUseDarkAppearance:useDarkAppearance use InactiveAppearance:_private->page->useInactiveAppearance()];2500 } 2501 2502 - (BOOL)_use InactiveAppearance2499 [self _setUseDarkAppearance:useDarkAppearance useElevatedUserInterfaceLevel:_private->page->useElevatedUserInterfaceLevel()]; 2500 } 2501 2502 - (BOOL)_useElevatedUserInterfaceLevel 2503 2503 { 2504 2504 if (!_private || !_private->page) 2505 2505 return NO; 2506 return _private->page->use InactiveAppearance();2507 } 2508 2509 - (void)_setUse InactiveAppearance:(BOOL)useInactiveAppearance2506 return _private->page->useElevatedUserInterfaceLevel(); 2507 } 2508 2509 - (void)_setUseElevatedUserInterfaceLevel:(BOOL)useElevatedUserInterfaceLevel 2510 2510 { 2511 2511 if (!_private || !_private->page) 2512 2512 return; 2513 [self _setUseDarkAppearance:_private->page->useDarkAppearance() use InactiveAppearance:useInactiveAppearance];2513 [self _setUseDarkAppearance:_private->page->useDarkAppearance() useElevatedUserInterfaceLevel:useElevatedUserInterfaceLevel]; 2514 2514 } 2515 2515 2516 2516 - (void)_setUseDarkAppearance:(BOOL)useDarkAppearance useInactiveAppearance:(BOOL)useInactiveAppearance 2517 2517 { 2518 // FIXME: Remove once UIWebView has moved off this old method. 2519 [self _setUseDarkAppearance:useDarkAppearance useElevatedUserInterfaceLevel:!useInactiveAppearance]; 2520 } 2521 2522 - (void)_setUseDarkAppearance:(BOOL)useDarkAppearance useElevatedUserInterfaceLevel:(BOOL)useElevatedUserInterfaceLevel 2523 { 2518 2524 if (!_private || !_private->page) 2519 2525 return; 2520 _private->page->effectiveAppearanceDidChange(useDarkAppearance, use InactiveAppearance);2526 _private->page->effectiveAppearanceDidChange(useDarkAppearance, useElevatedUserInterfaceLevel); 2521 2527 } 2522 2528 … … 5187 5193 } 5188 5194 5189 - (bool)_effectiveAppearanceIsInactive 5190 { 5191 // FIXME: Use the window isKeyWindow state or view first responder status? 5195 - (bool)_effectiveUserInterfaceLevelIsElevated 5196 { 5192 5197 return false; 5193 5198 } … … 5216 5221 return; 5217 5222 5218 _private->page->effectiveAppearanceDidChange(self._effectiveAppearanceIsDark, self._effective AppearanceIsInactive);5223 _private->page->effectiveAppearanceDidChange(self._effectiveAppearanceIsDark, self._effectiveUserInterfaceLevelIsElevated); 5219 5224 } 5220 5225 #endif -
trunk/Source/WebKitLegacy/mac/WebView/WebViewPrivate.h
r246285 r246938 325 325 326 326 @property (nonatomic, assign, setter=_setUseDarkAppearance:) BOOL _useDarkAppearance; 327 @property (nonatomic, assign, setter=_setUse InactiveAppearance:) BOOL _useInactiveAppearance;327 @property (nonatomic, assign, setter=_setUseElevatedUserInterfaceLevel:) BOOL _useElevatedUserInterfaceLevel; 328 328 329 329 - (void)_setUseDarkAppearance:(BOOL)useDarkAppearance useInactiveAppearance:(BOOL)useInactiveAppearance; 330 - (void)_setUseDarkAppearance:(BOOL)useDarkAppearance useElevatedUserInterfaceLevel:(BOOL)useElevatedUserInterfaceLevel; 330 331 331 332 - (WebInspector *)inspector;
Note: See TracChangeset
for help on using the changeset viewer.