-
Notifications
You must be signed in to change notification settings - Fork 904
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix setting preferred color scheme logic for brave theme change #3281
Conversation
GN change disallows sources that aren't a source, header, or object file. We need to pass `process_only` flag to process_version to not create source_set out of the version file. GN change: https://gn.googlesource.com/gn/+/8730b0feb6b991fa47368566501ab9ccfb453c92 commit 8730b0feb6b991fa47368566501ab9ccfb453c92 author Tom Anderson <thomasanderson@chromium.org> Thu May 16 11:00:40 2019 -0700 committer Commit Bot <commit-bot@chromium.org> Thu May 16 21:36:50 2019 +0000 Disallow non-buildable sources in binary targets When adding a file that's not a source, header, or object file to a source_set, loadable_module, shared_library, executable, or static_library, gn will now generate an error like the following: ERROR at //third_party/protobuf/proto_library.gni:369:15: Only source, header, and object files belong in the sources of a source_set. //out/Test/pyproto/google_apis/gcm/protocol/mcs_pb2.py is not one of the valid types. sources = get_target_outputs(":$action_name") ^--------------------------------- See //google_apis/gcm/BUILD.gn:78:1: whence it was called. proto_library("proto") { ^----------------------- See //BUILD.gn:89:7: which caused the file to be included. "//google_apis/gcm:gcm_unit_tests", ^--------------------------------- BUG=77
Chrominum changes: https://chromium.googlesource.com/chromium/src/+/b2720ad134127a6fdd35f92f44b5b2b946452c1b commit b2720ad134127a6fdd35f92f44b5b2b946452c1b author Nick Harper <nharper@chromium.org> Fri Jul 12 22:07:10 2019 committer Commit Bot <commit-bot@chromium.org> Fri Jul 12 22:07:10 2019 tree f850eb08e89e08373a37378fb43ea76064672a00 parent f070ecdf7436215ee672ff7b84a89f4eee90863c [diff] Remove Channel ID deletion code Bug: 903642, 975114 https://chromium.googlesource.com/chromium/src/+/d1d11f3957428a77097d49e5fb2971b873d11f5d commit d1d11f3957428a77097d49e5fb2971b873d11f5d [log] [tgz] author Xing Liu <xingliu@chromium.org> Tue Apr 30 21:09:55 2019 committer Commit Bot <commit-bot@chromium.org> Tue Apr 30 21:09:55 2019 tree d8778d132d6b3559a7c91fc12ff2873492e8b948 parent 5e42b1a0fb34030b2e78b6453977cf4801bff761 [diff] Notification scheduler: Plumb dependencies to glue class. This CL plumbs dependencies into scheduler glue class, and starts to connects several subsystems together. Tests will be added in following CLs to keep this CL smaller, and there are still many things not implemented in the glue layer yet. TBR=peter@chromium.org Bug: 930968
Chromium change: https://chromium.googlesource.com/chromium/src/+/e31e15795d599fd8a53d04ed2bf8832e36fa0ead commit e31e15795d599fd8a53d04ed2bf8832e36fa0ead author Yue Ru Sun <yrsun@chromium.org> Fri Jul 19 17:09:57 2019 committer Commit Bot <commit-bot@chromium.org> Fri Jul 19 17:09:57 2019 tree b5d9b74dae9b156ce8c6abb4d635f8d84480ea88 parent fb39b07fe2369060544e7cadc86f82cba2e43bb8 [diff] Sync omnibox type proto change Field name has changed from INVALID to EMPTY in cl/255470920, this patch syncs that change and fix all occurrences. See https://bugs.chromium.org/p/chromium/issues/detail?id=983220 Bug: 983220
Chromium change: https://chromium.googlesource.com/chromium/src/+/b6042ed37a482983111cdf1f9d0b09ffe972c309 commit b6042ed37a482983111cdf1f9d0b09ffe972c309 Author: Clark DuVall <cduvall@chromium.org> Date: Mon Jul 15 17:20:45 2019 +0000 Support HandleExternalProtocol on UI thread This allows HandleExternalProtocol to be used on the UI thread in android_webview. This is part of migrating the navigation loader to the UI thread. Bug: 824840
…rkRequest. Chromium change: https://chromium.googlesource.com/chromium/src/+/1d81619dbd351cb570943140bddac7a80559dd76 commit 1d81619dbd351cb570943140bddac7a80559dd76 Author: Clark DuVall <cduvall@chromium.org> Date: Fri Jul 19 19:54:42 2019 +0000 Move WebRequest to the UI thread Now that network service is launched, there is no reason to have WebRequest run on the IO thread. This moves all WebRequest code and the WebRequestProxyingURLLoaderFactory to the UI thread, which eliminates thread hops. For more info, see the Chrome IO Thread Simplification: Planning doc: https://docs.google.com/document/d/1fowGQ8xWBv4YqHj_YbK-S3wpmJQDE7L0-GwNR_vAkHE/edit# Change-Id: I5ba8954c5d91c98c96a66558ecb659b59ff4386c Bug: 980774
For Brave importer profile writer added a nullptr optional for tab group. Chromium change: https://chromium.googlesource.com/chromium/src/+/81999fd6a771e38cccc487364728ba91f5fc17f2 commit 81999fd6a771e38cccc487364728ba91f5fc17f2 Author: Collin Baker <collinbaker@chromium.org> Date: Wed Jun 5 23:12:27 2019 +0000 Save and restore tab groups This implements basic session restore functionality for tab groups. Currently, only whole browser session restore is supported; restoring a window or a tab from the history menu won't restore groups. Bug: 905491
Removed const from overrides. Chromium change: https://chromium.googlesource.com/chromium/src/+/4b4eed074e848347f5a5b07d4d4b3fd2f6e13820 commit 4b4eed074e848347f5a5b07d4d4b3fd2f6e13820 Author: Lucas Furukawa Gadani <lfg@chromium.org> Date: Tue Jun 4 23:12:04 2019 +0000 Remove const interfaces from content/public. Tbr: boliu@chromium.org, dvadym@chromium.org, bengr@chromium.org Bug: 908139
Got flagged because .idl files aren't allowed as GN sources in source_sets any more due to the GN change below. This particular source_set wasn't being used anywhere and can be removed. GN change: https://gn.googlesource.com/gn/+/8730b0feb6b991fa47368566501ab9ccfb453c92 commit 8730b0feb6b991fa47368566501ab9ccfb453c92 author Tom Anderson <thomasanderson@chromium.org> Thu May 16 11:00:40 2019 -0700 committer Commit Bot <commit-bot@chromium.org> Thu May 16 21:36:50 2019 +0000 Disallow non-buildable sources in binary targets When adding a file that's not a source, header, or object file to a source_set, loadable_module, shared_library, executable, or static_library, gn will now generate an error like the following: ERROR at //third_party/protobuf/proto_library.gni:369:15: Only source, header, and object files belong in the sources of a source_set. //out/Test/pyproto/google_apis/gcm/protocol/mcs_pb2.py is not one of the valid types. sources = get_target_outputs(":$action_name") ^--------------------------------- See //google_apis/gcm/BUILD.gn:78:1: whence it was called. proto_library("proto") { ^----------------------- See //BUILD.gn:89:7: which caused the file to be included. "//google_apis/gcm:gcm_unit_tests", ^--------------------------------- BUG=77
We patch NavigationRequest::OnStartChecksComplete to call MaybeHideReferrer. One of the params to MaybeHideReferrer is top document GURL which was available in OnStartCheckComplete. The Chromium change below removed it. Added a chromium_src override that includes GetTopDocumentGURL function that containes the deleted functionality. Chromium change: https://chromium.googlesource.com/chromium/src/+/435bcb58bb2c75be8276f1dde69fc6c9891c45ba commit 435bcb58bb2c75be8276f1dde69fc6c9891c45ba Author: Lukasz Anforowicz <lukasza@chromium.org> Date: Fri Jul 12 20:50:06 2019 +0000 Store |initiator_origin| in FrameNavigationEntry. Changes in this CL ================== This CL: 1. Updates FrameNavigationEntry::UpdateEntry and FrameNavigationEntry's constructor so that they both take |const base::Optional<url::Origin>& initiator_origin| which gets stored in a new FrameNavigationEntry::initiator_origin_ field. 2. Updates callers of FNE::UpdateEntry and FNE's constructor to provide/propagate the initiator as needed. This includes adding an |initiator_origin| parameter to - NavigationEntryImpl's constructor - NavigationEntryImpl::AddOrUpdateFrameEntry - NavigationController::CreateNavigationEntry (the list above is not necessarily exhaustive/complete) 3. Uses the new |FrameNavigationEntry::initiator_origin()| from NavigationEntryImpl::ConstructCommonNavigationParams (which used to always provide |base::nullopt| initiator for history navigations - always treating them as browser-initiated, rather than replaying the original initiator). The changes above makes sure that the right Sec-Fetch-Site http request header is "replayed" during history navigations. The CL adds browser tests and WPT tests to cover the new, desired behavior. Follow-up changes ================= This CL does not: - Use |FrameNavigationEntry::initiator_origin()| in GetOriginForURLLoaderFactory in render_frame_host_impl.cc (this will be done in a follow-up CL at https://crrev.com/c/1672176) - Handle persisting |FrameNavigationEntry::initiator_origin()| for session restore (this is tracked in a separate https://crbug.com/976055). Bug: 946503
…essageLoopRun. We used to start a number of our services in BraveBrowserProcessImpl::ResourceDispatcherHostCreated, which was an override of BrowserProcessImpl. However the method was removed in the base class due to Chromium change to remove ChromeResourceDispatcherHostDelegate. Chromium change: https://chromium.googlesource.com/chromium/src/+/c098bc87fdf68370de521a35ade804d1d4ede9c2 commit c098bc87fdf68370de521a35ade804d1d4ede9c2 Author: John Abd-El-Malek <jam@chromium.org> Date: Fri May 31 19:33:55 2019 +0000 Remove ChromeResourceDispatcherHostDelegate as it's not used anymore. Bug: 934009
Browser tests are run from ChromeBrowserMainParts::PreMainMessageLoopRun ChromeBrowserMainParts::PreMainMessageLoopeRunImpl parameters().ui_task->Run() in chrome_browser_main.cc:1827 which is before ChromeBrowserMainParts::PreMainMessageLoopRun calls PreMainMessageLoopRun on extra parts. Since our services were being started in extra parts PreMainMessageLoopRun, the test would run prior to services starting. ChromeBrowserMainParts::PostBroserStart, however, is being called prior to execution of ui_task from which the tests are run.
Updated name in constructor of our override BravePrefProvider. Chromim change: https://chromium.googlesource.com/chromium/src/+/94c80d547af89125e18831420d57562117c8e348 commit 94c80d547af89125e18831420d57562117c8e348 Author: Ramin Halavati <rhalavati@chromium.org> Date: Tue Jun 4 06:13:36 2019 +0000 Replace incognito with off_the_record in ContentSettingsPref*. ContentSettingsPref and ContentSettingsPrefProfovider classes receive an |incognito| argument that actually triggers the off-the-record behavior and is not necessarily an incognito mode specifier. The argument and all related items are renamed to off_the_record to remove ambiguity. Bug: 968028
The method now returns a struct instrad of having mutliple out params. Chromium change: https://chromium.googlesource.com/chromium/src/+/4ed01619c8ae43d3a1ef1f8acd713aa6aaa3530b commit 4ed01619c8ae43d3a1ef1f8acd713aa6aaa3530b Author: Devlin Cronin <rdevlin.cronin@chromium.org> Date: Thu Jul 18 17:41:55 2019 +0000 [Extensions Bindings] Return a struct from APISignature parsing methods Make APISignature::ParseArgumentsToJSON(), APISignature::ParseArgumentsToV8(), and APISignature::ConvertArgumentsIgnoringSchema() return a struct containing the parse results, including arguments, error, and async response type (callback if one were provided). This will make it easier when we need to provide additional information about if a promise should be returned. No behavior change is expected. Bug: 978538
Updated BraveComponentLoader to use the new constractor signature. Chromium change: https://chromium.googlesource.com/chromium/src/+/be1f920bfb7aa8094f4b89efc297dc32746876d6 commit be1f920bfb7aa8094f4b89efc297dc32746876d6 Author: Michael Giuffrida <michaelpg@chromium.org> Date: Wed Jun 5 22:36:18 2019 +0000 Don't add Kiosk Next Home app in normal sessions The Kiosk Next Home app should only be loaded in Kiosk Next Home sessions (using the pref as a proxy for this). Also removes unused local_state references. Bug: 937549
We were overriding base::GetFieldTrialParamValueByFeature function call in location_bar_model_impl.cc in chromium_src to force the experiment outcome to OmniboxFieldTrial::kSimplifyHttpsIndicatorParameterBothToLock. The feature is now on by default and the behavior is the same as what we were forcing. Removed the no longer needed override. Chromium change: https://chromium.googlesource.com/chromium/src/+/c26ef30d0961cbcdf2a226792922d73e6a1fc59f commit c26ef30d0961cbcdf2a226792922d73e6a1fc59f Author: Christopher Thompson <cthomp@chromium.org> Date: Fri Jun 7 01:55:45 2019 +0000 Enable SimplifyHttpsIndicator feature by default This also cleans up the various old conditions, keeping the feature flag as a simple binary flag (enabled = lock-only). Also updates tests and removes the console warning and testing config. Bug: 803138
This flow has been removed from Chromium. Chromium changes: https://bugs.chromium.org/p/chromium/issues/detail?id=956680 https://chromium.googlesource.com/chromium/src/+/afd6d11e54a3682cf1e4d0476e598eb234488246 commit afd6d11e54a3682cf1e4d0476e598eb234488246 Author: Hector Carmona <hcarmona@chromium.org> Date: Mon Jun 24 21:07:42 2019 +0000 Navi: Delete entry point for showing chrome://welcome-win10 Bug: 956680 https://chromium.googlesource.com/chromium/src/+/9359944557ddce6a63516df681eb38e0a70829df commit 9359944557ddce6a63516df681eb38e0a70829df Author: Hector Carmona <hcarmona@chromium.org> Date: Wed Jun 26 17:56:25 2019 +0000 Navi: Deprecate kHasSeenWin10PromoPage pref. Bug: 956680
signin_pref_names.h and other header files used in unit tests are now in components/signin/public/base/. Chromium change: https://chromium.googlesource.com/chromium/src/+/3517170ea99d55a43b030a55409ddc300846d0f9 commit 3517170ea99d55a43b030a55409ddc300846d0f9 Author: Colin Blundell <blundell@chromium.org> Date: Thu Jul 11 08:16:34 2019 +0000 Signin: Restructure //components/signin/core/browser:shared This CL moves the files that are currently in the //components/signin/core/browser:shared GN target into the structure described in this document: https://docs.google.com/document/d/1p_kahITGFgv7PehQ61-thRVR3Hrdaf3tLryMytTRPYs/edit# Namely, files intended for usage by the entire signin component and its consumers are moved into a new //signin/public/base/ directory. Files that are conceptually part of the IdentityManager public interface are moved into //signin/public/identity_manager/. This change was done in two parts: 1. A script that did the code moves and corresponding renames, include path changes, etc. 2. Manual followup that changed GN files and DEPS to reflect the new structure. For ease of reviewing, I uploaded 1 as the original PS and 2 as PS2. TBR=jochen@chromium.org Bug: 952788
ContainsKey/Value have been removed. Chromium change: https://chromium.googlesource.com/chromium/src/+/73c901e63c6f2c1cfab306f4c4873bb30bfba651 commit 73c901e63c6f2c1cfab306f4c4873bb30bfba651 Author: Jan Wilken Dörrie <jdoerrie@chromium.org> Date: Wed Jun 12 09:02:32 2019 +0000 [base] Remove base::Contains{Key,Value} This change removes base::ContainsKey() and base::ContainsValue() from the codebase. In addition, it migrates remaining usages of these methods to using base::Contains instead. These usages were not caught by the search and replace CLs, because they either were added afterwards, or were unqualified and used ADL. TBR=rockot@google.com,blundell@chromium.org Bug: 970209
Chromium change: https://chromium.googlesource.com/chromium/src/+/89a5f3ab57a994cd2652c45475c4b83895a40a94 commit 89a5f3ab57a994cd2652c45475c4b83895a40a94 Author: John Abd-El-Malek <jam@chromium.org> Date: Fri Jun 14 18:21:53 2019 +0000 Remove IOThread class as it's not needed anymore. Bug: 934009
Chromium change: https://chromium.googlesource.com/chromium/src/+/5b9e43d976aca377588875fc59c5348ede02a8b5 commit 5b9e43d976aca377588875fc59c5348ede02a8b5 Author: Hwanseung Lee <hs1217.lee@samsung.com> Date: Tue Jun 25 01:55:32 2019 +0000 Convert enum to enum class for BoxLayout::Orientation Use enum class instead of enum for BoxLayout::Orientation enum class is more type safety. Bug: 940736
Removed unnecessary spellcheck/os build flags checks. The flag was causing the include not to happen due to a this change: https://chromium.googlesource.com/chromium/src/+/de74ce301c50fd3a4815faff207c9592416eb337 commit de74ce301c50fd3a4815faff207c9592416eb337 Author: Siye Liu <siliu@microsoft.com> Date: Thu Jun 20 20:44:43 2019 +0000 windows spellchecker integration. This CL aims to implement windows spellchecker integration in Chromium project, so that user can switch to use windows spellchecker or hunspell spellchecker at run time. We need to implement platform agnostic interfaces to integrate windows spellchecker into Chromium. We also need to refactor some code to enable runtime switch between Windows spellchecker and hunspell spellchecker. We have outlines following steps to achieve the goal: (1) Implement spellcheck_platform interface. spellcheck_platform is an interface that platform-specific spellchecker needs to implement. Create spellcheck_platform_win.cc which contains Windows specific logic. All COM calls are happeninn on the background thread. spellcheck_platform API are all async. (2) Refactor SpellCheckHostChromeImpl. SpellCheckHostChromeImpl is a derived class from SpellCheckHost which provides basic spellcheck support. Mac has separate implementation located at spell_check_host_chrome_impl_mac.cc. Windows can share the same implementation, therefore, I move the code to the base derived class at spellcheck_host_chrome_impl.cc and delete mac specific file. (3) Refactor SpellingRequest. SpellingRequest is owned by SpellCheckHostChromeImpl and is currently located at spell_check_host_chrome_impl_mac.cc file. Created seperate files spelling_request.h and spelling_request.cc for defination and declaration of SpellingRequest. (4) Refactor CreateNativeSpellingEngine(). CreateNativeSpellingEngine() used to live in seperate files for different spellcheckers. For platform specific spellchecker, it is located at platform_spelling_engine.cc. For hunspell spellchecker, it is located at hunspell_engine.cc. In order to enable runtime switch between those two spellcheck services, We need to have a uniformed definiation. Therefore, I create a new fine spelling_engine.cc base class and put a uniformed defination of CreateNativeSpellingEngine(). (5) Define USE_RENDERER_SPELLCHECKER build flag We already have USE_BROWSER_SPELLCHECKER build flag. The decision to use platform specific spellcheck or hunspell spellcheck is made at build time. It's not the case anymore. We want to switch between spellcheck services at runtime. use browser spellcheck (platform specific spellcheck) and use renderer spellcheck (hunspll spellcheck) are no longer mutually exclusive. I created USE_RENDERER_SPELLCHECKER build flag to indicate usage of hunspell spellcheck service. (6) create feature flag kWinUseBrowserSpellChecker. In order to enable runtime switch between two spellcheck services. We need to have a feature flag to indicate which spellcheck services to use. I created kWinUseBrowserSpellChecker. The flag only has effect on Windows. (7) Create spellcheck::UseBrowserSpellChecker() In order to enable runtime switch between platform specific spellcheck and hunspell spellcheck, we need a runtime check instead of build time check. I created a runtime check an put it in file spellcheck_features.cc. For Windows, the method will check for feature flag kWinUseBrowserSpellChecker to determine which spellcheck service to use. On all other platforms, it will return build time flag. After these steps, we enabled Windows Spellcheck Services integration and also achieved runtime switch between platform spellchecker and hunspell spellchecker for windows platform. Bug: 463364
Chromium change: https://chromium.googlesource.com/chromium/src/+/bdb2e80550099f087aa5af29eaba1121bc1c1c62 commit bdb2e80550099f087aa5af29eaba1121bc1c1c62 Author: dpapad <dpapad@chromium.org> Date: Thu Jun 27 16:32:57 2019 +0000 WebUI: Move md_select_css.html from html/ to cr_elements/ This is done for two reasons. 1) Consistency: md_select_css.html and action_link_css.html are the only <dom-module>s that don't reside under cr_elements/ or cr_components/. Other shared styles (like hidden_style_css.html) are already under cr_elements/. 2) For the purposes of auto-generating Polymer3 files, moving those files over eliminates a corner case (with regards to path rewriting) that otherwise needs to be handled by polymer_modulizer(). Also note that |flattenhtml| was unnecessarily used for md_select_css.html, removed as part of the move. action_link_css.html will be moved in a separate CL. Bug: 965770
Also, the version of AddView that takes View* was renamed to AddExistingView and is meant only for adding views that are already owned by the host. Chromium changes: https://chromium.googlesource.com/chromium/src/+/6f83fdb6e7f3c941861a9d3f4214cbbfc06053c9 commit 6f83fdb6e7f3c941861a9d3f4214cbbfc06053c9 Author: Allen Bauer <kylixrd@chromium.org> Date: Wed Jun 12 15:17:04 2019 +0000 Add unique_ptr versions of AddView() to GridLayout class. Bug: 945335 https://chromium.googlesource.com/chromium/src/+/5b736bf217aeaa765eff32bbb4d119b2932b854d commit 5b736bf217aeaa765eff32bbb4d119b2932b854d Author: Allen Bauer <kylixrd@chromium.org> Date: Thu Jun 27 17:58:30 2019 +0000 Refactor more uses of GridLayout::AddView to use the std::unique_ptr<> version. Bug: 945335
Doesn't take a View* parameter any more. Chromium change: https://chromium.googlesource.com/chromium/src/+/c14b201aba1c9b765dc0a29c9834b53502c8b8bd commit c14b201aba1c9b765dc0a29c9834b53502c8b8bd Author: Scott Violet <sky@chromium.org> Date: Fri Jun 14 15:05:01 2019 +0000 views: removes View* parameter to GridLayout constructor This parameters predates the Installed() function and can be replaced with the View* supplied to Installed(). BUG=none
ChromeContentBrowserClient. Updated override in BraveContentBrowserClient. Chromium change: https://chromium.googlesource.com/chromium/src/+/1be897a02157e874bcdf889192951537a9cf90b3 commit 1be897a02157e874bcdf889192951537a9cf90b3 Author: Dominic Farolino <dom@chromium.org> Date: Sat Jul 20 08:11:42 2019 +0000 Convert old mojo types to new ones in //content loading code Specifically, this code updates URLLoaderFactoryBundleInfo, and subclasses to use the new mojo types. This CL also updates variables that reference this class in RenderFrameHostImpl, and follows the path down through ContentBrowserClient subclasses updating variables where necessary. The change is mostly mechanical, and as tightly-scoped as I could make it given the instances I aimed to update. Bug: 955171
These were removed from the base class (ChromeContentBrowserClient) and we do not need them any more due to #3130. Chromium change: https://chromium.googlesource.com/chromium/src/+/e7db7a21873d31f5c74a81670a3047c08757d8ed commit e7db7a21873d31f5c74a81670a3047c08757d8ed Author: Maks Orlovich <morlovich@chromium.org> Date: Thu Jul 25 01:47:46 2019 +0000 Android MediaResourceGetterImpl: use RestrictedCookieManager for policy-following cookie access. This removes the last use of ContentBrowserClient::AllowGetCookie, and permits the removal of AllowGetCookie/AllowSetCookie which is also done in this CL. Bug: 965982
ChromeNetworkDelegate has been removed and we can't subclass it any more. It is also no longer needed when network service is used. Chromium change: https://chromium.googlesource.com/chromium/src/+/3576e9bf0861248a7b3e7133b9e4c216f0e19819 commit 3576e9bf0861248a7b3e7133b9e4c216f0e19819 Author: John Abd-El-Malek <jam@chromium.org> Date: Thu Jun 6 22:25:50 2019 +0000 Remove ChromeNetworkDelegate. The implementation is gone, but I've left the files because the IsAccessAllowed methods which aren't specific to the NetworkDelegate aspect of this are still used. I'll rename them in a followup. Bug: 934009
Thanks for checking @mkarolin @bsclifton ! |
@mkarolin @bsclifton Pushed one more commits for fixing above issue. 3a8a8fd |
When brave theme is set to dark or light, system dark mode change should not affect brave theme.
fd2565b
to
3a8a8fd
Compare
@simonhong Thanks! Checked on Windows and it works as expected. |
@mkarolin Thanks for checking. I'm trying to add some additional browser tests. |
Upstream added ui::NativeTheme::SystemDarkModeSupported(). Replace ours with upstream one.
This test can verify whether theme change notification is delivered or not. If brave theme option is not default, system dark theme change should not trigger theme change notificagtion delivery.
bfa720d
to
1ffc4a8
Compare
@mkarolin @bsclifton Tests are added and verified all |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works beautifully! Needs rebase after @mkarolin rebased against master, but worked great on Windows and macOS! 😄👍
It might be easier to cherry-pick these commits into c77 branch directly since it was force pushed and a rebase maybe cumbersome. |
This commit is a squash of 4 commits from #3281. - Fix setting preferred color scheme logic for brave theme change - Fix system dark mode change affect brave theme on Win10 When brave theme is set to dark or light, system dark mode change should not affect brave theme. - CleanUp: Delete SystemThemeSupportDarkMode Upstream added ui::NativeTheme::SystemDarkModeSupported(). Replace ours with upstream one. - Add dark mode change test by modifying reg value for Windows This test can verify whether theme change notification is delivered or not. If brave theme option is not default, system dark theme change should not trigger theme change notificagtion delivery.
Cherry-picked directly into |
This commit is a squash of 4 commits from #3281. - Fix setting preferred color scheme logic for brave theme change - Fix system dark mode change affect brave theme on Win10 When brave theme is set to dark or light, system dark mode change should not affect brave theme. - CleanUp: Delete SystemThemeSupportDarkMode Upstream added ui::NativeTheme::SystemDarkModeSupported(). Replace ours with upstream one. - Add dark mode change test by modifying reg value for Windows This test can verify whether theme change notification is delivered or not. If brave theme option is not default, system dark theme change should not trigger theme change notificagtion delivery. Chromium change: https://chromium.googlesource.com/chromium/src/+/67fd4d9f35650a079f6a636b5d19de77856bd2cf commit 67fd4d9f35650a079f6a636b5d19de77856bd2cf Author: Alison Maher <almaher@microsoft.com> Date: Fri Jul 12 18:34:21 2019 +0000 Set preferred color scheme for high contrast This change adds logic to update the preferred color scheme based on the OS high contrast theme. If high contrast is not enabled, preferred color scheme will continue to be based on the OS dark mode state. A PreferredColorScheme enum was added to NativeTheme to keep track of the current high contrast/dark mode preferred color scheme. The updated preferred color scheme is used to evaluate the prefers-color-scheme media query. Bug: 970285
This commit is a squash of 4 commits from #3281. - Fix setting preferred color scheme logic for brave theme change - Fix system dark mode change affect brave theme on Win10 When brave theme is set to dark or light, system dark mode change should not affect brave theme. - CleanUp: Delete SystemThemeSupportDarkMode Upstream added ui::NativeTheme::SystemDarkModeSupported(). Replace ours with upstream one. - Add dark mode change test by modifying reg value for Windows This test can verify whether theme change notification is delivered or not. If brave theme option is not default, system dark theme change should not trigger theme change notificagtion delivery. Chromium change: https://chromium.googlesource.com/chromium/src/+/67fd4d9f35650a079f6a636b5d19de77856bd2cf commit 67fd4d9f35650a079f6a636b5d19de77856bd2cf Author: Alison Maher <almaher@microsoft.com> Date: Fri Jul 12 18:34:21 2019 +0000 Set preferred color scheme for high contrast This change adds logic to update the preferred color scheme based on the OS high contrast theme. If high contrast is not enabled, preferred color scheme will continue to be based on the OS dark mode state. A PreferredColorScheme enum was added to NativeTheme to keep track of the current high contrast/dark mode preferred color scheme. The updated preferred color scheme is used to evaluate the prefers-color-scheme media query. Bug: 970285
This commit is a squash of 4 commits from #3281. - Fix setting preferred color scheme logic for brave theme change - Fix system dark mode change affect brave theme on Win10 When brave theme is set to dark or light, system dark mode change should not affect brave theme. - CleanUp: Delete SystemThemeSupportDarkMode Upstream added ui::NativeTheme::SystemDarkModeSupported(). Replace ours with upstream one. - Add dark mode change test by modifying reg value for Windows This test can verify whether theme change notification is delivered or not. If brave theme option is not default, system dark theme change should not trigger theme change notificagtion delivery. Chromium change: https://chromium.googlesource.com/chromium/src/+/67fd4d9f35650a079f6a636b5d19de77856bd2cf commit 67fd4d9f35650a079f6a636b5d19de77856bd2cf Author: Alison Maher <almaher@microsoft.com> Date: Fri Jul 12 18:34:21 2019 +0000 Set preferred color scheme for high contrast This change adds logic to update the preferred color scheme based on the OS high contrast theme. If high contrast is not enabled, preferred color scheme will continue to be based on the OS dark mode state. A PreferredColorScheme enum was added to NativeTheme to keep track of the current high contrast/dark mode preferred color scheme. The updated preferred color scheme is used to evaluate the prefers-color-scheme media query. Bug: 970285
This commit is a squash of 4 commits from #3281. - Fix setting preferred color scheme logic for brave theme change - Fix system dark mode change affect brave theme on Win10 When brave theme is set to dark or light, system dark mode change should not affect brave theme. - CleanUp: Delete SystemThemeSupportDarkMode Upstream added ui::NativeTheme::SystemDarkModeSupported(). Replace ours with upstream one. - Add dark mode change test by modifying reg value for Windows This test can verify whether theme change notification is delivered or not. If brave theme option is not default, system dark theme change should not trigger theme change notificagtion delivery. Chromium change: https://chromium.googlesource.com/chromium/src/+/67fd4d9f35650a079f6a636b5d19de77856bd2cf commit 67fd4d9f35650a079f6a636b5d19de77856bd2cf Author: Alison Maher <almaher@microsoft.com> Date: Fri Jul 12 18:34:21 2019 +0000 Set preferred color scheme for high contrast This change adds logic to update the preferred color scheme based on the OS high contrast theme. If high contrast is not enabled, preferred color scheme will continue to be based on the OS dark mode state. A PreferredColorScheme enum was added to NativeTheme to keep track of the current high contrast/dark mode preferred color scheme. The updated preferred color scheme is used to evaluate the prefers-color-scheme media query. Bug: 970285
Submitter Checklist:
npm run lint
)git rebase master
(if needed).git rebase -i
to squash commits (if needed).Test Plan:
Reviewer Checklist:
After-merge Checklist:
changes has landed on.