WebKit Bugzilla
Attachment 373146 Details for
Bug 199336
: Rename effectiveAppearanceIsInactive and useInactiveAppearance to better match UIUserInterfaceLevel
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-199336-20190628132958.patch (text/plain), 34.10 KB, created by
Timothy Hatcher
on 2019-06-28 13:29:58 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Timothy Hatcher
Created:
2019-06-28 13:29:58 PDT
Size:
34.10 KB
patch
obsolete
>Subversion Revision: 246926 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index a5f9ee5a745a270ac756adc4c7647df9bbe09103..c67c6fd8f0ecd77eb4f25537cbe3045019f86574 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,32 @@ >+2019-06-28 Timothy Hatcher <timothy@apple.com> >+ >+ Rename effectiveAppearanceIsInactive and useInactiveAppearance to better match UIUserInterfaceLevel. >+ https://bugs.webkit.org/show_bug.cgi?id=199336 >+ rdar://problem/52348938 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * css/StyleColor.h: >+ * dom/Document.cpp: >+ (WebCore::Document::useElevatedUserInterfaceLevel const): >+ (WebCore::Document::styleColorOptions const): >+ (WebCore::Document::useInactiveAppearance const): Deleted. >+ * dom/Document.h: >+ * page/Page.cpp: >+ (WebCore::Page::effectiveAppearanceDidChange): >+ * page/Page.h: >+ (WebCore::Page::useElevatedUserInterfaceLevel const): >+ (WebCore::Page::useInactiveAppearance const): Deleted. >+ * platform/ios/LocalCurrentTraitCollection.h: >+ (WebCore::LocalCurrentTraitCollection::usingElevatedUserInterfaceLevel const): >+ (WebCore::LocalCurrentTraitCollection::usingBaseLevelAppearance const): Deleted. >+ * platform/ios/LocalCurrentTraitCollection.mm: >+ (WebCore::LocalCurrentTraitCollection::LocalCurrentTraitCollection): >+ * rendering/RenderThemeIOS.mm: >+ (WebCore::RenderThemeIOS::systemColor const): >+ * testing/InternalSettings.cpp: >+ (WebCore::InternalSettings::setUseDarkAppearanceInternal): >+ > 2019-06-28 Konstantin Tokarev <annulen@yandex.ru> > > Remove traces of ENABLE_ICONDATABASE remaining after its removal in 219733 >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 52ce4c1b7cf2009cd2b8232093912b2cfbfdd053..3b5b681b43c984ec90e8fa96d2f73a1890285140 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,48 @@ >+2019-06-28 Timothy Hatcher <timothy@apple.com> >+ >+ Rename effectiveAppearanceIsInactive and useInactiveAppearance to better match UIUserInterfaceLevel. >+ https://bugs.webkit.org/show_bug.cgi?id=199336 >+ rdar://problem/52348938 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * Shared/WebPageCreationParameters.cpp: >+ (WebKit::WebPageCreationParameters::encode const): >+ (WebKit::WebPageCreationParameters::decode): >+ * Shared/WebPageCreationParameters.h: >+ * UIProcess/API/Cocoa/WKWebView.mm: >+ (-[WKWebView _effectiveUserInterfaceLevelIsElevated]): >+ (-[WKWebView _effectiveAppearanceIsInactive]): Deleted. >+ * UIProcess/API/Cocoa/WKWebViewInternal.h: >+ * UIProcess/Cocoa/WebViewImpl.h: >+ * UIProcess/Cocoa/WebViewImpl.mm: >+ (WebKit::WebViewImpl::effectiveUserInterfaceLevelIsElevated): >+ (WebKit::WebViewImpl::effectiveAppearanceIsInactive): Deleted. >+ * UIProcess/PageClient.h: >+ (WebKit::PageClient::effectiveUserInterfaceLevelIsElevated const): >+ (WebKit::PageClient::effectiveAppearanceIsInactive const): Deleted. >+ * UIProcess/WebPageProxy.cpp: >+ (WebKit::WebPageProxy::creationParameters): >+ (WebKit::WebPageProxy::useElevatedUserInterfaceLevel const): >+ (WebKit::WebPageProxy::effectiveAppearanceDidChange): >+ (WebKit::WebPageProxy::useInactiveAppearance const): Deleted. >+ * UIProcess/WebPageProxy.h: >+ * UIProcess/ios/PageClientImplIOS.h: >+ * UIProcess/ios/PageClientImplIOS.mm: >+ (WebKit::PageClientImpl::effectiveUserInterfaceLevelIsElevated const): >+ (WebKit::PageClientImpl::effectiveAppearanceIsInactive const): Deleted. >+ * UIProcess/mac/PageClientImplMac.h: >+ * UIProcess/mac/PageClientImplMac.mm: >+ (WebKit::PageClientImpl::effectiveUserInterfaceLevelIsElevated const): >+ (WebKit::PageClientImpl::effectiveAppearanceIsInactive const): Deleted. >+ * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: >+ (WKBundlePageSetUseDarkAppearance): >+ * WebProcess/WebPage/WebPage.cpp: >+ (WebKit::m_shrinkToFitContentTimer): >+ (WebKit::WebPage::effectiveAppearanceDidChange): >+ * WebProcess/WebPage/WebPage.h: >+ * WebProcess/WebPage/WebPage.messages.in: >+ > 2019-06-28 Antti Koivisto <antti@apple.com> > > [iOS Scrolling] Propagate scrolls to non-nested UIScrollViews >diff --git a/Source/WebKitLegacy/mac/ChangeLog b/Source/WebKitLegacy/mac/ChangeLog >index 47657909a01642ea5f90a0ce63ede137d40beb06..7aea2b1715f168581efc70bf5cdab7da72f8ff22 100644 >--- a/Source/WebKitLegacy/mac/ChangeLog >+++ b/Source/WebKitLegacy/mac/ChangeLog >@@ -1,3 +1,25 @@ >+2019-06-28 Timothy Hatcher <timothy@apple.com> >+ >+ Rename effectiveAppearanceIsInactive and useInactiveAppearance to better match UIUserInterfaceLevel. >+ https://bugs.webkit.org/show_bug.cgi?id=199336 >+ rdar://problem/52348938 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * WebView/WebView.mm: >+ (-[WebView _commonInitializationWithFrameName:groupName:]): >+ (-[WebView _setUseDarkAppearance:]): >+ (-[WebView _useElevatedUserInterfaceLevel]): >+ (-[WebView _setUseElevatedUserInterfaceLevel:]): >+ (-[WebView _setUseDarkAppearance:useInactiveAppearance:]): >+ (-[WebView _setUseDarkAppearance:useElevatedUserInterfaceLevel:]): >+ (-[WebView _effectiveUserInterfaceLevelIsElevated]): >+ (-[WebView viewDidChangeEffectiveAppearance]): >+ (-[WebView _useInactiveAppearance]): Deleted. >+ (-[WebView _setUseInactiveAppearance:]): Deleted. >+ (-[WebView _effectiveAppearanceIsInactive]): Deleted. >+ * WebView/WebViewPrivate.h: >+ > 2019-06-28 Konstantin Tokarev <annulen@yandex.ru> > > Remove traces of ENABLE_ICONDATABASE remaining after its removal in 219733 >diff --git a/Source/WebCore/css/StyleColor.h b/Source/WebCore/css/StyleColor.h >index 853e4ab3fdf42938673a6c3b0fc840bd703b3d65..1448ade5b27f1a86acb15f193d59f09deab30ec7 100644 >--- a/Source/WebCore/css/StyleColor.h >+++ b/Source/WebCore/css/StyleColor.h >@@ -55,7 +55,7 @@ public: > ForVisitedLink = 1 << 0, > UseSystemAppearance = 1 << 1, > UseDarkAppearance = 1 << 2, >- UseInactiveAppearance = 1 << 3 >+ UseElevatedUserInterfaceLevel = 1 << 3 > }; > > static Color colorFromKeyword(CSSValueID, OptionSet<Options>); >diff --git a/Source/WebCore/dom/Document.cpp b/Source/WebCore/dom/Document.cpp >index 43dc4adee84c0480982db7d7b6812d5f695ed0a0..78e59127508d98f97539858761b4dd3649e2aad2 100644 >--- a/Source/WebCore/dom/Document.cpp >+++ b/Source/WebCore/dom/Document.cpp >@@ -6958,10 +6958,10 @@ bool Document::useDarkAppearance(const RenderStyle* style) const > return false; > } > >-bool Document::useInactiveAppearance() const >+bool Document::useElevatedUserInterfaceLevel() const > { > if (auto* documentPage = page()) >- return documentPage->useInactiveAppearance(); >+ return documentPage->useElevatedUserInterfaceLevel(); > return false; > } > >@@ -6972,8 +6972,8 @@ OptionSet<StyleColor::Options> Document::styleColorOptions(const RenderStyle* st > options.add(StyleColor::Options::UseSystemAppearance); > if (useDarkAppearance(style)) > options.add(StyleColor::Options::UseDarkAppearance); >- if (useInactiveAppearance()) >- options.add(StyleColor::Options::UseInactiveAppearance); >+ if (useElevatedUserInterfaceLevel()) >+ options.add(StyleColor::Options::UseElevatedUserInterfaceLevel); > return options; > } > >diff --git a/Source/WebCore/dom/Document.h b/Source/WebCore/dom/Document.h >index 8e92d80356500716525b4cfd141425f10c119179..a1c8b14ca9605559a12538abac4c8cf0c75a1a39 100644 >--- a/Source/WebCore/dom/Document.h >+++ b/Source/WebCore/dom/Document.h >@@ -564,7 +564,7 @@ public: > float deviceScaleFactor() const; > > WEBCORE_EXPORT bool useSystemAppearance() const; >- WEBCORE_EXPORT bool useInactiveAppearance() const; >+ WEBCORE_EXPORT bool useElevatedUserInterfaceLevel() const; > WEBCORE_EXPORT bool useDarkAppearance(const RenderStyle*) const; > > OptionSet<StyleColor::Options> styleColorOptions(const RenderStyle*) const; >diff --git a/Source/WebCore/page/Page.cpp b/Source/WebCore/page/Page.cpp >index 90e4c935dcd0bcde2fc4c57fe222cc721f51d3c2..518c7a2dab5ac3a575fff343562f12896dc2da5b 100644 >--- a/Source/WebCore/page/Page.cpp >+++ b/Source/WebCore/page/Page.cpp >@@ -2727,14 +2727,14 @@ void Page::setUseSystemAppearance(bool value) > } > } > >-void Page::effectiveAppearanceDidChange(bool useDarkAppearance, bool useInactiveAppearance) >+void Page::effectiveAppearanceDidChange(bool useDarkAppearance, bool useElevatedUserInterfaceLevel) > { > #if HAVE(OS_DARK_MODE_SUPPORT) >- if (m_useDarkAppearance == useDarkAppearance && m_useInactiveAppearance == useInactiveAppearance) >+ if (m_useDarkAppearance == useDarkAppearance && m_useElevatedUserInterfaceLevel == useElevatedUserInterfaceLevel) > return; > > m_useDarkAppearance = useDarkAppearance; >- m_useInactiveAppearance = useInactiveAppearance; >+ m_useElevatedUserInterfaceLevel = useElevatedUserInterfaceLevel; > > InspectorInstrumentation::defaultAppearanceDidChange(*this, useDarkAppearance); > >@@ -2742,10 +2742,10 @@ void Page::effectiveAppearanceDidChange(bool useDarkAppearance, bool useInactive > #else > UNUSED_PARAM(useDarkAppearance); > >- if (m_useInactiveAppearance == useInactiveAppearance) >+ if (m_useElevatedUserInterfaceLevel == useElevatedUserInterfaceLevel) > return; > >- m_useInactiveAppearance = useInactiveAppearance; >+ m_useElevatedUserInterfaceLevel = useElevatedUserInterfaceLevel; > > appearanceDidChange(); > #endif >diff --git a/Source/WebCore/page/Page.h b/Source/WebCore/page/Page.h >index e7a1eae62ff7cd2551fa40f690940bfafa27aa44..2fab6e2e523c9553fb9bf84cbe0c4c9c41620593 100644 >--- a/Source/WebCore/page/Page.h >+++ b/Source/WebCore/page/Page.h >@@ -380,8 +380,8 @@ public: > WEBCORE_EXPORT void setUseSystemAppearance(bool); > > WEBCORE_EXPORT bool useDarkAppearance() const; >- bool useInactiveAppearance() const { return m_useInactiveAppearance; } >- WEBCORE_EXPORT void effectiveAppearanceDidChange(bool useDarkAppearance, bool useInactiveAppearance); >+ bool useElevatedUserInterfaceLevel() const { return m_useElevatedUserInterfaceLevel; } >+ WEBCORE_EXPORT void effectiveAppearanceDidChange(bool useDarkAppearance, bool useElevatedUserInterfaceLevel); > bool defaultUseDarkAppearance() const { return m_useDarkAppearance; } > void setUseDarkAppearanceOverride(Optional<bool>); > >@@ -837,7 +837,7 @@ private: > #endif > > bool m_useSystemAppearance { false }; >- bool m_useInactiveAppearance { false }; >+ bool m_useElevatedUserInterfaceLevel { false }; > bool m_useDarkAppearance { false }; > Optional<bool> m_useDarkAppearanceOverride; > >diff --git a/Source/WebCore/platform/ios/LocalCurrentTraitCollection.h b/Source/WebCore/platform/ios/LocalCurrentTraitCollection.h >index 626b014402f63c42bcc49cb01caf6000ff4d1eee..87da9dd305a073a771e38b00675d36eb5618372e 100644 >--- a/Source/WebCore/platform/ios/LocalCurrentTraitCollection.h >+++ b/Source/WebCore/platform/ios/LocalCurrentTraitCollection.h >@@ -40,7 +40,7 @@ class LocalCurrentTraitCollection { > WTF_MAKE_NONCOPYABLE(LocalCurrentTraitCollection); > > public: >- WEBCORE_EXPORT LocalCurrentTraitCollection(bool useDarkAppearance, bool useBaseLevelAppearance); >+ WEBCORE_EXPORT LocalCurrentTraitCollection(bool useDarkAppearance, bool useElevatedUserInterfaceLevel); > WEBCORE_EXPORT LocalCurrentTraitCollection(UITraitCollection *); > WEBCORE_EXPORT ~LocalCurrentTraitCollection(); > >@@ -53,12 +53,12 @@ public: > #endif > } > >- bool usingBaseLevelAppearance() const >+ bool usingElevatedUserInterfaceLevel() const > { > #if HAVE(OS_DARK_MODE_SUPPORT) >- return m_usingBaseLevelAppearance; >+ return m_usingElevatedUserInterfaceLevel; > #else >- return true; >+ return false; > #endif > } > >@@ -66,7 +66,7 @@ private: > #if HAVE(OS_DARK_MODE_SUPPORT) > RetainPtr<UITraitCollection> m_savedTraitCollection; > bool m_usingDarkAppearance { false }; >- bool m_usingBaseLevelAppearance { true }; >+ bool m_usingElevatedUserInterfaceLevel { false }; > #endif > }; > >diff --git a/Source/WebCore/platform/ios/LocalCurrentTraitCollection.mm b/Source/WebCore/platform/ios/LocalCurrentTraitCollection.mm >index 193567a14d22d835519f6f430ff0722700d44553..f90670162318246813d671377f652e0c317acd73 100644 >--- a/Source/WebCore/platform/ios/LocalCurrentTraitCollection.mm >+++ b/Source/WebCore/platform/ios/LocalCurrentTraitCollection.mm >@@ -31,21 +31,21 @@ > > namespace WebCore { > >-LocalCurrentTraitCollection::LocalCurrentTraitCollection(bool useDarkAppearance, bool useBaseLevelAppearance) >+LocalCurrentTraitCollection::LocalCurrentTraitCollection(bool useDarkAppearance, bool useElevatedUserInterfaceLevel) > { > #if HAVE(OS_DARK_MODE_SUPPORT) > m_savedTraitCollection = [PAL::getUITraitCollectionClass() _currentTraitCollection]; > m_usingDarkAppearance = useDarkAppearance; >- m_usingBaseLevelAppearance = useBaseLevelAppearance; >+ m_usingElevatedUserInterfaceLevel = useElevatedUserInterfaceLevel; > > auto userInterfaceStyleTrait = [PAL::getUITraitCollectionClass() traitCollectionWithUserInterfaceStyle:m_usingDarkAppearance ? UIUserInterfaceStyleDark : UIUserInterfaceStyleLight]; >- auto backgroundLevelTrait = [PAL::getUITraitCollectionClass() traitCollectionWithUserInterfaceLevel:m_usingBaseLevelAppearance ? UIUserInterfaceLevelBase : UIUserInterfaceLevelElevated]; >+ auto backgroundLevelTrait = [PAL::getUITraitCollectionClass() traitCollectionWithUserInterfaceLevel:m_usingElevatedUserInterfaceLevel ? UIUserInterfaceLevelElevated : UIUserInterfaceLevelBase]; > auto newTraitCollection = [PAL::getUITraitCollectionClass() traitCollectionWithTraitsFromCollections:@[ m_savedTraitCollection.get(), userInterfaceStyleTrait, backgroundLevelTrait ]]; > > [PAL::getUITraitCollectionClass() _setCurrentTraitCollection:newTraitCollection]; > #else > UNUSED_PARAM(useDarkAppearance); >- UNUSED_PARAM(useBaseLevelAppearance); >+ UNUSED_PARAM(useElevatedUserInterfaceLevel); > #endif > } > >@@ -54,7 +54,7 @@ LocalCurrentTraitCollection::LocalCurrentTraitCollection(UITraitCollection *trai > #if HAVE(OS_DARK_MODE_SUPPORT) > m_savedTraitCollection = [PAL::getUITraitCollectionClass() _currentTraitCollection]; > m_usingDarkAppearance = traitCollection.userInterfaceStyle == UIUserInterfaceStyleDark; >- m_usingBaseLevelAppearance = traitCollection.userInterfaceLevel == UIUserInterfaceLevelBase; >+ m_usingElevatedUserInterfaceLevel = traitCollection.userInterfaceLevel == UIUserInterfaceLevelElevated; > > [PAL::getUITraitCollectionClass() _setCurrentTraitCollection:traitCollection]; > #else >diff --git a/Source/WebCore/rendering/RenderThemeIOS.mm b/Source/WebCore/rendering/RenderThemeIOS.mm >index 9da48fe9aaf9977b3d27f9c0e1562b6dd624a1a2..1a6a7e560af561385d8d8b5f53247cf3a06162f8 100644 >--- a/Source/WebCore/rendering/RenderThemeIOS.mm >+++ b/Source/WebCore/rendering/RenderThemeIOS.mm >@@ -1444,8 +1444,8 @@ Color RenderThemeIOS::systemColor(CSSValueID cssValueID, OptionSet<StyleColor::O > auto& cache = colorCache(options); > return cache.systemStyleColors.ensure(cssValueID, [this, cssValueID, options] () -> Color { > const bool useDarkAppearance = options.contains(StyleColor::Options::UseDarkAppearance); >- const bool useInactiveAppearance = options.contains(StyleColor::Options::UseInactiveAppearance); >- LocalCurrentTraitCollection localTraitCollection(useDarkAppearance, useInactiveAppearance); >+ const bool useElevatedUserInterfaceLevel = options.contains(StyleColor::Options::UseElevatedUserInterfaceLevel); >+ LocalCurrentTraitCollection localTraitCollection(useDarkAppearance, useElevatedUserInterfaceLevel); > > auto cssColorToSelector = [cssValueID] () -> SEL { > switch (cssValueID) { >diff --git a/Source/WebCore/testing/InternalSettings.cpp b/Source/WebCore/testing/InternalSettings.cpp >index 16353d9e1f1943b64fc5c485269ef21adfbce9f8..e723a4771e0f0cc9baf3eed5cf9327c1172530b6 100644 >--- a/Source/WebCore/testing/InternalSettings.cpp >+++ b/Source/WebCore/testing/InternalSettings.cpp >@@ -548,7 +548,7 @@ void InternalSettings::setUseDarkAppearanceInternal(bool useDarkAppearance) > } > #endif > ASSERT(m_page); >- m_page->effectiveAppearanceDidChange(useDarkAppearance, m_page->useInactiveAppearance()); >+ m_page->effectiveAppearanceDidChange(useDarkAppearance, m_page->useElevatedUserInterfaceLevel()); > } > > ExceptionOr<void> InternalSettings::setUseDarkAppearance(bool useDarkAppearance) >diff --git a/Source/WebKit/Shared/WebPageCreationParameters.cpp b/Source/WebKit/Shared/WebPageCreationParameters.cpp >index 1b90d7cc3886e5d7f2ea5094de6eda5ac5b254d7..85f1198557d9c88b9f0841ed66d2e5cd59140fe3 100644 >--- a/Source/WebKit/Shared/WebPageCreationParameters.cpp >+++ b/Source/WebKit/Shared/WebPageCreationParameters.cpp >@@ -78,7 +78,7 @@ void WebPageCreationParameters::encode(IPC::Encoder& encoder) const > encoder << controlledByAutomation; > encoder << isProcessSwap; > encoder << useDarkAppearance; >- encoder << useInactiveAppearance; >+ encoder << useElevatedUserInterfaceLevel; > > #if PLATFORM(MAC) > encoder << colorSpace; >@@ -255,7 +255,7 @@ Optional<WebPageCreationParameters> WebPageCreationParameters::decode(IPC::Decod > return WTF::nullopt; > if (!decoder.decode(parameters.useDarkAppearance)) > return WTF::nullopt; >- if (!decoder.decode(parameters.useInactiveAppearance)) >+ if (!decoder.decode(parameters.useElevatedUserInterfaceLevel)) > return WTF::nullopt; > > #if PLATFORM(MAC) >diff --git a/Source/WebKit/Shared/WebPageCreationParameters.h b/Source/WebKit/Shared/WebPageCreationParameters.h >index f4b17e5a6bebb40ea632873b9fb593772e607f11..8c88212e902cfcda7ac62d41d6bff57e189a5904 100644 >--- a/Source/WebKit/Shared/WebPageCreationParameters.h >+++ b/Source/WebKit/Shared/WebPageCreationParameters.h >@@ -138,7 +138,7 @@ struct WebPageCreationParameters { > bool isProcessSwap { false }; > > bool useDarkAppearance { false }; >- bool useInactiveAppearance { false }; >+ bool useElevatedUserInterfaceLevel { false }; > > #if PLATFORM(MAC) > ColorSpaceData colorSpace; >diff --git a/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm b/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm >index 857ef857c5daac1f3940e814c15fbe6c8249dbb4..5cdd79cb23b0b415768177d230e8c718622e7b91 100644 >--- a/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm >+++ b/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm >@@ -479,10 +479,10 @@ - (BOOL)_effectiveAppearanceIsDark > return self.traitCollection.userInterfaceStyle == UIUserInterfaceStyleDark; > } > >-- (BOOL)_effectiveAppearanceIsInactive >+- (BOOL)_effectiveUserInterfaceLevelIsElevated > { > #if HAVE(OS_DARK_MODE_SUPPORT) && !PLATFORM(WATCHOS) >- return self.traitCollection.userInterfaceLevel != UIUserInterfaceLevelElevated; >+ return self.traitCollection.userInterfaceLevel == UIUserInterfaceLevelElevated; > #else > return NO; > #endif >diff --git a/Source/WebKit/UIProcess/API/Cocoa/WKWebViewInternal.h b/Source/WebKit/UIProcess/API/Cocoa/WKWebViewInternal.h >index d55abf401cbd7077874a7d9f059e58c5ce8a5b22..6b246121f8b5451e872cdedd4f7db7c088ada7ee 100644 >--- a/Source/WebKit/UIProcess/API/Cocoa/WKWebViewInternal.h >+++ b/Source/WebKit/UIProcess/API/Cocoa/WKWebViewInternal.h >@@ -171,7 +171,7 @@ struct PrintInfo; > @property (nonatomic, readonly, getter=_isRetainingActiveFocusedState) BOOL _retainingActiveFocusedState; > > - (BOOL)_effectiveAppearanceIsDark; >-- (BOOL)_effectiveAppearanceIsInactive; >+- (BOOL)_effectiveUserInterfaceLevelIsElevated; > #endif // PLATFORM(IOS_FAMILY) > > #if ENABLE(ATTACHMENT_ELEMENT) >diff --git a/Source/WebKit/UIProcess/Cocoa/WebViewImpl.h b/Source/WebKit/UIProcess/Cocoa/WebViewImpl.h >index e40fd90f5b4540149e6477af6e401bc9f0ac5167..a3ba9ef54d208a3c7d7e7e1bea4327723277289d 100644 >--- a/Source/WebKit/UIProcess/Cocoa/WebViewImpl.h >+++ b/Source/WebKit/UIProcess/Cocoa/WebViewImpl.h >@@ -599,7 +599,7 @@ public: > > void effectiveAppearanceDidChange(); > bool effectiveAppearanceIsDark(); >- bool effectiveAppearanceIsInactive(); >+ bool effectiveUserInterfaceLevelIsElevated(); > > void takeFocus(WebCore::FocusDirection); > >diff --git a/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm b/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm >index 254aef93d35ab6f798d25aed86a9c82e1efbd9f2..b9075386b556358c06cd5c27948c28d9afdac0aa 100644 >--- a/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm >+++ b/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm >@@ -5314,9 +5314,8 @@ bool WebViewImpl::effectiveAppearanceIsDark() > #endif > } > >-bool WebViewImpl::effectiveAppearanceIsInactive() >+bool WebViewImpl::effectiveUserInterfaceLevelIsElevated() > { >- // FIXME: Use the window isKeyWindow state or view first responder status? > return false; > } > >diff --git a/Source/WebKit/UIProcess/PageClient.h b/Source/WebKit/UIProcess/PageClient.h >index 1d07801af3484ed7a253618121f2ccc32a0d3be0..41204ae289762cbd4c6c40d66529aa2a0c2f58bd 100644 >--- a/Source/WebKit/UIProcess/PageClient.h >+++ b/Source/WebKit/UIProcess/PageClient.h >@@ -327,7 +327,7 @@ public: > #endif > > virtual bool effectiveAppearanceIsDark() const { return false; } >- virtual bool effectiveAppearanceIsInactive() const { return false; } >+ virtual bool effectiveUserInterfaceLevelIsElevated() const { return false; } > > virtual void enterAcceleratedCompositingMode(const LayerTreeContext&) = 0; > virtual void exitAcceleratedCompositingMode() = 0; >diff --git a/Source/WebKit/UIProcess/WebPageProxy.cpp b/Source/WebKit/UIProcess/WebPageProxy.cpp >index 2607b30034ec97be76a42b0d5a3286f4f3196549..18ffde722c55a15e9cb13e9a545e5f85b7b9f394 100644 >--- a/Source/WebKit/UIProcess/WebPageProxy.cpp >+++ b/Source/WebKit/UIProcess/WebPageProxy.cpp >@@ -7176,7 +7176,7 @@ WebPageCreationParameters WebPageProxy::creationParameters(WebProcessProxy& proc > parameters.layerHostingMode = m_layerHostingMode; > parameters.controlledByAutomation = m_controlledByAutomation; > parameters.useDarkAppearance = useDarkAppearance(); >- parameters.useInactiveAppearance = useInactiveAppearance(); >+ parameters.useElevatedUserInterfaceLevel = useElevatedUserInterfaceLevel(); > #if PLATFORM(MAC) > parameters.colorSpace = pageClient().colorSpace(); > parameters.useSystemAppearance = m_useSystemAppearance; >@@ -8704,9 +8704,9 @@ bool WebPageProxy::useDarkAppearance() const > return pageClient().effectiveAppearanceIsDark(); > } > >-bool WebPageProxy::useInactiveAppearance() const >+bool WebPageProxy::useElevatedUserInterfaceLevel() const > { >- return pageClient().effectiveAppearanceIsInactive(); >+ return pageClient().effectiveUserInterfaceLevelIsElevated(); > } > > void WebPageProxy::effectiveAppearanceDidChange() >@@ -8714,7 +8714,7 @@ void WebPageProxy::effectiveAppearanceDidChange() > if (!hasRunningProcess()) > return; > >- m_process->send(Messages::WebPage::EffectiveAppearanceDidChange(useDarkAppearance(), useInactiveAppearance()), m_pageID); >+ m_process->send(Messages::WebPage::EffectiveAppearanceDidChange(useDarkAppearance(), useElevatedUserInterfaceLevel()), m_pageID); > } > > #if PLATFORM(COCOA) >diff --git a/Source/WebKit/UIProcess/WebPageProxy.h b/Source/WebKit/UIProcess/WebPageProxy.h >index a80d15e458d643674a9a51d97fac444a237a7506..a19ee09649d4a737e889b2765b6c834d13b28a96 100644 >--- a/Source/WebKit/UIProcess/WebPageProxy.h >+++ b/Source/WebKit/UIProcess/WebPageProxy.h >@@ -954,7 +954,7 @@ public: > > void effectiveAppearanceDidChange(); > bool useDarkAppearance() const; >- bool useInactiveAppearance() const; >+ bool useElevatedUserInterfaceLevel() const; > > #if PLATFORM(COCOA) > // Called by the web process through a message. >diff --git a/Source/WebKit/UIProcess/ios/PageClientImplIOS.h b/Source/WebKit/UIProcess/ios/PageClientImplIOS.h >index 42930c4b45a17458d9d22ee77662ec07b7c32976..01cd86efd68199ca401d8f6d48e2239c449cd914 100644 >--- a/Source/WebKit/UIProcess/ios/PageClientImplIOS.h >+++ b/Source/WebKit/UIProcess/ios/PageClientImplIOS.h >@@ -142,7 +142,7 @@ private: > void didPerformDictionaryLookup(const WebCore::DictionaryPopupInfo&) override; > > bool effectiveAppearanceIsDark() const override; >- bool effectiveAppearanceIsInactive() const override; >+ bool effectiveUserInterfaceLevelIsElevated() const override; > > void couldNotRestorePageState() override; > void restorePageState(Optional<WebCore::FloatPoint>, const WebCore::FloatPoint&, const WebCore::FloatBoxExtent&, double) override; >diff --git a/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm b/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm >index 248bb230d67a5edebdc631b393b4793a42653444..399950380aa4745986222777faee37920469e8ec 100644 >--- a/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm >+++ b/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm >@@ -481,9 +481,9 @@ bool PageClientImpl::effectiveAppearanceIsDark() const > return [m_webView _effectiveAppearanceIsDark]; > } > >-bool PageClientImpl::effectiveAppearanceIsInactive() const >+bool PageClientImpl::effectiveUserInterfaceLevelIsElevated() const > { >- return [m_webView _effectiveAppearanceIsInactive]; >+ return [m_webView _effectiveUserInterfaceLevelIsElevated]; > } > > void PageClientImpl::setRemoteLayerTreeRootNode(RemoteLayerTreeNode* rootNode) >diff --git a/Source/WebKit/UIProcess/mac/PageClientImplMac.h b/Source/WebKit/UIProcess/mac/PageClientImplMac.h >index b767fa931fd1f5973e57fd98f60d5ba8d9b8b1c2..a7fdb0b0598375450f754e109eaca2b97c1a3161 100644 >--- a/Source/WebKit/UIProcess/mac/PageClientImplMac.h >+++ b/Source/WebKit/UIProcess/mac/PageClientImplMac.h >@@ -241,7 +241,7 @@ private: > > WebCore::UserInterfaceLayoutDirection userInterfaceLayoutDirection() override; > bool effectiveAppearanceIsDark() const override; >- bool effectiveAppearanceIsInactive() const override; >+ bool effectiveUserInterfaceLevelIsElevated() const override; > > #if ENABLE(DRAG_SUPPORT) > void didPerformDragOperation(bool handled) final; >diff --git a/Source/WebKit/UIProcess/mac/PageClientImplMac.mm b/Source/WebKit/UIProcess/mac/PageClientImplMac.mm >index 8124ec4e62c30011761781d9f2b38ab1eec65027..821417332eb147328f85ae5c7ff8795a8e682656 100644 >--- a/Source/WebKit/UIProcess/mac/PageClientImplMac.mm >+++ b/Source/WebKit/UIProcess/mac/PageClientImplMac.mm >@@ -944,9 +944,9 @@ bool PageClientImpl::effectiveAppearanceIsDark() const > return m_impl->effectiveAppearanceIsDark(); > } > >-bool PageClientImpl::effectiveAppearanceIsInactive() const >+bool PageClientImpl::effectiveUserInterfaceLevelIsElevated() const > { >- return m_impl->effectiveAppearanceIsInactive(); >+ return m_impl->effectiveUserInterfaceLevelIsElevated(); > } > > void PageClientImpl::takeFocus(WebCore::FocusDirection direction) >diff --git a/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp b/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp >index ac7be19e1022808836c62544606fbb5dc8f519ce..32eae270e1686b0e8657cb49b109037ad787d978 100644 >--- a/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp >+++ b/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp >@@ -593,7 +593,7 @@ void WKBundlePageSetUseDarkAppearance(WKBundlePageRef pageRef, bool useDarkAppea > { > WebKit::WebPage* webPage = WebKit::toImpl(pageRef); > if (WebCore::Page* page = webPage ? webPage->corePage() : nullptr) >- page->effectiveAppearanceDidChange(useDarkAppearance, page->useInactiveAppearance()); >+ page->effectiveAppearanceDidChange(useDarkAppearance, page->useElevatedUserInterfaceLevel()); > } > > bool WKBundlePageIsUsingDarkAppearance(WKBundlePageRef pageRef) >diff --git a/Source/WebKit/WebProcess/WebPage/WebPage.cpp b/Source/WebKit/WebProcess/WebPage/WebPage.cpp >index 3962e282f552940a483a4bbbb0746b49fb7a1a4d..3bcf0d785fff52da17b106ebac8f6fd0dd2a4b72 100644 >--- a/Source/WebKit/WebProcess/WebPage/WebPage.cpp >+++ b/Source/WebKit/WebProcess/WebPage/WebPage.cpp >@@ -564,7 +564,7 @@ WebPage::WebPage(PageIdentifier pageID, WebPageCreationParameters&& parameters) > setGapBetweenPages(parameters.gapBetweenPages); > setPaginationLineGridEnabled(parameters.paginationLineGridEnabled); > >- effectiveAppearanceDidChange(parameters.useDarkAppearance, parameters.useInactiveAppearance); >+ effectiveAppearanceDidChange(parameters.useDarkAppearance, parameters.useElevatedUserInterfaceLevel); > > if (parameters.isEditable) > setEditable(true); >@@ -4656,9 +4656,9 @@ void WebPage::setUseSystemAppearance(bool useSystemAppearance) > #endif > > #if !PLATFORM(GTK) >-void WebPage::effectiveAppearanceDidChange(bool useDarkAppearance, bool useInactiveAppearance) >+void WebPage::effectiveAppearanceDidChange(bool useDarkAppearance, bool useElevatedUserInterfaceLevel) > { >- corePage()->effectiveAppearanceDidChange(useDarkAppearance, useInactiveAppearance); >+ corePage()->effectiveAppearanceDidChange(useDarkAppearance, useElevatedUserInterfaceLevel); > } > #endif > >diff --git a/Source/WebKit/WebProcess/WebPage/WebPage.h b/Source/WebKit/WebProcess/WebPage/WebPage.h >index 39d0c219616fcb27c207faeb84120b952c6dbc21..15bcb90f5d929b764b1ca508f682f5cb43f2fc04 100644 >--- a/Source/WebKit/WebProcess/WebPage/WebPage.h >+++ b/Source/WebKit/WebProcess/WebPage/WebPage.h >@@ -553,7 +553,7 @@ public: > void setUseSystemAppearance(bool); > #endif > >- void effectiveAppearanceDidChange(bool useDarkAppearance, bool useInactiveAppearance); >+ void effectiveAppearanceDidChange(bool useDarkAppearance, bool useElevatedUserInterfaceLevel); > > bool windowIsFocused() const; > bool windowAndWebPageAreFocused() const; >diff --git a/Source/WebKit/WebProcess/WebPage/WebPage.messages.in b/Source/WebKit/WebProcess/WebPage/WebPage.messages.in >index 6346cd032e2b1928b4dba37550d982755755aad4..dad2d5e0585c0cad906244971089b68bf7a97982 100644 >--- a/Source/WebKit/WebProcess/WebPage/WebPage.messages.in >+++ b/Source/WebKit/WebProcess/WebPage/WebPage.messages.in >@@ -489,7 +489,7 @@ GenerateSyntheticEditingCommand(enum:uint8_t WebKit::SyntheticEditingCommandType > SetFooterBannerHeightForTesting(int height); > #endif > >- EffectiveAppearanceDidChange(bool useDarkAppearance, bool useInactiveAppearance); >+ EffectiveAppearanceDidChange(bool useDarkAppearance, bool useElevatedUserInterfaceLevel); > > #if PLATFORM(COCOA) > RequestActiveNowPlayingSessionInfo(WebKit::CallbackID callbackID) >diff --git a/Source/WebKitLegacy/mac/WebView/WebView.mm b/Source/WebKitLegacy/mac/WebView/WebView.mm >index d7cb65985a71e3f3394453d613a2df7ded2cf65b..262c74a0877bbe21ef7f1d81554c439c1193d4c2 100644 >--- a/Source/WebKitLegacy/mac/WebView/WebView.mm >+++ b/Source/WebKitLegacy/mac/WebView/WebView.mm >@@ -1585,7 +1585,7 @@ - (void)_commonInitializationWithFrameName:(NSString *)frameName groupName:(NSSt > #endif > > #if HAVE(OS_DARK_MODE_SUPPORT) && PLATFORM(MAC) >- _private->page->effectiveAppearanceDidChange(self._effectiveAppearanceIsDark, self._effectiveAppearanceIsInactive); >+ _private->page->effectiveAppearanceDidChange(self._effectiveAppearanceIsDark, self._effectiveUserInterfaceLevelIsElevated); > #endif > > _private->page->settings().setContentDispositionAttachmentSandboxEnabled(true); >@@ -2496,28 +2496,34 @@ - (void)_setUseDarkAppearance:(BOOL)useDarkAppearance > { > if (!_private || !_private->page) > return; >- [self _setUseDarkAppearance:useDarkAppearance useInactiveAppearance:_private->page->useInactiveAppearance()]; >+ [self _setUseDarkAppearance:useDarkAppearance useElevatedUserInterfaceLevel:_private->page->useElevatedUserInterfaceLevel()]; > } > >-- (BOOL)_useInactiveAppearance >+- (BOOL)_useElevatedUserInterfaceLevel > { > if (!_private || !_private->page) > return NO; >- return _private->page->useInactiveAppearance(); >+ return _private->page->useElevatedUserInterfaceLevel(); > } > >-- (void)_setUseInactiveAppearance:(BOOL)useInactiveAppearance >+- (void)_setUseElevatedUserInterfaceLevel:(BOOL)useElevatedUserInterfaceLevel > { > if (!_private || !_private->page) > return; >- [self _setUseDarkAppearance:_private->page->useDarkAppearance() useInactiveAppearance:useInactiveAppearance]; >+ [self _setUseDarkAppearance:_private->page->useDarkAppearance() useElevatedUserInterfaceLevel:useElevatedUserInterfaceLevel]; > } > > - (void)_setUseDarkAppearance:(BOOL)useDarkAppearance useInactiveAppearance:(BOOL)useInactiveAppearance >+{ >+ // FIXME: Remove once UIWebView has moved off this old method. >+ [self _setUseDarkAppearance:useDarkAppearance useElevatedUserInterfaceLevel:!useInactiveAppearance]; >+} >+ >+- (void)_setUseDarkAppearance:(BOOL)useDarkAppearance useElevatedUserInterfaceLevel:(BOOL)useElevatedUserInterfaceLevel > { > if (!_private || !_private->page) > return; >- _private->page->effectiveAppearanceDidChange(useDarkAppearance, useInactiveAppearance); >+ _private->page->effectiveAppearanceDidChange(useDarkAppearance, useElevatedUserInterfaceLevel); > } > > + (void)_setIconLoadingEnabled:(BOOL)enabled >@@ -5186,9 +5192,8 @@ - (bool)_effectiveAppearanceIsDark > return [appearance isEqualToString:NSAppearanceNameDarkAqua]; > } > >-- (bool)_effectiveAppearanceIsInactive >+- (bool)_effectiveUserInterfaceLevelIsElevated > { >- // FIXME: Use the window isKeyWindow state or view first responder status? > return false; > } > #endif >@@ -5215,7 +5220,7 @@ - (void)viewDidChangeEffectiveAppearance > if (!_private || !_private->page) > return; > >- _private->page->effectiveAppearanceDidChange(self._effectiveAppearanceIsDark, self._effectiveAppearanceIsInactive); >+ _private->page->effectiveAppearanceDidChange(self._effectiveAppearanceIsDark, self._effectiveUserInterfaceLevelIsElevated); > } > #endif > >diff --git a/Source/WebKitLegacy/mac/WebView/WebViewPrivate.h b/Source/WebKitLegacy/mac/WebView/WebViewPrivate.h >index 131277df5579ff665f94b7834489191231293709..50aaf80c937a9ed57f4fab52e2c01456a4f51dbd 100644 >--- a/Source/WebKitLegacy/mac/WebView/WebViewPrivate.h >+++ b/Source/WebKitLegacy/mac/WebView/WebViewPrivate.h >@@ -324,9 +324,10 @@ typedef enum { > + (BOOL)_isIconLoadingEnabled; > > @property (nonatomic, assign, setter=_setUseDarkAppearance:) BOOL _useDarkAppearance; >-@property (nonatomic, assign, setter=_setUseInactiveAppearance:) BOOL _useInactiveAppearance; >+@property (nonatomic, assign, setter=_setUseElevatedUserInterfaceLevel:) BOOL _useElevatedUserInterfaceLevel; > > - (void)_setUseDarkAppearance:(BOOL)useDarkAppearance useInactiveAppearance:(BOOL)useInactiveAppearance; >+- (void)_setUseDarkAppearance:(BOOL)useDarkAppearance useElevatedUserInterfaceLevel:(BOOL)useElevatedUserInterfaceLevel; > > - (WebInspector *)inspector; >
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 199336
: 373146