diff --git a/DEPS b/DEPS index cbe883f1..99230057 100644 --- a/DEPS +++ b/DEPS
@@ -332,7 +332,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling V8 # and whatever else without interference from each other. - 'v8_revision': '3cf8db6cd03fa5bc0333ce701c2c23cd86efb09c', + 'v8_revision': '9172040972f8859c52faca4cad2c0eb54fb673c9', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling ANGLE # and whatever else without interference from each other. @@ -356,7 +356,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling googletest # and whatever else without interference from each other. - 'googletest_revision': 'a46a6012a133c7c0929fdae55b321c2fe65f3c5f', + 'googletest_revision': '29c6d63146d587e062217a5dfbbbaaedfab04f9e', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling lss # and whatever else without interference from each other. @@ -396,11 +396,11 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling libFuzzer # and whatever else without interference from each other. - 'libfuzzer_revision': 'c7ea90fb61105752fa78e257e77a7c5d62fff7d3', + 'libfuzzer_revision': 'd4e508d39abe38b2d7c271820010c59f21c42537', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling fuzztest # and whatever else without interference from each other. - 'fuzztest_revision': 'b7ef234c594beeb90ef6089fa30d6b3c0c65e82b', + 'fuzztest_revision': '45d65d84fe1ee1489c3249560a5b386a2afb8ef6', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling domato # and whatever else without interference from each other. @@ -554,11 +554,11 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling llvm-libc # and whatever else without interference from each other. - 'llvm_libc_revision': '150dd464918cc5a61d509d6ff52fc9edcfc0a195', + 'llvm_libc_revision': '7fc0017c937ba7f741993d61b365c4a2199cdfef', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling llvm-libc # and whatever else without interference from each other. - 'compiler_rt_revision': 'dfcaf3782c0ff818be24554712ce2e04352da92d', + 'compiler_rt_revision': 'd10af25449fd0a16ae59e4a88582947f3adf53cd', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling clusterfuzz-data # and whatever else without interference from each other. @@ -1577,7 +1577,7 @@ 'packages': [ { 'package': 'chromium/third_party/updater/chromium_linux64', - 'version': 'version:2@1751007', + 'version': 'version:2@1752016', }, ], }, @@ -1588,7 +1588,7 @@ 'packages': [ { 'package': 'chromium/third_party/updater/chromium_mac_amd64', - 'version': 'version:2@1751063', + 'version': 'version:2@1752010', }, ], }, @@ -1599,7 +1599,7 @@ 'packages': [ { 'package': 'chromium/third_party/updater/chromium_mac_arm64', - 'version': 'version:2@1751043', + 'version': 'version:2@1752005', }, ], }, @@ -1610,7 +1610,7 @@ 'packages': [ { 'package': 'chromium/third_party/updater/chromium_win_arm64', - 'version': 'version:2@1751065', + 'version': 'version:2@1752063', }, ], }, @@ -1621,7 +1621,7 @@ 'packages': [ { 'package': 'chromium/third_party/updater/chromium_win_x86', - 'version': 'version:2@1751035', + 'version': 'version:2@1752053', }, ], }, @@ -1632,7 +1632,7 @@ 'packages': [ { 'package': 'chromium/third_party/updater/chromium_win_x86_64', - 'version': 'version:2@1751055', + 'version': 'version:2@1752064', }, ], }, @@ -1812,7 +1812,7 @@ 'packages': [ { 'package': 'chromium/chrome/test/data/variations/cipd', - 'version': 'L6hIAByxWXsZzJmTrrmd6mIe6gqRqbGBsURcFbstKA4C', + 'version': 'vnJXOicjbhOMpVEU061cZsB0Dv-eeCYhVImjCGq4Zw8C', }, ], 'condition': 'non_git_source', @@ -1824,7 +1824,7 @@ 'src/clank': { 'url': Var('chrome_git') + '/clank/internal/apps.git' + '@' + - '8eef42fbc57942f2a7815a05dfa59d678ebbfd48', + '008d4b34e9bd04c6b0ce0502cc97e98293f0ef45', 'condition': 'checkout_android and checkout_src_internal', }, @@ -2865,7 +2865,7 @@ Var('chromium_git') + '/chromium/third_party/openh264rs.git' + '@' + Var('openh264rs_revision'), 'src/third_party/openscreen/src': - Var('chromium_git') + '/openscreen' + '@' + '7642acff5a5251781a87bfeff98bbb92081b71bf', + Var('chromium_git') + '/openscreen' + '@' + '43a6f17b5efeaa4470e3b200cc6d4b6297d68fe5', 'src/third_party/openxr/src': { 'url': Var('chromium_git') + '/external/github.com/KhronosGroup/OpenXR-SDK' + '@' + '75c53b6e853dc12c7b3c771edc9c9c841b15faaa', @@ -2891,7 +2891,7 @@ Var('pdfium_git') + '/pdfium.git' + '@' + Var('pdfium_revision'), 'src/third_party/perfetto': - Var('chromium_git') + '/external/github.com/google/perfetto.git' + '@' + 'f98fd37411f2096b4eb382922511c485926db6e4', + Var('chromium_git') + '/external/github.com/google/perfetto.git' + '@' + '6ff067a989b7609a5887e26e966217db0f2d689a', 'src/base/tracing/test/data': { 'bucket': 'perfetto', @@ -3335,7 +3335,7 @@ Var('chromium_git') + '/webpagereplay.git' + '@' + Var('webpagereplay_revision'), 'src/third_party/webrtc': - Var('webrtc_git') + '/src.git' + '@' + 'ebfaa7178364cb929bab049758d09f223a2c61e1', + Var('webrtc_git') + '/src.git' + '@' + 'b2b37fe09462f47423ae1d9270dd9e8789a171f6', # Wuffs' canonical repository is at github.com/google/wuffs, but we use # Skia's mirror of Wuffs, the same as in upstream Skia's DEPS file. @@ -3464,7 +3464,7 @@ 'packages': [ { 'package': 'chromeos_internal/apps/boca_receiver_app/app', - 'version': '83ti_j90os0neWZ3xKdSU0YqLFJf7GTMiGptBWuhb9YC', + 'version': 'OT7nasbqEV4KAB8nnOBtQHkE4jbYti_vjdPy6fa7osgC', }, ], 'condition': 'checkout_chromeos and checkout_src_internal', @@ -3486,7 +3486,7 @@ 'packages': [ { 'package': 'chromeos_internal/apps/help_app/app', - 'version': 'o56Vy_NagyUUxX4nHKuNBG-ti4Vo43nidDnjqflpYgEC', + 'version': 'eB9OGAAmWEJq7mW2DTVQBmA6OfFeD9m_6ZcKfQnmtmIC', }, ], 'condition': 'checkout_chromeos and checkout_src_internal', @@ -3497,7 +3497,7 @@ 'packages': [ { 'package': 'chromeos_internal/apps/media_app/app', - 'version': 'vAaTPVm630OPYCRpKa3Y7UCOl4E8LzDRZBWnEfyl73kC', + 'version': 'zEBM2gHd2xDarXBOBi1-x6nLVF-L5JMnRvzg9qKFyPIC', }, ], 'condition': 'checkout_chromeos and checkout_src_internal', @@ -3952,7 +3952,7 @@ 'src/ios_internal': { 'url': Var('chrome_git') + '/chrome/ios_internal.git' + '@' + - 'cc09476ef46b7e0499573b1fd066895ed1027b7b', + 'be796067523c8f9236d4d3c277a4f98342edb8f1', 'condition': 'checkout_ios and checkout_src_internal', },
diff --git a/android_webview/build/android-webview-arm.orderfile.txt b/android_webview/build/android-webview-arm.orderfile.txt index 1911de2..a5c2f50 100644 --- a/android_webview/build/android-webview-arm.orderfile.txt +++ b/android_webview/build/android-webview-arm.orderfile.txt
@@ -1 +1 @@ -Kqcy1VNvYfIjFSRV-4HzLgxglaYkqO3XJAnlwu7VUOIC +nZMQBHx75ZqQIU0LvuAupo2rCum6Mws9Nq8WPVXhExYC
diff --git a/android_webview/build/android-webview-arm64.orderfile.txt b/android_webview/build/android-webview-arm64.orderfile.txt index 63eba65..86cf485 100644 --- a/android_webview/build/android-webview-arm64.orderfile.txt +++ b/android_webview/build/android-webview-arm64.orderfile.txt
@@ -1 +1 @@ -RqibbZDHqX9Sx1c_mCF4fsE5Ze0wx1K_6o5gnIGgdBYC +L6zCW-TUw3tf6TSmFeeU5ldunfbNwBJC0kmxXxmwOuQC
diff --git a/ash/metrics/login_unlock_throughput_recorder.cc b/ash/metrics/login_unlock_throughput_recorder.cc index 473baafb..070d8e70 100644 --- a/ash/metrics/login_unlock_throughput_recorder.cc +++ b/ash/metrics/login_unlock_throughput_recorder.cc
@@ -386,7 +386,7 @@ scoped_throughput_reporter_blocker_.reset(); // TotalAnimationThroughputReporter (login_animation_throughput_reporter_) - // reports only on next non-animated frame. Ensure there is one. + // reports on the next frame after tracking stops. Ensure there is one. aura::Window* shelf_container = Shell::Get()->GetPrimaryRootWindowController()->GetContainer( kShellWindowId_ShelfContainer);
diff --git a/ash/metrics/login_unlock_throughput_recorder_unittest.cc b/ash/metrics/login_unlock_throughput_recorder_unittest.cc index 7abd715..10e4d19 100644 --- a/ash/metrics/login_unlock_throughput_recorder_unittest.cc +++ b/ash/metrics/login_unlock_throughput_recorder_unittest.cc
@@ -14,10 +14,13 @@ #include "ash/shell.h" #include "ash/test/animation_metrics_test_util.h" #include "ash/wm/tablet_mode/tablet_mode_controller.h" +#include "base/functional/bind.h" #include "base/run_loop.h" #include "base/strings/stringprintf.h" #include "base/task/single_thread_task_runner.h" #include "base/test/metrics/histogram_tester.h" +#include "base/time/time.h" +#include "base/timer/timer.h" #include "chromeos/ash/components/login/login_state/login_state.h" #include "components/app_constants/constants.h" #include "testing/gmock/include/gmock/gmock.h" @@ -160,24 +163,28 @@ } }; -void GiveItSomeTime(base::TimeDelta delta) { +void FlushFramesUntil(base::RunLoop& run_loop) { // Due to the |frames_to_terminate_tracker|=3 constant in // FrameSequenceTracker::ReportSubmitFrame we need to continue generating // frames to receive feedback. - base::RepeatingTimer begin_main_frame_scheduler( + base::RepeatingTimer begin_main_frame_scheduler; + begin_main_frame_scheduler.Start( FROM_HERE, base::Milliseconds(16), base::BindRepeating([]() { auto* compositor = Shell::GetPrimaryRootWindow()->GetHost()->compositor(); compositor->ScheduleFullRedraw(); })); - begin_main_frame_scheduler.Reset(); - base::RunLoop run_loop(base::RunLoop::Type::kNestableTasksAllowed); auto* compositor = Shell::GetPrimaryRootWindow()->GetHost()->compositor(); compositor->ScheduleFullRedraw(); + run_loop.Run(); +} + +void GiveItSomeTime(base::TimeDelta delta) { + base::RunLoop run_loop(base::RunLoop::Type::kNestableTasksAllowed); base::SingleThreadTaskRunner::GetCurrentDefault()->PostDelayedTask( FROM_HERE, run_loop.QuitClosure(), delta); - run_loop.Run(); + FlushFramesUntil(run_loop); } } // namespace @@ -725,4 +732,82 @@ check_point.Call("animation_done"); } +// Verifies that login animation duration is reported when animations finish +// while blocked waiting for window restore. +TEST_P(LoginUnlockThroughputRecorderWindowRestoreTest, + ReportLoginAnimationWhenAlreadyFinishedWhileBlocked) { + const bool has_display = GetParam(); + + StrictMock<MockPostLoginEventObserver> mock_observer(throughput_recorder()); + StrictMock<MockFunction<void(const char* check_point_name)>> check_point; + base::TimeTicks reported_animation_end; + base::RunLoop animation_done_loop(base::RunLoop::Type::kNestableTasksAllowed); + + { + ::testing::InSequence inseq; + + EXPECT_CALL(mock_observer, + OnUserLoggedIn(_, /*is_ash_restarted=*/false, + /*is_regular_user_or_owner=*/true)) + .Times(1); + + EXPECT_CALL(check_point, Call("login_animation_finished_while_blocked")) + .Times(1); + + EXPECT_CALL(mock_observer, OnAllExpectedShelfIconLoaded(_)).Times(1); + + EXPECT_CALL(mock_observer, + OnSessionRestoreDataLoaded(_, /*restore_automatically=*/true)) + .Times(1); + EXPECT_CALL(mock_observer, OnAllBrowserWindowsCreated(_)).Times(1); + EXPECT_CALL(mock_observer, OnAllBrowserWindowsShown(_)).Times(1); + EXPECT_CALL(mock_observer, OnAllBrowserWindowsPresented(_)).Times(1); + + EXPECT_CALL(mock_observer, OnShelfIconsLoadedAndSessionRestoreDone(_)) + .Times(1); + EXPECT_CALL(mock_observer, OnShelfAnimationFinished(_)).Times(1); + EXPECT_CALL(mock_observer, OnDeferredTasksStarted(_)).Times(1); + + EXPECT_CALL(check_point, Call("all_windows_presented")).Times(1); + + EXPECT_CALL(mock_observer, OnCompositorAnimationFinished(_, _)) + .WillOnce(::testing::SaveArg<0>(&reported_animation_end)); + EXPECT_CALL(mock_observer, OnShelfAnimationAndCompositorAnimationDone(_)) + .WillOnce([&](base::TimeTicks) { animation_done_loop.Quit(); }); + + EXPECT_CALL(check_point, Call("animation_reported")).Times(1); + } + + SetupDisplay(has_display); + + LoginOwner(); + test::RunSimpleAnimation(); + const base::TimeTicks after_blocked_animation = base::TimeTicks::Now(); + GiveItSomeTime(base::Milliseconds(100)); + + check_point.Call("login_animation_finished_while_blocked"); + + TestShelfModel model; + model.InitializeIconList({1, 2, 3}); + model.AddBrowserIcon(); + model.SetIconsLoadedFor({1, 2, 3}); + model.SetIconLoadedForBrowser(); + throughput_recorder()->InitShelfIconList(&model); + + AddScheduledRestoreWindows({1, 2, 3}); + RestoredWindowsCreated({1, 2, 3}); + RestoredWindowsShown({1, 2, 3}); + RestoredWindowsPresented({1, 2, 3}); + + check_point.Call("all_windows_presented"); + + // Flush frames without starting a new animation until the stopped tracker + // reports. + FlushFramesUntil(animation_done_loop); + + check_point.Call("animation_reported"); + EXPECT_FALSE(reported_animation_end.is_null()); + EXPECT_LE(reported_animation_end, after_blocked_animation); +} + } // namespace ash
diff --git a/ash/strings/ash_strings_cy.xtb b/ash/strings/ash_strings_cy.xtb index bc95ddd..a29f388b 100644 --- a/ash/strings/ash_strings_cy.xtb +++ b/ash/strings/ash_strings_cy.xtb
@@ -126,6 +126,7 @@ <translation id="1276975447697633661">Dewiswch y ffeil, a phwyswch <ph name="KEY" /></translation> <translation id="1279938420744323401"><ph name="DISPLAY_NAME" /> (<ph name="ANNOTATION" />)</translation> <translation id="1281746473742296584">{NUM_OF_FILES,plural, =1{Methu ag agor y ffeil}zero{Methu ag agor y ffeiliau}two{Methu ag agor y ffeiliau}few{Methu ag agor y ffeiliau}many{Methu ag agor y ffeiliau}other{Methu ag agor y ffeiliau}}</translation> +<translation id="1282910319809323663">{NUM_LINKS,plural, =1{+1 arall}zero{+# arall}two{+# arall}few{+# arall}many{+# arall}other{+# arall}}</translation> <translation id="1283126956823499975">Aeth rhywbeth o'i le gyda gosod y ddyfais</translation> <translation id="1285992161347843613">Lleoli'r ffôn</translation> <translation id="1287002645302686982">Mae desg wedi'i chadw o'r enw <ph name="DESK_TEMPLATE_NAME" /> eisoes yn bodoli</translation> @@ -2197,6 +2198,7 @@ <translation id="6249795363855770621">Methu â marcio fel wedi'i chwblhau. Rhowch gynnig arall arni pan fyddwch ar-lein.</translation> <translation id="625369703868467034">Iechyd y Rhwydwaith</translation> <translation id="6254629735336163724">Wedi'i gloi i lorweddol</translation> +<translation id="6259567134396197679">{NUM_LINKS,plural, =1{+1 ddolen arall}zero{+# dolen arall}two{+# ddolen arall}few{+# dolen arall}many{+# dolen arall}other{+# dolen arall}}</translation> <translation id="6259776178973198997">Adnewyddu Gwybodaeth Perchnogion WiFi Uniongyrchol</translation> <translation id="6260038345397266744"><ph name="TITLE" />. <ph name="DESCRIPTION" /></translation> <translation id="6267036997247669271"><ph name="NAME" />: Wrthi'n gweithredu...</translation>
diff --git a/base/BUILD.gn b/base/BUILD.gn index 038ecd8..79a5e95 100644 --- a/base/BUILD.gn +++ b/base/BUILD.gn
@@ -3379,6 +3379,8 @@ "i18n/string_search.h", "i18n/time_formatting.cc", "i18n/time_formatting.h", + "i18n/unicode_string_util.cc", + "i18n/unicode_string_util.h", "i18n/unicodestring.h", "i18n/utf8_validator_tables.cc", "i18n/utf8_validator_tables.h", @@ -3998,6 +4000,7 @@ "i18n/string_search_unittest.cc", "i18n/time_formatting_unittest.cc", "i18n/timezone_unittest.cc", + "i18n/unicode_string_util_unittest.cc", "json/json_reader_unittest.cc", "json/json_value_converter_unittest.cc", "json/json_value_serializer_unittest.cc",
diff --git a/base/i18n/unicode_string_util.cc b/base/i18n/unicode_string_util.cc new file mode 100644 index 0000000..7665da8d --- /dev/null +++ b/base/i18n/unicode_string_util.cc
@@ -0,0 +1,74 @@ +// Copyright 2026 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "base/i18n/unicode_string_util.h" + +#include <stddef.h> + +#include <algorithm> +#include <utility> + +#include "base/i18n/char_iterator.h" +#include "base/strings/string_util.h" +#include "base/strings/utf_string_conversion_utils.h" +#include "third_party/icu/source/common/unicode/uchar.h" +#include "third_party/icu/source/common/unicode/utf16.h" + +namespace base::i18n { + +namespace { + +bool IsUnicodeFormat(UChar32 c) { + return u_charType(c) == U_FORMAT_CHAR; +} + +bool IsUnicodeControlOrFormat(UChar32 c) { + return base::IsUnicodeControl(c) || IsUnicodeFormat(c); +} + +} // namespace + +bool ContainsUnicodeControlOrFormat(std::string_view str) { + for (UTF8CharIterator iter(str); !iter.end(); iter.Advance()) { + if (IsUnicodeControlOrFormat(iter.get())) { + return true; + } + } + return false; +} + +bool ContainsUnicodeControlOrFormat(std::u16string_view str) { + for (size_t i = 0; i < str.length();) { + UChar32 c; + U16_NEXT(str, i, str.length(), c); + if (IsUnicodeControlOrFormat(c)) { + return true; + } + } + return false; +} + +bool ContainsUnicodeControlOrFormatLatin1(base::span<const uint8_t> str) { + return std::ranges::any_of(str, IsUnicodeControlOrFormat); +} + +bool RemoveUnicodeControlAndFormat(std::u16string& str) { + if (!ContainsUnicodeControlOrFormat(str)) { + return false; + } + + std::u16string sanitized; + sanitized.reserve(str.size()); + for (size_t i = 0; i < str.length();) { + UChar32 c; + U16_NEXT_OR_FFFD(str, i, str.length(), c); + if (!IsUnicodeControlOrFormat(c)) { + WriteUnicodeCharacter(c, &sanitized); + } + } + str = std::move(sanitized); + return true; +} + +} // namespace base::i18n
diff --git a/base/i18n/unicode_string_util.h b/base/i18n/unicode_string_util.h new file mode 100644 index 0000000..068484b --- /dev/null +++ b/base/i18n/unicode_string_util.h
@@ -0,0 +1,41 @@ +// Copyright 2026 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef BASE_I18N_UNICODE_STRING_UTIL_H_ +#define BASE_I18N_UNICODE_STRING_UTIL_H_ + +#include <stdint.h> + +#include <string> +#include <string_view> + +#include "base/containers/span.h" +#include "base/i18n/base_i18n_export.h" + +namespace base::i18n { + +// Returns true if the UTF-8 or UTF-16 string contains any Unicode Control +// (category Cc) or Format (category Cf, such as bidirectional controls or +// zero-width joiners) characters. Ill-formed byte sequences or unpaired +// surrogates are ignored. +BASE_I18N_EXPORT bool ContainsUnicodeControlOrFormat(std::string_view str); +BASE_I18N_EXPORT bool ContainsUnicodeControlOrFormat(std::u16string_view str); + +// Returns true if the Latin-1 (ISO-8859-1) byte span contains any Unicode +// Control (Cc) or Format (Cf) characters. Takes `span<const uint8_t>` rather +// than `std::string_view` so UTF-8 strings cannot be passed accidentally. +BASE_I18N_EXPORT bool ContainsUnicodeControlOrFormatLatin1( + base::span<const uint8_t> str); + +// Removes all Unicode Control (Cc) and Format (Cf) characters from `str`. +// Returns true if any Control or Format characters were removed; when +// sanitizing, any unpaired UTF-16 surrogates are also replaced with U+FFFD so +// removing an intervening character cannot coalesce split surrogates into a +// new character. If `str` contains no Control or Format characters, returns +// false without modifying `str`. +BASE_I18N_EXPORT bool RemoveUnicodeControlAndFormat(std::u16string& str); + +} // namespace base::i18n + +#endif // BASE_I18N_UNICODE_STRING_UTIL_H_
diff --git a/base/i18n/unicode_string_util_unittest.cc b/base/i18n/unicode_string_util_unittest.cc new file mode 100644 index 0000000..ede09f8 --- /dev/null +++ b/base/i18n/unicode_string_util_unittest.cc
@@ -0,0 +1,179 @@ +// Copyright 2026 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "base/i18n/unicode_string_util.h" + +#include <stdint.h> + +#include "base/containers/span.h" +#include "base/strings/string_view_util.h" +#include "testing/gtest/include/gtest/gtest.h" + +namespace base::i18n { + +TEST(UnicodeStringUtilTest, ContainsUnicodeControlOrFormat_UTF8) { + // Empty and normal UTF-8 strings (including multibyte UTF-8 whose + // continuation bytes fall in 0x80..0x9F, such as U+20AC '€' = E2 82 AC). + EXPECT_FALSE(ContainsUnicodeControlOrFormat("")); + EXPECT_FALSE(ContainsUnicodeControlOrFormat("hello 1")); + EXPECT_FALSE(ContainsUnicodeControlOrFormat("\u3042")); // Hiragana A + EXPECT_FALSE(ContainsUnicodeControlOrFormat("\u20AC")); // Euro sign + EXPECT_FALSE(ContainsUnicodeControlOrFormat("a\U0002070Eb")); // Han char + EXPECT_FALSE(ContainsUnicodeControlOrFormat("\U000E0100")); // Mn, not Cf + + // Control characters (Cc) + EXPECT_TRUE(ContainsUnicodeControlOrFormat( + base::MakeStringViewWithNulChars("hello\0world"))); + EXPECT_TRUE(ContainsUnicodeControlOrFormat("a\x{1F}b")); // US + EXPECT_TRUE(ContainsUnicodeControlOrFormat("a\x{7F}b")); // DEL + EXPECT_TRUE(ContainsUnicodeControlOrFormat("a\u0085b")); // NEL (C2 85) + EXPECT_TRUE(ContainsUnicodeControlOrFormat("a\u009Fb")); // APC (C2 9F) + + // Format characters (Cf) - BMP and Supplementary + EXPECT_TRUE(ContainsUnicodeControlOrFormat("a\u00ADb")); // Soft Hyphen + EXPECT_TRUE(ContainsUnicodeControlOrFormat("a\u200Bb")); // ZWSP + EXPECT_TRUE(ContainsUnicodeControlOrFormat("a\u200Db")); // ZWJ + EXPECT_TRUE(ContainsUnicodeControlOrFormat("a\u200Eb")); // LRM + EXPECT_TRUE(ContainsUnicodeControlOrFormat("a\u202Db")); // LRO + EXPECT_TRUE(ContainsUnicodeControlOrFormat("a\uFEFFb")); // BOM + EXPECT_TRUE(ContainsUnicodeControlOrFormat("a\U000E0001b")); // Language Tag + EXPECT_TRUE(ContainsUnicodeControlOrFormat("a\U000E0020b")); // Tag Space + EXPECT_TRUE(ContainsUnicodeControlOrFormat("a\U000E007Fb")); // Cancel Tag + + // Ill-formed UTF-8 byte sequences (including raw Latin-1 0x85 / 0xAD bytes) + // are ignored rather than misinterpreted as code points. + EXPECT_FALSE(ContainsUnicodeControlOrFormat("a\x{85}b")); + EXPECT_FALSE(ContainsUnicodeControlOrFormat("a\x{AD}b")); + EXPECT_FALSE(ContainsUnicodeControlOrFormat("a\x{FF}b")); + EXPECT_FALSE(ContainsUnicodeControlOrFormat("a\x{ED}\x{A0}\x{80}b")); +} + +TEST(UnicodeStringUtilTest, ContainsUnicodeControlOrFormat_UTF16) { + // Empty and normal UTF-16 strings + EXPECT_FALSE(ContainsUnicodeControlOrFormat(u"")); + EXPECT_FALSE(ContainsUnicodeControlOrFormat(u"hello 1 \u3042")); + EXPECT_FALSE(ContainsUnicodeControlOrFormat(u"a\U0002070Eb")); + EXPECT_FALSE(ContainsUnicodeControlOrFormat(u"\U000E0100")); // Mn, not Cf + + // Unpaired surrogates are Cs, not Cc or Cf. + const std::u16string unpaired_lead = {u'a', 0xD800, u'b'}; + const std::u16string unpaired_trail = {u'a', 0xDC00, u'b'}; + EXPECT_FALSE(ContainsUnicodeControlOrFormat(unpaired_lead)); + EXPECT_FALSE(ContainsUnicodeControlOrFormat(unpaired_trail)); + + // Control characters (Cc) + EXPECT_TRUE(ContainsUnicodeControlOrFormat( + base::MakeStringViewWithNulChars(u"hello\0world"))); + EXPECT_TRUE(ContainsUnicodeControlOrFormat(u"a\u001Fb")); + EXPECT_TRUE(ContainsUnicodeControlOrFormat(u"a\u007Fb")); + EXPECT_TRUE(ContainsUnicodeControlOrFormat(u"a\u0085b")); + EXPECT_TRUE(ContainsUnicodeControlOrFormat(u"a\u009Fb")); + + // Format characters (Cf) - BMP and Supplementary + EXPECT_TRUE(ContainsUnicodeControlOrFormat(u"a\u00ADb")); + EXPECT_TRUE(ContainsUnicodeControlOrFormat(u"a\u200Bb")); + EXPECT_TRUE(ContainsUnicodeControlOrFormat(u"a\u200Db")); + EXPECT_TRUE(ContainsUnicodeControlOrFormat(u"hello\u200Eworld")); + EXPECT_TRUE(ContainsUnicodeControlOrFormat(u"a\u202Db")); + EXPECT_TRUE(ContainsUnicodeControlOrFormat(u"a\uFEFFb")); + EXPECT_TRUE(ContainsUnicodeControlOrFormat(u"a\U000E0001b")); + EXPECT_TRUE(ContainsUnicodeControlOrFormat(u"a\U000E0020b")); + EXPECT_TRUE(ContainsUnicodeControlOrFormat(u"a\U000E007Fb")); +} + +TEST(UnicodeStringUtilTest, ContainsUnicodeControlOrFormatLatin1) { + EXPECT_FALSE(ContainsUnicodeControlOrFormatLatin1({})); + + const uint8_t kNormalLatin1[] = {'h', 'i', '1', 0xA0, 0xA9, 0xFF}; + EXPECT_FALSE(ContainsUnicodeControlOrFormatLatin1(kNormalLatin1)); + + // Control characters (Cc) + const uint8_t kWithNul[] = {'a', 0x00, 'b'}; // NUL + const uint8_t kWithUs[] = {'a', 0x1F, 'b'}; // US + const uint8_t kWithDel[] = {'a', 0x7F, 'b'}; // DEL + const uint8_t kWithNel[] = {'a', 0x85, 'b'}; // NEL + const uint8_t kWithApc[] = {'a', 0x9F, 'b'}; // APC + EXPECT_TRUE(ContainsUnicodeControlOrFormatLatin1(kWithNul)); + EXPECT_TRUE(ContainsUnicodeControlOrFormatLatin1(kWithUs)); + EXPECT_TRUE(ContainsUnicodeControlOrFormatLatin1(kWithDel)); + EXPECT_TRUE(ContainsUnicodeControlOrFormatLatin1(kWithNel)); + EXPECT_TRUE(ContainsUnicodeControlOrFormatLatin1(kWithApc)); + + // Format characters (Cf) + const uint8_t kWithSoftHyphen[] = {'a', 0xAD, 'b'}; // Soft Hyphen + EXPECT_TRUE(ContainsUnicodeControlOrFormatLatin1(kWithSoftHyphen)); +} + +TEST(UnicodeStringUtilTest, RemoveUnicodeControlAndFormat_U16) { + // Empty string + std::u16string str; + EXPECT_FALSE(RemoveUnicodeControlAndFormat(str)); + EXPECT_TRUE(str.empty()); + + // No change + str = u"hello"; + EXPECT_FALSE(RemoveUnicodeControlAndFormat(str)); + EXPECT_EQ(str, u"hello"); + + // Only control + str = base::MakeStringViewWithNulChars(u"\0\x1F\x7F"); + EXPECT_TRUE(RemoveUnicodeControlAndFormat(str)); + EXPECT_TRUE(str.empty()); + + // Only format + str = u"\u00AD\u200B\u200D\u200E"; + EXPECT_TRUE(RemoveUnicodeControlAndFormat(str)); + EXPECT_TRUE(str.empty()); + + // Mixed (use MakeStringViewWithNulChars to preserve NUL) + str = base::MakeStringViewWithNulChars(u"a\0b\u200Ec"); + EXPECT_TRUE(RemoveUnicodeControlAndFormat(str)); + EXPECT_EQ(str, u"abc"); + + // Supplementary format (U+E0001 Language Tag: H 0xDB40, L 0xDC01) + str = u"a\U000E0001b"; + ASSERT_EQ(str.length(), 4u); + EXPECT_TRUE(RemoveUnicodeControlAndFormat(str)); + EXPECT_EQ(str, u"ab"); + + // Supplementary normal character (U+2070E Han character) is preserved. + str = u"a\U0002070Eb"; + std::u16string expected = str; + EXPECT_FALSE(RemoveUnicodeControlAndFormat(str)); + EXPECT_EQ(str, expected); + + // Unpaired surrogate without any control/format characters: early return + // leaves the string untouched. + str = {u'a', 0xD841, u'b'}; + expected = str; + EXPECT_FALSE(RemoveUnicodeControlAndFormat(str)); + EXPECT_EQ(str, expected); + + // Case 1: Split surrogates that would coalesce into a supplementary Format + // character (U+E0001: 0xDB40, 0xDC01) when an intervening control/format + // character is removed are each replaced with U+FFFD. + str = {u'a', 0xDB40, 0x200B, 0xDC01, u'b'}; + EXPECT_TRUE(RemoveUnicodeControlAndFormat(str)); + EXPECT_EQ(str, u"a\uFFFD\uFFFDb"); + EXPECT_FALSE(ContainsUnicodeControlOrFormat(str)); + + // Case 2: Single unpaired lead or trail surrogate alongside a removed + // control/format character is replaced with U+FFFD. + str = {u'a', 0xD841, 0x200B, u'b'}; + EXPECT_TRUE(RemoveUnicodeControlAndFormat(str)); + EXPECT_EQ(str, u"a\uFFFDb"); + + str = {u'a', 0x200B, 0xDF0E, u'b'}; + EXPECT_TRUE(RemoveUnicodeControlAndFormat(str)); + EXPECT_EQ(str, u"a\uFFFDb"); + + // Case 3: Split surrogates that would coalesce into a normal supplementary + // character (U+2070E: 0xD841, 0xDF0E) when an intervening control/format + // character is removed are replaced with U+FFFD rather than forming U+2070E. + str = {u'a', 0xD841, 0x200B, 0xDF0E, u'b'}; + EXPECT_TRUE(RemoveUnicodeControlAndFormat(str)); + EXPECT_EQ(str, u"a\uFFFD\uFFFDb"); +} + +} // namespace base::i18n
diff --git a/chrome/VERSION b/chrome/VERSION index d507e44..96749ff 100644 --- a/chrome/VERSION +++ b/chrome/VERSION
@@ -1,4 +1,4 @@ MAJOR=160 MINOR=0 -BUILD=8190 +BUILD=8191 PATCH=0
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/StaticLayout.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/StaticLayout.java index d72e2d4..eff2e1a 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/StaticLayout.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/StaticLayout.java
@@ -20,6 +20,7 @@ import org.chromium.chrome.browser.browser_controls.BrowserControlsOffsetTagsInfo; import org.chromium.chrome.browser.browser_controls.BrowserControlsStateProvider; import org.chromium.chrome.browser.browser_controls.BrowserControlsStateProvider.ControlsPosition; +import org.chromium.chrome.browser.browser_controls.BrowserControlsUtils; import org.chromium.chrome.browser.compositor.layouts.components.LayoutTab; import org.chromium.chrome.browser.compositor.scene_layer.StaticTabSceneLayer; import org.chromium.chrome.browser.layouts.CompositorModelChangeProcessor; @@ -176,7 +177,17 @@ boolean bottomControlsMinHeightChanged, boolean requestNewFrame, boolean isVisibilityForced) { - if (requestNewFrame || isVisibilityForced) { + // When the browser positions the controls (Controls-in-Browser), the + // content OffsetTag is still registered and the renderer applies the + // controls offset to it, so the browser must not also apply it + // here or the content would be offset twice. Forced visibility removes the + // OffsetTags, so the browser still positions the content in that case. + boolean browserOwnsContentOffset = + isVisibilityForced + || (requestNewFrame + && !BrowserControlsUtils + .isBrowserPositioningControls()); + if (browserOwnsContentOffset) { int contentOffset = mBrowserControlsStateProvider.getContentOffset(); mModel.set(LayoutTab.CONTENT_OFFSET_Y, contentOffset); } else {
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/fullscreen/BrowserControlsManager.java b/chrome/android/java/src/org/chromium/chrome/browser/fullscreen/BrowserControlsManager.java index 6527f67..0303316 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/fullscreen/BrowserControlsManager.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/fullscreen/BrowserControlsManager.java
@@ -338,9 +338,11 @@ offsetTagsInfo.mTopControlsAdditionalHeight = hairlineHeight; offsetTagsInfo.mContentConstraints = new OffsetTagConstraints(0, 0, -mTopControlsHeight, 0); - offsetTagsInfo.mTopControlsConstraints = - new OffsetTagConstraints( - 0, 0, -(mTopControlsHeight + hairlineHeight), 0); + if (!BrowserControlsUtils.isBrowserPositioningControls()) { + offsetTagsInfo.mTopControlsConstraints = + new OffsetTagConstraints( + 0, 0, -(mTopControlsHeight + hairlineHeight), 0); + } onConstraintsChanged(constraints); // Notify observers of changes before passing tags to native so observers @@ -1242,6 +1244,7 @@ @Override public boolean offsetOverridden() { + if (BrowserControlsUtils.isBrowserPositioningControls()) return true; return mOffsetOverridden; } @@ -1587,8 +1590,13 @@ } } + // With CIB the browser moves the top controls, so they don't need OffsetTag constraints. + // The content OffsetTag is still registered, so its constraints are still updated. OffsetTagConstraints newTopConstraints = - new OffsetTagConstraints(0, 0, minY - getTopControlsHairlineHeight(), maxY); + BrowserControlsUtils.isBrowserPositioningControls() + ? null + : new OffsetTagConstraints( + 0, 0, minY - getTopControlsHairlineHeight(), maxY); OffsetTagConstraints newContentConstraints = new OffsetTagConstraints(0, 0, minY, maxY); BrowserControlsOffsetTagConstraints constraints = new BrowserControlsOffsetTagConstraints( @@ -1603,6 +1611,10 @@ private void updateBottomControlsOffsetTagConstraints( int oldHeight, int oldMinHeight, int newHeight, int newMinHeight) { + if (BrowserControlsUtils.isBrowserPositioningControls()) { + return; + } + int minY = 0; int maxY = newHeight - newMinHeight;
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabBrowserControlsConstraintsHelper.java b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabBrowserControlsConstraintsHelper.java index b656a47..abdce74c 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabBrowserControlsConstraintsHelper.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabBrowserControlsConstraintsHelper.java
@@ -17,6 +17,7 @@ import org.chromium.cc.input.BrowserControlsOffsetTagModifications; import org.chromium.cc.input.BrowserControlsState; import org.chromium.chrome.browser.browser_controls.BrowserControlsOffsetTagsInfo; +import org.chromium.chrome.browser.browser_controls.BrowserControlsUtils; import org.chromium.chrome.browser.flags.ChromeFeatureList; import org.chromium.components.browser_ui.util.BrowserControlsVisibilityDelegate; import org.chromium.content_public.browser.NavigationHandle; @@ -279,7 +280,11 @@ boolean isNewStateForced = isStateForced(constraints); if (!mOffsetTagsInfo.hasTags() && !isNewStateForced) { - updateOffsetTags(new BrowserControlsOffsetTagsInfo(), constraints); + BrowserControlsOffsetTagsInfo tagsInfo = + BrowserControlsUtils.isBrowserPositioningControls() + ? BrowserControlsOffsetTagsInfo.createContentOnly() + : new BrowserControlsOffsetTagsInfo(); + updateOffsetTags(tagsInfo, constraints); } else if (mOffsetTagsInfo.hasTags() && isNewStateForced) { updateOffsetTags(new BrowserControlsOffsetTagsInfo(null, null, null), constraints); }
diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/compositor/layouts/StaticLayoutUnitTest.java b/chrome/android/junit/src/org/chromium/chrome/browser/compositor/layouts/StaticLayoutUnitTest.java index 0f6582f..e3f5e4d 100644 --- a/chrome/android/junit/src/org/chromium/chrome/browser/compositor/layouts/StaticLayoutUnitTest.java +++ b/chrome/android/junit/src/org/chromium/chrome/browser/compositor/layouts/StaticLayoutUnitTest.java
@@ -46,12 +46,14 @@ import org.chromium.base.supplier.ObservableSuppliers; import org.chromium.base.supplier.SettableNonNullObservableSupplier; import org.chromium.base.test.BaseRobolectricTestRunner; +import org.chromium.base.test.util.Features.EnableFeatures; import org.chromium.chrome.browser.browser_controls.BrowserControlsOffsetTagsInfo; import org.chromium.chrome.browser.browser_controls.BrowserControlsStateProvider; import org.chromium.chrome.browser.browser_controls.BrowserControlsStateProvider.ControlsPosition; import org.chromium.chrome.browser.compositor.layouts.components.LayoutTab; import org.chromium.chrome.browser.compositor.scene_layer.StaticTabSceneLayer; import org.chromium.chrome.browser.compositor.scene_layer.StaticTabSceneLayerJni; +import org.chromium.chrome.browser.flags.ChromeFeatureList; import org.chromium.chrome.browser.layouts.animation.CompositorAnimationHandler; import org.chromium.chrome.browser.layouts.scene_layer.SceneLayer; import org.chromium.chrome.browser.layouts.scene_layer.SceneLayerJni; @@ -255,6 +257,42 @@ } @Test + @EnableFeatures(ChromeFeatureList.CONTROLS_IN_BROWSER) + public void testOnControlsOffsetChanged_controlsInBrowser_requestNewFrameUsesTopHeight() { + final int offset = 10; + final int height = 150; + doReturn(offset).when(mBrowserControlsStateProvider).getContentOffset(); + doReturn(height).when(mBrowserControlsStateProvider).getTopControlsHeight(); + + // The content OffsetTag applies the controls offset, so the browser must not apply it too. + mBrowserControlsStateProviderObserverCaptor + .getValue() + .onControlsOffsetChanged(0, 0, false, 0, 0, false, true, false); + assertEquals(height, (int) mModel.get(LayoutTab.CONTENT_OFFSET_Y)); + } + + @Test + @EnableFeatures(ChromeFeatureList.CONTROLS_IN_BROWSER) + public void testOnControlsOffsetChanged_controlsInBrowser_visibilityForcedUsesContentOffset() { + final int offset = 10; + final int height = 150; + doReturn(offset).when(mBrowserControlsStateProvider).getContentOffset(); + doReturn(height).when(mBrowserControlsStateProvider).getTopControlsHeight(); + + // Forced visibility removes the OffsetTags, so the browser positions the content. + mBrowserControlsStateProviderObserverCaptor + .getValue() + .onControlsOffsetChanged(0, 0, false, 0, 0, false, false, true); + assertEquals(offset, (int) mModel.get(LayoutTab.CONTENT_OFFSET_Y)); + mModel.set(LayoutTab.CONTENT_OFFSET_Y, 0); + + mBrowserControlsStateProviderObserverCaptor + .getValue() + .onControlsOffsetChanged(0, 0, false, 0, 0, false, true, true); + assertEquals(offset, (int) mModel.get(LayoutTab.CONTENT_OFFSET_Y)); + } + + @Test public void testAnimatedPositionChange_setsContentOffsetToNewTopHeight() { final int height = 150; mModel.set(LayoutTab.CONTENT_OFFSET_Y, 0);
diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/fullscreen/BrowserControlsManagerUnitTest.java b/chrome/android/junit/src/org/chromium/chrome/browser/fullscreen/BrowserControlsManagerUnitTest.java index ab05ce4..0e9ef4a5 100644 --- a/chrome/android/junit/src/org/chromium/chrome/browser/fullscreen/BrowserControlsManagerUnitTest.java +++ b/chrome/android/junit/src/org/chromium/chrome/browser/fullscreen/BrowserControlsManagerUnitTest.java
@@ -1253,6 +1253,95 @@ eq(true)); } + /** + * Registers content-only OffsetTags (as done with Controls-in-Browser) through the tab observer + * and returns the tags info that was passed in. + */ + private BrowserControlsOffsetTagsInfo registerContentOnlyOffsetTags() { + remakeWithoutSpy(); + notifyAddTab(mTab); + mActivityTabProvider.setForTesting(mTab); + when(mTab.getWebContents()).thenReturn(mWebContents); + when(mControlContainer.getToolbarHairlineHeight()).thenReturn(TOOLBAR_HAIRLINE_HEIGHT); + + BrowserControlsOffsetTagsInfo offsetTagsInfo = + BrowserControlsOffsetTagsInfo.createContentOnly(); + mBrowserControlsManager + .getTabControlsObserverForTesting() + .onOffsetTagsInfoChanged( + mTab, + new BrowserControlsOffsetTagsInfo(), + offsetTagsInfo, + BrowserControlsState.BOTH); + return offsetTagsInfo; + } + + @Test + @EnableFeatures(ChromeFeatureList.CONTROLS_IN_BROWSER) + public void testOffsetTagsChanged_controlsInBrowser_noTopControlsConstraints() { + BrowserControlsOffsetTagsInfo offsetTagsInfo = registerContentOnlyOffsetTags(); + + assertNull(offsetTagsInfo.mTopControlsConstraints); + verifyUpdateOffsetTagDefinitions( + offsetTagsInfo.getTags(), + /* top= */ null, + new OffsetTagConstraints(0, 0, -TOOLBAR_HEIGHT, 0), + /* bottom= */ null); + } + + @Test + @EnableFeatures(ChromeFeatureList.CONTROLS_IN_BROWSER) + public void testChangeTopHeight_controlsInBrowser_updatesOnlyContentConstraints() { + BrowserControlsOffsetTagsInfo offsetTagsInfo = registerContentOnlyOffsetTags(); + verifyUpdateOffsetTagDefinitions( + offsetTagsInfo.getTags(), + /* top= */ null, + new OffsetTagConstraints(0, 0, -TOOLBAR_HEIGHT, 0), + /* bottom= */ null); + + final int newHeight = TOOLBAR_HEIGHT + EXTRA_TOP_CONTROL_HEIGHT; + mBrowserControlsManager.setTopControlsHeight(newHeight, 0); + + verifyUpdateOffsetTagDefinitions( + offsetTagsInfo.getTags(), + /* top= */ null, + new OffsetTagConstraints(0, 0, -newHeight, 0), + /* bottom= */ null); + } + + @Test + @EnableFeatures(ChromeFeatureList.CONTROLS_IN_BROWSER) + public void testChangeBottomHeight_controlsInBrowser_noBottomConstraints() { + registerContentOnlyOffsetTags(); + verify(mWebContents, times(1)).updateOffsetTagDefinitions(any()); + + mBrowserControlsManager.setBottomControlsAdditionalHeight(TOOLBAR_HAIRLINE_HEIGHT); + mBrowserControlsManager.setBottomControlsHeight(TOOLBAR_HEIGHT, 0); + + // The bottom constraints update is skipped, so nothing new is sent to the renderer. + verify(mWebContents, times(1)).updateOffsetTagDefinitions(any()); + } + + @Test + @EnableFeatures(ChromeFeatureList.CONTROLS_IN_BROWSER) + public void testOffsetOverridden_controlsInBrowser_alwaysTrue() { + assertTrue(mBrowserControlsManager.offsetOverridden()); + } + + private void verifyUpdateOffsetTagDefinitions( + BrowserControlsOffsetTags expectedTags, + OffsetTagConstraints top, + OffsetTagConstraints content, + OffsetTagConstraints bottom) { + mWebContentsInOrder + .verify(mWebContents) + .updateOffsetTagDefinitions( + argThat( + actual -> + offsetTagDefinitionsMatch( + expectedTags, top, content, bottom, actual))); + } + private void verifyUpdateOffsetTagDefinitions( OffsetTagConstraints top, OffsetTagConstraints content, OffsetTagConstraints bottom) { BrowserControlsOffsetTags expectedTags =
diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/tab/TabBrowserControlsConstraintsHelperTest.java b/chrome/android/junit/src/org/chromium/chrome/browser/tab/TabBrowserControlsConstraintsHelperTest.java index 267efc98..7c1dd130 100644 --- a/chrome/android/junit/src/org/chromium/chrome/browser/tab/TabBrowserControlsConstraintsHelperTest.java +++ b/chrome/android/junit/src/org/chromium/chrome/browser/tab/TabBrowserControlsConstraintsHelperTest.java
@@ -235,12 +235,96 @@ assertOffsetTagsNotNull(tagsInfoArg.getValue().getTags()); } + @Test + @EnableFeatures(ChromeFeatureList.CONTROLS_IN_BROWSER) + public void testUpdateOffsetTag_controlsInBrowser_visibilityConstraintsChanged() { + initHelper(); + ArgumentCaptor<BrowserControlsOffsetTagsInfo> tagsInfoArg = + ArgumentCaptor.forClass(BrowserControlsOffsetTagsInfo.class); + ArgumentCaptor<BrowserControlsOffsetTagModifications> tagModificationsArg = + ArgumentCaptor.forClass(BrowserControlsOffsetTagModifications.class); + mRegisteredTabObserver.onInitialized(mTab); + RobolectricUtil.runAllBackgroundAndUi(); + + // During init, delegate gets set with BOTH, check that only a content tag is created and + // propagated, since the browser positions the controls. + Mockito.verify(mTabObserver) + .onOffsetTagsInfoChanged( + Mockito.any(), + Mockito.any(), + tagsInfoArg.capture(), + Mockito.eq(BrowserControlsState.BOTH)); + assertOnlyContentOffsetTagNotNull(tagsInfoArg.getValue().getTags()); + verifyUpdateState(BrowserControlsState.BOTH, tagModificationsArg); + assertOnlyContentOffsetTagNotNull(tagModificationsArg.getValue().getTags()); + + // When visibility is forced, we should have null tags. + mVisibilityDelegate.set(BrowserControlsState.SHOWN); + RobolectricUtil.runAllBackgroundAndUi(); + Mockito.verify(mTabObserver) + .onOffsetTagsInfoChanged( + Mockito.any(), + Mockito.any(), + tagsInfoArg.capture(), + Mockito.eq(BrowserControlsState.SHOWN)); + assertOffsetTagsNull(tagsInfoArg.getValue().getTags()); + verifyUpdateState(BrowserControlsState.SHOWN, tagModificationsArg); + assertOffsetTagsNull(tagModificationsArg.getValue().getTags()); + + // Back to non forced state, check that we create and propagate a content tag again. + mVisibilityDelegate.set(BrowserControlsState.BOTH); + RobolectricUtil.runAllBackgroundAndUi(); + Mockito.verify(mTabObserver, Mockito.times(2)) + .onOffsetTagsInfoChanged( + Mockito.any(), + Mockito.any(), + tagsInfoArg.capture(), + Mockito.eq(BrowserControlsState.BOTH)); + assertOnlyContentOffsetTagNotNull(tagsInfoArg.getValue().getTags()); + verifyUpdateState(BrowserControlsState.BOTH, tagModificationsArg); + assertOnlyContentOffsetTagNotNull(tagModificationsArg.getValue().getTags()); + } + + @Test + @EnableFeatures(ChromeFeatureList.CONTROLS_IN_BROWSER) + public void testUpdateOffsetTag_controlsInBrowser_hiddenConstraintRemovesTags() { + initHelper(); + ArgumentCaptor<BrowserControlsOffsetTagsInfo> tagsInfoArg = + ArgumentCaptor.forClass(BrowserControlsOffsetTagsInfo.class); + mRegisteredTabObserver.onInitialized(mTab); + RobolectricUtil.runAllBackgroundAndUi(); + Mockito.verify(mTabObserver) + .onOffsetTagsInfoChanged( + Mockito.any(), + Mockito.any(), + tagsInfoArg.capture(), + Mockito.eq(BrowserControlsState.BOTH)); + assertOnlyContentOffsetTagNotNull(tagsInfoArg.getValue().getTags()); + + // Forcing the controls hidden should remove the content tag. + mVisibilityDelegate.set(BrowserControlsState.HIDDEN); + RobolectricUtil.runAllBackgroundAndUi(); + Mockito.verify(mTabObserver) + .onOffsetTagsInfoChanged( + Mockito.any(), + Mockito.any(), + tagsInfoArg.capture(), + Mockito.eq(BrowserControlsState.HIDDEN)); + assertOffsetTagsNull(tagsInfoArg.getValue().getTags()); + } + private void assertOffsetTagsNull(BrowserControlsOffsetTags tags) { Assert.assertNull(tags.getTopControlsOffsetTag()); Assert.assertNull(tags.getContentOffsetTag()); Assert.assertNull(tags.getBottomControlsOffsetTag()); } + private void assertOnlyContentOffsetTagNotNull(BrowserControlsOffsetTags tags) { + Assert.assertNull(tags.getTopControlsOffsetTag()); + Assert.assertNotNull(tags.getContentOffsetTag()); + Assert.assertNull(tags.getBottomControlsOffsetTag()); + } + private void assertOffsetTagsNotNull(BrowserControlsOffsetTags tags) { Assert.assertNotNull(tags.getTopControlsOffsetTag()); Assert.assertNotNull(tags.getContentOffsetTag());
diff --git a/chrome/android/profiles/arm.newest.txt b/chrome/android/profiles/arm.newest.txt index 9733473..df9c731 100644 --- a/chrome/android/profiles/arm.newest.txt +++ b/chrome/android/profiles/arm.newest.txt
@@ -1 +1 @@ -chromeos-chrome-arm-160.0.8186.0_pre1755623_rc-r1-merged.afdo.bz2 +chromeos-chrome-arm-160.0.8189.0_pre1756735_rc-r1-merged.afdo.bz2
diff --git a/chrome/app/resources/chromium_strings_cy.xtb b/chrome/app/resources/chromium_strings_cy.xtb index 0935aeb8..dc322f4 100644 --- a/chrome/app/resources/chromium_strings_cy.xtb +++ b/chrome/app/resources/chromium_strings_cy.xtb
@@ -1,6 +1,7 @@ <?xml version="1.0" ?> <!DOCTYPE translationbundle> <translationbundle lang="cy"> +<translation id="1006344083777662909">Rydych yn rhannu'r tab hwn gyda Search</translation> <translation id="1026101648481255140">Parhau i Osod</translation> <translation id="1029669172902658969">Ail-lansiwch i ddiweddaru &ChromiumOS</translation> <translation id="1040916596585577953">Mae Chromium yn argymell eich bod yn adolygu'r estyniad hwn</translation> @@ -86,6 +87,7 @@ <translation id="1880495786739455486">Gallwch ailagor Search yn y panel ochr i ofyn cwestiynau wrth i chi bori</translation> <translation id="1880677175115548835">Dewis testun</translation> <translation id="188102464690227119">Mae gan y botwm "Search yn y panel ochr" ar y bar offer eicon newydd. Cliciwch arno i ofyn cwestiynau wrth i chi bori gyda Search yn y panel ochr.</translation> +<translation id="1888946382735994145"><ph name="WINDOW_TITLE" /> - Rydych yn rhannu'r tab hwn gyda Search</translation> <translation id="1896836275755235458">Mae Chromium yn arbed pŵer batri drwy gyfyngu ar weithgarwch cefndir ac effeithiau gweledol, megis sgrolio llyfn a chyfraddau ffrâm fideo. <ph name="BEGIN_LINK" />Dysgu rhagor am yr Arbedwr Ynni<ph name="END_LINK" /></translation> <translation id="1900969832270057921">Gwasanaeth Diweddaru Chromium</translation> <translation id="1929939181775079593">Mae Chromium yn anymatebol. Ail-lansio nawr?</translation> @@ -105,6 +107,7 @@ <translation id="2086476982681781442">Gwnaeth Chromium rwystro'r lawrlwythiad hwn oherwydd bod y ffeil yn dwyllodrus a gallai wneud newidiadau annisgwyl i'ch dyfais</translation> <translation id="208726765006323911">Byddwch yn gweld anogwr i roi cynnig ar <ph name="FEATURE_NAME" /> y tro nesaf y byddwch yn agor Chromium iOS.</translation> <translation id="2099452623287920103">Bydd eich cyfrineiriau a data Chromium arall a gadwyd gennych yn eich Cyfrif Google yn cael eu tynnu o'r ddyfais hon. I'w defnyddio eto yn Chromium, mewngofnodwch eto.</translation> +<translation id="2104346008417283366">Gallwch newid i Gemini sy'n gysylltiedig â'ch Cyfrif Google yn wreiddiol ac nad yw'n cael ei reoli gan <ph name="DOMAIN" />. Mae newid yn gofyn am ail-lansio Chromium.</translation> <translation id="2120965832000301375">{COUNT,plural, =1{Mae eich sefydliad yn dileu data pori yn awtomatig pan nad yw Chromium yn cael ei ddefnyddio am 1 funud. Gallai hyn gynnwys hanes, awtolenwi a lawrlwythiadau. Bydd eich tabiau yn aros ar agor.}zero{Mae eich sefydliad yn dileu data pori yn awtomatig pan nad yw Chromium yn cael ei ddefnyddio am # munud. Gallai hyn gynnwys hanes, awtolenwi a lawrlwythiadau. Bydd eich tabiau yn aros ar agor.}two{Mae eich sefydliad yn dileu data pori yn awtomatig pan nad yw Chromium yn cael ei ddefnyddio am # funud. Gallai hyn gynnwys hanes, awtolenwi a lawrlwythiadau. Bydd eich tabiau yn aros ar agor.}few{Mae eich sefydliad yn dileu data pori yn awtomatig pan nad yw Chromium yn cael ei ddefnyddio am # munud. Gallai hyn gynnwys hanes, awtolenwi a lawrlwythiadau. Bydd eich tabiau yn aros ar agor.}many{Mae eich sefydliad yn dileu data pori yn awtomatig pan nad yw Chromium yn cael ei ddefnyddio am # munud. Gallai hyn gynnwys hanes, awtolenwi a lawrlwythiadau. Bydd eich tabiau yn aros ar agor.}other{Mae eich sefydliad yn dileu data pori yn awtomatig pan nad yw Chromium yn cael ei ddefnyddio am # munud. Gallai hyn gynnwys hanes, awtolenwi a lawrlwythiadau. Bydd eich tabiau yn aros ar agor.}}</translation> <translation id="2126108037660393668">Mae'r ffeil a lawrlwythwyd wedi methu â dilysu.</translation> <translation id="2135919691573380097">Adroddwch am y wefan hon</translation> @@ -272,6 +275,7 @@ <translation id="3941890832296813527">Gwall gosod: Mae enw ffeil y gosodwr yn annilys neu heb ei gefnogi.</translation> <translation id="3945058413678539331">Mae Chromium yn ceisio copïo cyfrineiriau. Teipiwch eich cyfrinair Windows i ganiatáu hyn.</translation> <translation id="3950481960271781644">I gael eich gwybodaeth sydd wedi'i chadw a rhagor ar eich holl ddyfeisiau, mewngofnodwch i Chromium</translation> +<translation id="3956384805063254165">Gall y porwr hwn a reolir ddefnyddio Gemini a sefydlwyd ar gyfer gwaith gan <ph name="DOMAIN" />. Gall ddod o hyd i wybodaeth a darparu atebion sydd wedi'u seilio ar ffeiliau a gwasanaethau'r sefydliad. Mae newid yn gofyn am ail-lansio Chromium.</translation> <translation id="395904275706073188">Nid oes modd darllen tudalennau gwarchodedig. Rhowch gynnig ar dudalen wahanol.</translation> <translation id="3962647064319009959">Dysgwch sut mae Chromium yn eich cadw'n ddiogel</translation> <translation id="3967822245660637423">Lawrlwytho wedi'i gwblhau</translation> @@ -364,6 +368,7 @@ <translation id="494490797786467921">Cliciwch i gau'r deialog mewngofnodi Chromium</translation> <translation id="4950660488495335294">Gallwch wahanu eich holl bethau Chromium gyda phroffiliau Chromium. Creu proffiliau ar gyfer eich ffrindiau a'ch teulu, neu rannu rhwng gwaith a hwyl.</translation> <translation id="4992938037305302429">Eich Cyfrif yn Chromium</translation> +<translation id="5088350632679445418">Dechrau Trywydd Newydd gyda Search</translation> <translation id="5123973130450702873">Mae angen caniatâd i olrhain eich dwylo ar Chromium</translation> <translation id="5141988424377517949">Nid ydych wedi ymweld yn ddiweddar. Mae Chromium wedi tynnu <ph name="PERMISSION_1" />, <ph name="PERMISSION_2" />, <ph name="PERMISSION_3" />.</translation> <translation id="5171868502429358653">Mewngofnodi i Chromium</translation> @@ -402,6 +407,7 @@ <translation id="5473971139929175403">Mae'n bosib na fydd Chromium yn gweithredu'n gywir oherwydd nad yw'n cael ei gefnogi mwyach ar y dosbarthiad Linux hwn</translation> <translation id="5475924890392386523">Gwnaeth Chromium rwystro'r lawrlwythiad hwn oherwydd gall y ffeil niweidio'ch cyfrifon rhwydwaith personol a chymdeithasol</translation> <translation id="5496810170689441661">Mae Chromium yn ceisio golygu cyfrineiriau. Teipiwch eich cyfrinair Windows i ganiatáu hyn.</translation> +<translation id="550687958592841318">{NUM_TABS,plural, =1{Dad-rannu tab gyda Search}zero{Dad-rannu # tab gyda Search}two{Dad-rannu # dab gyda Search}few{Dad-rannu # thab gyda Search}many{Dad-rannu # thab gyda Search}other{Dad-rannu # tab gyda Search}}</translation> <translation id="5524890928877629608">cornel chwith uchaf yr ardal chwilio: <ph name="LEFT" />% i'r chwith, <ph name="TOP" />% ar y brig</translation> <translation id="5527463683072221100">Agor ffeiliau PDF yn Chromium</translation> <translation id="5557035028197464376">Search yn Chrome wedi'i binio i'r bar offer!</translation> @@ -412,8 +418,10 @@ <translation id="5576587363991567745">Mae <ph name="EXISTING_USER" /> eisoes wedi mewngofnodi. I gadw'ch pori ar wahân, mewngofnodwch i Chromium yn eich proffil eich hun fel <ph name="USER_EMAIL_ADDRESS" />. Byddwch hefyd yn cael eich gwybodaeth sydd wedi'i chadw a rhagor o'ch <ph name="DEVICE" />.</translation> <translation id="5579324208890605088">Gwall cychwyn: rhedeg y gosodwr fel defnyddiwr arferol, nid fel gweinyddwr.</translation> <translation id="5580770360767802657">Defnyddio Chromium yn ddiofyn a'i binio</translation> +<translation id="5595526984151073167">{NUM_TABS,plural, =1{Rhannu Tab gyda Search}zero{Rhannu # tab gyda Search}two{Rhannu # Dab gyda Search}few{Rhannu # Thab gyda Search}many{Rhannu # Thab gyda Search}other{Rhannu # Tab gyda Search}}</translation> <translation id="5596063723521813107">{COUNT,plural, =1{Mae eich gweinyddwr yn gofyn i chi ail-lansio Chromium i gymhwyso diweddariad. Ni fydd eich ffenestr Ynysig yn ailagor.}zero{Mae eich gweinyddwr yn gofyn i chi ail-lansio Chromium i gymhwyso diweddariad. Ni fydd eich # ffenestr Ynysig yn ailagor.}two{Mae eich gweinyddwr yn gofyn i chi ail-lansio Chromium i gymhwyso diweddariad. Ni fydd eich # ffenestr Ynysig yn ailagor.}few{Mae eich gweinyddwr yn gofyn i chi ail-lansio Chromium i gymhwyso diweddariad. Ni fydd eich # ffenestr Ynysig yn ailagor.}many{Mae eich gweinyddwr yn gofyn i chi ail-lansio Chromium i gymhwyso diweddariad. Ni fydd eich # ffenestr Ynysig yn ailagor.}other{Mae eich gweinyddwr yn gofyn i chi ail-lansio Chromium i gymhwyso diweddariad. Ni fydd eich # ffenestr Ynysig yn ailagor.}}</translation> <translation id="5596627076506792578">Rhagor o ddewisiadau</translation> +<translation id="5608863008645990586">Newid i Gemini Enterprise a reolir gan <ph name="DOMAIN" /></translation> <translation id="5614149501995591823">Mae <ph name="IMPORTANT_UPDATE" /> yn barod. Gallwch ail-lansio nawr, neu osod Chromium i ddiweddaru'r tro nesaf y bydd eich sgrîn yn aros ymlaen a heb ei ddefnyddio am <ph name="IDLE_DURATION" />.</translation> <translation id="5623402015214259806">{0,plural, =0{Mae diweddariad Cromiwm ar gael}=1{Mae diweddariad Cromiwm ar gael}two{Mae diweddariad Chromium wedi bod ar gael ers # ddiwrnod}few{Mae diweddariad Chromium wedi bod ar gael ers # diwrnod}many{Mae diweddariad Chromium wedi bod ar gael ers # diwrnod}other{Mae diweddariad Chromium wedi bod ar gael ers # diwrnod}}</translation> <translation id="5643865575100044307">Dileu data gwefan o'ch dyfais bob amser pan fyddwch yn cau Chromium</translation> @@ -507,6 +515,7 @@ <translation id="6455857529632101747">Croeso i broffiliau Chromium</translation> <translation id="6460614424172581323">Y tro nesaf y byddwch yn agor Chromium ar eich <ph name="DEVICE_TYPE" />, byddwch yn gweld anogwr i ddefnyddio grwpiau tabiau.</translation> <translation id="6466344609055215035">Tynnu Cyfrif o Chromium</translation> +<translation id="6475125381371849386">Dechrau trywydd newydd gyda Search</translation> <translation id="6475912303565314141">Mae hefyd yn rheoli pa dudalen sy'n cael ei dangos pan fyddwch yn dechrau Chromium.</translation> <translation id="6510925080656968729">Dadosod Chromium</translation> <translation id="651535675648445253">Mae llwybrau byr yn agor yn Chromium</translation> @@ -521,6 +530,7 @@ <translation id="6598877126913850652">Ewch i osodiadau hysbysu Chromium</translation> <translation id="6600016381025017075">Chwilio unrhyw beth ar y dudalen hon</translation> <translation id="6613594504749178791">Bydd eich newidiadau yn dod i rym y tro nesaf y byddwch yn ail-lansio Chromium.</translation> +<translation id="6614182654067789793">{NUM_TABS,plural, =1{Rhannu tab gyda Search}zero{Rhannu # tab gyda Search}two{Rhannu # dab gyda Search}few{Rhannu # thab gyda Search}many{Rhannu # thab gyda Search}other{Rhannu # tab gyda Search}}</translation> <translation id="6637855549677695722">Y tro nesaf y byddwch yn agor Chromium ar eich <ph name="DEVICE_TYPE" />, byddwch yn gweld anogwr i gael nodweddion diogelwch gorau Chromium.</translation> <translation id="6637908313088374648">Mae Chromium bellach yn lansio pan fydd Windows yn cychwyn fel y gallwch ddechrau pori ar unwaith. Gallwch ddiffodd hyn yn y gosodiadau.</translation> <translation id="6644846457769259194">Yn diweddaru eich dyfais (<ph name="PROGRESS_PERCENT" />)</translation> @@ -535,6 +545,7 @@ Mae'n bosib na fydd rhai nodweddion ar gael. Rhowch gyfeiriadur proffil gwahanol neu defnyddiwch fersiwn mwy diweddar o Chromium.</translation> <translation id="6729124504294600478">I gael personoleiddio a nodweddion eraill, cynhwyswch Chromium yng Ngweithgarwch ar y We ac Apiau a gwasanaethau Google cysylltiedig</translation> <translation id="6734291798041940871">Mae Chromium eisoes wedi'i osod ar gyfer pob defnyddiwr ar eich cyfrifiadur.</translation> +<translation id="6737759643107005803">Newid yn ôl i Gemini nad yw'n cael ei reoli gan <ph name="DOMAIN" /></translation> <translation id="6742093177587589736">I gael eich nodau tudalen a rhagor ar eich holl ddyfeisiau, mewngofnodwch i Chromium. Bydd y nod tudalen hwn yn cael ei gadw yn eich Cyfrif Google ar ôl i chi fewngofnodi.</translation> <translation id="674891594898436429">Diystyru chwiliad gweithredol yn y tab hwn</translation> <translation id="6751374565094704799">Yn cyflymu gwefannau gydag injan V8 Chromium ond yn lleihau gallu Chromium i wrthsefyll ymosodiadau ychydig. Mae'r gosodiad hwn wedi'i droi ymlaen.</translation> @@ -730,6 +741,7 @@ <translation id="8556055872671007529">Mae llwybrau byr yn rhan o rai nodweddion ac estyniadau Chromium. Gallwch ddewis eu troi yn ôl ymlaen.</translation> <translation id="8556420416730706394">Gallwch binio Chwilio Lluniau i gael mynediad hawdd; cliciwch ar y botwm Pinio ar frig y panel ochr</translation> <translation id="856656450041460113">Chwilio rhestr iaith</translation> +<translation id="8570178520132427425">{NUM_TABS,plural, =1{Dad-rannu Tab gyda Search}zero{Dad-rannu # Tab gyda Search}two{Dad-rannu # Dab gyda Search}few{Dad-rannu # Thab gyda Search}many{Dad-rannu # Thab gyda Search}other{Dad-rannu # Tab gyda Search}}</translation> <translation id="8576826849825683917">Mae mwy nag un sefydliad yn rheoli Chromium</translation> <translation id="8586442755830160949">Hawlfraint <ph name="YEAR" /> Awduron Chromium. Cedwir Pob Hawl.</translation> <translation id="8619360774459241877">Wrthi'n lansio Chromium...</translation>
diff --git a/chrome/app/resources/chromium_strings_hi.xtb b/chrome/app/resources/chromium_strings_hi.xtb index 247e3a8..36e2e6d 100644 --- a/chrome/app/resources/chromium_strings_hi.xtb +++ b/chrome/app/resources/chromium_strings_hi.xtb
@@ -73,6 +73,7 @@ <translation id="1820835682567584003">Chromium, <ph name="AUTHENTICATION_PURPOSE" /> की कोशिश कर रहा है</translation> <translation id="1828328511398219809"><ph name="EXISTING_USER" /> ने पहले से साइन इन किया हुआ है. अपने ब्राउज़िंग डेटा को अलग से मैनेज करने के लिए, Chromium में अपनी प्रोफ़ाइल में <ph name="USER_EMAIL_ADDRESS" /> से साइन इन करें. इससे आपको <ph name="DEVICE" /> पर एक्सटेंशन वगैरह का ऐक्सेस भी मिलेगा.</translation> <translation id="183031085822326697">अगली बार अपने <ph name="DEVICE_TYPE" /> पर Chromium खोलने पर, आपको Google Password Manager इस्तेमाल करने का प्रॉम्प्ट दिखेगा.</translation> +<translation id="1833464938462854539">बुकमार्क की गई साइटों को कभी भी ऐक्सेस करने के लिए, अपने फ़ोन के कैमरे से क्यूआर कोड स्कैन करके Chromium में साइन इन करें.</translation> <translation id="1838374766361614909">खोज साफ़ करें</translation> <translation id="18552579716432081">ब्राउज़िंग डेटा को सिर्फ़ इस डिवाइस से मिटाने और अपने Google खाते में सेव रखने के लिए, <ph name="BEGIN_LINK" />Chromium से साइन आउट करें<ph name="END_LINK" />.</translation> <translation id="1857749206890802997">अपने फ़ोन पर Chromium डाउनलोड करें, ताकि आप कभी भी, कहीं भी टैब ग्रुप खोल सकें या नए टैब ग्रुप बना सकें.</translation> @@ -138,6 +139,7 @@ <translation id="2425157128016763890">इस दस्तावेज़ को Chromium में Gemini के साथ शेयर करने के लिए 'खास जानकारी पाएं' बटन पर क्लिक करें. इससे आपको दस्तावेज़ की खास जानकारी तुरंत मिलेगी और फ़ॉलो-अप वाले सवाल पूछे जा सकेंगे</translation> <translation id="2440750600860946460"><ph name="BEGIN_LINK" />Chromium के टूल<ph name="END_LINK" /> की मदद से, सुरक्षित तरीके से ब्राउज़िंग की जा सकती है. साथ ही, अपना डेटा भी कंट्रोल किया जा सकता है</translation> <translation id="2449487342837813167"><ph name="EXISTING_USER" /> ने पहले से साइन इन किया हुआ है. अपने ब्राउज़िंग डेटा को अलग से मैनेज करने के लिए, Chromium में अपनी प्रोफ़ाइल में <ph name="USER_EMAIL_ADDRESS" /> से साइन इन करें. इससे आपको अपने सभी डिवाइसों पर पासवर्ड वगैरह का ऐक्सेस भी मिलेगा.</translation> +<translation id="2450352156071813659">अपने सभी डिवाइसों पर सेव किए गए पासवर्ड इस्तेमाल करने के लिए, अपने फ़ोन के कैमरे से क्यूआर कोड स्कैन करके Chromium में साइन इन करें.</translation> <translation id="2451727308784734061">Password Manager को फटाफट ऐक्सेस करने के लिए, शॉर्टकट का इस्तेमाल करें. आपके पास, अपने शॉर्टकट को कंप्यूटर की होम स्क्रीन पर या ऐप्लिकेशन लॉन्चर पर ले जाने का विकल्प है.</translation> <translation id="2478295928299953161">Chromium जल्द ही बंद हो जाएगा</translation> <translation id="2483889755041906834">क्रोमियम में</translation>
diff --git a/chrome/app/resources/chromium_strings_mr.xtb b/chrome/app/resources/chromium_strings_mr.xtb index 11128f8f..9830f74b 100644 --- a/chrome/app/resources/chromium_strings_mr.xtb +++ b/chrome/app/resources/chromium_strings_mr.xtb
@@ -76,6 +76,7 @@ <translation id="1820835682567584003">Chromium <ph name="AUTHENTICATION_PURPOSE" /> याचा प्रयत्न करत आहे</translation> <translation id="1828328511398219809"><ph name="EXISTING_USER" /> यांनी आधीच साइन इन केले आहे. तुमचे ब्राउझिंग स्वतंत्र ठेवण्यासाठी, तुमच्या स्वतःच्या प्रोफाइलमधील Chromium मध्ये <ph name="USER_EMAIL_ADDRESS" /> म्हणून साइन इन करा. तुम्हाला <ph name="DEVICE" /> कडून तुमची एक्स्टेंशन आणि आणखी बऱ्याच गोष्टीदेखील मिळतील.</translation> <translation id="183031085822326697">तुम्ही पुढील वेळी तुमच्या <ph name="DEVICE_TYPE" /> वर Chromium उघडल्यावर, तुम्हाला Google Password Manager वापरण्यासाठी प्रॉम्प्ट दिसेल.</translation> +<translation id="1833464938462854539">तुम्ही बुकमार्क केलेल्या साइटवर नेहमी परत जाण्यासाठी, Chromium मध्ये साइन इन करण्याकरिता तुमच्या फोनचा कॅमेरा वापरून QR कोड स्कॅन करा.</translation> <translation id="1838374766361614909">शोध साफ करा</translation> <translation id="18552579716432081">तुमच्या Google खाते मध्ये ब्राउझिंग डेटा राखून ठेवून, तो फक्त या डिव्हाइसवरून हटवण्यासाठी, <ph name="BEGIN_LINK" />Chromium मधून साइन आउट करणे<ph name="END_LINK" /> हे करा.</translation> <translation id="1857749206890802997">फिरतीवर असताना नवीन टॅब गट उघडण्यासाठी किंवा तयार करण्यासाठी तुमच्या फोनवर Chromium डाउनलोड करा.</translation> @@ -143,6 +144,7 @@ <translation id="2425157128016763890">त्वरित अवलोकन मिळवण्यासाठी आणि फॉलो-अप प्रश्न विचारण्यासाठी हा दस्तऐवज Chromium मधील Gemini सोबत शेअर करण्याकरिता सारांश द्या बटणावर क्लिक करा</translation> <translation id="2440750600860946460">तुम्ही <ph name="BEGIN_LINK" />Chromium ची टूल<ph name="END_LINK" /> वापरून सुरक्षितरीत्या ब्राउझ करू शकता आणि तुमचा डेटा नियंत्रित करू शकता</translation> <translation id="2449487342837813167"><ph name="EXISTING_USER" /> यांनी आधीच साइन इन केले आहे. तुमचे ब्राउझिंग स्वतंत्र ठेवण्यासाठी, तुमच्या स्वतःच्या प्रोफाइलमधील Chromium मध्ये <ph name="USER_EMAIL_ADDRESS" /> म्हणून साइन इन करा. तुम्हाला तुमच्या सर्व डिव्हाइसवर तुमचे पासवर्ड आणि आणखी बरेच काही मिळेल.</translation> +<translation id="2450352156071813659">तुमचे सेव्ह केलेले पासवर्ड सर्व डिव्हाइसवर वापरण्यासाठी, Chromium मध्ये साइन इन करण्याकरिता तुमच्या फोनचा कॅमेरा वापरून QR कोड स्कॅन करा.</translation> <translation id="2451727308784734061">Password Manager वर झटपट जाण्यासाठी तुमचा शॉर्टकट वापरा. तुम्ही तुमचा शॉर्टकट तुमच्या कॉंप्युटरच्या होम स्क्रीनवर किंवा अॅप लाँचरवर हलवू शकता.</translation> <translation id="2478295928299953161">Chromium लवकरच बंद होईल</translation> <translation id="2483889755041906834">Chromium मध्ये</translation>
diff --git a/chrome/app/resources/chromium_strings_ms.xtb b/chrome/app/resources/chromium_strings_ms.xtb index 1182464..8152413 100644 --- a/chrome/app/resources/chromium_strings_ms.xtb +++ b/chrome/app/resources/chromium_strings_ms.xtb
@@ -75,6 +75,7 @@ <translation id="1820835682567584003">Chromium cuba <ph name="AUTHENTICATION_PURPOSE" /></translation> <translation id="1828328511398219809"><ph name="EXISTING_USER" /> sudah log masuk. Untuk memastikan penyemakan imbas anda terpisah, log masuk ke Chromium dalam profil anda sendiri sebagai <ph name="USER_EMAIL_ADDRESS" />. Anda juga akan mendapat sambungan anda dan pelbagai lagi daripada <ph name="DEVICE" />.</translation> <translation id="183031085822326697">Apabila anda membuka Chromium pada <ph name="DEVICE_TYPE" /> anda selepas ini, anda akan melihat gesaan untuk menggunakan Google Password Manager.</translation> +<translation id="1833464938462854539">Untuk sentiasa kembali kepada laman yang telah anda tandai halaman, imbas kod QR dengan kamera telefon anda untuk log masuk ke Chromium.</translation> <translation id="1838374766361614909">Kosongkan carian</translation> <translation id="18552579716432081">Untuk memadamkan data semakan imbas daripada peranti ini dan menyimpan data semakan imbas tersebut dalam Google Account anda, <ph name="BEGIN_LINK" />log keluar dari Chromium<ph name="END_LINK" />.</translation> <translation id="1857749206890802997">Muat turun Chromium pada telefon anda untuk membuka atau membuat kumpulan tab baharu semasa dalam perjalanan.</translation> @@ -142,6 +143,7 @@ <translation id="2425157128016763890">Klik butang Ringkaskan untuk berkongsi dokumen ini dengan Gemini dalam Chromium untuk mendapatkan ikhtisar pantas dan mengemukakan pertanyaan susulan</translation> <translation id="2440750600860946460">Dengan <ph name="BEGIN_LINK" />alatan daripada Chromium<ph name="END_LINK" />, anda boleh menyemak imbas dengan selamat dan mengekalkan kawalan anda</translation> <translation id="2449487342837813167"><ph name="EXISTING_USER" /> sudah log masuk. Untuk memastikan penyemakan imbas anda terpisah, log masuk ke Chromium dalam profil anda sendiri sebagai <ph name="USER_EMAIL_ADDRESS" />. Anda juga akan mendapat kata laluan anda dan pelbagai lagi pada semua peranti anda.</translation> +<translation id="2450352156071813659">Untuk menggunakan kata laluan anda yang disimpan merentas peranti, imbas kod QR dengan kamera telefon anda untuk log masuk ke Chromium.</translation> <translation id="2451727308784734061">Gunakan pintasan anda untuk mengakses Password Manager dengan pantas. Anda boleh mengalihkan pintasan anda kepada skrin utama atau pelancar apl komputer anda.</translation> <translation id="2478295928299953161">Chromium akan ditutup sebentar lagi</translation> <translation id="2483889755041906834">Dalam Chromium</translation>
diff --git a/chrome/app/resources/generated_resources_cy.xtb b/chrome/app/resources/generated_resources_cy.xtb index b84f3ef..7669f24 100644 --- a/chrome/app/resources/generated_resources_cy.xtb +++ b/chrome/app/resources/generated_resources_cy.xtb
@@ -519,6 +519,7 @@ <translation id="1570990174567554976">Crëwyd y Ffolder nodau tudalen '<ph name="BOOKMARK_TITLE" />'.</translation> <translation id="1571041387761170095">Dim cyfrineiriau gwan neu rai sydd wedi'u hailddefnyddio</translation> <translation id="1571304935088121812">Copïo'r enw defnyddiwr</translation> +<translation id="1571371559291327711">&Canfod, golygu, a rhagor o offer</translation> <translation id="1571738973904005196">Gweld y tab: <ph name="TAB_ORIGIN" /></translation> <translation id="1572139610531470719"><ph name="WINDOW_TITLE" /> (Gwestai)</translation> <translation id="1573127087832371028">Disgrifiwch y broblem</translation> @@ -966,6 +967,7 @@ <translation id="204914487372604757">Creu llwybr byr</translation> <translation id="2050339315714019657">Fertigol</translation> <translation id="2051669996101374349">Defnyddiwch HTTPS lle bynnag y bo'n bosib a chael rhybudd cyn llwytho gwefannau nad ydynt yn ei gefnogi. Ni allwch newid y gosodiad hwn oherwydd eich bod wedi galluogi Diogelwch Uwch.</translation> +<translation id="2052353138844549871">Mae'n bosib na fyddai ddefnyddio Gemini Enterprise gyda phroffil sydd heb ei reoli'n cael ei argymell</translation> <translation id="2052723746739622752">Dad-binio Gemini</translation> <translation id="2061366302742593739">Dim byd i'w ddangos</translation> <translation id="2061589908388230480">Os bydd Chromium yn dod o hyd i un o'ch cyfrineiriau mewn tor data cyhoeddus, gall Rheolwr Cyfrineiriau Google gynnig newid eich cyfrinair ar eich rhan os ydych chi wedi mewngofnodi. <ph name="BEGIN_LINK" />Rhagor am newid cyfrinair yn awtomatig<ph name="END_LINK" /></translation> @@ -1234,6 +1236,7 @@ <translation id="2348729153658512593"><ph name="WINDOW_TITLE" /> - Gofynnwyd am ganiatâd, pwyswch Ctrl + Forward i ymateb</translation> <translation id="2349610121459545414">Parhau i ganiatáu i'r wefan hon gael mynediad at eich lleoliad</translation> <translation id="2350133097354918058">Ail-lwythwyd</translation> +<translation id="2351165193188463938">Rydych bellach yn pori gyda Gemini Enterprise</translation> <translation id="2352662711729498748">< 1 MB</translation> <translation id="2353297238722298836">Caniateir y camera a'r meicroffon</translation> <translation id="2353682139907904963">Pinio estyniadau newydd i'r Bar Offer</translation> @@ -1281,6 +1284,7 @@ <translation id="2408955596600435184">Rhowch eich PIN</translation> <translation id="2409709393952490731">Defnyddiwch ffôn neu lechen</translation> <translation id="2410940059315936967">Gall gwefan rydych yn ymweld â hi fewnosod cynnwys o wefannau eraill, er enghraifft lluniau, hysbysebion a thestun. Gelwir cwcis a osodwyd gan wefannau eraill yn gwcis trydydd parti.</translation> +<translation id="2412885537108786454">{NUM_TABS,plural, =1{Ffocysu ar 1 tab}zero{Ffocysu ar # tab}two{Ffocysu ar # dab}few{Ffocysu ar # thab}many{Ffocysu ar # thab}other{Ffocysu ar # tab}}</translation> <translation id="2413009156320833859">Addaswch eich porwr hyd yn oed yn fwy gydag estyniadau o'r <ph name="BEGIN_LINK1" />Chrome Web Store<ph name="END_LINK1" /></translation> <translation id="2414159296888870200">Parhau i bori ar gyfer <ph name="MODULE_TITLE" /></translation> <translation id="2414886740292270097">Tywyll</translation> @@ -1690,6 +1694,7 @@ <translation id="2849926636739429924">Rhagor o ddewisiadau ar gyfer <ph name="TAB_GROUP_NAME" /></translation> <translation id="285033512555869047">Wedi cau</translation> <translation id="2851291081585704741">Rydych chi all-lein</translation> +<translation id="2851527955600412545">Mae eich sefydliad wedi diweddaru ei bolisïau ar gyfer Gemini Enterprise yn Chrome. Mae'n bosib na fydd eich hanes sgwrsio yn cael ei drosglwyddo.</translation> <translation id="285237063405807022">(wrthi'n llwytho)</translation> <translation id="2853121255651601031">Cadwyd y Cyfrinair</translation> <translation id="2855243985454069333">Yn dileu hanes o bob dyfais sydd wedi'i chysoni</translation> @@ -2639,6 +2644,7 @@ <translation id="3810593934879994994">Gall <ph name="ORIGIN" /> weld ffeiliau yn y ffolderi canlynol</translation> <translation id="3810770279996899697">Mae angen mynediad at MacOS Keychain ar y Rheolwr Cyfrineiriau</translation> <translation id="3810973564298564668">Rheoli</translation> +<translation id="3811424142236602772">Pori gyda Gemini, wedi'i sefydlu gan <ph name="DOMAIN" /> ar gyfer gwaith. Gofynnwch gwestiynau wrth i chi bori trwy rannu tabiau fel cyd-destun a chael atebion wedi'u seilio ar ffeiliau a gwasanaethau eich sefydliad.</translation> <translation id="3812525830114410218">Tystysgrif wael</translation> <translation id="3813296892522778813">Ewch i <ph name="BEGIN_LINK_CHROMIUM" />Help Google Chrome<ph name="END_LINK_CHROMIUM" /> os na allwch ddod o hyd i'r hyn rydych yn chwilio amdano</translation> <translation id="3815509884387832993">Gwrandewch ar y dudalen hon fel pe bai'n bodlediad gyda chwarae AI gan ddefnyddio'r botwm Troi Chwarae AI ymlaen ym y bar offer modd Darllen</translation> @@ -3236,6 +3242,7 @@ <translation id="4500055235123625757">Gall Gemini ateb cwestiynau am y fideo neu'r sain rydych chi wedi'u chwarae ar <ph name="LINK_BEGIN" />rai gwefannau<ph name="LINK_END" />.</translation> <translation id="4500647907053779331">&Cyfieithu dewisiad i <ph name="LANGUAGE" /></translation> <translation id="4502477450742595012">De-gliciwch ar dab a dewiswch "Ychwanegu'r tab at grŵp newydd"</translation> +<translation id="450300557121092531">Tabiau yn ôl dyfais</translation> <translation id="4503362512377701151">Rydych yn gweld eich grwpiau tabiau a ddefnyddiwyd yn ddiweddar i'ch helpu chi i barhau'n hawdd o ble gwnaethoch chi adael. <ph name="BREAK" /> <ph name="BREAK" /> @@ -3288,6 +3295,7 @@ <translation id="4562155266774382038">Diystyru'r awgrym</translation> <translation id="4563883094055457792">Adfer gwedd hollt</translation> <translation id="456449593072900590">Dileu wrth adael</translation> +<translation id="4564636746145660922">Gwiriwch eich cysylltiad, yna rhowch gynnig arall arni.</translation> <translation id="4565377596337484307">Cuddio'r cyfrinair</translation> <translation id="4565465014351935093">Dangos ar Dudalen Tab Newydd yn Unig</translation> <translation id="4566417217121906555">Distewi'r meicroffon</translation> @@ -3461,6 +3469,7 @@ <translation id="475088594373173692">Defnyddiwr cyntaf</translation> <translation id="4751925628341802838">I gael eich hanes o'ch dyfeisiau eraill, mewngofnodwch a chysoni eich hanes a'ch tabiau i <ph name="EMAIL" />. Byddwch hefyd yn cael eich estyniadau a rhagor ar eich holl ddyfeisiau. Gallwch stopio cysoni unrhyw bryd yn y gosodiadau. Gall Google bersonoleiddio Search a gwasanaethau eraill yn seiliedig ar eich hanes.</translation> <translation id="4754590344707355551">Gwella eich porwr gydag estyniadau</translation> +<translation id="4754903312643763797">Gall telerau preifatrwydd data gwahanol fod yn berthnasol</translation> <translation id="4756130875344525429">I gael eich hanes o <ph name="DEVICE" />, mewngofnodwch a chysonwch eich hanes a'ch tabiau i <ph name="EMAIL" />. Byddwch hefyd yn cael eich gwybodaeth sydd wedi'i chadw a rhagor ar eich holl ddyfeisiau. Gallwch stopio cysoni unrhyw bryd yn y gosodiadau. Gall Google bersonoleiddio Search a gwasanaethau eraill yn seiliedig ar eich hanes.</translation> <translation id="4756378406049221019">Stopio/Ail-lwytho</translation> <translation id="4756388243121344051">&Hanes</translation> @@ -4143,6 +4152,7 @@ <translation id="5509914365760201064">Cyhoeddwr: <ph name="CERTIFICATE_AUTHORITY" /></translation> <translation id="5510775624736435856">Cael disgrifiadau am ddelweddau gan Google</translation> <translation id="5512739112435045339">Rhyddhewch le ar eich dyfais. Yna, rhowch gynnig arall ar lawrlwytho</translation> +<translation id="5513121759801003159">Ni fydd eich hanes sgwrsio yn trosglwyddo</translation> <translation id="5514315914873062345">Tab</translation> <translation id="5515048886012998157">Gweld rhagor o opsiynau ar gyfer <ph name="EXTENSION_NAME" /></translation> <translation id="5521078259930077036">Ai hon yw'r dudalen hafan yr oeddech yn ei disgwyl?</translation> @@ -4951,6 +4961,7 @@ <translation id="6451861213630784801">Rydych wedi'ch Allgofnodi</translation> <translation id="6453191633103419909">Ansawdd y Tafluniad Tab/Sgrîn</translation> <translation id="6453306703004115497">Wedi'i gyfieithu i <ph name="LANGUAGE" /></translation> +<translation id="6454212815056355439">Chwilio AI ar ddyfais</translation> <translation id="645433497989692531">Bydd hyn yn dileu eich data pori o'r ddyfais hon yn barhaol. I adfer y data, mewngofnodwch fel</translation> <translation id="6455264371803474013">Ar wefannau penodol</translation> <translation id="6455521402703088376">Wedi diffodd • Ni chyhoeddwyd yr estyniad hwn gan ei ddatblygwr</translation> @@ -5129,6 +5140,7 @@ <translation id="663569763553406962">Gweld pa estyniadau all ddarllen neu newid gwefan</translation> <translation id="6636258750460740634">Hanes</translation> <translation id="6636623428211296678">Gallwch archwilio rhagor o osodiadau isod neu orffen nawr</translation> +<translation id="6638255874883623697">Gemini Enterprise</translation> <translation id="6639405694338292402">Mae'r nodwedd Sgiliau wedi'i hanalluogi ar hyn o bryd. Diweddarwch eich Gosodiadau Chrome i ddechrau arni.</translation> <translation id="6639554308659482635">Cof SQLite</translation> <translation id="6640268266988685324">Agor Tab</translation> @@ -5262,6 +5274,7 @@ <translation id="6785779729084003225">Defnyddiwch <ph name="FOCUS_TOGGLE_HOTKEY" /> i agor Gemini yn Chrome</translation> <translation id="67862343314499040">Fioled</translation> <translation id="6786480815699355166">Dim ond ieithoedd Capsiynau Byw a gefnogir y gellir eu cyfieithu</translation> +<translation id="6786498102134843646">Ni fydd ymatebion wedi'u seilio ar ffeiliau neu wasanaethau a reolir gan <ph name="DOMAIN" /></translation> <translation id="6786747875388722282">Estyniadau</translation> <translation id="6786804673213172567">Haen 3: UCHEL</translation> <translation id="6787531944787756058">mae enw defnyddiwr <ph name="USER_EMAIL" /> yn cael ei gadw i'r ddyfais hon yn unig. Gweld y manylion</translation> @@ -5424,6 +5437,7 @@ <translation id="6941514251635934269">Gofyn am y ddogfen hon</translation> <translation id="694168622559714949">Mae eich gweinyddwr wedi gosod iaith ddiofyn na ellir ei haddasu.</translation> <translation id="6941953303876950920">Mae angen ail-lansio i barhau i bori gyda Gemini</translation> +<translation id="6943803108751887058">Pwyswch Escape i gau</translation> <translation id="6944854424004126054">Adfer ffenestr</translation> <translation id="6945221475159498467">Dewis</translation> <translation id="694592694773692225">Mae ailgyfeirio wedi'i rwystro ar y dudalen hon.</translation> @@ -5749,6 +5763,7 @@ <translation id="7293774463163321848">Gellir dileu hanes chwilio, hanes Gemini a chyfrineiriau yn eu gosodiadau rheoli</translation> <translation id="7296503797589217366">Dewis ffolder <ph name="FOLDER_TITLE" /></translation> <translation id="7297228218361240128">Cadw gwybodaeth i Google Wallet o dudalennau rydych chi'n edrych arnyn nhw</translation> +<translation id="7297535265731442945">Diweddarwyd Gemini Enterprise</translation> <translation id="7297726121602187087">Gwyrdd tywyll</translation> <translation id="7298195798382681320">Argymhellir</translation> <translation id="7299515639584427954">Newid yr ap diofyn ar gyfer dolenni a gefnogir?</translation> @@ -5770,6 +5785,7 @@ <translation id="731827437403763009">Arloesiadau AI</translation> <translation id="7319983568955948908">Stopio Rhannu</translation> <translation id="7321545336522791733">Methu â chyrraedd y gweinydd</translation> +<translation id="7321838786611890851">Mae'n bosib na fydd gan eich rhyngweithiadau â Gemini yr amddiffyniadau a sefydlwyd gan <ph name="DOMAIN" />, a gall telerau preifatrwydd data gwahanol fod yn berthnasol</translation> <translation id="7322515217754205362">Caniatadau Gwefan</translation> <translation id="7324020307732396723">Agor Gosodiadau Iaith</translation> <translation id="7325209047678309347">Mae papur wedi'i rwystro</translation> @@ -6066,6 +6082,7 @@ <translation id="7653354650639364202">{0,plural, =1{Cau'r ffenestr Ynysig}zero{Cau Ffenestr Ynysig (# ffenestr)}two{Cau Ffenestr Ynysig (# ffenestr)}few{Cau Ffenestr Ynysig (# ffenestr)}many{Cau Ffenestr Ynysig (# ffenestr)}other{Cau Ffenestr Ynysig (# ffenestr)}}</translation> <translation id="7654941827281939388">Mae'r cyfrif hwn eisoes yn cael ei ddefnyddio ar y cyfrifiadur hwn.</translation> <translation id="7655411746932645568">Gall gwefannau ofyn am gysylltu â phyrth cyfresol</translation> +<translation id="7656674791025857763">Mewngofnodwch i ddefnyddio <ph name="ASSISTANT_NAME" /></translation> <translation id="7657090467145778067">Arbedion bach</translation> <translation id="7657218410916651670">Gall <ph name="BEGIN_LINK_GOOGLE" />mathau eraill o weithgarwch<ph name="END_LINK_GOOGLE" /> gael eu cadw i'ch Cyfrif Google pan fyddwch wedi mewngofnodi. Gallwch eu dileu ar unrhyw adeg.</translation> <translation id="7658239707568436148">Canslo</translation> @@ -6277,6 +6294,7 @@ <translation id="7904492297081735975">&Agor rheolwr nodau tudalen</translation> <translation id="7907312522152480478">I gael eich tabiau o'ch dyfeisiau eraill, cadarnhewch mai chi sydd yno a chysoni eich hanes a'ch tabiau. Gallwch stopio cysoni unrhyw bryd yn y gosodiadau. Gall Google bersonoleiddio Search a gwasanaethau eraill yn seiliedig ar eich hanes.</translation> <translation id="7907837847548254634">Dangos amlygu cyflym ar y gwrthrych sydd dan sylw</translation> +<translation id="7908205867885088429">Dysgu rhagor am adfer gosodiadau i'r rhai diofyn</translation> <translation id="7908835530772972485">Dileu data pan fyddwch yn cau pob ffenestr</translation> <translation id="7909324225945368569">Ail-enwi'ch proffil</translation> <translation id="7909969815743704077">Wedi'i lawrlwytho yn y Modd Anhysbys</translation> @@ -6668,6 +6686,7 @@ <translation id="8323317289166663449">Darllen a newid eich holl ddata ar eich cyfrifiadur a phob gwefan</translation> <translation id="8323518750352551353">Gwahanu pori?</translation> <translation id="8323744572398547859">I gael eich tabiau o'ch dyfeisiau eraill, mewngofnodwch a chysoni hanes. Byddwch hefyd yn cael eich cyfrineiriau a rhagor ar eich holl ddyfeisiau. Gallwch stopio cysoni unrhyw bryd yn y gosodiadau. Gall Google bersonoleiddio Search a gwasanaethau eraill yn seiliedig ar eich hanes.</translation> +<translation id="8324035203198677529">Mae eich sefydliad wedi diffodd Gemini Enterprise yn Chrome. Gallwch barhau i ddefnyddio Gemini yn Chrome, ond ni fydd bellach yn dod o hyd i wybodaeth a reolir gan eich sefydliad nac yn cyfeirio ati. Mae'n bosib na fydd eich hanes sgwrsio yn cael ei drosglwyddo.</translation> <translation id="8325413836429495820">Ni chaniateir gweld eich clipfwrdd</translation> <translation id="8326478304147373412">PKCS #7, cadwyn tystysgrifau</translation> <translation id="8327386430364625757">Ffont mathemategol</translation> @@ -6874,6 +6893,7 @@ <translation id="8551388862522347954">Trwyddedau</translation> <translation id="8552102814346875916">Cadw i'r rhestr "cadw'r gwefannau hyn yn weithredol bob amser"</translation> <translation id="8552947739661397736">Cymryd rheolaeth o'r dasg, mae Gemini yn rheoli ar hyn o bryd</translation> +<translation id="8555042096950728024">Llusgwch neu defnyddiwch y bysellau saeth i aildrefnu</translation> <translation id="8555069853078399592"><ph name="ACTION_TOOLTIP" /> - dangosir cynnwys estynedig</translation> <translation id="8557022314818157177">Parhewch i gyffwrdd â'ch allwedd ddiogelwch nes bod eich olion bysedd wedi'i dynnu</translation> <translation id="8557100046150195444">Touch ID i barhau</translation> @@ -6966,6 +6986,7 @@ <translation id="8651806635673244884">Gallwch symud eich tabiau yn ôl i'r brig trwy dde-glicio unrhyw dab a dewis “Dangos tabiau'n llorweddol”</translation> <translation id="8652400352452647993">Gwall estyniad pecyn</translation> <translation id="8654151524613148204">Mae'r ffeil yn rhy fawr i'ch cyfrifiadur ei thrin. Ymddiheuriadau.</translation> +<translation id="8654872240409864765">Mae eich sefydliad wedi sefydlu Gemini Enterprise yn Chrome. Gofynnwch i Gemini am unrhyw beth wrth i chi bori, a chael atebion wedi'u seilio ar ffeiliau a gwasanaethau ar draws eich sefydliad.</translation> <translation id="8657393004602556571">Ydych chi am gael gwared ar yr adborth?</translation> <translation id="865857184419171576">Cyfieithu capsiynau i</translation> <translation id="865936634714975126">Ychwanegu paramedr ymholiad yn yr URL i ddewis mathau ar lwyth tudalen. Enghraifft: chrome://device-log/?types=Bluetooth,USB</translation> @@ -7129,6 +7150,7 @@ <translation id="8813937837706331325">Arbedion canolig</translation> <translation id="8815742860876889867">Agor dolen mewn ffenestr ynysig</translation> <translation id="881799181680267069">Cuddio'r Lleill</translation> +<translation id="8820301999480837183">Ffocysu ar grŵp <ph name="GROUP_NAME" /></translation> <translation id="8820817407110198400">Nodau tudalen</translation> <translation id="8821206216942230957">Nid oes gan eich cyfrif fynediad at Gemini yn Chrome</translation> <translation id="8823514049557262177">Copïo testun y ddol&en</translation> @@ -7168,6 +7190,7 @@ <translation id="8863753581171631212">Agor dolen mewn <ph name="APP" /> newydd</translation> <translation id="8864055848767439877">Wrthi'n rhannu <ph name="TAB_NAME" /> i <ph name="APP_NAME" /></translation> <translation id="8864104359314908853">Mae eich cyfrinair wedi'i gadw</translation> +<translation id="8865924457197342642">Nid yw Gemini Enterprise ar gael mwyach</translation> <translation id="8866424952450451412">Rheoli eich llifau gwaith personol a bwerir gan</translation> <translation id="8867102760244540173">Chwilio tabiau...</translation> <translation id="8867568208303837180">Wrthi'n anfon yr arian...</translation> @@ -7380,6 +7403,7 @@ <translation id="9096776523567481218">heb ei osod yn lleol</translation> <translation id="9099383880226822604">Fforest law</translation> <translation id="9100765901046053179">Gosodiadau uwch</translation> +<translation id="9100928301185810363">Ffocysu ar grŵp dienw - <ph name="GROUP_CONTENTS" /></translation> <translation id="9103341231213089378">I gastio, rhowch fynediad i Chrome yn: <ph name="IDS_MEDIA_ROUTER_LOCAL_DISCOVERY_PERMISSION_REJECTED_LINK" /> > Rhwydwaith Lleol > Chrome</translation> <translation id="9103868373786083162">Pwyswch i fynd yn ôl, dewislen gyd-destunol i weld hanes</translation> <translation id="9107096627210171112">Cyfieithu...</translation>
diff --git a/chrome/app/resources/generated_resources_hi.xtb b/chrome/app/resources/generated_resources_hi.xtb index 86f517b..d5f164c 100644 --- a/chrome/app/resources/generated_resources_hi.xtb +++ b/chrome/app/resources/generated_resources_hi.xtb
@@ -540,6 +540,7 @@ <translation id="1594703455918849716">जांच करने वाले पेज पर जाएं</translation> <translation id="1596286373007273895">कास्ट करने के लिए उपलब्ध जगह</translation> <translation id="1596780725094407793">- इसमें सबडोमेन शामिल हैं</translation> +<translation id="1597359766734075461">बुकमार्क अपने फ़ोन पर पाएं</translation> <translation id="1598163867407640634"><ph name="IDENTITY_PROVIDER_ETLD_PLUS_ONE" /> की मदद से, <ph name="SITE_ETLD_PLUS_ONE" /> का इस्तेमाल करें</translation> <translation id="1598233202702788831">आपके व्यवस्थापक के द्वारा अपडेट अक्षम किए गए हैं</translation> <translation id="1598293830962835699">ज़रूरत पड़ने पर, तुरंत स्प्लिट व्यू सेट करें</translation> @@ -3232,6 +3233,7 @@ <translation id="4490798467014431984">इस साइट पर एक्सटेंशन इस्तेमाल करने की अनुमति नहीं है</translation> <translation id="4492265221907525667">एक्सपेरिमेंट के तौर पर उपलब्ध इस नई सुविधा का इस्तेमाल करने के लिए, कृपया साइन इन करें.</translation> <translation id="449232563137139956">आम तौर पर, साइटें उदाहरण देने के लिए इमेज दिखाती हैं. जैसे कि ऑनलाइन स्टोर या समाचार लेखों के लिए फ़ोटो</translation> +<translation id="4492544090316143330">पासवर्ड अपने फ़ोन पर पाएं</translation> <translation id="4493167769966437077"><ph name="LANGUAGE_NAME" /> के लिए अनुवाद करने की सुविधा कभी भी न दें</translation> <translation id="4495002167047709180">क्या <ph name="SITE" /> पर इस एक्सटेंशन को चलाने की अनुमति देनी है?</translation> <translation id="4500055235123625757">आपने <ph name="LINK_BEGIN" />कुछ वेबसाइटों<ph name="LINK_END" /> पर जो वीडियो या ऑडियो चलाया है, Gemini उनसे जुड़े सवालों के जवाब दे सकता है.</translation>
diff --git a/chrome/app/resources/generated_resources_lo.xtb b/chrome/app/resources/generated_resources_lo.xtb index 5ce04eb..3b91f27 100644 --- a/chrome/app/resources/generated_resources_lo.xtb +++ b/chrome/app/resources/generated_resources_lo.xtb
@@ -2596,6 +2596,7 @@ <translation id="3771721161825963003">ສະແດງແຖບໃນແນວຕັ້ງ</translation> <translation id="3771851622616482156">ທ່ານຈະຖືກພາອອກຈາກລະບົບເວັບໄຊນີ້, ຮວມທັງໃນແຖບທີ່ເປີດຢູ່</translation> <translation id="3772951945682043324">ບໍ່ມີແຖບທີ່ຫາກໍປິດ</translation> +<translation id="3775389358290351377">ສະຫຼັບຜູ້ໃຫ້ບໍລິການ (ແຖບ)</translation> <translation id="3775432569830822555">ໃບຢັ້ງຢືນເຊີບເວີ SSL</translation> <translation id="3776508619697147021">ເວັບໄຊສາມາດຂໍດາວໂຫຼດຫຼາຍໄຟລ໌ໂດຍອັດຕະໂນມັດໄດ້</translation> <translation id="3776796446459804932">ສ່ວນຂະຫຍາຍນີ້ລະເມີດນະໂຍບາຍ Chrome Web Store.</translation> @@ -3061,6 +3062,7 @@ <translation id="429530814437327574">ສະແດງແບບວາງຊ້ອນກັນ</translation> <translation id="4296632172536745000">ລະບົບພົບລະຫັດຜ່ານເກົ່າຂອງທ່ານສຳລັບເວັບໄຊນີ້ໃນການລະເມີດຂໍ້ມູນສາທາລະນະ. ເມື່ອວັນທີ <ph name="DATE" /> ທ່ານໄດ້ຂໍໃຫ້ <ph name="BRAND" /> ປ່ຽນລະຫັດຜ່ານໃຫ້ທ່ານໂດຍອັດຕະໂນມັດ.</translation> <translation id="42981349822642051">ຂະຫຍາຍ</translation> +<translation id="4298381759837744019">ຊອກຫາ “<ph name="QUERY" />” ໃນການຕັ້ງຄ່າ</translation> <translation id="4298660926525614540">ຊື່ບ່ອນຈັດເກັບຂໍ້ມູນທີ່ຖອດອອກໄດ້</translation> <translation id="4299022904780065004">&ໜ້າຈໍທີ່ບໍ່ເປີດເຜີຍຕົວຕົນໃໝ່</translation> <translation id="4301231341924904092">ປ່ຽນລະຫັດຜ່ານໃຫ້ຂ້ອຍ</translation> @@ -4299,6 +4301,7 @@ <translation id="5689516760719285838">ສະຖານທີ່</translation> <translation id="568984110402742489">ບໍ່ສາມາດສົ່ງຄຳຕິຊົມໄດ້</translation> <translation id="5691772641933328258">ບໍ່ຮູ້ຈັກລາຍນິ້ວມື</translation> +<translation id="5693100627879528952">ສຶກສາເພີ່ມເຕີມກ່ຽວກັບການຕັ້ງຄ່າໂປຣແກຣມຊອກຫາ ແລະ ການຊອກຫາເວັບໄຊ</translation> <translation id="5693255400847650006">ມີການໃຊ້ໄມໂຄຣໂຟນຢູ່</translation> <translation id="5693806089748511108">ທັກສະຂອງທ່ານ</translation> <translation id="5694689722959820210">ສ້າງກຸ່ມແຖບ</translation>
diff --git a/chrome/app/resources/generated_resources_mn.xtb b/chrome/app/resources/generated_resources_mn.xtb index 38e17682..8937784 100644 --- a/chrome/app/resources/generated_resources_mn.xtb +++ b/chrome/app/resources/generated_resources_mn.xtb
@@ -2596,6 +2596,7 @@ <translation id="3771721161825963003">Табыг босоогоор харуулах</translation> <translation id="3771851622616482156">Таныг энэ сайтаас гаргах бөгөөд үүнд нээлттэй табын сайтууд мөн багтана</translation> <translation id="3772951945682043324">Саяхан хаасан ямар ч таб байхгүй</translation> +<translation id="3775389358290351377">Үйлчилгээ үзүүлэгчийг сэлгэх (Tab)</translation> <translation id="3775432569830822555">SSL серверийн сертификат</translation> <translation id="3776508619697147021">Сайтууд олон файлыг автоматаар татахыг хүсэх боломжтой</translation> <translation id="3776796446459804932">Энэ өргөтгөл нь Chrome Web Store-ын бодлогыг зөрчиж байна.</translation> @@ -3060,6 +3061,7 @@ <translation id="429530814437327574">Өрсөн байдлаар харуулах</translation> <translation id="4296632172536745000">Таны энэ сайтын эх нууц үгийг олон нийтийн өгөгдлийн зөрчлөөс оллоо. Та <ph name="DATE" />-нд <ph name="BRAND" />-с танд зориулж нууц үгийг тань автоматаар өөрчлөхийг хүссэн.</translation> <translation id="42981349822642051">Өргөтгөх</translation> +<translation id="4298381759837744019">Тохиргооноос “<ph name="QUERY" />”-г хайх</translation> <translation id="4298660926525614540">Салгах боломжтой хадгалах сангийн нэрс</translation> <translation id="4299022904780065004">Шинэ &Нууцлалтай цонх</translation> <translation id="4301231341924904092">Миний өмнөөс үүнийг өөрчил</translation> @@ -4299,6 +4301,7 @@ <translation id="5689516760719285838">Байршил</translation> <translation id="568984110402742489">Санал хүсэлт илгээх боломжгүй</translation> <translation id="5691772641933328258">Хурууны хээг таньсангүй</translation> +<translation id="5693100627879528952">Хайлтын систем, сайтын хайлтын тохиргооны талаар нэмэлт мэдээлэл авах</translation> <translation id="5693255400847650006">Микрофоныг ашиглаж байна</translation> <translation id="5693806089748511108">Таны ур чадварууд</translation> <translation id="5694689722959820210">Табын бүлэг үүсгэх</translation>
diff --git a/chrome/app/resources/generated_resources_mr.xtb b/chrome/app/resources/generated_resources_mr.xtb index bb6247c..767650f 100644 --- a/chrome/app/resources/generated_resources_mr.xtb +++ b/chrome/app/resources/generated_resources_mr.xtb
@@ -541,6 +541,7 @@ <translation id="1594703455918849716">चेकअप पेजवर जा</translation> <translation id="1596286373007273895">उपलब्ध आहे</translation> <translation id="1596780725094407793">- सबडोमेन समाविष्ट आहेत</translation> +<translation id="1597359766734075461">तुमच्या फोनवर बुकमार्क मिळवा</translation> <translation id="1598163867407640634"><ph name="IDENTITY_PROVIDER_ETLD_PLUS_ONE" /> सह <ph name="SITE_ETLD_PLUS_ONE" /> वापरा</translation> <translation id="1598233202702788831">तुमच्या ॲडमिनिस्ट्रेटरने अपडेट अक्षम केली आहेत.</translation> <translation id="1598293830962835699">तुम्हाला हवे असेल तेव्हा विभाजित दृश्य झटपट तयार करा</translation> @@ -3237,6 +3238,7 @@ <translation id="4490798467014431984">या साइटवर एक्स्टेंशनना अनुमती नाही</translation> <translation id="4492265221907525667">हे नवीन प्रायोगिक वैशिष्ट्य वापरण्यासाठी, कृपया साइन इन करा.</translation> <translation id="449232563137139956">ऑनलाइन स्टोअर किंवा बातमीपर लेख यांसाठी फोटोसारखी इलस्ट्रेशन पुरवण्याकरिता साइट सामान्यपणे इमेज दाखवतात</translation> +<translation id="4492544090316143330">तुमच्या फोनवर पासवर्ड मिळवा</translation> <translation id="4493167769966437077">कधीही भाषांतर ऑफर करू नका भाषांमधून <ph name="LANGUAGE_NAME" /> काढून टाका</translation> <translation id="4495002167047709180">या एक्स्टेंशनला <ph name="SITE" /> वर अनुमती द्यायची आहे का?</translation> <translation id="4500055235123625757">तुम्ही <ph name="LINK_BEGIN" />काही वेबसाइट<ph name="LINK_END" /> वर प्ले केलेल्या व्हिडिओ किंवा ऑडिओबद्दल प्रश्नांची उत्तरे Gemini देऊ शकते.</translation>
diff --git a/chrome/app/resources/generated_resources_ms.xtb b/chrome/app/resources/generated_resources_ms.xtb index 31f2600..c9a0a92 100644 --- a/chrome/app/resources/generated_resources_ms.xtb +++ b/chrome/app/resources/generated_resources_ms.xtb
@@ -541,6 +541,7 @@ <translation id="1594703455918849716">Pergi ke halaman Semakan</translation> <translation id="1596286373007273895">Tersedia</translation> <translation id="1596780725094407793">- termasuk subdomain</translation> +<translation id="1597359766734075461">Dapatkan penanda halaman pada telefon anda</translation> <translation id="1598163867407640634">Gunakan <ph name="SITE_ETLD_PLUS_ONE" /> dengan <ph name="IDENTITY_PROVIDER_ETLD_PLUS_ONE" /></translation> <translation id="1598233202702788831">Kemas kini dilumpuhkan oleh pentadbir anda</translation> <translation id="1598293830962835699">Buat paparan pisah dengan pantas apabila diperlukan</translation> @@ -3239,6 +3240,7 @@ <translation id="4490798467014431984">Sambungan tidak dibenarkan pada laman ini</translation> <translation id="4492265221907525667">Untuk menggunakan ciri percubaan baharu ini, sila log masuk.</translation> <translation id="449232563137139956">Tapak biasanya menunjukkan imej untuk memberikan ilustrasi, seperti foto untuk kedai dalam talian atau artikel berita</translation> +<translation id="4492544090316143330">Dapatkan kata laluan pada telefon anda</translation> <translation id="4493167769966437077">Alih keluar <ph name="LANGUAGE_NAME" /> daripada bahasa jangan sekali-kali tawarkan terjemahan</translation> <translation id="4495002167047709180">Benarkan sambungan pada <ph name="SITE" />?</translation> <translation id="4500055235123625757">Gemini boleh menjawab pertanyaan tentang video atau audio yang telah anda mainkan pada <ph name="LINK_BEGIN" />sesetengah laman web<ph name="LINK_END" />.</translation>
diff --git a/chrome/app/resources/google_chrome_strings_cy.xtb b/chrome/app/resources/google_chrome_strings_cy.xtb index acfe447..c77e1a81 100644 --- a/chrome/app/resources/google_chrome_strings_cy.xtb +++ b/chrome/app/resources/google_chrome_strings_cy.xtb
@@ -75,6 +75,7 @@ <translation id="1640672724030957280">Wrthi'n lawrlwytho...</translation> <translation id="1651617469580841801">Pan fyddwch yn defnyddio Google Lens, mae teitl y dudalen, URL, a chynnwys, gan gynnwys PDFs, yn cael eu hanfon at Google. <ph name="LEARN_MORE" /></translation> <translation id="1674870198290878346">Agor y Ddolen mewn Ffenestr Anhy&sbys Chrome</translation> +<translation id="167594665289110631"><ph name="WINDOW_TITLE" /> - Rydych yn rhannu'r tab hwn gyda Google Search</translation> <translation id="1682634494516646069">Ni all Google Chrome ddarllen nac ysgrifennu i'w gyfeiriadur data: <ph name="USER_DATA_DIRECTORY" /></translation> @@ -258,6 +259,7 @@ <translation id="3380249972812870825">I agor Gemini yn Chrome, pwyswch <ph name="GLOBAL_HOTKEY" /></translation> <translation id="3392127217442962664">Ychwanegodd Chrome AI sy'n rhedeg ar eich dyfais. Gall gwefannau a Chrome ei ddefnyddio ar gyfer nodweddion megis:</translation> <translation id="3396977131400919238">Bu gwall system weithredu wrth osod. Lawrlwythwch Google Chrome eto.</translation> +<translation id="3404531968986217414">Dechrau trywydd newydd gyda Google Search</translation> <translation id="3428747202529429621">Yn eich cadw'n ddiogel ar Chrome a gellir ei ddefnyddio i wella'ch diogelwch mewn apiau Google eraill pan fyddwch wedi'ch mewngofnodi</translation> <translation id="3438681572027105609">I gael eich cyfrineiriau a rhagor ar eich holl ddyfeisiau, mewngofnodwch i Chrome</translation> <translation id="3450887623636316740">Gall y ffeil hon fod yn beryglus<ph name="LINE_BREAK" />Gall Chrome wirio'r lawrlwythiad hwn i chi os ydych yn darparu'r cyfrinair. Mae gwybodaeth am y ffeil yn cael ei hanfon i Bori'n Ddiogel gyda Google, ond mae cynnwys y ffeil a'r cyfrinair yn aros ar eich dyfais.</translation> @@ -400,6 +402,7 @@ <translation id="5003967926796347400">Cliciwch 'Rheolwr Cyfrineiriau Google'</translation> <translation id="5043786843026425788">Dysgu rhagor am chwilio gyda Google Lens yn Chrome</translation> <translation id="504867494566807945">Agor dolenni yn Chrome o unrhyw ap. Hefyd, er mwyn cael mynediad hawdd, caiff ei binio i'ch bar tasgau.</translation> +<translation id="507983337152787026">Dechrau Trywydd Newydd gyda Google Search</translation> <translation id="5098698934038952252">{COUNT,plural, =1{Mae Gwell Diogelwch yn gofyn i chi ail-lansio Chrome i gymhwyso diweddariad. Mae ffenestr Anhysbys neu Ynysig ar agor. Ni fydd yn ailagor ar ôl i chi ail-lansio.}zero{Mae Gwell Diogelwch yn gofyn i chi ail-lansio Chrome i gymhwyso diweddariad. Mae # ffenestr Anhysbys ac Ynysig ar agor ar draws proffiliau. Ni fyddant yn ailagor ar ôl i chi ail-lansio.}two{Mae Gwell Diogelwch yn gofyn i chi ail-lansio Chrome i gymhwyso diweddariad. Mae # ffenestr Anhysbys ac Ynysig ar agor ar draws proffiliau. Ni fyddant yn ailagor ar ôl i chi ail-lansio.}few{Mae Gwell Diogelwch yn gofyn i chi ail-lansio Chrome i gymhwyso diweddariad. Mae # ffenestr Anhysbys ac Ynysig ar agor ar draws proffiliau. Ni fyddant yn ailagor ar ôl i chi ail-lansio.}many{Mae Gwell Diogelwch yn gofyn i chi ail-lansio Chrome i gymhwyso diweddariad. Mae # ffenestr Anhysbys ac Ynysig ar agor ar draws proffiliau. Ni fyddant yn ailagor ar ôl i chi ail-lansio.}other{Mae Gwell Diogelwch yn gofyn i chi ail-lansio Chrome i gymhwyso diweddariad. Mae # ffenestr Anhysbys ac Ynysig ar agor ar draws proffiliau. Ni fyddant yn ailagor ar ôl i chi ail-lansio.}}</translation> <translation id="5105120510934353742">I gael diweddariadau Google Chrome yn y dyfodol, bydd angen macOS 13 neu'n hwyrach arnoch. Mae'r cyfrifiadur hwn yn defnyddio macOS 12.</translation> <translation id="5114340746415930644">Rhowch eich cyfrin-ymadrodd i ddefnyddio a chadw data Chrome yn eich cyfrif, <ph name="USER_EMAIL" /></translation> @@ -426,6 +429,7 @@ <translation id="524751727772074981">Gofyn unrhyw beth, yn y fan a'r lle, gyda Gemini yn Chrome</translation> <translation id="5247617065091903691">Gallwch binio panel ochr Google Search i ofyn cwestiynau wrth i chi bori</translation> <translation id="5271833978500241046">Defnyddiwch nhw ochr yn ochr â nodweddion Gemini eraill yn Chrome</translation> +<translation id="528611299569739095">Gall y porwr hwn a reolir ddefnyddio Gemini a sefydlwyd ar gyfer gwaith gan <ph name="DOMAIN" />. Gall ddod o hyd i wybodaeth a darparu atebion sydd wedi'u seilio ar ffeiliau a gwasanaethau'r sefydliad. Mae newid yn gofyn am ail-lansio Chrome.</translation> <translation id="5320351714793324716">Os ydych yn caniatáu cwcis, gall Chrome eu defnyddio ar gyfer rhaglwytho</translation> <translation id="5321325624576443340">Nid yw Google Lens ar gael. Rhowch gynnig arall arni'n nes ymlaen.</translation> <translation id="5346389065299425353">Dyfnhau eich chwiliad trwy ychwanegu sawl tab, ffeil ac offeryn</translation> @@ -450,7 +454,9 @@ <translation id="5596627076506792578">Rhagor o ddewisiadau</translation> <translation id="5600352656975192682">Pinio Chrome i'ch bar tasgau i'w gyrraedd yn gyflym unrhyw bryd</translation> <translation id="5602351063754773347">Mae Chrome yn argymell eich bod yn ei dynnu. <ph name="BEGIN_LINK" />Dysgu rhagor am estyniadau a gefnogir<ph name="END_LINK" /></translation> +<translation id="5608863008645990586">Newid i Gemini Enterprise a reolir gan <ph name="DOMAIN" /></translation> <translation id="5610759359710387751">Gwneud Chrome yn Unigryw i Chi</translation> +<translation id="564257059644081091">{NUM_TABS,plural, =1{Dad-rannu tab gyda Google Search}zero{Dad-rannu # tab gyda Google Search}two{Dad-rannu # dab gyda Google Search}few{Dad-rannu # thab gyda Google Search}many{Dad-rannu # thab gyda Google Search}other{Dad-rannu # tab gyda Google Search}}</translation> <translation id="5649156266046089790">Gallwch wahanu eich holl bethau Chrome gyda phroffiliau Chrome. Creu proffiliau ar gyfer eich ffrindiau a'ch teulu, neu rannu rhwng gwaith a hwyl.</translation> <translation id="565744775970812598">Gallai <ph name="FILE_NAME" /> fod yn beryglus, felly mae Chrome wedi ei rwystro.</translation> <translation id="566568153320186256">Bydd Chrome yn arbed pŵer batri drwy gyfyngu ar weithgarwch cefndir ac effeithiau gweledol, megis sgrolio llyfn a chyfraddau ffrâm fideo. <ph name="BEGIN_LINK" />Dysgu rhagor am yr Arbedwr Ynni<ph name="END_LINK" /></translation> @@ -544,6 +550,7 @@ <translation id="6417690341895039567">{COUNT,plural, =1{Mae eich sefydliad yn cau Chrome yn awtomatig pan na chaiff ei ddefnyddio am 1 funud. Mae data pori yn cael eu dileu. Gallai hyn gynnwys hanes, awtolenwi a lawrlwythiadau.}zero{Mae eich sefydliad yn cau Chrome yn awtomatig pan na chaiff ei ddefnyddio am # munud. Mae data pori yn cael eu dileu. Gallai hyn gynnwys hanes, awtolenwi a lawrlwythiadau.}two{Mae eich sefydliad yn cau Chrome yn awtomatig pan na chaiff ei ddefnyddio am # funud. Mae data pori yn cael eu dileu. Gallai hyn gynnwys hanes, awtolenwi a lawrlwythiadau.}few{Mae eich sefydliad yn cau Chrome yn awtomatig pan na chaiff ei ddefnyddio am # munud. Mae data pori yn cael eu dileu. Gallai hyn gynnwys hanes, awtolenwi a lawrlwythiadau.}many{Mae eich sefydliad yn cau Chrome yn awtomatig pan na chaiff ei ddefnyddio am # munud. Mae data pori yn cael eu dileu. Gallai hyn gynnwys hanes, awtolenwi a lawrlwythiadau.}other{Mae eich sefydliad yn cau Chrome yn awtomatig pan na chaiff ei ddefnyddio am # munud. Mae data pori yn cael eu dileu. Gallai hyn gynnwys hanes, awtolenwi a lawrlwythiadau.}}</translation> <translation id="6418662306461808273">Newid i broffil Chrome presennol?</translation> <translation id="6426623519983252346">Byddwch yn gweld anogwr i roi cynnig ar <ph name="FEATURE_NAME" /> y tro nesaf y byddwch yn agor Chrome iOS.</translation> +<translation id="6431496891888891615">Gallwch newid i Gemini sy'n gysylltiedig â'ch Cyfrif Google yn wreiddiol ac nad yw'n cael ei reoli gan <ph name="DOMAIN" />. Mae newid yn gofyn am ail-lansio Chrome.</translation> <translation id="6434035853014503219">Diolch am ddewis Chrome fel eich porwr diofyn!</translation> <translation id="6438015621983209660">Estynnwch Bori'n Ddiogel Gwell gyda Chrome ar eich ffôn</translation> <translation id="6442774133615368941">Siopa, cyfieithu ac adnabod yr hyn a welwch gyda'ch camera ar ap iOS Chrome</translation> @@ -580,6 +587,7 @@ <translation id="6712881677154121168">Gwall lawrlwytho: <ph name="DOWNLOAD_ERROR" />.</translation> <translation id="6718739135284199302">Gwneud Chrome yn gyflymach</translation> <translation id="6734827584173583205">Nid ydych wedi ymweld yn ddiweddar. Mae Chrome wedi tynnu <ph name="PERMISSION_1" />, <ph name="PERMISSION_2" />, a <ph name="COUNT" /> arall.</translation> +<translation id="6737759643107005803">Newid yn ôl i Gemini nad yw'n cael ei reoli gan <ph name="DOMAIN" /></translation> <translation id="674891594898436429">Diystyru chwiliad gweithredol yn y tab hwn</translation> <translation id="6750954913813541382">I drwsio gwallau sillafu, mae Chrome yn anfon y testun rydych yn ei deipio yn y porwr at Google</translation> <translation id="6760235774835597023">Yn cyflymu gwefannau gydag injan V8 Chrome ond yn lleihau gallu Chrome i wrthsefyll ymosodiadau ychydig. Mae'r gosodiad hwn wedi'i droi ymlaen.</translation> @@ -658,6 +666,7 @@ <translation id="7481213027396403996">Cael diogelwch cryfaf Chrome</translation> <translation id="749228101751499733">Tra byddwch wedi mewngofnodi, gallwch ddefnyddio'ch cyfrineiriau a rhagor o'ch Cyfrif Google yn Chrome. Gall <ph name="SHORTCUT" /> newid eich gosodiadau gwasanaethau Google.</translation> <translation id="7496017508659652909">Bydd Chrome yn rhaglwytho tudalennau sy'n gwneud pori a chwilio'n gyflymach. <ph name="BEGIN_LINK" />Dysgu rhagor am raglwytho tudalennau<ph name="END_LINK" /></translation> +<translation id="7512102939658787283">Rydych yn rhannu'r tab hwn gyda Google Search</translation> <translation id="7514258452813684157">Gwasanaeth Diweddaru Google</translation> <translation id="7515191208480168435">Gallwch binio Google Lens i gael mynediad hawdd</translation> <translation id="7535429826459677826">Google Chrome Dev</translation> @@ -745,6 +754,7 @@ <translation id="8286862437124483331">Mae Google Chrome yn ceisio dangos cyfrineiriau. Teipiwch eich cyfrinair Windows i ganiatáu hyn.</translation> <translation id="8291415872436043161">Lawrlwytho Chrome</translation> <translation id="829923460755755423">Ychwanegu llwybr byr at y Rheolwr Cyfrineiriau Google</translation> +<translation id="8302613214059692501">{NUM_TABS,plural, =1{Rhannu Tab gyda Google Search}zero{Rhannu # Tab gyda Google Search}two{Rhannu # Dab gyda Google Search}few{Rhannu # Thab gyda Google Search}many{Rhannu # Thab gyda Google Search}other{Rhannu # Tab gyda Google Search}}</translation> <translation id="8313851650939857356">Gwall cychwyn <ph name="STARTUP_ERROR" />.</translation> <translation id="8321058241987390452">Llwyddiant! Gallwch bellach ofyn cwestiynau yn hawdd wrth i chi bori gyda phanel Google Search</translation> <translation id="8336463659890584292">Pan fydd gwefan yn gofyn i chi raglwytho dolenni ar ei thudalen yn breifat, mae Chrome yn defnyddio gweinyddion Google. Mae hyn yn cuddio eich hunaniaeth o'r wefan sydd wedi'i rhaglwytho, ond mae Google yn dysgu pa wefannau sy'n cael eu rhaglwytho.</translation> @@ -799,6 +809,7 @@ <translation id="8712767363896337380">Bron yn gyfoes! Ail-lansiwch Chrome i orffen diweddaru.</translation> <translation id="8717554232729236539">Mae <ph name="EXISTING_USER" /> eisoes wedi mewngofnodi. I gadw'ch pori ar wahân, mewngofnodwch i Chrome yn eich proffil eich hun fel <ph name="USER_EMAIL_ADDRESS" />. Byddwch hefyd yn cael eich rhestr ddarllen a rhagor o <ph name="DEVICE" />.</translation> <translation id="8718062187489036808">Allgofnodi o Chrome</translation> +<translation id="872566061310308038">{NUM_TABS,plural, =1{Rhannu tab gyda Google Search}zero{Rhannu # tab gyda Google Search}two{Rhannu # dab gyda Google Search}few{Rhannu # thab gyda Google Search}many{Rhannu # thab gyda Google Search}other{Rhannu # tab gyda Google Search}}</translation> <translation id="873133009373065397">Ni all Google Chrome bennu na gosod y porwr diofyn</translation> <translation id="8747073452963259673">cornel chwith isaf yr ardal chwilio: <ph name="LEFT" />% i'r chwith, <ph name="BOTTOM" />% ar y gwaelod</translation> <translation id="8748735421235723888">Bydd Chrome yn rhyddhau cof o dabiau anweithredol. Mae hyn yn rhoi mwy o adnoddau cyfrifiadurol i dabiau gweithredol ac apiau eraill ac yn cadw Chrome yn gyflym. Mae eich tabiau anweithredol yn dod yn weithredol eto yn awtomatig pan fyddwch yn dychwelyd atynt. <ph name="BEGIN_LINK" />Dysgu rhagor am yr Arbedwr Cof<ph name="END_LINK" /></translation> @@ -850,6 +861,7 @@ <translation id="9210313013767007472"><ph name="USER_NAME_OR_EMAIL" />. Aelodaeth Google.</translation> <translation id="922152298093051471">Personoleiddio Chrome</translation> <translation id="93760716455950538">Ailddechrau ChromeOS Flex</translation> +<translation id="942523836246905265">{NUM_TABS,plural, =1{Dad-rannu Tab gyda Google Search}zero{Dad-rannu # Tab gyda Google Search}two{Dad-rannu # Dab gyda Google Search}few{Dad-rannu # Thab gyda Google Search}many{Dad-rannu # Thab gyda Google Search}other{Dad-rannu # Tab gyda Google Search}}</translation> <translation id="945522503751344254">Danfon adborth</translation> <translation id="983803489796659991">Methodd y gosodiad oherwydd nad oes gan y gweinydd diweddaru unrhyw ddata hash ar gyfer yr ap.</translation> <translation id="989816563149873169">Gall <ph name="SHORTCUT" /> newid rhwng proffiliau Chrome</translation>
diff --git a/chrome/app/resources/google_chrome_strings_hi.xtb b/chrome/app/resources/google_chrome_strings_hi.xtb index d2fbf76..61e30d25 100644 --- a/chrome/app/resources/google_chrome_strings_hi.xtb +++ b/chrome/app/resources/google_chrome_strings_hi.xtb
@@ -2,6 +2,7 @@ <!DOCTYPE translationbundle> <translationbundle lang="hi"> <translation id="1001534784610492198">इंस्टॉलर संग्रह खराब या अमान्य है. कृपया Google Chrome फिर से डाउनलोड करें.</translation> +<translation id="1003032879891166432">अपने सभी डिवाइसों पर सेव किए गए पासवर्ड इस्तेमाल करने के लिए, अपने फ़ोन के कैमरे से क्यूआर कोड स्कैन करके Chrome में साइन इन करें.</translation> <translation id="1006034097353797313">वहीं से काम जारी रखें जहां आपने छोड़ा था: हर बार रीस्टार्ट करने पर Chrome आपके टैब वापस ला सकता है. इसे बंद करने के लिए, यहां जाएं</translation> <translation id="1018937009655463387">विंडो शेयर करने के लिए, 'सिस्टम सेटिंग' में जाकर Chrome के लिए स्क्रीन रिकॉर्ड करने की अनुमति दें.</translation> <translation id="1026101648481255140">इंस्टॉल करने की प्रोसेस को दोबारा चालू करें</translation> @@ -482,6 +483,7 @@ <translation id="5947104538377036631">Chrome का शॉर्टकट</translation> <translation id="5960071705175224773">आपकी सेटिंग में किसी अनजान ऐप्लिकेशन ने बदलाव किए हैं</translation> <translation id="5980111191913430208">अज्ञात सोर्स से डाउनलोड किए गए एक्सटेंशन, ऐप्लिकेशन, और थीम से आपके डिवाइस को नुकसान पहुंच सकता है. Chrome, सिर्फ़ <ph name="IDS_EXTENSION_WEB_STORE_TITLE" /> से इन्हें इंस्टॉल करने का सुझाव देता है</translation> +<translation id="5985355560468572884">बुकमार्क की गई साइटों को कभी भी ऐक्सेस करने के लिए, अपने फ़ोन के कैमरे से क्यूआर कोड स्कैन करके Chrome में साइन इन करें.</translation> <translation id="6004427865367382148">{COUNT,plural, =1{आपके एडमिन चाहते हैं कि अपडेट लागू करने के लिए आप Chrome को फिर से लॉन्च करें. इसमें गुप्त या आइसोलेटेड विंडो खुली है. Chrome को फिर से लॉन्च करने पर, यह विंडो दोबारा नहीं खुलेगी.}one{आपके एडमिन चाहते हैं कि अपडेट लागू करने के लिए आप Chrome को फिर से लॉन्च करें. इसमें # गुप्त या आइसोलेटेड विंडो खुली है. Chrome को फिर से लॉन्च करने पर, यह विंडो दोबारा नहीं खुलेगी.}other{आपके एडमिन चाहते हैं कि अपडेट लागू करने के लिए आप Chrome को फिर से लॉन्च करें. इसमें # गुप्त या आइसोलेटेड विंडो खुली हैं. Chrome को फिर से लॉन्च करने पर, यह विंडो दोबारा नहीं खुलेंगी.}}</translation> <translation id="6009821354356307391">फ़ॉलो अप करें</translation> <translation id="6014316319780893079"><ph name="BEGIN_LINK" />Chrome के टूल<ph name="END_LINK" /> की मदद से, सुरक्षित तरीके से ब्राउज़िंग की जा सकती है. साथ ही, अपना डेटा भी कंट्रोल किया जा सकता है</translation>
diff --git a/chrome/app/resources/google_chrome_strings_mr.xtb b/chrome/app/resources/google_chrome_strings_mr.xtb index d3be376..3eecf537 100644 --- a/chrome/app/resources/google_chrome_strings_mr.xtb +++ b/chrome/app/resources/google_chrome_strings_mr.xtb
@@ -2,6 +2,7 @@ <!DOCTYPE translationbundle> <translationbundle lang="mr"> <translation id="1001534784610492198">इन्स्टॉलर संग्रहण भ्रष्ट किंवा चुकीचा आहे. कृपया Google Chrome पुन्हा डाउनलोड करा.</translation> +<translation id="1003032879891166432">तुमचे सेव्ह केलेले पासवर्ड सर्व डिव्हाइसवर वापरण्यासाठी, Chrome मध्ये साइन इन करण्याकरिता तुमच्या फोनचा कॅमेरा वापरून QR कोड स्कॅन करा.</translation> <translation id="1006034097353797313">तुम्ही सोडले होते तिथून पुढे सुरू ठेवा: तुम्ही रीस्टार्ट करता, तेव्हा प्रत्येक वेळी Chrome तुमचे टॅब रिस्टोअर करते. हे बंद करण्यासाठी, यावर जा</translation> <translation id="1018937009655463387">तुमची विंडो शेअर करण्यासाठी, सिस्टीम सेटिंग्ज मध्ये Chrome साठी स्क्रीन रेकॉर्डिंगला अनुमती द्या.</translation> <translation id="1026101648481255140">इंस्टॉलेशन पुन्हा सुरू करा</translation> @@ -491,6 +492,7 @@ <translation id="5947104538377036631">Chrome शॉर्टकट</translation> <translation id="5960071705175224773">अज्ञात ॲपने तुमची सेटिंग्ज बदलली आहेत</translation> <translation id="5980111191913430208">अज्ञात स्रोतांकडील एक्स्टेंशन, अॅप्स आणि थीम तुमच्या डिव्हाइसला हानी पोहोचवू शकतात. Chrome फक्त <ph name="IDS_EXTENSION_WEB_STORE_TITLE" /> मधून ते इंस्टॉल करण्याची शिफारस करते</translation> +<translation id="5985355560468572884">तुम्ही बुकमार्क केलेल्या साइटवर नेहमी परत जाण्यासाठी, Chrome मध्ये साइन इन करण्याकरिता तुमच्या फोनचा कॅमेरा वापरून QR कोड स्कॅन करा.</translation> <translation id="6004427865367382148">{COUNT,plural, =1{अपडेट लागू करता यावे यासाठी तुम्ही Chrome पुन्हा लाँच करण्याची तुमच्या ॲडमिनिस्ट्रेटरला गरज आहे. गुप्त मोड किंवा अलिप्त विंडो उघडी आहे. तुम्ही पुन्हा लाँच केल्यानंतर ते पुन्हा उघडणार नाही.}other{अपडेट लागू करता यावे यासाठी तुम्ही Chrome पुन्हा लाँच करण्याची तुमच्या ॲडमिनिस्ट्रेटरला गरज आहे. सर्व प्रोफाइलमध्ये # गुप्त मोड आणि अलिप्त विंडो उघड्या आहेत. तुम्ही पुन्हा लाँच केल्यानंतर ते पुन्हा उघडणार नाहीत.}}</translation> <translation id="6009821354356307391">फॉलो अपची विनंती करा</translation> <translation id="6014316319780893079">तुम्ही <ph name="BEGIN_LINK" />Chrome ची टूल<ph name="END_LINK" /> वापरून सुरक्षितरीत्या ब्राउझ करू शकता आणि तुमचा डेटा नियंत्रित करू शकता</translation>
diff --git a/chrome/app/resources/google_chrome_strings_ms.xtb b/chrome/app/resources/google_chrome_strings_ms.xtb index 6f9151a7..5eb7d79e 100644 --- a/chrome/app/resources/google_chrome_strings_ms.xtb +++ b/chrome/app/resources/google_chrome_strings_ms.xtb
@@ -2,6 +2,7 @@ <!DOCTYPE translationbundle> <translationbundle lang="ms"> <translation id="1001534784610492198">Arkib pemasang rosak atau tidak sah. Sila muat turun Google Chrome semula.</translation> +<translation id="1003032879891166432">Untuk menggunakan kata laluan anda yang disimpan merentas peranti, imbas kod QR dengan kamera telefon anda untuk log masuk ke Chrome.</translation> <translation id="1006034097353797313">Teruskan dari tempat anda berhenti: Chrome memulihkan tab anda setiap kali anda memulakan semula apl. Untuk mematikan ciri ini, akses</translation> <translation id="1018937009655463387">Untuk berkongsi tetingkap anda, benarkan rakaman skrin untuk Chrome dalam Tetapan Sistem.</translation> <translation id="1026101648481255140">Sambung Semula Pemasangan</translation> @@ -485,6 +486,7 @@ <translation id="5947104538377036631">Pintasan Chrome</translation> <translation id="5960071705175224773">Tetapan anda telah diubah oleh apl yang tidak diketahui</translation> <translation id="5980111191913430208">Sambungan, apl dan tema daripada sumber yang tidak diketahui boleh membahayakan peranti anda. Chrome mengesyorkan agar fail dipasang daripada <ph name="IDS_EXTENSION_WEB_STORE_TITLE" /> sahaja</translation> +<translation id="5985355560468572884">Untuk sentiasa kembali kepada laman yang telah anda tandai halaman, imbas kod QR dengan kamera telefon anda untuk log masuk ke Chrome.</translation> <translation id="6004427865367382148">{COUNT,plural, =1{Pentadbir anda menghendaki anda melancarkan semula Chrome untuk menggunakan kemaskinian. Terdapat tetingkap Inkognito atau Terasing yang dibuka. Tetingkap tersebut tidak akan dibuka semula selepas anda melancarkan semula penyemak imbas.}other{Pentadbir anda menghendaki anda melancarkan semula Chrome untuk menggunakan kemaskinian. Terdapat # tetingkap Inkognito dan Terasing yang dibuka merentas profil. Tetingkap tersebut tidak akan dibuka semula selepas anda melancarkan semula penyemak imbas.}}</translation> <translation id="6009821354356307391">Minta susulan</translation> <translation id="6014316319780893079">Dengan <ph name="BEGIN_LINK" />alatan daripada Chrome<ph name="END_LINK" />, anda boleh menyemak imbas dengan selamat dan mengekalkan kawalan anda</translation>
diff --git a/chrome/browser/browser_controls/android/java/src/org/chromium/chrome/browser/browser_controls/BottomControlsStacker.java b/chrome/browser/browser_controls/android/java/src/org/chromium/chrome/browser/browser_controls/BottomControlsStacker.java index b2a4794..f4a2967 100644 --- a/chrome/browser/browser_controls/android/java/src/org/chromium/chrome/browser/browser_controls/BottomControlsStacker.java +++ b/chrome/browser/browser_controls/android/java/src/org/chromium/chrome/browser/browser_controls/BottomControlsStacker.java
@@ -482,8 +482,11 @@ } mBrowserControlsSizer.setBottomControlsAdditionalHeight(additionalHeight); - offsetTagsInfo.mBottomControlsConstraints = - new OffsetTagConstraints(0, 0, 0, totalHeight + additionalHeight); + // With CIB the browser moves the controls, so they don't need OffsetTag constraints. + if (!BrowserControlsUtils.isBrowserPositioningControls()) { + offsetTagsInfo.mBottomControlsConstraints = + new OffsetTagConstraints(0, 0, 0, totalHeight + additionalHeight); + } if (shouldUpdateOffsets) { repositionLayers( @@ -635,7 +638,13 @@ // composited views present.) // // When isOverriddenAtRest, `bottomOffset` is a scroll-off offset, not a height delta. - if ((isAnimating || animated) && bottomOffset != 0 && !isOverriddenAtRest) { + // + // When CIB is enabled, `animated` is also true while scrolling, and scrolling the controls + // off looks like a height increase to this clamp, which would pin the layers in place. Only + // clamp during real height animations. + boolean clampForHeightAnimation = + isAnimating || (animated && !BrowserControlsUtils.isBrowserPositioningControls()); + if (clampForHeightAnimation && bottomOffset != 0 && !isOverriddenAtRest) { // When bottomOffset is negative, the browser controls is going through a height // reduction. //
diff --git a/chrome/browser/browser_controls/android/java/src/org/chromium/chrome/browser/browser_controls/BottomControlsStackerUnitTest.java b/chrome/browser/browser_controls/android/java/src/org/chromium/chrome/browser/browser_controls/BottomControlsStackerUnitTest.java index 6f49891d..04f0ef56 100644 --- a/chrome/browser/browser_controls/android/java/src/org/chromium/chrome/browser/browser_controls/BottomControlsStackerUnitTest.java +++ b/chrome/browser/browser_controls/android/java/src/org/chromium/chrome/browser/browser_controls/BottomControlsStackerUnitTest.java
@@ -653,6 +653,42 @@ } @Test + @EnableFeatures(ChromeFeatureList.CONTROLS_IN_BROWSER) + public void reposition_ScrollOff_OneLayer_RequestNewFrame_controlsInBrowser() { + TestLayer layer = + new TestLayer( + BOTTOM_LAYER, + 100, + LayerScrollBehavior.DEFAULT_SCROLL_OFF, + LayerVisibility.VISIBLE); + mBottomControlsStacker.addLayer(layer); + + mBottomControlsStacker.requestLayerUpdate(false); + verify(mBrowserControlsSizer).setBottomControlsHeight(100, 0); + + // With CIB, requestNewFrame is true while scrolling. Without a height animation running, + // the scroll offset should move the layer rather than being clamped as a height change. + onBottomControlsOffsetChanged(0, 0, true); + assertLayerYOffset(layer, 0); + + // Scroll down. + onBottomControlsOffsetChanged(60, 0, true); + assertLayerYOffset(layer, 60); + + // Controls Full scroll off. + onBottomControlsOffsetChanged(100, 0, true); + assertLayerYOffset(layer, 100); + + // Scroll up. + onBottomControlsOffsetChanged(30, 0, true); + assertLayerYOffset(layer, 30); + + // Controls fully visible. + onBottomControlsOffsetChanged(0, 0, true); + assertLayerYOffset(layer, 0); + } + + @Test public void reposition_ScrollOff_TwoLayers_AppliedByBrowser() { TestLayer top = new TestLayer( @@ -1169,6 +1205,50 @@ } @Test + @EnableFeatures(ChromeFeatureList.CONTROLS_IN_BROWSER) + public void reposition_RemoveLayer_RemoveTop_Animated_controlsInBrowser() { + TestLayer top = + new TestLayer( + TOP_LAYER, + 100, + LayerScrollBehavior.DEFAULT_SCROLL_OFF, + LayerVisibility.VISIBLE); + TestLayer bottom = + new TestLayer( + BOTTOM_LAYER, + 10, + LayerScrollBehavior.DEFAULT_SCROLL_OFF, + LayerVisibility.VISIBLE); + mBottomControlsStacker.addLayer(top); + mBottomControlsStacker.addLayer(bottom); + + mBottomControlsStacker.requestLayerUpdate(false); + verify(mBrowserControlsSizer).setBottomControlsHeight(110, 0); + + onBottomControlsOffsetChanged(0, 0, false); + assertLayerYOffset(top, -10); + assertLayerYOffset(bottom, 0); + + // With CIB, the height-animation clamp still applies while a real height animation runs. + top.setVisibility(LayerVisibility.HIDING); + mBottomControlsStacker.requestLayerUpdate(true); + verify(mBrowserControlsSizer).setBottomControlsHeight(10, 0); + mBottomControlsStacker.onBottomControlsHeightAnimationStarted(); + + onBottomControlsOffsetChanged(-100, 0, true); + assertLayerYOffset(top, -10); + assertLayerYOffset(bottom, 0); + + onBottomControlsOffsetChanged(-60, 0, true); + assertLayerYOffset(top, 30); + assertLayerYOffset(bottom, 0); + + onBottomControlsOffsetChanged(-20, 0, true); + assertLayerYOffset(top, 70); + assertLayerYOffset(bottom, 0); + } + + @Test public void reposition_RemoveLayer_RemovedBottom() { TestLayer top = new TestLayer( @@ -1916,6 +1996,36 @@ } @Test + @EnableFeatures(ChromeFeatureList.CONTROLS_IN_BROWSER) + public void testOnControlsConstraintsChanged_controlsInBrowser_noBottomConstraints() { + TestLayer top = + new TestLayer( + TOP_LAYER, + 150, + LayerScrollBehavior.DEFAULT_SCROLL_OFF, + LayerVisibility.VISIBLE); + TestLayer bottom = + new TestLayer( + BOTTOM_LAYER, + 20, + LayerScrollBehavior.NEVER_SCROLL_OFF, + LayerVisibility.VISIBLE); + mBottomControlsStacker.addLayer(top); + mBottomControlsStacker.addLayer(bottom); + mBottomControlsStacker.requestLayerUpdate(false); + verify(mBrowserControlsSizer).setBottomControlsHeight(170, 20); + + BrowserControlsOffsetTagsInfo tagsInfo = new BrowserControlsOffsetTagsInfo(); + mBottomControlsStacker.onOffsetTagsInfoChanged(null, tagsInfo, 0, false); + + // The additional height is still reported, but with CIB the browser moves the controls, + // so no OffsetTag constraints are set for the bottom controls. + verify(mBrowserControlsSizer) + .setBottomControlsAdditionalHeight(TestLayer.ADDITIONAL_HEIGHT); + assertNull(tagsInfo.mBottomControlsConstraints); + } + + @Test public void testOnControlsConstraintsChanged_clearOffsetTag() { TestLayer topLayer = new TestLayer(
diff --git a/chrome/browser/browser_controls/android/java/src/org/chromium/chrome/browser/browser_controls/BrowserControlsOffsetTagsInfo.java b/chrome/browser/browser_controls/android/java/src/org/chromium/chrome/browser/browser_controls/BrowserControlsOffsetTagsInfo.java index 2113c9c3..743ac03 100644 --- a/chrome/browser/browser_controls/android/java/src/org/chromium/chrome/browser/browser_controls/BrowserControlsOffsetTagsInfo.java +++ b/chrome/browser/browser_controls/android/java/src/org/chromium/chrome/browser/browser_controls/BrowserControlsOffsetTagsInfo.java
@@ -47,6 +47,10 @@ mTags = new BrowserControlsOffsetTags(topControls, content, bottomControls); } + public static BrowserControlsOffsetTagsInfo createContentOnly() { + return new BrowserControlsOffsetTagsInfo(null, OffsetTag.createRandom(), null); + } + public boolean hasTags() { return mTags.hasTags(); }
diff --git a/chrome/browser/browser_controls/android/java/src/org/chromium/chrome/browser/browser_controls/BrowserControlsUtils.java b/chrome/browser/browser_controls/android/java/src/org/chromium/chrome/browser/browser_controls/BrowserControlsUtils.java index 02b6309..9b71de7 100644 --- a/chrome/browser/browser_controls/android/java/src/org/chromium/chrome/browser/browser_controls/BrowserControlsUtils.java +++ b/chrome/browser/browser_controls/android/java/src/org/chromium/chrome/browser/browser_controls/BrowserControlsUtils.java
@@ -31,6 +31,17 @@ private static @TriState int sSyncMinHeightWithTotalHeightForTesting; /** + * Returns whether the browser positions the top and bottom browser controls itself instead of + * the renderer moving them through OffsetTags. When true, only the content OffsetTag is + * registered. True for Controls-in-Browser. + */ + public static boolean isBrowserPositioningControls() { + // TODO(peilinwang): Limit CIB to phones, excluding tablets and other large form factors + // (desktop, automotive, XR, TV) and make sure the renderer's behavior is consistent. + return ChromeFeatureList.sControlsInBrowser.isEnabled(); + } + + /** * Returns the height of the window in pixels based on the window's display and context * configuration screenHeightDp. *
diff --git a/chrome/browser/devtools/devtools_file_helper_unittest.cc b/chrome/browser/devtools/devtools_file_helper_unittest.cc index 53690a5..6f403ca 100644 --- a/chrome/browser/devtools/devtools_file_helper_unittest.cc +++ b/chrome/browser/devtools/devtools_file_helper_unittest.cc
@@ -884,14 +884,12 @@ const base::FilePath git_objects_info_dir = git_dir.AppendASCII("objects").AppendASCII("info"); const base::FilePath git_refs_dir = git_dir.AppendASCII("refs"); - const base::FilePath mvn_dir = repo_dir.GetPath().AppendASCII(".mvn"); ASSERT_TRUE(base::CreateDirectory(git_hooks_dir)); ASSERT_TRUE(base::CreateDirectory(git_objects_info_dir)); ASSERT_TRUE(base::CreateDirectory(git_refs_dir)); - ASSERT_TRUE(base::CreateDirectory(mvn_dir)); for (const base::FilePath& blocked_path : - {git_dir, git_hooks_dir, git_objects_info_dir, mvn_dir}) { + {git_dir, git_hooks_dir, git_objects_info_dir}) { SCOPED_TRACE(blocked_path); base::MockCallback<DevToolsFileHelper::ConnectCallback> connect_cb; EXPECT_CALL(connect_cb, Run(false));
diff --git a/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc b/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc index cde3f42..cb3dafe 100644 --- a/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc +++ b/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc
@@ -568,11 +568,6 @@ // crbug.com/571913154, crbug.com/572269631, and crbug.com/577352729. BlockPath::CreateSuffix(FILE_PATH_LITERAL(".git"), BlockType::kBlockWrite), - // Block write access to */.mvn, which holds Maven project and JVM - // configuration (such as jvm.config, maven.config, and extensions.xml), - // see crbug.com/578500839. - BlockPath::CreateSuffix(FILE_PATH_LITERAL(".mvn"), - BlockType::kBlockWrite), #if BUILDFLAG(IS_WIN) // Some Windows specific directories to block, basically all apps, the // operating system itself, as well as configuration data for apps.
diff --git a/chrome/browser/file_system_access/chrome_file_system_access_permission_context_unittest.cc b/chrome/browser/file_system_access/chrome_file_system_access_permission_context_unittest.cc index 4fa6a38..e00eb23a 100644 --- a/chrome/browser/file_system_access/chrome_file_system_access_permission_context_unittest.cc +++ b/chrome/browser/file_system_access/chrome_file_system_access_permission_context_unittest.cc
@@ -2464,7 +2464,7 @@ // Testing that allowlisted repository data, ref, and index paths under an // existing */.git directory remain writable for web-based Git clients, without -// weakening stricter ancestor rules or nested .git/.mvn blocks. +// weakening stricter ancestor rules or nested .git blocks. TEST_F(ChromeFileSystemAccessPermissionContextTest, ConfirmSensitiveEntryAccess_GitSafeDataPathsWriteAllowed) { #if defined(FILE_PATH_USES_DRIVE_LETTERS) @@ -2580,8 +2580,8 @@ HandleType::kFile, AccessTrigger::kProgrammaticWrite), SensitiveDirectoryResult::kAbort); - // Nested .git or .mvn entries inside `.git` (including under `.git/modules` - // or `.git/refs`) stay blocked for write. + // Nested .git entries inside `.git` (including under `.git/modules` or + // `.git/refs`) stay blocked for write. EXPECT_EQ(ConfirmSensitiveEntryAccessSync( permission_context(), PathInfo(git_dir.Append(FILE_PATH_LITERAL("modules")) @@ -2613,14 +2613,6 @@ .Append(FILE_PATH_LITERAL("config"))), HandleType::kFile, AccessTrigger::kProgrammaticWrite), SensitiveDirectoryResult::kAbort); - EXPECT_EQ(ConfirmSensitiveEntryAccessSync( - permission_context(), - PathInfo(git_dir.Append(FILE_PATH_LITERAL("refs")) - .Append(FILE_PATH_LITERAL("evil")) - .Append(FILE_PATH_LITERAL(".mvn")) - .Append(FILE_PATH_LITERAL("jvm.config"))), - HandleType::kFile, AccessTrigger::kProgrammaticWrite), - SensitiveDirectoryResult::kAbort); // `ShouldBlockAccessToGitPath()` must never unblock paths inside a // `kBlockAllChildren` ancestor (such as `~/.ssh` or `DIR_EXE`). @@ -2640,135 +2632,6 @@ } } -// Testing that writes to */.mvn and its descendants (such as .mvn/jvm.config) -// are blocked, while reads and non-.mvn workspace paths stay allowed. -TEST_F(ChromeFileSystemAccessPermissionContextTest, - ConfirmSensitiveEntryAccess_MvnWriteBlock) { -#if defined(FILE_PATH_USES_DRIVE_LETTERS) - base::FilePath root(FILE_PATH_LITERAL("c:\\")); -#else - base::FilePath root(FILE_PATH_LITERAL("/")); -#endif - const base::FilePath workspace_dir = root.Append(FILE_PATH_LITERAL("a")); - const base::FilePath mvn_dir = - workspace_dir.Append(FILE_PATH_LITERAL(".mvn")); - const base::FilePath jvm_config = - mvn_dir.Append(FILE_PATH_LITERAL("jvm.config")); - const base::FilePath maven_config = - mvn_dir.Append(FILE_PATH_LITERAL("maven.config")); - const base::FilePath extensions_xml = - mvn_dir.Append(FILE_PATH_LITERAL("extensions.xml")); - const base::FilePath wrapper_dir = - mvn_dir.Append(FILE_PATH_LITERAL("wrapper")); - const base::FilePath wrapper_props = - wrapper_dir.Append(FILE_PATH_LITERAL("maven-wrapper.properties")); - - // .mvn directory is blocked for save and programmatic write, but allowed for - // read. - EXPECT_EQ(ConfirmSensitiveEntryAccessSync( - permission_context(), PathInfo(mvn_dir), HandleType::kDirectory, - AccessTrigger::kSave), - SensitiveDirectoryResult::kAbort); - EXPECT_EQ(ConfirmSensitiveEntryAccessSync( - permission_context(), PathInfo(mvn_dir), HandleType::kDirectory, - AccessTrigger::kProgrammaticWrite), - SensitiveDirectoryResult::kAbort); - EXPECT_EQ(ConfirmSensitiveEntryAccessSync( - permission_context(), PathInfo(mvn_dir), HandleType::kDirectory, - AccessTrigger::kOpen), - SensitiveDirectoryResult::kAllowed); - EXPECT_EQ(ConfirmSensitiveEntryAccessSync( - permission_context(), PathInfo(mvn_dir), HandleType::kDirectory, - AccessTrigger::kProgrammaticRead), - SensitiveDirectoryResult::kAllowed); - - // .mvn/jvm.config and other files/subdirectories inside .mvn are blocked for - // save and programmatic write, but allowed for read. - EXPECT_EQ(ConfirmSensitiveEntryAccessSync( - permission_context(), PathInfo(jvm_config), HandleType::kFile, - AccessTrigger::kSave), - SensitiveDirectoryResult::kAbort); - EXPECT_EQ(ConfirmSensitiveEntryAccessSync( - permission_context(), PathInfo(jvm_config), HandleType::kFile, - AccessTrigger::kProgrammaticWrite), - SensitiveDirectoryResult::kAbort); - EXPECT_EQ(ConfirmSensitiveEntryAccessSync( - permission_context(), PathInfo(jvm_config), HandleType::kFile, - AccessTrigger::kOpen), - SensitiveDirectoryResult::kAllowed); - EXPECT_EQ(ConfirmSensitiveEntryAccessSync( - permission_context(), PathInfo(jvm_config), HandleType::kFile, - AccessTrigger::kProgrammaticRead), - SensitiveDirectoryResult::kAllowed); - EXPECT_EQ(ConfirmSensitiveEntryAccessSync( - permission_context(), PathInfo(maven_config), HandleType::kFile, - AccessTrigger::kProgrammaticWrite), - SensitiveDirectoryResult::kAbort); - EXPECT_EQ(ConfirmSensitiveEntryAccessSync( - permission_context(), PathInfo(extensions_xml), - HandleType::kFile, AccessTrigger::kProgrammaticWrite), - SensitiveDirectoryResult::kAbort); - EXPECT_EQ(ConfirmSensitiveEntryAccessSync( - permission_context(), PathInfo(wrapper_dir), - HandleType::kDirectory, AccessTrigger::kProgrammaticWrite), - SensitiveDirectoryResult::kAbort); - EXPECT_EQ(ConfirmSensitiveEntryAccessSync( - permission_context(), PathInfo(wrapper_props), - HandleType::kFile, AccessTrigger::kProgrammaticWrite), - SensitiveDirectoryResult::kAbort); - - // Case variations of .mvn and .mvn/jvm.config are blocked for save and - // programmatic write. - EXPECT_EQ(ConfirmSensitiveEntryAccessSync( - permission_context(), - PathInfo(workspace_dir.Append(FILE_PATH_LITERAL(".MVN"))), - HandleType::kDirectory, AccessTrigger::kProgrammaticWrite), - SensitiveDirectoryResult::kAbort); - EXPECT_EQ(ConfirmSensitiveEntryAccessSync( - permission_context(), - PathInfo(workspace_dir.Append(FILE_PATH_LITERAL(".MVN")) - .Append(FILE_PATH_LITERAL("JVM.CONFIG"))), - HandleType::kFile, AccessTrigger::kSave), - SensitiveDirectoryResult::kAbort); - EXPECT_EQ(ConfirmSensitiveEntryAccessSync( - permission_context(), - PathInfo(workspace_dir.Append(FILE_PATH_LITERAL(".Mvn")) - .Append(FILE_PATH_LITERAL("Jvm.Config"))), - HandleType::kFile, AccessTrigger::kProgrammaticWrite), - SensitiveDirectoryResult::kAbort); - - // Parent workspace directory, child project files, and files named - // jvm.config outside of .mvn remain allowed for save and programmatic write. - EXPECT_EQ(ConfirmSensitiveEntryAccessSync( - permission_context(), PathInfo(workspace_dir), - HandleType::kDirectory, AccessTrigger::kSave), - SensitiveDirectoryResult::kAllowed); - EXPECT_EQ( - ConfirmSensitiveEntryAccessSync( - permission_context(), - PathInfo(workspace_dir.Append(FILE_PATH_LITERAL("child-project")) - .Append(FILE_PATH_LITERAL("pom.xml"))), - HandleType::kFile, AccessTrigger::kProgrammaticWrite), - SensitiveDirectoryResult::kAllowed); - EXPECT_EQ(ConfirmSensitiveEntryAccessSync( - permission_context(), - PathInfo(workspace_dir.Append(FILE_PATH_LITERAL("jvm.config"))), - HandleType::kFile, AccessTrigger::kProgrammaticWrite), - SensitiveDirectoryResult::kAllowed); - EXPECT_EQ(ConfirmSensitiveEntryAccessSync( - permission_context(), - PathInfo(workspace_dir.Append(FILE_PATH_LITERAL(".mvn2")) - .Append(FILE_PATH_LITERAL("jvm.config"))), - HandleType::kFile, AccessTrigger::kProgrammaticWrite), - SensitiveDirectoryResult::kAllowed); - EXPECT_EQ(ConfirmSensitiveEntryAccessSync( - permission_context(), - PathInfo(workspace_dir.Append(FILE_PATH_LITERAL(".mvn_other")) - .Append(FILE_PATH_LITERAL("jvm.config"))), - HandleType::kFile, AccessTrigger::kProgrammaticWrite), - SensitiveDirectoryResult::kAllowed); -} - #if BUILDFLAG(IS_ANDROID) TEST_F(ChromeFileSystemAccessPermissionContextTest, ConfirmSensitiveEntryAccess_ContentUri) {
diff --git a/chrome/browser/lifetime/BUILD.gn b/chrome/browser/lifetime/BUILD.gn index 91c6970..d9c1845e 100644 --- a/chrome/browser/lifetime/BUILD.gn +++ b/chrome/browser/lifetime/BUILD.gn
@@ -55,6 +55,13 @@ ] } + if (is_linux) { + public += [ + "session_manager_client_linux.h", + "xsmp_api_linux.h", + ] + } + if (is_linux && use_dbus) { public += [ "session_end_listener_linux.h" ] public_deps += [ @@ -201,6 +208,13 @@ ] } + if (is_linux) { + sources += [ + "session_manager_client_linux.cc", + "xsmp_api_linux.cc", + ] + } + if (is_linux && use_dbus) { sources += [ "session_end_listener_linux.cc" ] deps += [ @@ -265,6 +279,12 @@ "//components/policy/core/common:test_support", ] } + if (is_linux) { + sources += [ + "session_manager_client_linux_unittest.cc", + "xsmp_api_linux_unittest.cc", + ] + } if (is_linux && use_dbus) { sources += [ "session_end_listener_linux_unittest.cc" ] deps += [
diff --git a/chrome/browser/lifetime/session_manager_client_linux.cc b/chrome/browser/lifetime/session_manager_client_linux.cc new file mode 100644 index 0000000..eb82a538 --- /dev/null +++ b/chrome/browser/lifetime/session_manager_client_linux.cc
@@ -0,0 +1,261 @@ +// Copyright 2026 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/browser/lifetime/session_manager_client_linux.h" + +#include <pwd.h> +#include <stdlib.h> +#include <unistd.h> + +#include <array> +#include <memory> +#include <optional> +#include <string> +#include <utility> +#include <vector> + +#include "base/command_line.h" +#include "base/compiler_specific.h" +#include "base/environment.h" +#include "base/files/file_descriptor_watcher_posix.h" +#include "base/files/file_util.h" +#include "base/functional/bind.h" +#include "base/logging.h" +#include "base/memory/ptr_util.h" +#include "chrome/browser/lifetime/xsmp_api_linux.h" + +using xsmp::IceConn; +using xsmp::SmcConn; +using xsmp::SmPointer; +using xsmp::SmProp; +using xsmp::SmPropValue; +using xsmp::XsmpApi; + +namespace { + +std::string GetCurrentUserName() { + std::array<char, 1024> buf = {}; + struct passwd pw = {}; + struct passwd* result = nullptr; + if (getpwuid_r(geteuid(), &pw, buf.data(), buf.size(), &result) == 0 && + result && result->pw_name) { + return result->pw_name; + } + auto env = base::Environment::Create(); + return env->GetVar("USER").value_or(""); +} + +} // namespace + +struct SessionManagerClientLinux::Callbacks { + static void SaveYourself(SmcConn /*smc_conn*/, + SmPointer client_data, + int save_type, + int /*shutdown*/, + int /*interact_style*/, + int /*fast*/) { + static_cast<SessionManagerClientLinux*>(client_data) + ->OnSaveYourself(save_type); + } + + static void Die(SmcConn /*smc_conn*/, SmPointer client_data) { + static_cast<SessionManagerClientLinux*>(client_data)->die_received_ = true; + } + + static void SaveComplete(SmcConn /*smc_conn*/, SmPointer /*client_data*/) {} + + static void ShutdownCancelled(SmcConn /*smc_conn*/, + SmPointer /*client_data*/) {} +}; + +// static +DISABLE_CFI_DLSYM std::unique_ptr<SessionManagerClientLinux> +SessionManagerClientLinux::Connect(const base::CommandLine& command_line, + base::RepeatingClosure save_state_cb, + base::OnceClosure die_cb) { + auto env = base::Environment::Create(); + std::optional<std::string> session_manager = env->GetVar("SESSION_MANAGER"); + if (!session_manager || session_manager->empty()) { + return nullptr; + } + + const XsmpApi* api = XsmpApi::Get(); + if (!api) { + return nullptr; + } + + auto client = base::WrapUnique(new SessionManagerClientLinux( + std::move(save_state_cb), std::move(die_cb))); + + xsmp::SmcCallbacks callbacks = {}; + callbacks.save_yourself = {&Callbacks::SaveYourself, client.get()}; + callbacks.die = {&Callbacks::Die, client.get()}; + callbacks.save_complete = {&Callbacks::SaveComplete, client.get()}; + callbacks.shutdown_cancelled = {&Callbacks::ShutdownCancelled, client.get()}; + constexpr unsigned long kCallbackMask = + xsmp::SmcSaveYourselfProcMask | xsmp::SmcDieProcMask | + xsmp::SmcSaveCompleteProcMask | xsmp::SmcShutdownCancelledProcMask; + + std::string network_ids = *session_manager; + std::string previous_id = command_line.GetSwitchValueASCII(kSmClientIdSwitch); + char* client_id_ret = nullptr; + std::array<char, 256> error_buf = {}; + + SmcConn smc_conn = api->open_connection( + network_ids.data(), /*context=*/nullptr, xsmp::SmProtoMajor, + xsmp::SmProtoMinor, kCallbackMask, &callbacks, + previous_id.empty() ? nullptr : previous_id.c_str(), &client_id_ret, + error_buf.size(), error_buf.data()); + if (!smc_conn && !previous_id.empty()) { + // Some session managers reject an unrecognized previous_id; retry as a + // fresh client. + smc_conn = api->open_connection(network_ids.data(), /*context=*/nullptr, + xsmp::SmProtoMajor, xsmp::SmProtoMinor, + kCallbackMask, &callbacks, + /*previous_id=*/nullptr, &client_id_ret, + error_buf.size(), error_buf.data()); + } + if (!smc_conn) { + VLOG(1) << "Failed to open XSMP connection: " << error_buf.data(); + return nullptr; + } + + if (client_id_ret) { + client->client_id_ = client_id_ret; + free(client_id_ret); + } + client->smc_conn_ = smc_conn; + + IceConn ice_conn = api->get_ice_connection(smc_conn); + int fd = ice_conn ? api->connection_number(ice_conn) : -1; + if (fd < 0) { + client->Disconnect(/*close_smc=*/true); + return nullptr; + } + base::SetCloseOnExec(fd); + + client->SetProperties(command_line); + client->watch_controller_ = base::FileDescriptorWatcher::WatchReadable( + fd, base::BindRepeating(&SessionManagerClientLinux::OnIceReadable, + client->weak_ptr_factory_.GetWeakPtr())); + return client; +} + +SessionManagerClientLinux::SessionManagerClientLinux( + base::RepeatingClosure save_state_cb, + base::OnceClosure die_cb) + : save_state_cb_(std::move(save_state_cb)), die_cb_(std::move(die_cb)) {} + +SessionManagerClientLinux::~SessionManagerClientLinux() { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + Disconnect(/*close_smc=*/true); +} + +DISABLE_CFI_DLSYM void SessionManagerClientLinux::SetProperties( + const base::CommandLine& command_line) { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + const XsmpApi* api = XsmpApi::Get(); + if (!api || !smc_conn_) { + return; + } + + const base::CommandLine& clone_cmd = command_line; + const base::CommandLine& restart_cmd = command_line; + + std::string program = restart_cmd.GetProgram().value(); + std::string user_id = GetCurrentUserName(); + unsigned char restart_style = xsmp::SmRestartIfRunning; + + auto to_prop_values = [](const std::vector<std::string>& args) { + std::vector<SmPropValue> values; + values.reserve(args.size()); + for (const std::string& arg : args) { + values.push_back( + {static_cast<int>(arg.size()), const_cast<char*>(arg.data())}); + } + return values; + }; + std::vector<SmPropValue> clone_vals = to_prop_values(clone_cmd.argv()); + std::vector<SmPropValue> restart_vals = to_prop_values(restart_cmd.argv()); + + auto make_prop = [](const char* name, const char* type, + std::vector<SmPropValue>& vals) { + return SmProp{const_cast<char*>(name), const_cast<char*>(type), + static_cast<int>(vals.size()), vals.data()}; + }; + std::vector<SmPropValue> program_vals = { + {static_cast<int>(program.size()), program.data()}}; + std::vector<SmPropValue> style_vals = {{1, &restart_style}}; + std::vector<SmPropValue> user_vals = { + {static_cast<int>(user_id.size()), user_id.data()}}; + SmProp program_prop = + make_prop(xsmp::SmProgram, xsmp::SmARRAY8, program_vals); + SmProp clone_prop = + make_prop(xsmp::SmCloneCommand, xsmp::SmLISTofARRAY8, clone_vals); + SmProp restart_prop = + make_prop(xsmp::SmRestartCommand, xsmp::SmLISTofARRAY8, restart_vals); + SmProp style_prop = + make_prop(xsmp::SmRestartStyleHint, xsmp::SmCARD8, style_vals); + SmProp user_prop = make_prop(xsmp::SmUserID, xsmp::SmARRAY8, user_vals); + + std::vector<SmProp*> props = {&program_prop, &clone_prop, &restart_prop, + &style_prop}; + if (!user_id.empty()) { + props.push_back(&user_prop); + } + api->set_properties(smc_conn_, static_cast<int>(props.size()), props.data()); +} + +DISABLE_CFI_DLSYM void SessionManagerClientLinux::OnIceReadable() { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + const XsmpApi* api = XsmpApi::Get(); + if (!api || !smc_conn_) { + return; + } + + IceConn ice_conn = api->get_ice_connection(smc_conn_); + const xsmp::IceProcessMessagesStatus status = + api->process_messages(ice_conn, nullptr, nullptr); + if (status == xsmp::IceProcessMessagesIOError) { + Disconnect(/*close_smc=*/true); + return; + } + if (status == xsmp::IceProcessMessagesConnectionClosed) { + // IceProcessMessages already freed the underlying IceConn. + Disconnect(/*close_smc=*/false); + return; + } + + if (die_received_) { + Disconnect(/*close_smc=*/true); + if (die_cb_) { + std::move(die_cb_).Run(); + } + } +} + +DISABLE_CFI_DLSYM void SessionManagerClientLinux::OnSaveYourself( + int save_type) { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + if (save_type != xsmp::SmSaveGlobal && save_state_cb_) { + save_state_cb_.Run(); + } + if (const XsmpApi* api = XsmpApi::Get(); api && smc_conn_) { + api->save_yourself_done(smc_conn_, /*success=*/1); + } +} + +DISABLE_CFI_DLSYM void SessionManagerClientLinux::Disconnect(bool close_smc) { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + // Stop watching the ICE socket before closing it so the fd outlives the + // watcher controller. + watch_controller_.reset(); + SmcConn conn = smc_conn_; + smc_conn_ = nullptr; + if (conn && close_smc) { + if (const XsmpApi* api = XsmpApi::Get()) { + api->close_connection(conn, 0, nullptr); + } + } +}
diff --git a/chrome/browser/lifetime/session_manager_client_linux.h b/chrome/browser/lifetime/session_manager_client_linux.h new file mode 100644 index 0000000..1109469 --- /dev/null +++ b/chrome/browser/lifetime/session_manager_client_linux.h
@@ -0,0 +1,71 @@ +// Copyright 2026 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CHROME_BROWSER_LIFETIME_SESSION_MANAGER_CLIENT_LINUX_H_ +#define CHROME_BROWSER_LIFETIME_SESSION_MANAGER_CLIENT_LINUX_H_ + +#include <memory> +#include <string> + +#include "base/files/file_descriptor_watcher_posix.h" +#include "base/functional/callback.h" +#include "base/memory/raw_ptr.h" +#include "base/memory/weak_ptr.h" +#include "base/sequence_checker.h" + +namespace base { +class CommandLine; +} // namespace base + +struct _SmcConn; + +// Command-line switch passing the XSMP client ID assigned in the previous +// desktop session so the session manager can match the relaunched instance. +inline constexpr char kSmClientIdSwitch[] = "sm-client-id"; + +// Connects to the desktop session manager via the X11R6 Session Management +// Protocol (XSMP) when $SESSION_MANAGER is set, registers the restart and clone +// commands, and handles SaveYourself and Die messages during logout. +class SessionManagerClientLinux { + public: + // Connects to $SESSION_MANAGER, resuming the client ID passed via + // `--sm-client-id` in `command_line` if any. Returns nullptr if + // $SESSION_MANAGER is unset, libSM/libICE are not installed, or the + // connection fails. `save_state_cb` runs on each non-global SaveYourself + // request and `die_cb` runs once the session manager sends Die. + static std::unique_ptr<SessionManagerClientLinux> Connect( + const base::CommandLine& command_line, + base::RepeatingClosure save_state_cb, + base::OnceClosure die_cb); + + SessionManagerClientLinux(const SessionManagerClientLinux&) = delete; + SessionManagerClientLinux& operator=(const SessionManagerClientLinux&) = + delete; + ~SessionManagerClientLinux(); + + const std::string& client_id() const { return client_id_; } + + private: + struct Callbacks; + + SessionManagerClientLinux(base::RepeatingClosure save_state_cb, + base::OnceClosure die_cb); + + void SetProperties(const base::CommandLine& command_line); + void OnIceReadable(); + void OnSaveYourself(int save_type); + void Disconnect(bool close_smc); + + raw_ptr<struct _SmcConn> smc_conn_ = nullptr; + std::string client_id_; + base::RepeatingClosure save_state_cb_; + base::OnceClosure die_cb_; + bool die_received_ = false; + std::unique_ptr<base::FileDescriptorWatcher::Controller> watch_controller_; + + SEQUENCE_CHECKER(sequence_checker_); + base::WeakPtrFactory<SessionManagerClientLinux> weak_ptr_factory_{this}; +}; + +#endif // CHROME_BROWSER_LIFETIME_SESSION_MANAGER_CLIENT_LINUX_H_
diff --git a/chrome/browser/lifetime/session_manager_client_linux_unittest.cc b/chrome/browser/lifetime/session_manager_client_linux_unittest.cc new file mode 100644 index 0000000..6a87746 --- /dev/null +++ b/chrome/browser/lifetime/session_manager_client_linux_unittest.cc
@@ -0,0 +1,516 @@ +// Copyright 2026 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/browser/lifetime/session_manager_client_linux.h" + +#include <dlfcn.h> +#include <poll.h> +#include <stdlib.h> +#include <unistd.h> + +#include <array> +#include <optional> +#include <string> +#include <vector> + +#include "base/command_line.h" +#include "base/compiler_specific.h" +#include "base/files/file_descriptor_watcher_posix.h" +#include "base/files/file_path.h" +#include "base/files/file_util.h" +#include "base/files/scoped_file.h" +#include "base/files/scoped_temp_dir.h" +#include "base/functional/bind.h" +#include "base/memory/raw_ptr_exclusion.h" +#include "base/memory/ref_counted.h" +#include "base/memory/weak_ptr.h" +#include "base/process/launch.h" +#include "base/process/process.h" +#include "base/run_loop.h" +#include "base/scoped_environment_variable_override.h" +#include "base/strings/string_number_conversions.h" +#include "base/strings/string_split.h" +#include "base/strings/string_util.h" +#include "base/test/multiprocess_test.h" +#include "base/test/task_environment.h" +#include "chrome/browser/lifetime/xsmp_api_linux.h" +#include "testing/gtest/include/gtest/gtest.h" +#include "testing/multiprocess_func_list.h" + +namespace { + +using xsmp::IceConn; +using xsmp::SmPointer; +using xsmp::SmProp; +using xsmp::SmPropValue; + +constexpr int kServerCmdFd = 3; +constexpr int kServerEvtFd = 4; + +// Minimal X11R6 ICE / XSMP server-side C ABI definitions for the test server. +struct _IceListenObj; +struct _SmsConn; +using IceListenObj = _IceListenObj*; +using SmsConn = _SmsConn*; + +enum IceAcceptStatus { + IceAcceptSuccess = 0, + IceAcceptFailure = 1, +}; + +enum IceConnectStatus { + IceConnectPending = 0, +}; + +using IceHostBasedAuthProc = int (*)(char*); +using SmsRegisterClientProc = int (*)(SmsConn, SmPointer, char*); +using SmsInteractRequestProc = void (*)(SmsConn, SmPointer, int); +using SmsInteractDoneProc = void (*)(SmsConn, SmPointer, int); +using SmsSaveYourselfRequestProc = + void (*)(SmsConn, SmPointer, int, int, int, int, int); +using SmsSaveYourselfPhase2RequestProc = void (*)(SmsConn, SmPointer); +using SmsSaveYourselfDoneProc = void (*)(SmsConn, SmPointer, int); +using SmsCloseConnectionProc = void (*)(SmsConn, SmPointer, int, char**); +using SmsSetPropertiesProc = void (*)(SmsConn, SmPointer, int, SmProp**); +using SmsDeletePropertiesProc = void (*)(SmsConn, SmPointer, int, char**); +using SmsGetPropertiesProc = void (*)(SmsConn, SmPointer); + +struct SmsCallbacks { + struct { + SmsRegisterClientProc callback; + SmPointer manager_data; + } register_client; + struct { + SmsInteractRequestProc callback; + SmPointer manager_data; + } interact_request; + struct { + SmsInteractDoneProc callback; + SmPointer manager_data; + } interact_done; + struct { + SmsSaveYourselfRequestProc callback; + SmPointer manager_data; + } save_yourself_request; + struct { + SmsSaveYourselfPhase2RequestProc callback; + SmPointer manager_data; + } save_yourself_phase2_request; + struct { + SmsSaveYourselfDoneProc callback; + SmPointer manager_data; + } save_yourself_done; + struct { + SmsCloseConnectionProc callback; + SmPointer manager_data; + } close_connection; + struct { + SmsSetPropertiesProc callback; + SmPointer manager_data; + } set_properties; + struct { + SmsDeletePropertiesProc callback; + SmPointer manager_data; + } delete_properties; + struct { + SmsGetPropertiesProc callback; + SmPointer manager_data; + } get_properties; +}; + +using SmsNewClientProc = + int (*)(SmsConn, SmPointer, unsigned long*, SmsCallbacks*, char**); + +constexpr int SmSaveBoth = 2; +constexpr int SmInteractStyleNone = 0; +constexpr unsigned long SmsRegisterClientProcMask = 1UL << 0; +constexpr unsigned long SmsSaveYourselfDoneProcMask = 1UL << 5; +constexpr unsigned long SmsCloseConnectionProcMask = 1UL << 6; +constexpr unsigned long SmsSetPropertiesProcMask = 1UL << 7; + +struct ServerFns { + IceConn (*ice_accept_connection)(IceListenObj, IceAcceptStatus*) = nullptr; + int (*ice_close_connection)(IceConn) = nullptr; + char* (*ice_compose_network_id_list)(int, IceListenObj*) = nullptr; + int (*ice_connection_number)(IceConn) = nullptr; + IceConnectStatus (*ice_connection_status)(IceConn) = nullptr; + void (*ice_free_listen_objs)(int, IceListenObj*) = nullptr; + int (*ice_get_listen_connection_number)(IceListenObj) = nullptr; + int (*ice_listen_for_connections)(int*, IceListenObj**, int, char*) = nullptr; + int (*ice_process_messages)(IceConn, void*, int*) = nullptr; + void (*ice_set_host_based_auth_proc)(IceListenObj, + IceHostBasedAuthProc) = nullptr; + void (*ice_set_shutdown_negotiation)(IceConn, int) = nullptr; + void (*sm_free_property)(SmProp*) = nullptr; + void (*sm_free_reasons)(int, char**) = nullptr; + void (*sms_clean_up)(SmsConn) = nullptr; + void (*sms_die)(SmsConn) = nullptr; + IceConn (*sms_get_ice_connection)(SmsConn) = nullptr; + int (*sms_initialize)(const char*, + const char*, + SmsNewClientProc, + SmPointer, + IceHostBasedAuthProc, + int, + char*) = nullptr; + int (*sms_register_client_reply)(SmsConn, char*) = nullptr; + void (*sms_save_yourself)(SmsConn, int, int, int, int) = nullptr; +}; + +struct ServerState { + ServerFns fns; + RAW_PTR_EXCLUSION SmsConn sms_conn = nullptr; + bool closed = false; +}; + +void WriteAll(int fd, std::string_view data) { + base::WriteFileDescriptor(fd, data); +} + +int AllowHostBasedAuth(char* /*hostname*/) { + return 1; +} + +DISABLE_CFI_DLSYM int OnRegisterClient(SmsConn sms_conn, + SmPointer manager_data, + char* previous_id) { + auto* state = static_cast<ServerState*>(manager_data); + std::string prev = previous_id ? previous_id : "<none>"; + free(previous_id); + WriteAll(kServerEvtFd, "REGISTERED " + prev + "\n"); + return state->fns.sms_register_client_reply( + sms_conn, const_cast<char*>("test-client-id-42")); +} + +DISABLE_CFI_DLSYM void OnSetProperties(SmsConn /*sms_conn*/, + SmPointer manager_data, + int num_props, + SmProp** props) { + auto* state = static_cast<ServerState*>(manager_data); + std::string program; + int style = -1; + std::vector<std::string> restart_cmd; + std::vector<std::string> clone_cmd; + + // SAFETY: `props` has `num_props` elements allocated by libSM. + auto prop_span = + UNSAFE_BUFFERS(base::span(props, static_cast<size_t>(num_props))); + for (SmProp* prop : prop_span) { + std::string_view name(prop->name); + // SAFETY: `prop->vals` has `prop->num_vals` elements allocated by libSM. + auto vals = UNSAFE_BUFFERS( + base::span(prop->vals, static_cast<size_t>(prop->num_vals))); + if (name == xsmp::SmProgram && !vals.empty()) { + program.assign(static_cast<const char*>(vals[0].value), vals[0].length); + } else if (name == xsmp::SmRestartStyleHint && !vals.empty()) { + style = *static_cast<const unsigned char*>(vals[0].value); + } else if (name == xsmp::SmRestartCommand) { + for (const SmPropValue& v : vals) { + restart_cmd.emplace_back(static_cast<const char*>(v.value), v.length); + } + } else if (name == xsmp::SmCloneCommand) { + for (const SmPropValue& v : vals) { + clone_cmd.emplace_back(static_cast<const char*>(v.value), v.length); + } + } + state->fns.sm_free_property(prop); + } + free(props); + + WriteAll(kServerEvtFd, "PROPS " + program + "|" + + base::NumberToString(style) + "|" + + base::JoinString(restart_cmd, ",") + "|" + + base::JoinString(clone_cmd, ",") + "\n"); +} + +DISABLE_CFI_DLSYM void OnSaveYourselfDone(SmsConn /*sms_conn*/, + SmPointer /*manager_data*/, + int success) { + WriteAll(kServerEvtFd, "SAVED " + base::NumberToString(success) + "\n"); +} + +DISABLE_CFI_DLSYM void OnCloseConnection(SmsConn sms_conn, + SmPointer manager_data, + int count, + char** reason_msgs) { + auto* state = static_cast<ServerState*>(manager_data); + // libSM allocates `reason_msgs` with `malloc(0)` even when `count == 0`. + state->fns.sm_free_reasons(count, reason_msgs); + IceConn ice_conn = state->fns.sms_get_ice_connection(sms_conn); + state->fns.sms_clean_up(sms_conn); + state->fns.ice_set_shutdown_negotiation(ice_conn, 0); + state->fns.ice_close_connection(ice_conn); + state->sms_conn = nullptr; + state->closed = true; + WriteAll(kServerEvtFd, "CLOSED\n"); +} + +int OnNewClient(SmsConn sms_conn, + SmPointer manager_data, + unsigned long* mask_ret, + SmsCallbacks* callbacks_ret, + char** /*failure_reason_ret*/) { + auto* state = static_cast<ServerState*>(manager_data); + state->sms_conn = sms_conn; + *mask_ret = SmsRegisterClientProcMask | SmsSetPropertiesProcMask | + SmsSaveYourselfDoneProcMask | SmsCloseConnectionProcMask; + callbacks_ret->register_client.callback = &OnRegisterClient; + callbacks_ret->register_client.manager_data = state; + callbacks_ret->set_properties.callback = &OnSetProperties; + callbacks_ret->set_properties.manager_data = state; + callbacks_ret->save_yourself_done.callback = &OnSaveYourselfDone; + callbacks_ret->save_yourself_done.manager_data = state; + callbacks_ret->close_connection.callback = &OnCloseConnection; + callbacks_ret->close_connection.manager_data = state; + return 1; +} + +class EventPipeReader { + public: + explicit EventPipeReader(int fd) : fd_(fd) {} + + std::string ReadLine() { + while (true) { + size_t newline = buffer_.find('\n'); + if (newline != std::string::npos) { + std::string line = buffer_.substr(0, newline); + buffer_.erase(0, newline + 1); + return line; + } + + base::RunLoop run_loop; + auto watcher = base::FileDescriptorWatcher::WatchReadable( + fd_, base::BindRepeating(&EventPipeReader::OnReadable, + weak_ptr_factory_.GetWeakPtr(), + run_loop.QuitClosure())); + run_loop.Run(); + } + } + + private: + void OnReadable(base::RepeatingClosure quit_closure) { + std::array<char, 512> tmp; + ssize_t n = read(fd_, tmp.data(), tmp.size()); + if (n > 0) { + buffer_.append(tmp.data(), static_cast<size_t>(n)); + } + quit_closure.Run(); + } + + int fd_; + std::string buffer_; + base::WeakPtrFactory<EventPipeReader> weak_ptr_factory_{this}; +}; + +DISABLE_CFI_DLSYM int RunXsmpTestServer() { + void* ice_lib = dlopen("libICE.so.6", RTLD_LAZY | RTLD_LOCAL); + void* sm_lib = dlopen("libSM.so.6", RTLD_LAZY | RTLD_LOCAL); + if (!ice_lib || !sm_lib) { + WriteAll(kServerEvtFd, "UNAVAILABLE\n"); + return 0; + } + + ServerState state; + auto load = [](void* lib, const char* name, auto& fn) { + fn = reinterpret_cast<std::remove_reference_t<decltype(fn)>>( + dlsym(lib, name)); + return fn != nullptr; + }; + if (!load(ice_lib, "IceAcceptConnection", state.fns.ice_accept_connection) || + !load(ice_lib, "IceCloseConnection", state.fns.ice_close_connection) || + !load(ice_lib, "IceComposeNetworkIdList", + state.fns.ice_compose_network_id_list) || + !load(ice_lib, "IceConnectionNumber", state.fns.ice_connection_number) || + !load(ice_lib, "IceConnectionStatus", state.fns.ice_connection_status) || + !load(ice_lib, "IceFreeListenObjs", state.fns.ice_free_listen_objs) || + !load(ice_lib, "IceGetListenConnectionNumber", + state.fns.ice_get_listen_connection_number) || + !load(ice_lib, "IceListenForConnections", + state.fns.ice_listen_for_connections) || + !load(ice_lib, "IceProcessMessages", state.fns.ice_process_messages) || + !load(ice_lib, "IceSetHostBasedAuthProc", + state.fns.ice_set_host_based_auth_proc) || + !load(ice_lib, "IceSetShutdownNegotiation", + state.fns.ice_set_shutdown_negotiation) || + !load(sm_lib, "SmFreeProperty", state.fns.sm_free_property) || + !load(sm_lib, "SmFreeReasons", state.fns.sm_free_reasons) || + !load(sm_lib, "SmsCleanUp", state.fns.sms_clean_up) || + !load(sm_lib, "SmsDie", state.fns.sms_die) || + !load(sm_lib, "SmsGetIceConnection", state.fns.sms_get_ice_connection) || + !load(sm_lib, "SmsInitialize", state.fns.sms_initialize) || + !load(sm_lib, "SmsRegisterClientReply", + state.fns.sms_register_client_reply) || + !load(sm_lib, "SmsSaveYourself", state.fns.sms_save_yourself)) { + return 1; + } + + std::array<char, 256> err = {}; + if (!state.fns.sms_initialize("ChromiumTestSM", "1.0", &OnNewClient, &state, + &AllowHostBasedAuth, err.size(), err.data())) { + return 1; + } + + int listen_count = 0; + IceListenObj* listen_objs = nullptr; + if (!state.fns.ice_listen_for_connections(&listen_count, &listen_objs, + err.size(), err.data()) || + listen_count < 1) { + return 1; + } + // SAFETY: `listen_objs` has `listen_count` elements returned by libICE. + auto listen_span = UNSAFE_BUFFERS( + base::span(listen_objs, static_cast<size_t>(listen_count))); + for (IceListenObj obj : listen_span) { + state.fns.ice_set_host_based_auth_proc(obj, &AllowHostBasedAuth); + } + + char* net_ids = + state.fns.ice_compose_network_id_list(listen_count, listen_objs); + WriteAll(kServerEvtFd, std::string("LISTEN ") + net_ids + "\n"); + free(net_ids); + + IceConn client_ice = nullptr; + std::string cmd_buf; + while (!state.closed) { + std::vector<struct pollfd> pfds; + pfds.push_back({.fd = kServerCmdFd, .events = POLLIN}); + for (IceListenObj obj : listen_span) { + pfds.push_back({.fd = state.fns.ice_get_listen_connection_number(obj), + .events = POLLIN}); + } + if (client_ice) { + pfds.push_back({.fd = state.fns.ice_connection_number(client_ice), + .events = POLLIN}); + } + + if (poll(pfds.data(), pfds.size(), 10000) <= 0) { + break; + } + + for (size_t i = 0; i < listen_span.size(); ++i) { + if (pfds[1 + i].revents & POLLIN) { + IceAcceptStatus status = IceAcceptFailure; + client_ice = state.fns.ice_accept_connection(listen_span[i], &status); + while (client_ice && state.fns.ice_connection_status(client_ice) == + IceConnectPending) { + state.fns.ice_process_messages(client_ice, nullptr, nullptr); + } + } + } + + if (client_ice && + pfds.back().fd == state.fns.ice_connection_number(client_ice) && + (pfds.back().revents & (POLLIN | POLLHUP))) { + state.fns.ice_process_messages(client_ice, nullptr, nullptr); + if (state.closed) { + break; + } + } + + if (pfds[0].revents & (POLLIN | POLLHUP)) { + std::array<char, 128> buf; + ssize_t n = read(kServerCmdFd, buf.data(), buf.size()); + if (n <= 0) { + break; + } + cmd_buf.append(buf.data(), static_cast<size_t>(n)); + size_t nl; + while ((nl = cmd_buf.find('\n')) != std::string::npos) { + std::string cmd = cmd_buf.substr(0, nl); + cmd_buf.erase(0, nl + 1); + if (cmd == "SAVE_YOURSELF" && state.sms_conn) { + state.fns.sms_save_yourself(state.sms_conn, SmSaveBoth, + /*shutdown=*/1, SmInteractStyleNone, + /*fast=*/0); + } else if (cmd == "DIE" && state.sms_conn) { + state.fns.sms_die(state.sms_conn); + } + } + } + } + + state.fns.ice_free_listen_objs(listen_count, listen_objs); + return 0; +} + +} // namespace + +MULTIPROCESS_TEST_MAIN(XsmpTestServer) { + return RunXsmpTestServer(); +} + +TEST(SessionManagerClientLinuxTest, RegistersAndHandlesSessionLifecycle) { + base::test::TaskEnvironment task_environment( + base::test::TaskEnvironment::MainThreadType::IO); + base::ScopedTempDir temp_dir; + ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); + base::ScopedEnvironmentVariableOverride ice_auth_env( + "ICEAUTHORITY", temp_dir.GetPath().Append("ICEauthority").value()); + + std::array<int, 2> cmd_pipe = {-1, -1}; + std::array<int, 2> evt_pipe = {-1, -1}; + ASSERT_EQ(0, pipe(cmd_pipe.data())); + ASSERT_EQ(0, pipe(evt_pipe.data())); + base::ScopedFD cmd_read(cmd_pipe[0]); + base::ScopedFD cmd_write(cmd_pipe[1]); + base::ScopedFD evt_read(evt_pipe[0]); + base::ScopedFD evt_write(evt_pipe[1]); + + base::LaunchOptions options; + options.fds_to_remap.emplace_back(cmd_read.get(), kServerCmdFd); + options.fds_to_remap.emplace_back(evt_write.get(), kServerEvtFd); + base::Process server = base::SpawnMultiProcessTestChild( + "XsmpTestServer", base::GetMultiProcessTestChildBaseCommandLine(), + options); + ASSERT_TRUE(server.IsValid()); + cmd_read.reset(); + evt_write.reset(); + + EventPipeReader reader(evt_read.get()); + std::string listen_line = reader.ReadLine(); + if (listen_line == "UNAVAILABLE") { + GTEST_SKIP() << "libSM.so.6 / libICE.so.6 not available"; + } + ASSERT_TRUE(base::StartsWith(listen_line, "LISTEN ")) << listen_line; + base::ScopedEnvironmentVariableOverride sm_env( + "SESSION_MANAGER", listen_line.substr(strlen("LISTEN "))); + + base::CommandLine cmd(base::FilePath("/usr/bin/google-chrome-stable")); + cmd.AppendSwitchASCII(kSmClientIdSwitch, "prev-id-7"); + cmd.AppendArg("https://example.com"); + + auto save_count = base::MakeRefCounted<base::RefCountedData<int>>(0); + auto die_count = base::MakeRefCounted<base::RefCountedData<int>>(0); + auto client = SessionManagerClientLinux::Connect( + cmd, + base::BindRepeating( + [](scoped_refptr<base::RefCountedData<int>> count) { ++count->data; }, + save_count), + base::BindOnce( + [](scoped_refptr<base::RefCountedData<int>> count) { ++count->data; }, + die_count)); + ASSERT_NE(nullptr, client); + EXPECT_EQ("test-client-id-42", client->client_id()); + + EXPECT_EQ("REGISTERED prev-id-7", reader.ReadLine()); + EXPECT_EQ( + "PROPS /usr/bin/google-chrome-stable|0|" + "/usr/bin/google-chrome-stable,--sm-client-id=prev-id-7," + "https://example.com|/usr/bin/google-chrome-stable," + "--sm-client-id=prev-id-7,https://example.com", + reader.ReadLine()); + + WriteAll(cmd_write.get(), "SAVE_YOURSELF\n"); + EXPECT_EQ("SAVED 1", reader.ReadLine()); + EXPECT_EQ(1, save_count->data); + EXPECT_EQ(0, die_count->data); + + WriteAll(cmd_write.get(), "DIE\n"); + EXPECT_EQ("CLOSED", reader.ReadLine()); + EXPECT_EQ(1, die_count->data); + + int exit_code = -1; + EXPECT_TRUE(server.WaitForExit(&exit_code)); + EXPECT_EQ(0, exit_code); +}
diff --git a/chrome/browser/lifetime/xsmp_api_linux.cc b/chrome/browser/lifetime/xsmp_api_linux.cc new file mode 100644 index 0000000..b04abd9 --- /dev/null +++ b/chrome/browser/lifetime/xsmp_api_linux.cc
@@ -0,0 +1,101 @@ +// Copyright 2026 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/browser/lifetime/xsmp_api_linux.h" + +#include <dlfcn.h> + +#include <optional> +#include <tuple> + +#include "base/compiler_specific.h" +#include "base/scoped_native_library.h" + +namespace xsmp { + +namespace { + +using IceErrorHandler = + void (*)(IceConn, int, int, unsigned long, int, int, IcePointer); +using IceIOErrorHandler = void (*)(IceConn); +using SmcErrorHandler = + void (*)(SmcConn, int, int, unsigned long, int, int, SmPointer); + +void OnIceIOError(IceConn /*ice_conn*/) {} + +void OnIceError(IceConn /*ice_conn*/, + int /*swap*/, + int /*offending_minor_opcode*/, + unsigned long /*offending_sequence*/, + int /*error_class*/, + int /*severity*/, + IcePointer /*values*/) {} + +void OnSmcError(SmcConn /*smc_conn*/, + int /*swap*/, + int /*offending_minor_opcode*/, + unsigned long /*offending_sequence*/, + int /*error_class*/, + int /*severity*/, + SmPointer /*values*/) {} + +template <typename Fn> +bool LoadSymbol(const base::ScopedNativeLibrary& lib, + const char* name, + Fn& fn) { + fn = reinterpret_cast<Fn>(lib.GetFunctionPointer(name)); + return fn != nullptr; +} + +DISABLE_CFI_DLSYM std::optional<XsmpApi> Load() { + base::ScopedNativeLibrary ice_lib( + dlopen("libICE.so.6", RTLD_LAZY | RTLD_LOCAL)); + if (!ice_lib.is_valid()) { + return std::nullopt; + } + base::ScopedNativeLibrary sm_lib( + dlopen("libSM.so.6", RTLD_LAZY | RTLD_LOCAL)); + if (!sm_lib.is_valid()) { + return std::nullopt; + } + + XsmpApi api; + IceIOErrorHandler (*set_ice_io_err)(IceIOErrorHandler) = nullptr; + IceErrorHandler (*set_ice_err)(IceErrorHandler) = nullptr; + SmcErrorHandler (*set_smc_err)(SmcErrorHandler) = nullptr; + if (!LoadSymbol(ice_lib, "IceConnectionNumber", api.connection_number) || + !LoadSymbol(ice_lib, "IceProcessMessages", api.process_messages) || + !LoadSymbol(ice_lib, "IceSetIOErrorHandler", set_ice_io_err) || + !LoadSymbol(ice_lib, "IceSetErrorHandler", set_ice_err) || + !LoadSymbol(sm_lib, "SmcOpenConnection", api.open_connection) || + !LoadSymbol(sm_lib, "SmcCloseConnection", api.close_connection) || + !LoadSymbol(sm_lib, "SmcGetIceConnection", api.get_ice_connection) || + !LoadSymbol(sm_lib, "SmcSaveYourselfDone", api.save_yourself_done) || + !LoadSymbol(sm_lib, "SmcSetErrorHandler", set_smc_err) || + !LoadSymbol(sm_lib, "SmcSetProperties", api.set_properties)) { + return std::nullopt; + } + + // Ensure a crashed or misbehaving session manager never terminates the + // browser. + set_ice_io_err(&OnIceIOError); + set_ice_err(&OnIceError); + set_smc_err(&OnSmcError); + + // Keep both libraries loaded for the lifetime of the process since `api` + // holds function pointers into them. + std::ignore = ice_lib.release(); + std::ignore = sm_lib.release(); + return api; +} + +} // namespace + +// static +const XsmpApi* XsmpApi::Get() { + static const std::optional<XsmpApi> api = Load(); + return api ? &*api : nullptr; +} + +} // namespace xsmp
diff --git a/chrome/browser/lifetime/xsmp_api_linux.h b/chrome/browser/lifetime/xsmp_api_linux.h new file mode 100644 index 0000000..0ae122e --- /dev/null +++ b/chrome/browser/lifetime/xsmp_api_linux.h
@@ -0,0 +1,119 @@ +// Copyright 2026 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CHROME_BROWSER_LIFETIME_XSMP_API_LINUX_H_ +#define CHROME_BROWSER_LIFETIME_XSMP_API_LINUX_H_ + +#include "base/memory/raw_ptr_exclusion.h" + +struct _IceConn; +struct _SmcConn; + +// Minimal X11R6 ICE / XSMP client C ABI definitions (from <X11/ICE/ICElib.h> +// and <X11/SM/SMlib.h>), declared directly because libICE.so.6 and libSM.so.6 +// are loaded via dlopen() and <X11/*> headers are disallowed by presubmit. +namespace xsmp { + +using IcePointer = void*; +using SmPointer = void*; +using IceConn = _IceConn*; +using SmcConn = _SmcConn*; + +enum IceProcessMessagesStatus { + IceProcessMessagesSuccess = 0, + IceProcessMessagesIOError = 1, + IceProcessMessagesConnectionClosed = 2, +}; + +enum SmcCloseStatus { + SmcClosedNow = 0, + SmcClosedASAP = 1, + SmcConnectionInUse = 2, +}; + +struct SmPropValue { + int length; + SmPointer value; +}; + +struct SmProp { + RAW_PTR_EXCLUSION char* name; + RAW_PTR_EXCLUSION char* type; + int num_vals; + RAW_PTR_EXCLUSION SmPropValue* vals; +}; + +using SmcSaveYourselfProc = void (*)(SmcConn, SmPointer, int, int, int, int); +using SmcDieProc = void (*)(SmcConn, SmPointer); +using SmcSaveCompleteProc = void (*)(SmcConn, SmPointer); +using SmcShutdownCancelledProc = void (*)(SmcConn, SmPointer); + +struct SmcCallbacks { + struct { + SmcSaveYourselfProc callback; + SmPointer client_data; + } save_yourself; + struct { + SmcDieProc callback; + SmPointer client_data; + } die; + struct { + SmcSaveCompleteProc callback; + SmPointer client_data; + } save_complete; + struct { + SmcShutdownCancelledProc callback; + SmPointer client_data; + } shutdown_cancelled; +}; + +inline constexpr int SmProtoMajor = 1; +inline constexpr int SmProtoMinor = 0; +inline constexpr int SmSaveGlobal = 0; +inline constexpr unsigned char SmRestartIfRunning = 0; + +inline constexpr unsigned long SmcSaveYourselfProcMask = 1UL << 0; +inline constexpr unsigned long SmcDieProcMask = 1UL << 1; +inline constexpr unsigned long SmcSaveCompleteProcMask = 1UL << 2; +inline constexpr unsigned long SmcShutdownCancelledProcMask = 1UL << 3; + +inline constexpr char SmCloneCommand[] = "CloneCommand"; +inline constexpr char SmProgram[] = "Program"; +inline constexpr char SmRestartCommand[] = "RestartCommand"; +inline constexpr char SmRestartStyleHint[] = "RestartStyleHint"; +inline constexpr char SmUserID[] = "UserID"; +inline constexpr char SmCARD8[] = "CARD8"; +inline constexpr char SmARRAY8[] = "ARRAY8"; +inline constexpr char SmLISTofARRAY8[] = "LISTofARRAY8"; + +// The libICE.so.6 and libSM.so.6 client entry points, loaded at runtime so +// systems without the X11 session management libraries do not need them +// installed. Callers must be annotated with DISABLE_CFI_DLSYM. +struct XsmpApi { + // Returns the loaded API, or nullptr if either library or any symbol is + // missing. The first successful call replaces the default libICE and libSM + // error handlers, which call exit(1), with handlers that do nothing. + static const XsmpApi* Get(); + + int (*connection_number)(IceConn) = nullptr; + IceProcessMessagesStatus (*process_messages)(IceConn, void*, int*) = nullptr; + SmcConn (*open_connection)(char*, + SmPointer, + int, + int, + unsigned long, + SmcCallbacks*, + const char*, + char**, + int, + char*) = nullptr; + SmcCloseStatus (*close_connection)(SmcConn, int, char**) = nullptr; + IceConn (*get_ice_connection)(SmcConn) = nullptr; + void (*save_yourself_done)(SmcConn, int) = nullptr; + void (*set_properties)(SmcConn, int, SmProp**) = nullptr; +}; + +} // namespace xsmp + +#endif // CHROME_BROWSER_LIFETIME_XSMP_API_LINUX_H_
diff --git a/chrome/browser/lifetime/xsmp_api_linux_unittest.cc b/chrome/browser/lifetime/xsmp_api_linux_unittest.cc new file mode 100644 index 0000000..fdaa842 --- /dev/null +++ b/chrome/browser/lifetime/xsmp_api_linux_unittest.cc
@@ -0,0 +1,40 @@ +// Copyright 2026 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/browser/lifetime/xsmp_api_linux.h" + +#include <dlfcn.h> + +#include "testing/gtest/include/gtest/gtest.h" + +namespace xsmp { + +TEST(XsmpApiLinuxTest, LoadsAllSymbols) { + void* ice_lib = dlopen("libICE.so.6", RTLD_LAZY | RTLD_LOCAL); + void* sm_lib = dlopen("libSM.so.6", RTLD_LAZY | RTLD_LOCAL); + if (!ice_lib || !sm_lib) { + EXPECT_EQ(nullptr, XsmpApi::Get()); + GTEST_SKIP() << "libSM.so.6 / libICE.so.6 not available"; + } + + const XsmpApi* api = XsmpApi::Get(); + ASSERT_NE(nullptr, api); + EXPECT_EQ(api, XsmpApi::Get()); + EXPECT_EQ(reinterpret_cast<void*>(api->connection_number), + dlsym(ice_lib, "IceConnectionNumber")); + EXPECT_EQ(reinterpret_cast<void*>(api->process_messages), + dlsym(ice_lib, "IceProcessMessages")); + EXPECT_EQ(reinterpret_cast<void*>(api->open_connection), + dlsym(sm_lib, "SmcOpenConnection")); + EXPECT_EQ(reinterpret_cast<void*>(api->close_connection), + dlsym(sm_lib, "SmcCloseConnection")); + EXPECT_EQ(reinterpret_cast<void*>(api->get_ice_connection), + dlsym(sm_lib, "SmcGetIceConnection")); + EXPECT_EQ(reinterpret_cast<void*>(api->save_yourself_done), + dlsym(sm_lib, "SmcSaveYourselfDone")); + EXPECT_EQ(reinterpret_cast<void*>(api->set_properties), + dlsym(sm_lib, "SmcSetProperties")); +} + +} // namespace xsmp
diff --git a/chrome/browser/policy/cloud/user_policy_signin_service_browsertest.cc b/chrome/browser/policy/cloud/user_policy_signin_service_browsertest.cc index 729d4bb..f2cbd5e8 100644 --- a/chrome/browser/policy/cloud/user_policy_signin_service_browsertest.cc +++ b/chrome/browser/policy/cloud/user_policy_signin_service_browsertest.cc
@@ -5,6 +5,7 @@ #include "chrome/browser/policy/cloud/user_policy_signin_service.h" #include <memory> +#include <optional> #include "base/command_line.h" #include "base/functional/bind.h" @@ -126,7 +127,8 @@ EXPECT_TRUE(base::test::RunUntil([&]() { return identity_manager() ->FindExtendedAccountInfoByAccountId(account_id) - .IsValid(); + .GetHostedDomain() + .has_value(); })); disable_disclaimer.RunAndReset();
diff --git a/chrome/browser/readaloud/android/resources/translations/android_readaloud_strings_cy.xtb b/chrome/browser/readaloud/android/resources/translations/android_readaloud_strings_cy.xtb index e1a735b..5de9c37 100644 --- a/chrome/browser/readaloud/android/resources/translations/android_readaloud_strings_cy.xtb +++ b/chrome/browser/readaloud/android/resources/translations/android_readaloud_strings_cy.xtb
@@ -13,11 +13,13 @@ <translation id="1807863182207623884">Ruby</translation> <translation id="1921351128855867012">Mynd ymlaen <ph name="NUMBER_OF_SECONDS" /> eiliad</translation> <translation id="1984328900355667246">Nid yw chwarae yn ôl ar gael</translation> +<translation id="2009730553732772041">Bydd cynnwys ac URL y dudalen rydych chi arni yn cael eu rhannu â Google i gynhyrchu sain. Gallwch ddiweddaru'r dewis hwn yn y gosodiadau unrhyw bryd.</translation> <translation id="2019727681730021602">Chwarae safonol</translation> <translation id="2224347680315897176">Cyson</translation> <translation id="2575502321843437554">Ddim yn ymgysylltu digon</translation> <translation id="2611765907167846862">Llonydd</translation> <translation id="3023502830214299618">Yn anffodus, nid yw chwarae yn ôl ar gael ar gyfer y dudalen hon ar hyn o bryd. Rhowch gynnig arall arni'n nes ymlaen.</translation> +<translation id="3431227249425330101">I barhau, gadewch i Chrome ddefnyddio cynnwys y dudalen ar gyfer Gwrando ar y dudalen hon?</translation> <translation id="3493899379487634969">Beth aeth o'i le?</translation> <translation id="3730775656877876887">Yn cynhyrchu chwarae AI</translation> <translation id="3778044272390020426">Dewislen opsiynau adborth negyddol</translation> @@ -55,6 +57,7 @@ <translation id="6889157801232138307">Chwaraewr 'Gwrando ar y dudalen hon'</translation> <translation id="7051308646573997571">Coral</translation> <translation id="7138678301420049075">Arall</translation> +<translation id="7161867604252594316">Mae “Gwrando ar y dudalen hon” wedi'i ddiffodd</translation> <translation id="7221920857098237570">Hynaws</translation> <translation id="7237590978482584900">Hwyliog</translation> <translation id="7282547042039404307">Llyfn</translation>
diff --git a/chrome/browser/ui/android/strings/translations/android_chrome_strings_cy.xtb b/chrome/browser/ui/android/strings/translations/android_chrome_strings_cy.xtb index fb794e4..54b6e55 100644 --- a/chrome/browser/ui/android/strings/translations/android_chrome_strings_cy.xtb +++ b/chrome/browser/ui/android/strings/translations/android_chrome_strings_cy.xtb
@@ -210,6 +210,7 @@ <translation id="1820408774134375111">Dalen waelod mewngofnodi</translation> <translation id="1824902652744048041">Tapiwch Dileu data pori</translation> <translation id="1829244130665387512">Chwilio'r dudalen</translation> +<translation id="1831587114257679402">Wedi'i adeiladu ar gyfer diogelwch fel y gallwch bori'n hyderus</translation> <translation id="1832459821645506983">Iawn, rwy'n cydsynio</translation> <translation id="1845958458910716240">I ddiogelu eich data, gadewch i Chrome dynnu caniatadau o wefannau nad ydych wedi ymweld â nhw yn ddiweddar</translation> <translation id="1851551847729706116">Yn rhannu <ph name="TAB_NAME" /> i'r tab hwn</translation> @@ -2087,6 +2088,7 @@ <translation id="8865415417596392024">Data Chrome yn eich cyfrif</translation> <translation id="886968456388055613">Hidlo yn ôl pwy fu'n pori</translation> <translation id="8872506776304248286">Agor mewn ap</translation> +<translation id="8876112961028111440">Mewngofnodwch i gael eich nodau tudalen, cyfrineiriau, gwybodaeth Awtolenwi, a rhagor ar draws eich holl ddyfeisiau.</translation> <translation id="8880275451109933094">Golwg dwy dudalen</translation> <translation id="8890668505403261809">Chwilio eich tabiau Anhysbys</translation> <translation id="8892234476517513962">Rydych eisoes wedi mewngofnodi</translation>
diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/bottom/BottomControlsMediator.java b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/bottom/BottomControlsMediator.java index d672a391..a855cab 100644 --- a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/bottom/BottomControlsMediator.java +++ b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/bottom/BottomControlsMediator.java
@@ -26,6 +26,7 @@ import org.chromium.chrome.browser.browser_controls.BottomControlsStacker.LayerVisibility; import org.chromium.chrome.browser.browser_controls.BrowserControlsOffsetTagsInfo; import org.chromium.chrome.browser.browser_controls.BrowserControlsStateProvider; +import org.chromium.chrome.browser.browser_controls.BrowserControlsUtils; import org.chromium.chrome.browser.browser_controls.BrowserControlsVisibilityManager; import org.chromium.chrome.browser.browser_controls.BrowserStateBrowserControlsVisibilityDelegate; import org.chromium.chrome.browser.flags.ChromeFeatureList; @@ -499,10 +500,16 @@ translationY = -chinHeight + bottomPadding + getBrowserControls().getBottomControlOffset(); } else { + // When the browser positions the controls, the BottomControlsStacker's Y_OFFSET + // already includes the scroll offset, so don't add it again. + int scrollOffset = + BrowserControlsUtils.isBrowserPositioningControls() + ? 0 + : getBrowserControls().getBottomControlOffset(); translationY = mModel.get(BottomControlsProperties.Y_OFFSET) + bottomPadding - + getBrowserControls().getBottomControlOffset(); + + scrollOffset; } mModel.set(BottomControlsProperties.ANDROID_VIEW_TRANSLATE_Y, translationY); }
diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/bottom/BottomControlsMediatorTest.java b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/bottom/BottomControlsMediatorTest.java index b112b07a..d04b95d 100644 --- a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/bottom/BottomControlsMediatorTest.java +++ b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/bottom/BottomControlsMediatorTest.java
@@ -302,6 +302,22 @@ } @Test + @EnableFeatures(ChromeFeatureList.CONTROLS_IN_BROWSER) + public void testAndroidViewTranslateY_controlsInBrowser_doesNotAddScrollOffset() { + mMediator.setBottomControlsVisible(true); + + // While scrolled off (bottomControlOffset = 30) with the offset overridden, the Android + // view stays visible. Under CIB the stacker's Y_OFFSET already includes the scroll offset, + // so the translation is Y_OFFSET + bottomPadding (0), without adding the offset again. + doReturn(30).when(mBrowserControlsVisibilityManager).getBottomControlOffset(); + doReturn(true).when(mBrowserControlsVisibilityManager).offsetOverridden(); + mMediator.onBrowserControlsOffsetUpdate(30); + + assertTrue(mModel.get(ANDROID_VIEW_VISIBLE)); + assertEquals(30, mModel.get(BottomControlsProperties.ANDROID_VIEW_TRANSLATE_Y)); + } + + @Test public void testEdgeToEdge_ObserverDestroyed() { // Set up a mediator with a live EdgeToEdgeController. Activity activity = Robolectric.buildActivity(TestActivity.class).setup().get();
diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/bottom/BottomControlsViewBinder.java b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/bottom/BottomControlsViewBinder.java index db5b0c9..462c9ad 100644 --- a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/bottom/BottomControlsViewBinder.java +++ b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/bottom/BottomControlsViewBinder.java
@@ -9,6 +9,7 @@ import org.chromium.build.annotations.NullMarked; import org.chromium.build.annotations.Nullable; +import org.chromium.chrome.browser.browser_controls.BrowserControlsUtils; import org.chromium.chrome.browser.toolbar.R; import org.chromium.ui.modelutil.PropertyKey; import org.chromium.ui.modelutil.PropertyModel; @@ -57,7 +58,8 @@ final boolean showAndroidView = model.get(BottomControlsProperties.ANDROID_VIEW_VISIBLE); final boolean showCompositedView = - model.get(BottomControlsProperties.COMPOSITED_VIEW_VISIBLE); + model.get(BottomControlsProperties.COMPOSITED_VIEW_VISIBLE) + && !BrowserControlsUtils.isBrowserPositioningControls(); view.root.setVisibility(showAndroidView ? View.VISIBLE : View.INVISIBLE); view.sceneLayer.setIsVisible(showCompositedView); if (!showAndroidView && !showCompositedView) {
diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/bottom/BottomControlsViewBinderTest.java b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/bottom/BottomControlsViewBinderTest.java index 9f677952..5756f4e0 100644 --- a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/bottom/BottomControlsViewBinderTest.java +++ b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/bottom/BottomControlsViewBinderTest.java
@@ -11,6 +11,7 @@ import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.clearInvocations; import static org.mockito.Mockito.never; +import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import android.content.Context; @@ -28,6 +29,8 @@ import org.mockito.junit.MockitoRule; import org.chromium.base.test.BaseRobolectricTestRunner; +import org.chromium.base.test.util.Features.EnableFeatures; +import org.chromium.chrome.browser.flags.ChromeFeatureList; import org.chromium.chrome.browser.toolbar.R; import org.chromium.ui.modelutil.PropertyModel; import org.chromium.ui.modelutil.PropertyModelChangeProcessor; @@ -152,6 +155,19 @@ } @Test + @EnableFeatures(ChromeFeatureList.CONTROLS_IN_BROWSER) + public void testCompositedViewVisible_controlsInBrowser_sceneLayerHidden() { + mModel.set(BottomControlsProperties.COMPOSITED_VIEW_VISIBLE, false); + verify(mSceneLayer).setIsVisible(false); + + // With CIB the browser positions the Android view, so the composited scene layer is never + // shown, even when COMPOSITED_VIEW_VISIBLE is true. + mModel.set(BottomControlsProperties.COMPOSITED_VIEW_VISIBLE, true); + verify(mSceneLayer, times(2)).setIsVisible(false); + verify(mSceneLayer, never()).setIsVisible(true); + } + + @Test public void testAndroidViewVisible_changed() { mModel.set(BottomControlsProperties.ANDROID_VIEW_VISIBLE, false); assertEquals(View.INVISIBLE, mRootView.getVisibility());
diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/TopToolbarOverlayMediator.java b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/TopToolbarOverlayMediator.java index a8e3ea7..998858a 100644 --- a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/TopToolbarOverlayMediator.java +++ b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/TopToolbarOverlayMediator.java
@@ -603,6 +603,11 @@ mModel.set(TopToolbarOverlayProperties.VISIBLE, false); } else if (mIsVisibilityManuallyControlled) { mModel.set(TopToolbarOverlayProperties.VISIBLE, mManualVisibility && mIsOnValidLayout); + } else if (BrowserControlsUtils.isBrowserPositioningControls()) { + // When the browser positions the controls, only the Android toolbar is drawn. The + // toolbar swipe's left and right toolbars have visibility manually controlled, which + // have their visibility set above. + mModel.set(TopToolbarOverlayProperties.VISIBLE, false); } else { // When BCIV is enabled, we want to show the composited view even if the controls are // offscreen, because we want to avoid an additional compositor frame when scrolling
diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/TopToolbarOverlayMediatorTest.java b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/TopToolbarOverlayMediatorTest.java index 2d4b607..b8469ba 100644 --- a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/TopToolbarOverlayMediatorTest.java +++ b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/TopToolbarOverlayMediatorTest.java
@@ -375,6 +375,50 @@ } @Test + @EnableFeatures(ChromeFeatureList.CONTROLS_IN_BROWSER) + public void testUpdateVisibility_controlsInBrowser_hiddenOnValidLayout() { + // The browser positions the controls, so only the Android toolbar is drawn even though the + // overlay is on a valid layout. + assertFalse( + "View should be hidden when the browser positions the controls.", + mModel.get(TopToolbarOverlayProperties.VISIBLE)); + + mLayoutObserverCaptor.getValue().onStartedShowing(LayoutType.BROWSING); + assertFalse( + "View should stay hidden on layout change.", + mModel.get(TopToolbarOverlayProperties.VISIBLE)); + + mTabObserverCaptor.getValue().onContentChanged(mTab); + assertFalse( + "View should stay hidden on content change.", + mModel.get(TopToolbarOverlayProperties.VISIBLE)); + + mSuppressToolbarSceneLayerSupplier.set(true); + mSuppressToolbarSceneLayerSupplier.set(false); + assertFalse( + "View should stay hidden after unsuppressing.", + mModel.get(TopToolbarOverlayProperties.VISIBLE)); + } + + @Test + @EnableFeatures(ChromeFeatureList.CONTROLS_IN_BROWSER) + public void testManualVisibility_controlsInBrowser() { + mMediator.setVisibilityManuallyControlledForTesting(true); + + // Manually controlled overlays (e.g. the toolbar swipe's toolbars) are still drawn. + mMediator.setManualVisibility(true); + assertTrue("View should be visible.", mModel.get(TopToolbarOverlayProperties.VISIBLE)); + + mMediator.setManualVisibility(false); + assertFalse("View should be invisible.", mModel.get(TopToolbarOverlayProperties.VISIBLE)); + + mMediator.setVisibilityManuallyControlledForTesting(false); + assertFalse( + "View should be hidden once no longer manually controlled.", + mModel.get(TopToolbarOverlayProperties.VISIBLE)); + } + + @Test @EnableFeatures(ChromeFeatureList.BROWSER_CONTROLS_HIDING_TOKEN) public void testUpdateVisibility_hasHidingTokens() { when(mTab.isTrustedWebActivity()).thenReturn(true);
diff --git a/chrome/browser/ui/views/autofill/popup/popup_base_view_interactive_uitest.cc b/chrome/browser/ui/views/autofill/popup/popup_base_view_interactive_uitest.cc index 996c97f..dff2a58 100644 --- a/chrome/browser/ui/views/autofill/popup/popup_base_view_interactive_uitest.cc +++ b/chrome/browser/ui/views/autofill/popup/popup_base_view_interactive_uitest.cc
@@ -40,6 +40,7 @@ #include "components/input/native_web_keyboard_event.h" #include "content/public/browser/render_frame_host.h" #include "content/public/browser/render_widget_host.h" +#include "content/public/test/hit_test_region_observer.h" #include "net/dns/mock_host_resolver.h" #include "net/test/embedded_test_server/embedded_test_server.h" #include "net/test/embedded_test_server/http_request.h" @@ -310,6 +311,9 @@ content::ChildFrameAt(web_contents->GetPrimaryMainFrame(), 0); ASSERT_TRUE(subframe); ASSERT_TRUE(subframe->IsCrossProcessSubframe()); + // The OOPIF's renderer drops input while its commits are deferred after + // load, so wait until it has submitted a frame. + content::WaitForHitTestData(subframe); ASSERT_TRUE( content::ExecJs(subframe, "document.getElementById('s').focus();"));
diff --git a/chrome/browser/web_applications/web_app_utils.cc b/chrome/browser/web_applications/web_app_utils.cc index 0599222e..e3cee05a 100644 --- a/chrome/browser/web_applications/web_app_utils.cc +++ b/chrome/browser/web_applications/web_app_utils.cc
@@ -24,6 +24,7 @@ #include "base/files/file_path.h" #include "base/functional/bind.h" #include "base/functional/callback_helpers.h" +#include "base/i18n/unicode_string_util.h" #include "base/memory/weak_ptr.h" #include "base/no_destructor.h" #include "base/notreached.h" @@ -69,8 +70,6 @@ #include "third_party/blink/public/common/safe_url_pattern.h" #include "third_party/blink/public/mojom/manifest/display_mode.mojom-shared.h" #include "third_party/blink/public/mojom/manifest/manifest.mojom-shared.h" -#include "third_party/icu/source/common/unicode/uchar.h" -#include "third_party/icu/source/common/unicode/utf16.h" #include "third_party/liburlpattern/options.h" #include "third_party/liburlpattern/part.h" #include "third_party/liburlpattern/pattern.h" @@ -427,37 +426,19 @@ const std::set<std::string>& extensions) { std::vector<std::u16string> extensions_for_display; extensions_for_display.reserve(extensions.size()); - std::ranges::transform( - extensions, std::back_inserter(extensions_for_display), - [](const std::string& extension) { - if (extension.empty()) { - return std::u16string(); - } - std::u16string ext_u16 = - base::UTF8ToUTF16(base::ToUpperASCII(extension.substr(1))); - std::u16string sanitized; - sanitized.reserve(ext_u16.size()); - for (size_t i = 0; i < ext_u16.length();) { - UChar32 c; - U16_NEXT(ext_u16, i, ext_u16.length(), c); - // TODO(crbug.com/530303003): This check for control and format - // characters is duplicated across manifest parsing, IPC validation, - // and PWA display. Consider consolidating it into a shared helper in - // //base/strings/string_util.h. - if (!base::IsUnicodeControl(c) && u_charType(c) != U_FORMAT_CHAR) { - if (c <= 0xFFFF) { - // Safe to cast UChar32 to char16_t here because the guard ensures - // c is within the BMP (<= 0xFFFF), and Unicode code points are - // non-negative. - sanitized.push_back(static_cast<char16_t>(c)); - } else { - sanitized.push_back(U16_LEAD(c)); - sanitized.push_back(U16_TRAIL(c)); - } - } - } - return sanitized; - }); + std::ranges::transform(extensions, std::back_inserter(extensions_for_display), + [](const std::string& extension) { + if (extension.empty()) { + return std::u16string(); + } + std::u16string ext_u16 = base::UTF8ToUTF16( + std::string_view(extension).substr(1)); + for (char16_t& c : ext_u16) { + c = base::ToUpperASCII(c); + } + base::i18n::RemoveUnicodeControlAndFormat(ext_u16); + return ext_u16; + }); return extensions_for_display; }
diff --git a/chrome/build/android-arm.orderfile.txt b/chrome/build/android-arm.orderfile.txt index 4d22af9..811b7e2 100644 --- a/chrome/build/android-arm.orderfile.txt +++ b/chrome/build/android-arm.orderfile.txt
@@ -1 +1 @@ -pU-WqX3L1IiCGBSS-EuqdQiqr7vztl0q2bqFIwXFSuUC +PNYpyjP-CAxvYWNT_PI0jshvXzZOvnXwtmcf0R7zKY4C
diff --git a/chrome/build/android-arm32.pgo.txt b/chrome/build/android-arm32.pgo.txt index b3024ba..400942f8 100644 --- a/chrome/build/android-arm32.pgo.txt +++ b/chrome/build/android-arm32.pgo.txt
@@ -1 +1 @@ -chrome-android32-main-1795845373-db8faa8913135c8218af8ee41928d0b6a11075a5-d359e9191e39b32edf08bb7d374f942965cfb17a.profdata +chrome-android32-main-1795910333-22a1c18c0751f49a02aeb10711f0516447fdfc6d-ad6fa9b1b851169a2ac9eea4eae597d193bb5e92.profdata
diff --git a/chrome/build/android-arm64.orderfile.txt b/chrome/build/android-arm64.orderfile.txt index e9db7ab..d26371c 100644 --- a/chrome/build/android-arm64.orderfile.txt +++ b/chrome/build/android-arm64.orderfile.txt
@@ -1 +1 @@ -6Ly1MDWD17JUGRlDg43Mapv0ahj3c3yQEfG0ZxkhhNAC +6YYRSViloJflXXPniAJhXBdatHOGAhG7r7tKvVOiboYC
diff --git a/chrome/build/linux.pgo.txt b/chrome/build/linux.pgo.txt index e312eb1..337a316 100644 --- a/chrome/build/linux.pgo.txt +++ b/chrome/build/linux.pgo.txt
@@ -1 +1 @@ -chrome-linux-main-1795737575-840ac5a10b7e6cad18e41a0bd1741c4f4e24a89b-2728cde843af9ed0e7201486745a46e8db963522.profdata +chrome-linux-main-1795888603-88a316b1a4835d7d9daa6c82b18fd109fd516af4-20bae2413dffb784500f739f6b3d56d8b91be4d7.profdata
diff --git a/chrome/build/mac-arm.pgo.txt b/chrome/build/mac-arm.pgo.txt index 8cff592d..2763f91 100644 --- a/chrome/build/mac-arm.pgo.txt +++ b/chrome/build/mac-arm.pgo.txt
@@ -1 +1 @@ -chrome-mac-arm-main-1795859668-87bfccf476e3b2b4a7ae9ffd90da4dbfd4abda7a-b8fdfb310ff042b18ba2082af416a38ef4e7820b.profdata +chrome-mac-arm-main-1795910333-96e28de9f9188f831b412a71c54f1066363f0a2f-ad6fa9b1b851169a2ac9eea4eae597d193bb5e92.profdata
diff --git a/chrome/build/mac.pgo.txt b/chrome/build/mac.pgo.txt index f4d21063..e8dc9869 100644 --- a/chrome/build/mac.pgo.txt +++ b/chrome/build/mac.pgo.txt
@@ -1 +1 @@ -chrome-mac-main-1795845373-4adf6c499b3b8e99ca63ee9817c8cf38eee8e1e6-d359e9191e39b32edf08bb7d374f942965cfb17a.profdata +chrome-mac-main-1795910333-535522f81a1ed73947127f350d19c3428151d1af-ad6fa9b1b851169a2ac9eea4eae597d193bb5e92.profdata
diff --git a/chrome/build/win-arm64.pgo.txt b/chrome/build/win-arm64.pgo.txt index 63fa142..f01741bd 100644 --- a/chrome/build/win-arm64.pgo.txt +++ b/chrome/build/win-arm64.pgo.txt
@@ -1 +1 @@ -chrome-win-arm64-main-1795845373-7dc322220c473076a8cd7f1a1f8c60ca5b659685-d359e9191e39b32edf08bb7d374f942965cfb17a.profdata +chrome-win-arm64-main-1795910333-31f2238c5af47d45283794ede17244eb71ce34b4-ad6fa9b1b851169a2ac9eea4eae597d193bb5e92.profdata
diff --git a/chrome/build/win32.pgo.txt b/chrome/build/win32.pgo.txt index f3f1efd..eff78d46 100644 --- a/chrome/build/win32.pgo.txt +++ b/chrome/build/win32.pgo.txt
@@ -1 +1 @@ -chrome-win32-main-1795845373-05aa3b45cc82a6b85bcf908c1ad2ae28844b554f-d359e9191e39b32edf08bb7d374f942965cfb17a.profdata +chrome-win32-main-1795899104-71fe9e71958ec120b50dcce217ace4aad6449da1-f7ee03b1324dcd48577f88b3009fe833c8a31d42.profdata
diff --git a/chrome/build/win64.pgo.txt b/chrome/build/win64.pgo.txt index 5bc012a2..74e7d44f 100644 --- a/chrome/build/win64.pgo.txt +++ b/chrome/build/win64.pgo.txt
@@ -1 +1 @@ -chrome-win64-main-1795845373-9669f0c3cd65cbb23c6be30c2dc98fab021711e8-d359e9191e39b32edf08bb7d374f942965cfb17a.profdata +chrome-win64-main-1795899104-e5b61d05e15446ad0fec53a602e5c2f1c5686b6a-f7ee03b1324dcd48577f88b3009fe833c8a31d42.profdata
diff --git a/chromeos/CHROMEOS_LKGM b/chromeos/CHROMEOS_LKGM index e09881b..f37e820 100644 --- a/chromeos/CHROMEOS_LKGM +++ b/chromeos/CHROMEOS_LKGM
@@ -1 +1 @@ -16902.0.0-1081997 \ No newline at end of file +16903.0.0-1082014 \ No newline at end of file
diff --git a/chromeos/profiles/arm.afdo.newest.txt b/chromeos/profiles/arm.afdo.newest.txt index 3a09189..d7ed5c37 100644 --- a/chromeos/profiles/arm.afdo.newest.txt +++ b/chromeos/profiles/arm.afdo.newest.txt
@@ -1 +1 @@ -chromeos-chrome-arm-none-160-8169.0-1795404614-benchmark-160.0.8186.0_pre1755623-r1-redacted.afdo.xz +chromeos-chrome-arm-none-160-8169.0-1795404614-benchmark-160.0.8189.0_pre1756735-r1-redacted.afdo.xz
diff --git a/clank b/clank index 8eef42f..008d4b3 160000 --- a/clank +++ b/clank
@@ -1 +1 @@ -Subproject commit 8eef42fbc57942f2a7815a05dfa59d678ebbfd48 +Subproject commit 008d4b34e9bd04c6b0ce0502cc97e98293f0ef45
diff --git a/components/autofill/core/browser/metrics/cross_tab_copy_paste_tracker.cc b/components/autofill/core/browser/metrics/cross_tab_copy_paste_tracker.cc index be7609b..bc70143 100644 --- a/components/autofill/core/browser/metrics/cross_tab_copy_paste_tracker.cc +++ b/components/autofill/core/browser/metrics/cross_tab_copy_paste_tracker.cc
@@ -4,11 +4,9 @@ #include "components/autofill/core/browser/metrics/cross_tab_copy_paste_tracker.h" -#include "base/feature_list.h" #include "base/hash/hash.h" #include "base/rand_util.h" #include "base/time/time.h" -#include "components/autofill/core/common/autofill_features.h" #include "components/sessions/core/session_id.h" #include "services/metrics/public/cpp/ukm_builders.h" #include "services/metrics/public/cpp/ukm_source_id.h" @@ -18,9 +16,6 @@ namespace { -// Maximum duration between copy and paste in a valid sequence for the promo. -constexpr base::TimeDelta kPromoSequenceDuration = base::Seconds(60); - // Maximum duration between copy and paste in a valid sequence for UKM logging. constexpr base::TimeDelta kUkmLoggingSequenceDuration = base::Minutes(10); @@ -39,15 +34,9 @@ if (base::FastHash(base::as_byte_span(text)) != last_copy.hash) { return; } - if (base::FeatureList::IsEnabled(features::kAutofillAtMemory)) { - ukm::builders::Clipboard_CopyPasteEvent_WithAtMemory(source_id) - .SetPasteFromTabNonce(last_copy.nonce) - .Record(ukm::UkmRecorder::Get()); - } else { - ukm::builders::Clipboard_CopyPasteEvent(source_id) - .SetPasteFromTabNonce(last_copy.nonce) - .Record(ukm::UkmRecorder::Get()); - } + ukm::builders::Clipboard_CopyPasteEvent(source_id) + .SetPasteFromTabNonce(last_copy.nonce) + .Record(ukm::UkmRecorder::Get()); } void CrossTabCopyPasteTracker::Shutdown() { @@ -59,31 +48,23 @@ ukm::SourceId source_id) { last_copy_.emplace(base::TimeTicks::Now(), content_hash, static_cast<int64_t>(base::RandUint64()), tab_id); - if (base::FeatureList::IsEnabled(features::kAutofillAtMemory)) { - ukm::builders::Clipboard_CopyPasteEvent_WithAtMemory(source_id) - .SetCopyFromTabNonce(last_copy_->nonce) - .Record(ukm::UkmRecorder::Get()); - } else { - ukm::builders::Clipboard_CopyPasteEvent(source_id) - .SetCopyFromTabNonce(last_copy_->nonce) - .Record(ukm::UkmRecorder::Get()); - } + ukm::builders::Clipboard_CopyPasteEvent(source_id) + .SetCopyFromTabNonce(last_copy_->nonce) + .Record(ukm::UkmRecorder::Get()); } -bool CrossTabCopyPasteTracker::OnPaste(SessionID tab_id, +void CrossTabCopyPasteTracker::OnPaste(SessionID tab_id, ukm::SourceId source_id) { if (!last_copy_.has_value()) { - return false; + return; } const bool is_different_tab = last_copy_->tab_id != tab_id; - const bool is_recent_for_promo = - (base::TimeTicks::Now() - last_copy_->time) <= kPromoSequenceDuration; + if (!is_different_tab) { + return; + } const bool is_recent_for_ukm = (base::TimeTicks::Now() - last_copy_->time) <= kUkmLoggingSequenceDuration; - if (!is_different_tab) { - return false; - } if (is_recent_for_ukm) { ui::Clipboard::GetForCurrentThread()->ReadText( ui::ClipboardBuffer::kCopyPaste, @@ -93,7 +74,6 @@ *last_copy_, source_id)); } last_copy_.reset(); - return is_recent_for_promo; } } // namespace autofill
diff --git a/components/autofill/core/browser/metrics/cross_tab_copy_paste_tracker.h b/components/autofill/core/browser/metrics/cross_tab_copy_paste_tracker.h index 8eb61cfb..6e7bc2c0 100644 --- a/components/autofill/core/browser/metrics/cross_tab_copy_paste_tracker.h +++ b/components/autofill/core/browser/metrics/cross_tab_copy_paste_tracker.h
@@ -28,9 +28,9 @@ // Records a copy action. void OnCopy(SessionID tab_id, size_t content_hash, ukm::SourceId source_id); - // Records a paste action and returns true if it completes a valid sequence - // (Paste in a different tab than the copy, within the time limit). - bool OnPaste(SessionID tab_id, ukm::SourceId source_id); + // Records a paste action and logs a UKM event if it completes a valid + // cross-tab copy-paste sequence within the time limit. + void OnPaste(SessionID tab_id, ukm::SourceId source_id); private: // Stores metadata about a clipboard copy event, which is used to correlate
diff --git a/components/autofill/core/browser/metrics/cross_tab_copy_paste_tracker_unittest.cc b/components/autofill/core/browser/metrics/cross_tab_copy_paste_tracker_unittest.cc index cc12bd7f..247b1c9 100644 --- a/components/autofill/core/browser/metrics/cross_tab_copy_paste_tracker_unittest.cc +++ b/components/autofill/core/browser/metrics/cross_tab_copy_paste_tracker_unittest.cc
@@ -4,15 +4,21 @@ #include "components/autofill/core/browser/metrics/cross_tab_copy_paste_tracker.h" +#include <cstddef> +#include <cstdint> +#include <string> + +#include "base/containers/span.h" #include "base/hash/hash.h" -#include "base/test/scoped_feature_list.h" #include "base/test/task_environment.h" -#include "components/autofill/core/common/autofill_features.h" +#include "base/time/time.h" #include "components/sessions/core/session_id.h" #include "components/ukm/test_ukm_recorder.h" #include "services/metrics/public/cpp/ukm_builders.h" +#include "services/metrics/public/cpp/ukm_source_id.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" +#include "ui/base/clipboard/clipboard_buffer.h" #include "ui/base/clipboard/scoped_clipboard_writer.h" #include "ui/base/clipboard/test/test_clipboard.h" @@ -30,6 +36,11 @@ ui::TestClipboard::DestroyClipboardForCurrentThread(); } + void WriteToClipboard(const std::u16string& text) { + ui::ScopedClipboardWriter writer(ui::ClipboardBuffer::kCopyPaste); + writer.WriteText(text); + } + base::test::TaskEnvironment task_environment_{ base::test::TaskEnvironment::TimeSource::MOCK_TIME}; CrossTabCopyPasteTracker tracker_; @@ -37,52 +48,84 @@ SessionID tab2_ = SessionID::FromSerializedValue(2); }; -TEST_F(CrossTabCopyPasteTrackerTest, ValidSequenceTriggers) { - tracker_.OnCopy(tab1_, /*content_hash=*/0, ukm::AssignNewSourceId()); - EXPECT_TRUE(tracker_.OnPaste(tab2_, ukm::AssignNewSourceId())); +TEST_F(CrossTabCopyPasteTrackerTest, SameTabDoesNotRecordPasteUkm) { + ukm::TestAutoSetUkmRecorder ukm_recorder; + const std::u16string text = u"Test text"; + WriteToClipboard(text); + + tracker_.OnCopy(tab1_, base::FastHash(base::as_byte_span(text)), + ukm::AssignNewSourceId()); + tracker_.OnPaste(tab1_, ukm::AssignNewSourceId()); + + // Only the copy event should be recorded. + EXPECT_THAT(ukm_recorder.GetEntriesByName( + ukm::builders::Clipboard_CopyPasteEvent::kEntryName), + SizeIs(1)); } -TEST_F(CrossTabCopyPasteTrackerTest, SameTabDoesNotTrigger) { - tracker_.OnCopy(tab1_, /*content_hash=*/0, ukm::AssignNewSourceId()); - EXPECT_FALSE(tracker_.OnPaste(tab1_, ukm::AssignNewSourceId())); -} +TEST_F(CrossTabCopyPasteTrackerTest, SequenceTooSlowDoesNotRecordPasteUkm) { + ukm::TestAutoSetUkmRecorder ukm_recorder; + const std::u16string text = u"Test text"; + WriteToClipboard(text); -TEST_F(CrossTabCopyPasteTrackerTest, SequenceTooSlow) { - tracker_.OnCopy(tab1_, /*content_hash=*/0, ukm::AssignNewSourceId()); - task_environment_.FastForwardBy(base::Seconds(61)); - EXPECT_FALSE(tracker_.OnPaste(tab2_, ukm::AssignNewSourceId())); + tracker_.OnCopy(tab1_, base::FastHash(base::as_byte_span(text)), + ukm::AssignNewSourceId()); + task_environment_.FastForwardBy(base::Minutes(11)); + tracker_.OnPaste(tab2_, ukm::AssignNewSourceId()); + + // Only the copy event should be recorded. + EXPECT_THAT(ukm_recorder.GetEntriesByName( + ukm::builders::Clipboard_CopyPasteEvent::kEntryName), + SizeIs(1)); } TEST_F(CrossTabCopyPasteTrackerTest, NewCopyResetsTimer) { - tracker_.OnCopy(tab1_, /*content_hash=*/0, ukm::AssignNewSourceId()); - task_environment_.FastForwardBy(base::Seconds(61)); - tracker_.OnCopy(tab1_, /*content_hash=*/0, ukm::AssignNewSourceId()); - EXPECT_TRUE(tracker_.OnPaste(tab2_, ukm::AssignNewSourceId())); + ukm::TestAutoSetUkmRecorder ukm_recorder; + const std::u16string text = u"Test text"; + const size_t content_hash = base::FastHash(base::as_byte_span(text)); + WriteToClipboard(text); + + tracker_.OnCopy(tab1_, content_hash, ukm::AssignNewSourceId()); + task_environment_.FastForwardBy(base::Minutes(11)); + tracker_.OnCopy(tab1_, content_hash, ukm::AssignNewSourceId()); + tracker_.OnPaste(tab2_, ukm::AssignNewSourceId()); + + // Two copy events plus one paste event matching the second copy should be + // recorded. + auto entries = ukm_recorder.GetEntriesByName( + ukm::builders::Clipboard_CopyPasteEvent::kEntryName); + ASSERT_THAT(entries, SizeIs(3)); + const int64_t* second_copy_nonce = + ukm::TestAutoSetUkmRecorder::GetEntryMetric( + entries[1], + ukm::builders::Clipboard_CopyPasteEvent::kCopyFromTabNonceName); + const int64_t* paste_nonce = ukm::TestAutoSetUkmRecorder::GetEntryMetric( + entries[2], + ukm::builders::Clipboard_CopyPasteEvent::kPasteFromTabNonceName); + ASSERT_NE(second_copy_nonce, nullptr); + ASSERT_NE(paste_nonce, nullptr); + EXPECT_EQ(*second_copy_nonce, *paste_nonce); } -TEST_F(CrossTabCopyPasteTrackerTest, PasteWithoutCopyFails) { - EXPECT_FALSE(tracker_.OnPaste(tab2_, ukm::AssignNewSourceId())); +TEST_F(CrossTabCopyPasteTrackerTest, PasteWithoutCopyDoesNotRecordUkm) { + ukm::TestAutoSetUkmRecorder ukm_recorder; + tracker_.OnPaste(tab2_, ukm::AssignNewSourceId()); + + EXPECT_THAT(ukm_recorder.GetEntriesByName( + ukm::builders::Clipboard_CopyPasteEvent::kEntryName), + IsEmpty()); } // Verifies that a valid copy-paste sequence records the `CopyFromTabNonce` -// UKM metric on copy and the matching `PasteFromTabNonce` UKM metric on paste -// for Clipboard.CopyPasteEvent when AtMemory is not enabled. -TEST_F(CrossTabCopyPasteTrackerTest, - RecordsCopyPasteUkmMetric_WithoutAtMemory) { - base::test::ScopedFeatureList feature_list; - feature_list.InitAndDisableFeature(features::kAutofillAtMemory); - +// UKM metric on copy and the matching `PasteFromTabNonce` UKM metric on paste. +TEST_F(CrossTabCopyPasteTrackerTest, RecordsCopyPasteUkmMetric) { ukm::TestAutoSetUkmRecorder ukm_recorder; const std::u16string text = u"Test text copied to clipboard"; const ukm::SourceId copy_source_id = ukm::AssignNewSourceId(); const ukm::SourceId paste_source_id = ukm::AssignNewSourceId(); const size_t content_hash = base::FastHash(base::as_byte_span(text)); - // Write the copied text to the clipboard so that OnPaste can read it. - { - ui::ScopedClipboardWriter writer(ui::ClipboardBuffer::kCopyPaste); - writer.WriteText(text); - } + WriteToClipboard(text); // 1. Trigger copy to clipboard. tracker_.OnCopy(tab1_, content_hash, copy_source_id); @@ -107,10 +150,7 @@ } // 2. Trigger paste in a different tab. - EXPECT_TRUE(tracker_.OnPaste(tab2_, paste_source_id)); - - // Flush the task environment so the async clipboard callback runs. - task_environment_.RunUntilIdle(); + tracker_.OnPaste(tab2_, paste_source_id); // Verify a second UKM Copy Event was recorded (associated with the paste). entries = ukm_recorder.GetEntriesByName( @@ -123,76 +163,6 @@ ukm::builders::Clipboard_CopyPasteEvent::kPasteFromTabNonceName); ASSERT_NE(paste_nonce, nullptr); EXPECT_EQ(*copy_nonce, *paste_nonce); - - // Verify that WithAtMemory event was NOT recorded. - EXPECT_THAT( - ukm_recorder.GetEntriesByName( - ukm::builders::Clipboard_CopyPasteEvent_WithAtMemory::kEntryName), - IsEmpty()); -} - -// Verifies that a valid copy-paste sequence records the `CopyFromTabNonce` -// UKM metric on copy and the matching `PasteFromTabNonce` UKM metric on paste -// for Clipboard.CopyPasteEvent.WithAtMemory when AtMemory is enabled. -TEST_F(CrossTabCopyPasteTrackerTest, RecordsCopyPasteUkmMetric_WithAtMemory) { - base::test::ScopedFeatureList feature_list(features::kAutofillAtMemory); - - ukm::TestAutoSetUkmRecorder ukm_recorder; - const std::u16string text = u"Test text copied to clipboard"; - const ukm::SourceId copy_source_id = ukm::AssignNewSourceId(); - const ukm::SourceId paste_source_id = ukm::AssignNewSourceId(); - const size_t content_hash = base::FastHash(base::as_byte_span(text)); - - // Write the copied text to the clipboard so that OnPaste can read it. - { - ui::ScopedClipboardWriter writer(ui::ClipboardBuffer::kCopyPaste); - writer.WriteText(text); - } - - // 1. Trigger copy to clipboard. - tracker_.OnCopy(tab1_, content_hash, copy_source_id); - - // Verify UKM Copy Event was recorded for WithAtMemory. - auto entries = ukm_recorder.GetEntriesByName( - ukm::builders::Clipboard_CopyPasteEvent_WithAtMemory::kEntryName); - ASSERT_THAT(entries, SizeIs(1)); - - // Verify the CopyFromTabNonce metric exists and is non-zero. - const int64_t* copy_nonce = ukm::TestAutoSetUkmRecorder::GetEntryMetric( - entries[0], ukm::builders::Clipboard_CopyPasteEvent_WithAtMemory:: - kCopyFromTabNonceName); - ASSERT_NE(copy_nonce, nullptr); - - // Verify the PasteFromTabNonce metric does not exist yet. - { - const int64_t* paste_nonce = ukm::TestAutoSetUkmRecorder::GetEntryMetric( - entries[0], ukm::builders::Clipboard_CopyPasteEvent_WithAtMemory:: - kPasteFromTabNonceName); - ASSERT_EQ(paste_nonce, nullptr); - } - - // 2. Trigger paste in a different tab. - EXPECT_TRUE(tracker_.OnPaste(tab2_, paste_source_id)); - - // Flush the task environment so the async clipboard callback runs. - task_environment_.RunUntilIdle(); - - // Verify a second UKM Copy Event was recorded (associated with the paste). - entries = ukm_recorder.GetEntriesByName( - ukm::builders::Clipboard_CopyPasteEvent_WithAtMemory::kEntryName); - ASSERT_THAT(entries, SizeIs(2)); - - // Verify the PasteFromTabNonce metric exists and both nonces match. - const int64_t* paste_nonce = ukm::TestAutoSetUkmRecorder::GetEntryMetric( - entries[1], ukm::builders::Clipboard_CopyPasteEvent_WithAtMemory:: - kPasteFromTabNonceName); - ASSERT_NE(paste_nonce, nullptr); - EXPECT_EQ(*copy_nonce, *paste_nonce); - - // Verify that the standard Clipboard.CopyPasteEvent was NOT recorded. - EXPECT_THAT(ukm_recorder.GetEntriesByName( - ukm::builders::Clipboard_CopyPasteEvent::kEntryName), - IsEmpty()); } } // namespace
diff --git a/components/browser_ui/strings/android/translations/browser_ui_strings_cy.xtb b/components/browser_ui/strings/android/translations/browser_ui_strings_cy.xtb index 77549ca..a991dbc 100644 --- a/components/browser_ui/strings/android/translations/browser_ui_strings_cy.xtb +++ b/components/browser_ui/strings/android/translations/browser_ui_strings_cy.xtb
@@ -31,6 +31,7 @@ <translation id="1321110954513621549">Caniateir • Lleoliad bras</translation> <translation id="1323433172918577554">Dangos Rhagor</translation> <translation id="1333965224356556482">Peidio â chaniatáu i wefannau weld eich lleoliad</translation> +<translation id="1352358548984352201">Ychwanegu tabiau, lluniau a rhagor fel cyd-destun i wella'ch chwiliad</translation> <translation id="1369915414381695676">Mae'r wefan <ph name="SITE_NAME" /> wedi'i hychwanegu</translation> <translation id="1371239764779356792">Caniatáu gwefan i gadw data ar eich dyfais</translation> <translation id="1383876407941801731">Chwilio</translation> @@ -87,6 +88,7 @@ <translation id="1848033246551405023">Ffont Sans Serif</translation> <translation id="1861244985839668297">Pan fydd wedi'i droi ymlaen, gall gwefannau ofyn am ddefnyddio dyfeisiau HID. Pan fydd wedi'i ddiffodd, ni all gwefannau ddefnyddio dyfeisiau HID.</translation> <translation id="1861262398884155592">Mae'r ffolder hon yn wag</translation> +<translation id="1871213582159462941">Gofyn am dudalen neu lun</translation> <translation id="1881806992065048905">Ymddangosiad tudalen tab newydd y ddalen waelod</translation> <translation id="1887786770086287077">Mae mynediad lleoliad wedi'i ddiffodd ar gyfer y ddyfais hon. Trowch ef ymlaen yn <ph name="BEGIN_LINK" />Gosodiadau Android<ph name="END_LINK" />.</translation> <translation id="1906181697255754968">Mae gwefannau fel arfer yn cyrchu ffeiliau a ffolderi ar eich dyfais ar gyfer nodweddion megis cadw eich gwaith yn awtomatig</translation>
diff --git a/components/browser_ui/strings/android/translations/browser_ui_strings_mn.xtb b/components/browser_ui/strings/android/translations/browser_ui_strings_mn.xtb index 1750c34..4abe0e7 100644 --- a/components/browser_ui/strings/android/translations/browser_ui_strings_mn.xtb +++ b/components/browser_ui/strings/android/translations/browser_ui_strings_mn.xtb
@@ -31,6 +31,7 @@ <translation id="1321110954513621549">Зөвшөөрсөн • Барагцаалсан</translation> <translation id="1323433172918577554">Дэлгэрэнгүй харуулах</translation> <translation id="1333965224356556482">Сайтуудад таны байршлыг харахыг бүү зөвшөөр</translation> +<translation id="1352358548984352201">Хайлтаа сайжруулахын тулд хам сэдэв болгож таб, зураг болон бусад зүйлийг нэмнэ үү</translation> <translation id="1369915414381695676">Сайт <ph name="SITE_NAME" /> нэмсэн</translation> <translation id="1371239764779356792">Сайтад таны төхөөрөмжид өгөгдөл хадгалахыг зөвшөөрөх</translation> <translation id="1383876407941801731">Хайлт</translation> @@ -87,6 +88,7 @@ <translation id="1848033246551405023">Санс сериф фонт</translation> <translation id="1861244985839668297">Асаалттай байхад сайтууд HID төхөөрөмжийг ашиглахыг хүсэж болно. Унтраалттай байхад сайтууд HID төхөөрөмжийг ашиглах боломжгүй.</translation> <translation id="1861262398884155592">Энэ фолдер хоосон байна</translation> +<translation id="1871213582159462941">Хуудас, зургийн талаар асуух</translation> <translation id="1881806992065048905">Шинэ таб хуудасны харагдах байдлын доод хүснэгт</translation> <translation id="1887786770086287077">Байршлын хандалт энэ төхөөрөмжид унтраалттай байна. Үүнийг <ph name="BEGIN_LINK" />Андройдын тохиргоо<ph name="END_LINK" /> хэсэгт асаана уу.</translation> <translation id="1906181697255754968">Сайтууд ихэвчлэн таны ажлыг автоматаар хадгалах зэрэг онцлогуудад зориулж таны төхөөрөмж дээрх файл болон фолдерт ханддаг</translation>
diff --git a/components/certificate_transparency/data/log_list.json b/components/certificate_transparency/data/log_list.json index 938dd9c5..d09f821 100644 --- a/components/certificate_transparency/data/log_list.json +++ b/components/certificate_transparency/data/log_list.json
@@ -1,6 +1,6 @@ { - "version": "98.8", - "log_list_timestamp": "2026-11-27T13:36:38Z", + "version": "98.9", + "log_list_timestamp": "2026-11-28T13:35:39Z", "operators": [ { "name": "Google",
diff --git a/components/input/passthrough_touch_event_queue.cc b/components/input/passthrough_touch_event_queue.cc index d8f99948..30e05ac 100644 --- a/components/input/passthrough_touch_event_queue.cc +++ b/components/input/passthrough_touch_event_queue.cc
@@ -137,7 +137,7 @@ WebInputEvent::Type::kTouchScrollStarted, WebInputEvent::kNoModifiers, ui::EventTimeForNow(), LatencyInfo()); touch.event.dispatch_type = WebInputEvent::DispatchType::kEventNonBlocking; - touch.event.unique_touch_event_id = ui::GetNextTouchEventId(); + touch.event.unique_touch_event_id = ui::GetNextEventId(); { ScopedDispatchToRendererCallback dispatch_callback( client_->GetDispatchToRendererCallback());
diff --git a/components/input/passthrough_touch_event_queue_unittest.cc b/components/input/passthrough_touch_event_queue_unittest.cc index d04eca9..af1c74b 100644 --- a/components/input/passthrough_touch_event_queue_unittest.cc +++ b/components/input/passthrough_touch_event_queue_unittest.cc
@@ -828,7 +828,7 @@ ui::EventTimeForNow()); followup_event.touches_length = 1; followup_event.touches[0].id = 0; - followup_event.unique_touch_event_id = ui::GetNextTouchEventId(); + followup_event.unique_touch_event_id = ui::GetNextEventId(); followup_event.touches[0].state = WebTouchPoint::State::kStateMoved; SetFollowupEvent(followup_event); SetSyncAckResult(blink::mojom::InputEventResultState::kConsumed);
diff --git a/components/input/web_input_event_builders_ios.mm b/components/input/web_input_event_builders_ios.mm index f2fc462c..b14ecfe 100644 --- a/components/input/web_input_event_builders_ios.mm +++ b/components/input/web_input_event_builders_ios.mm
@@ -328,7 +328,7 @@ ? blink::WebInputEvent::DispatchType::kEventNonBlocking : blink::WebInputEvent::DispatchType::kBlocking; result.hovering = type == blink::WebInputEvent::Type::kTouchEnd; - result.unique_touch_event_id = ui::GetNextTouchEventId(); + result.unique_touch_event_id = ui::GetNextEventId(); size_t touch_index = 0; if (type == blink::WebInputEvent::Type::kTouchStart) {
diff --git a/components/input/web_input_event_builders_mac.mm b/components/input/web_input_event_builders_mac.mm index 79f42d456..670e144 100644 --- a/components/input/web_input_event_builders_mac.mm +++ b/components/input/web_input_event_builders_mac.mm
@@ -691,7 +691,7 @@ ui::EventTimeStampFromSeconds([event timestamp])); ui::ComputeEventLatencyOS(base::apple::OwnedNSEvent(event)); result.hovering = event_type == blink::WebInputEvent::Type::kTouchEnd; - result.unique_touch_event_id = ui::GetNextTouchEventId(); + result.unique_touch_event_id = ui::GetNextEventId(); result.touches_length = 1; EventLocationInfo info = GetWebEventLocationForEventInView(event, view);
diff --git a/components/strings/components_strings_cy.xtb b/components/strings/components_strings_cy.xtb index 194c858..da3dbab 100644 --- a/components/strings/components_strings_cy.xtb +++ b/components/strings/components_strings_cy.xtb
@@ -78,6 +78,7 @@ <translation id="1131264053432022307">Llun y gwnaethoch ei gopïo</translation> <translation id="1132735979845538847"><ph name="ORIGIN" /> – I adael y sgrîn lawn, llusgwch o'r brig a chyffwrdd â'r botwm yn ôl</translation> <translation id="1132789342529761192">Ni argymhellir uwchlwytho</translation> +<translation id="1136582904187541177"><ph name="ITEM_LABEL" />, wedi'i dicio, eitem dewislen. Dewiswch i ddiffodd rhannu</translation> <translation id="11370190534773372">Manylion cerdyn wedi'u llenwi</translation> <translation id="1138458427267715730">Cael rhybuddion pan fydd y pris yn gostwng ar unrhyw wefan ar draws y we</translation> <translation id="1142713751288681188">Math o bapur</translation> @@ -928,6 +929,7 @@ <translation id="2526062290525841862">I redeg yr ap hwn, ail-alluogwch y Modd Datblygwr Ap Gwe Ynysig</translation> <translation id="2526280916094749336">Gallwch ddefnyddio cyfeiriadau sydd wedi'u cadw ar draws cynhyrchion Google. Bydd y cyfeiriad hwn yn cael ei gadw yn eich Cyfrif Google, <ph name="ACCOUNT" />.</translation> <translation id="2527451058878391043">Mae eich CVC ar flaen eich cerdyn. Dyma'r cod 4 digid ar y dde uchaf, uwchben rhif eich cerdyn.</translation> +<translation id="2527614414460013324"><ph name="ITEM_LABEL" />, wedi'i dicio</translation> <translation id="2529899080962247600">Ni ddylai'r maes hwn gynnwys mwy na <ph name="MAX_ITEMS_LIMIT" /> o gofnodion. Bydd pob cofnod arall yn cael ei anwybyddu.</translation> <translation id="2530042584066815841">Clo llygoden a defnydd</translation> <translation id="2535585790302968248">Agor tab Anhysbys newydd i bori'n breifat</translation> @@ -1012,6 +1014,7 @@ <translation id="2666092431469916601">Brig</translation> <translation id="2666117266261740852">Caewch dabiau neu apiau eraill</translation> <translation id="266935134738038806">Mynd i'r wefan</translation> +<translation id="2670682833829583790"><ph name="ITEM_LABEL" />, eitem dewislen. Dewiswch i droi rhannu ymlaen</translation> <translation id="2672201172023654893">Nid yw eich porwr yn cael ei reoli.</translation> <translation id="2674170444375937751">Ydych chi'n siŵr eich bod chi am ddileu'r tudalennau hyn o'ch hanes?</translation> <translation id="2675716371350192683">Ni fydd eich cynnwys yn cael ei ddefnyddio i wella AI. Gall eich sefydliad newid y gosodiadau hyn unrhyw bryd.</translation> @@ -1991,6 +1994,7 @@ <translation id="4297502707443874121">Mân-lun ar gyfer tudalen <ph name="THUMBNAIL_PAGE" /></translation> <translation id="4297937944457164390">Diweddarwyd <ph name="ATTRIBUTE_NAME" /></translation> <translation id="4298148761711700950">Talu ar unwaith heb uwchlwytho QR</translation> +<translation id="4298297436255194165"><ph name="WEEKDAY" /> • <ph name="DATE" /></translation> <translation id="4298925811540301889">Mae cwcis ar gyfer y wefan hon yn cael eu cysoni ar draws eich dyfeisiau ChromeOS. I reoli'r hyn rydych yn ei gysoni, ewch i <ph name="SYNC_SETTINGS" />.</translation> <translation id="4299360487321267760">Ffynhonnell <ph name="APP_NAME" /> <ph name="SOURCE_INDEX" /></translation> <translation id="4299919199185766032">Mae enw'r llwybr byr yn fwy na'r hyd mwyaf a ganiateir o <ph name="MAX_LENGTH" /> nod.</translation> @@ -2200,6 +2204,7 @@ <translation id="4682496302933121474">Cyfieithu'r dudalen?</translation> <translation id="468314109939257734">Gweld rhif eich cerdyn rhithwir</translation> <translation id="4686942373615810936">Newydd ei greu</translation> +<translation id="468826602575103388">Dewiswch i ddiffodd rhannu</translation> <translation id="4690205240253392065">Dewiswch ddarparwr talu'n ddiweddarach</translation> <translation id="469028408546145398">Botwm cau ffenestri Anhysbys, gweithredwch i gau pob ffenestr Anhysbys sydd ar agor ar hyn o bryd</translation> <translation id="4692623383562244444">Peiriant chwilio</translation> @@ -4170,6 +4175,7 @@ <translation id="7942349550061667556">Coch</translation> <translation id="7943397946612013052">Lawrlwytho wedi'i rwystro</translation> <translation id="7943893128817522649">Yn gallu gofyn am lawrlwytho mwy nag un ffeil yn awtomatig</translation> +<translation id="7947144323420971076">Dewiswch i droi rhannu ymlaen</translation> <translation id="7947285636476623132">Gwiriwch eich blwyddyn darfod a rhowch gynnig arall arni</translation> <translation id="7947813448670013867"><ph name="SEE_CHROME_TIPS_FOCUSED_FRIENDLY_MATCH_TEXT" />, pwyswch Tab yna Enter i ddysgu am nodweddion Chrome</translation> <translation id="7947964969544524438">Cadw'r Rhif Teithiwr Hysbys yn ddiogel</translation> @@ -4297,6 +4303,7 @@ <translation id="8172809706700703589">Creu rhestr pacio ar gyfer fy nhaith</translation> <translation id="8174047975335711832">Gwybodaeth am y ddyfais</translation> <translation id="8175053171643471349">Rheoli cardiau teyrngarwch</translation> +<translation id="817536628389054635">Manylion cyswllt wedi'u llenwi: <ph name="FILLED_TYPES" /></translation> <translation id="8175796834047840627">Mae Chrome yn cynnig cadw eich cardiau yn eich Cyfrif Google oherwydd eich bod wedi mewngofnodi. Gallwch newid yr ymddygiad hwn yn y gosodiadau.</translation> <translation id="8176440868214972690">Mae gweinyddwr y ddyfais hon wedi anfon rhywfaint o wybodaeth at y gwefannau canlynol, megis gosodiadau neu bolisïau.</translation> <translation id="818254048113802060">{0,plural, =1{Cafodd <ph name="FILE_NAME" /> ei rhwystro oherwydd y cynnwys}zero{Cafodd <ph name="FILE_COUNT" /> ffeil eu rhwystro oherwydd y cynnwys}two{Cafodd <ph name="FILE_COUNT" /> ffeil eu rhwystro oherwydd y cynnwys}few{Cafodd <ph name="FILE_COUNT" /> ffeil eu rhwystro oherwydd y cynnwys}many{Cafodd <ph name="FILE_COUNT" /> ffeil eu rhwystro oherwydd y cynnwys}other{Cafodd <ph name="FILE_COUNT" /> ffeil eu rhwystro oherwydd y cynnwys}}</translation>
diff --git a/components/strings/components_strings_ms.xtb b/components/strings/components_strings_ms.xtb index 36175be..17d0dcd 100644 --- a/components/strings/components_strings_ms.xtb +++ b/components/strings/components_strings_ms.xtb
@@ -4584,6 +4584,7 @@ <translation id="8663226718884576429">Ringkasan Pesanan, <ph name="TOTAL_LABEL" />, Butiran Lanjut</translation> <translation id="8663909737634214500">Cakera Optik</translation> <translation id="8664326323360157684">Padamkan data semakan imbas...</translation> +<translation id="8671317591140346153">Semua penyemakan imbas</translation> <translation id="8671519637524426245">Nilai <ph name="SECURE_DNS_SALT" /> tidak memenuhi keperluan saiz.</translation> <translation id="867224526087042813">Tandatangan</translation> <translation id="8675446170353411473">Fail anda sedang dimuat naik kepada <ph name="CLOUD_PROVIDER" /></translation>
diff --git a/content/browser/devtools/protocol/input_handler.cc b/content/browser/devtools/protocol/input_handler.cc index 68e4cb1c..7332a44 100644 --- a/content/browser/devtools/protocol/input_handler.cc +++ b/content/browser/devtools/protocol/input_handler.cc
@@ -1819,7 +1819,7 @@ ? blink::WebInputEvent::DispatchType::kEventNonBlocking : blink::WebInputEvent::DispatchType::kBlocking; event.moved_beyond_slop_region = true; - event.unique_touch_event_id = ui::GetNextTouchEventId(); + event.unique_touch_event_id = ui::GetNextEventId(); for (unsigned j = 0; j < event.touches_length; j++) { event.touches[j].SetPositionInWidget( event.touches[j].PositionInWidget() + delta_to_root);
diff --git a/content/browser/renderer_host/input/compositor_event_ack_browsertest.cc b/content/browser/renderer_host/input/compositor_event_ack_browsertest.cc index 38a945b3..1acf107b 100644 --- a/content/browser/renderer_host/input/compositor_event_ack_browsertest.cc +++ b/content/browser/renderer_host/input/compositor_event_ack_browsertest.cc
@@ -343,7 +343,7 @@ // TODO(wjmaclean): Figure out why we can send two touch events with the same // id, and not only does it work, it fails to work if we give the second // event a unique id! - // touch_event.unique_touch_event_id = ui::GetNextTouchEventId(); + // touch_event.unique_touch_event_id = ui::GetNextEventId(); input_event_router->RouteTouchEvent(root_view, &touch_event, ui::LatencyInfo()); touch_event.ResetPoints();
diff --git a/content/browser/renderer_host/input/touch_emulator_impl.cc b/content/browser/renderer_host/input/touch_emulator_impl.cc index 9db810a30..f752d8a 100644 --- a/content/browser/renderer_host/input/touch_emulator_impl.cc +++ b/content/browser/renderer_host/input/touch_emulator_impl.cc
@@ -312,7 +312,7 @@ auto weak_this = weak_ptr_factory_.GetWeakPtr(); scoped_refptr<ui::FilteredGestureProvider> gesture_provider( gesture_provider_); - event.unique_touch_event_id = ui::GetNextTouchEventId(); + event.unique_touch_event_id = ui::GetNextEventId(); auto result = gesture_provider->OnTouchEvent(MotionEventWeb(event)); if (!result.succeeded || !weak_this) { return true;
diff --git a/docs/security/autofill-across-iframes.md b/docs/security/autofill-across-iframes.md index cb4ff004..70c88f445 100644 --- a/docs/security/autofill-across-iframes.md +++ b/docs/security/autofill-across-iframes.md
@@ -47,20 +47,17 @@ - the policy-controlled feature [`autofill`] is enabled in the *candidate*'s [node document]. -Starting in Chrome 153 (October 2026), autofill suggestions will include a -[warning] if they'd fill a field in whose [node document] [`autofill`] is -disabled. - -In the long term, the first bullet point (and the warnings) will be removed. +In the long term, the first bullet point will be removed. Note that the above conditions are necessary but not sufficient for Chrome to autofill a field. In particular, Chrome does not fill credentials across frames. Chrome also avoids autofilling sensitive data, such as credit card numbers, -across origins. +across origins (from the perspective of the autofill's origin; see valid +cross-origin examples [below](#the-rationale)). The terminology used above is defined in the [appendix](#appendix-terminology). -The policy is implemented in [FormForest::GetRendererFormsOfBrowserForm()]. +The policy is implemented in [AutofillDriverRouter::IsSafeToFill()]. ## The rationale @@ -105,7 +102,7 @@ [Is feature enabled in document for origin?] algorithm on [`autofill`], the document, and the document's [origin] returns `Enabled`. -[FormForest::GetRendererFormsOfBrowserForm()]: https://source.chromium.org/chromium/chromium/src/+/main:components/autofill/content/browser/form_forest.cc;l=618-623;drc=94fbbc584c5d42f0097a9cb28b355853d2b34658 +[AutofillDriverRouter::IsSafeToFill()]: https://source.chromium.org/chromium/chromium/src/+/main:components/autofill/core/browser/foundations/autofill_driver_router.cc;l=83-120 [active document]: https://html.spec.whatwg.org/#nav-document [Is feature enabled in document for origin?]: https://w3c.github.io/webappsec-permissions-policy/#algo-is-feature-enabled [focused]: https://html.spec.whatwg.org/#focused @@ -117,4 +114,3 @@ [`autofill`]: https://github.com/explainers-by-googlers/safe-text-input/blob/main/autofill.md [top-level traversable]: https://html.spec.whatwg.org/#top-level-traversable [value]: https://html.spec.whatwg.org/#concept-fe-value -[warning]: https://github.com/explainers-by-googlers/safe-text-input/raw/main/images/warning-autofill.png
diff --git a/ios/chrome/app/strings/resources/ios_strings_cy.xtb b/ios/chrome/app/strings/resources/ios_strings_cy.xtb index 9e72bb9..f8fe3ea1 100644 --- a/ios/chrome/app/strings/resources/ios_strings_cy.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_cy.xtb
@@ -226,6 +226,7 @@ <translation id="1621729191093924223">Ni fydd nodweddion sydd angen meicroffon yn gweithio</translation> <translation id="1622717322707146952">Dewis "Ychwanegu at Google Calendar" neu "Ychwanegu at Apple Calendar."</translation> <translation id="1629162218487290695">Cadarnhewch mai chi sydd yno…</translation> +<translation id="1633084385573994059">Peidiwch â defnyddio'r wefan hon</translation> <translation id="1634520742547161889">MM/BB</translation> <translation id="1636234353664774105">Defnyddiwch y nodwedd llywio i gael cyfarwyddiadau i'ch cyrchfan gydag arweiniad tro-wrth-dro</translation> <translation id="1641113438599504367">Pori'n Ddiogel</translation> @@ -386,6 +387,7 @@ <translation id="2102396546234652240">Peidio â chaniatáu i wefannau ddefnyddio'ch meicroffon</translation> <translation id="2104436223719117661">Chwiliadau poblogaidd</translation> <translation id="21133533946938348">Pinio'r Tab</translation> +<translation id="2113761902638026426">Gadael i Gemini fynd i <ph name="SITE_DOMAIN" />?</translation> <translation id="2117650889962717098">Cadwch eich pori'n breifat trwy newid i'r modd Anhysbys</translation> <translation id="2119636449201577317">Agor yn…</translation> <translation id="2119962645034852864">Nid yw rhai gwasanaethau ar gael ar gyfer eich cyfrif</translation> @@ -766,6 +768,7 @@ <translation id="3350976670663926380">Golygiadau wedi'u cadw</translation> <translation id="3353037916374303415"><ph name="EMAIL" />. Rheolir y cyfrif hwn.</translation> <translation id="3365529507898144230">Cadw yn Photos</translation> +<translation id="3371168305258344914">Mae Gemini ar fin gweithredu ar wefan a allai fod â'ch gwybodaeth sensitif</translation> <translation id="3371831930909698441">Mae cyfieithiad ar gael. Mae opsiynau ar gael yn agos at waelod y sgrîn.</translation> <translation id="3377063233124932127">Mae eich nodau tudalen, cyfrineiriau a rhagor bellach wedi'u cadw ar y brig.</translation> <translation id="3378214228000661758">Creu cod pas ar gyfer</translation> @@ -1508,6 +1511,7 @@ <translation id="567881659373499783">Fersiwn <ph name="PRODUCT_VERSION" /></translation> <translation id="5683499062697987550">I ddefnyddio a chadw cyfrineiriau yn eich Cyfrif Google, cadarnhewch mai chi sydd yno.</translation> <translation id="5684761169742812828">Datgelwyd y cyfrinair hwn mewn toriad data ar y rhyngrwyd. Os nad oes gennych amser i'w newid ar hyn o bryd, mae Google yn argymell cadw'r rhybudd hwn i atgoffa'ch hun yn nes ymlaen.</translation> +<translation id="5691020463738411542">Cysoni dewisiadau pori diogel ar draws dyfeisiau</translation> <translation id="5694848685995373177">Wedi'i chadw yn Drive ar gyfer <ph name="USER_EMAIL" />.</translation> <translation id="570209299585559496">Gallwch newid y wedd gwefan ddiofyn i fwrdd gwaith yn y gosodiadau yna gosodiadau Cynnwys</translation> <translation id="5702108177581350218">Pan fyddwch yn rhannu copi o'ch enw defnyddiwr a'ch cyfrinair, gall aelod o'ch teulu eu llenwi gan ddefnyddio Rheolwr Cyfrineiriau Google.</translation> @@ -1586,6 +1590,7 @@ <translation id="5948605885471592910">Gweld a rheoli popeth sydd gennych ar agor</translation> <translation id="5952641243319721872">Ydych chi'n siŵr eich bod am waredu eich dewis?</translation> <translation id="5956112131836209882">Tab grŵp tabiau. <ph name="TAB_INDEX_IN_GROUP" /> o <ph name="NUMBER_OF_TABS_IN_GROUP" />.</translation> +<translation id="595662449352471176">Dechrau tasg</translation> <translation id="595769230373966252">Chwilio gyda <ph name="SEARCH_PROVIDER" /></translation> <translation id="5963694076845073027">Agor dolenni yma y tro nesaf</translation> <translation id="5963939892571022323">Ni ellir creu dolen i'r testun a amlygir.</translation> @@ -1806,6 +1811,7 @@ <translation id="656065428026159829">Gweld rhagor</translation> <translation id="6565899972286925956">Creu unrhyw beth</translation> <translation id="6571070086367343653">Golygu cerdyn credyd</translation> +<translation id="6571502147204686607">Amddiffyn eich hun rhag gwefannau anniogel</translation> <translation id="6574092468346088891">Trowch hysbysiadau ar gyfer Gwiriad Diogelwch ymlaen</translation> <translation id="6579867704846662339">Gallwch ddewis agor cyfeiriadau URL sy'n dod i mewn o apiau eraill yn Anhysbys.</translation> <translation id="6585618849026997638">Gallwch fynd yn ôl i dudalen sy'n bwysig i chi drwy ychwanegu nod tudalen</translation> @@ -2246,6 +2252,7 @@ <translation id="7921559948846049514">Dewiswch thema, lliw, neu ragor ar gyfer eich cefndir</translation> <translation id="792357691529995513">Ni chanfuwyd unrhyw broblemau</translation> <translation id="7925108652071887026">Data awtolenwi</translation> +<translation id="7926290435065552539">Cadwch eich cyfrineiriau'n ddiogel</translation> <translation id="7926975587469166629">Llysenw cerdyn</translation> <translation id="792762900715361006">Tynnu Llun neu Fideo</translation> <translation id="7927711904086083099">Heb ei ddewis</translation> @@ -2664,6 +2671,7 @@ <translation id="9144230693397287797">Derbyn diweddariadau ar gyfer atgoffwyr a osodwyd gennych, a thabiau o ddyfeisiau eraill</translation> <translation id="914781932147356857">Marcio'r cyfan…</translation> <translation id="9148126808321036104">Mewngofnodwch eto</translation> +<translation id="914964947703922647">Adolygu tasg</translation> <translation id="9149866541089851383">Golygu…</translation> <translation id="9152637745605628097">Dewis o themâu, lliwiau neu uwchlwytho llun</translation> <translation id="9153159728062222866">Hepgor y Copïo a Gludo</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_ms.xtb b/ios/chrome/app/strings/resources/ios_strings_ms.xtb index c7f30ac..6bc4eb8 100644 --- a/ios/chrome/app/strings/resources/ios_strings_ms.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_ms.xtb
@@ -150,6 +150,7 @@ <translation id="1408847409015257906">Ketik “Privasi & Keselamatan”.</translation> <translation id="1411386976162024013">Carian visual Lens</translation> <translation id="1414315029670184034">Jangan benarkan laman menggunakan kamera anda</translation> +<translation id="141484693809490782"><ph name="WEBSITE" /> mahu memuat turun fail dan membuka fail tersebut dalam Wallet anda.</translation> <translation id="1426410128494586442">Ya</translation> <translation id="1430915738399379752">Cetak</translation> <translation id="1433478348197382180">Mod Membaca</translation> @@ -2596,6 +2597,7 @@ <translation id="8909459547399237818">Pilih Password Manager, kemudian ketik Tambah Widget</translation> <translation id="891282356902782456">Kata laluan ini disimpan untuk peranti ini sahaja. Simpan kata laluan tersebut dalam Google Account anda, <ph name="EMAIL" /> untuk menggunakan kata laluan tersebut pada peranti anda yang lain.</translation> <translation id="8915916167043355778">Tutup semua</translation> +<translation id="8917404568798356367"><ph name="WEBSITE" /> mahu memuat turun fail dan menambahkan fail itu pada kalendar anda.</translation> <translation id="892185197271200809">Semua orang akan kehilangan akses kepada kumpulan tab “<ph name="GROUP_NAME" />" dengan serta-merta dan kumpulan tab ini akan dipadamkan daripada semua peranti</translation> <translation id="8923178205567790913">Kata laluan</translation> <translation id="8926498511977337209">Semak imbas dalam Inkognito</translation>
diff --git a/ios/google_internal/frameworks/ChromeExtensionKeychainInternal.framework.dSYM.ios.zip.sha1 b/ios/google_internal/frameworks/ChromeExtensionKeychainInternal.framework.dSYM.ios.zip.sha1 index da8f631..196812d 100644 --- a/ios/google_internal/frameworks/ChromeExtensionKeychainInternal.framework.dSYM.ios.zip.sha1 +++ b/ios/google_internal/frameworks/ChromeExtensionKeychainInternal.framework.dSYM.ios.zip.sha1
@@ -1 +1 @@ -704027af8139b666ff80354371105f1cb168646c \ No newline at end of file +9869281bd3d521771ed092bb3e5ce47a1939af09 \ No newline at end of file
diff --git a/ios/google_internal/frameworks/ChromeExtensionKeychainInternal.framework.dSYM.ios_asan.zip.sha1 b/ios/google_internal/frameworks/ChromeExtensionKeychainInternal.framework.dSYM.ios_asan.zip.sha1 index b356d21..e7f849a 100644 --- a/ios/google_internal/frameworks/ChromeExtensionKeychainInternal.framework.dSYM.ios_asan.zip.sha1 +++ b/ios/google_internal/frameworks/ChromeExtensionKeychainInternal.framework.dSYM.ios_asan.zip.sha1
@@ -1 +1 @@ -dc510a0f9e7b42103d668b06b2985c25c8d32c38 \ No newline at end of file +55977332aa36067bb1e2f3d4077f5b9076340880 \ No newline at end of file
diff --git a/ios/google_internal/frameworks/ChromeInternal.framework.dSYM.ios.zip.sha1 b/ios/google_internal/frameworks/ChromeInternal.framework.dSYM.ios.zip.sha1 index be86f46..1938ba7 100644 --- a/ios/google_internal/frameworks/ChromeInternal.framework.dSYM.ios.zip.sha1 +++ b/ios/google_internal/frameworks/ChromeInternal.framework.dSYM.ios.zip.sha1
@@ -1 +1 @@ -f64a3ae346783e08be8722f8f17fc9b8fb94eaa8 \ No newline at end of file +63367b919a48f6fd05d320547ea66d9615786c47 \ No newline at end of file
diff --git a/ios/google_internal/frameworks/ChromeInternal.framework.dSYM.ios_asan.zip.sha1 b/ios/google_internal/frameworks/ChromeInternal.framework.dSYM.ios_asan.zip.sha1 index 13bac29..30e4e10e 100644 --- a/ios/google_internal/frameworks/ChromeInternal.framework.dSYM.ios_asan.zip.sha1 +++ b/ios/google_internal/frameworks/ChromeInternal.framework.dSYM.ios_asan.zip.sha1
@@ -1 +1 @@ -1fb3be617552ba936a718529d830caa5e7bce1d4 \ No newline at end of file +aa9772ee930ed17b07faa55844d0eee5b1d9bc23 \ No newline at end of file
diff --git a/ios/google_internal/frameworks/ChromeSSOInternal.framework.dSYM.ios.zip.sha1 b/ios/google_internal/frameworks/ChromeSSOInternal.framework.dSYM.ios.zip.sha1 index f5f304d3..e717a8d 100644 --- a/ios/google_internal/frameworks/ChromeSSOInternal.framework.dSYM.ios.zip.sha1 +++ b/ios/google_internal/frameworks/ChromeSSOInternal.framework.dSYM.ios.zip.sha1
@@ -1 +1 @@ -48ea03bd976c44e81e9dec1afda674579e453dc5 \ No newline at end of file +42767c36d0935ea4b895db346d3d5bf4a8e09b4b \ No newline at end of file
diff --git a/ios/google_internal/frameworks/ChromeSSOInternal.framework.dSYM.ios_asan.zip.sha1 b/ios/google_internal/frameworks/ChromeSSOInternal.framework.dSYM.ios_asan.zip.sha1 index 7fd712a..1092117 100644 --- a/ios/google_internal/frameworks/ChromeSSOInternal.framework.dSYM.ios_asan.zip.sha1 +++ b/ios/google_internal/frameworks/ChromeSSOInternal.framework.dSYM.ios_asan.zip.sha1
@@ -1 +1 @@ -a6feffcfe45cdbe4e94c551251b58873dbcaad46 \ No newline at end of file +865b014ec1fd1cef1389a0b93ecd4fe6d88f169e \ No newline at end of file
diff --git a/ios/google_internal/frameworks/chrome_extension_keychain_internal_dynamic_framework.ios.zip.sha1 b/ios/google_internal/frameworks/chrome_extension_keychain_internal_dynamic_framework.ios.zip.sha1 index 5f23ac9..af150b9 100644 --- a/ios/google_internal/frameworks/chrome_extension_keychain_internal_dynamic_framework.ios.zip.sha1 +++ b/ios/google_internal/frameworks/chrome_extension_keychain_internal_dynamic_framework.ios.zip.sha1
@@ -1 +1 @@ -8544e8de9eed01912624a70c001b211cb02d2f21 \ No newline at end of file +8c6e23fe76f164c5351f591f2b1cfedd3cd242d8 \ No newline at end of file
diff --git a/ios/google_internal/frameworks/chrome_extension_keychain_internal_dynamic_framework.ios_asan.zip.sha1 b/ios/google_internal/frameworks/chrome_extension_keychain_internal_dynamic_framework.ios_asan.zip.sha1 index 16426da4..63c9c9f 100644 --- a/ios/google_internal/frameworks/chrome_extension_keychain_internal_dynamic_framework.ios_asan.zip.sha1 +++ b/ios/google_internal/frameworks/chrome_extension_keychain_internal_dynamic_framework.ios_asan.zip.sha1
@@ -1 +1 @@ -2976deb15e6d8dc55cdf9ec2016fc5c173ace755 \ No newline at end of file +503db416dcc4fa78bd3625ccff9e22250576dd44 \ No newline at end of file
diff --git a/ios/google_internal/frameworks/chrome_extension_keychain_internal_dynamic_framework.iossimulator.zip.sha1 b/ios/google_internal/frameworks/chrome_extension_keychain_internal_dynamic_framework.iossimulator.zip.sha1 index f889a2db..1f5e3c5 100644 --- a/ios/google_internal/frameworks/chrome_extension_keychain_internal_dynamic_framework.iossimulator.zip.sha1 +++ b/ios/google_internal/frameworks/chrome_extension_keychain_internal_dynamic_framework.iossimulator.zip.sha1
@@ -1 +1 @@ -0fedb45005a8ebe8271c8e5bdb4533e1fb70fee7 \ No newline at end of file +7a4b9be0eb2385c95bbf99050734d4cd53086a78 \ No newline at end of file
diff --git a/ios/google_internal/frameworks/chrome_extension_keychain_internal_dynamic_framework.iossimulator_asan.zip.sha1 b/ios/google_internal/frameworks/chrome_extension_keychain_internal_dynamic_framework.iossimulator_asan.zip.sha1 index 2bc86b43..db649f6 100644 --- a/ios/google_internal/frameworks/chrome_extension_keychain_internal_dynamic_framework.iossimulator_asan.zip.sha1 +++ b/ios/google_internal/frameworks/chrome_extension_keychain_internal_dynamic_framework.iossimulator_asan.zip.sha1
@@ -1 +1 @@ -49a185592e50e7f069d9c39139e61b99e6ac0ae6 \ No newline at end of file +cb99283625cd4330ee79c26e7c77196cb0f0067e \ No newline at end of file
diff --git a/ios/google_internal/frameworks/chrome_internal_dynamic_framework.ios.zip.sha1 b/ios/google_internal/frameworks/chrome_internal_dynamic_framework.ios.zip.sha1 index 3e4a83a..c6557a4 100644 --- a/ios/google_internal/frameworks/chrome_internal_dynamic_framework.ios.zip.sha1 +++ b/ios/google_internal/frameworks/chrome_internal_dynamic_framework.ios.zip.sha1
@@ -1 +1 @@ -534bbf1ec7ea6d274ae4504386695f9c45136696 \ No newline at end of file +47c67ee9eb2e1fad3328a62b60e791bf9a1920e0 \ No newline at end of file
diff --git a/ios/google_internal/frameworks/chrome_internal_dynamic_framework.ios_asan.zip.sha1 b/ios/google_internal/frameworks/chrome_internal_dynamic_framework.ios_asan.zip.sha1 index f29fbb6..f7197a1 100644 --- a/ios/google_internal/frameworks/chrome_internal_dynamic_framework.ios_asan.zip.sha1 +++ b/ios/google_internal/frameworks/chrome_internal_dynamic_framework.ios_asan.zip.sha1
@@ -1 +1 @@ -90217c2d69f9bf77b6ba0332c2e3f509b3696d61 \ No newline at end of file +e0aca676e5b6e3720512cf608ee15daefd990f1d \ No newline at end of file
diff --git a/ios/google_internal/frameworks/chrome_internal_dynamic_framework.iossimulator.zip.sha1 b/ios/google_internal/frameworks/chrome_internal_dynamic_framework.iossimulator.zip.sha1 index 19f6fbf..3d5dcb7 100644 --- a/ios/google_internal/frameworks/chrome_internal_dynamic_framework.iossimulator.zip.sha1 +++ b/ios/google_internal/frameworks/chrome_internal_dynamic_framework.iossimulator.zip.sha1
@@ -1 +1 @@ -6870e246b7c133cb4fdd4797f7be623fb8ebb95b \ No newline at end of file +ae0ce9f59b69c1dffc86668355b2622131cb7c57 \ No newline at end of file
diff --git a/ios/google_internal/frameworks/chrome_internal_dynamic_framework.iossimulator_asan.zip.sha1 b/ios/google_internal/frameworks/chrome_internal_dynamic_framework.iossimulator_asan.zip.sha1 index 813336d0..784a6846 100644 --- a/ios/google_internal/frameworks/chrome_internal_dynamic_framework.iossimulator_asan.zip.sha1 +++ b/ios/google_internal/frameworks/chrome_internal_dynamic_framework.iossimulator_asan.zip.sha1
@@ -1 +1 @@ -e78a50a759405b8eb30c9470b7371e82501dd59b \ No newline at end of file +1f0f2c2bfc760da66519fe60cad4b0537114a6e5 \ No newline at end of file
diff --git a/ios/google_internal/frameworks/chrome_sso_internal_dynamic_framework.ios.zip.sha1 b/ios/google_internal/frameworks/chrome_sso_internal_dynamic_framework.ios.zip.sha1 index 30b2ddd..b5f56392 100644 --- a/ios/google_internal/frameworks/chrome_sso_internal_dynamic_framework.ios.zip.sha1 +++ b/ios/google_internal/frameworks/chrome_sso_internal_dynamic_framework.ios.zip.sha1
@@ -1 +1 @@ -91df23ad174b44ee823108e12c94ab1a2da1e405 \ No newline at end of file +24db7a66681117d02e12ae8a764690c4bc59aab5 \ No newline at end of file
diff --git a/ios/google_internal/frameworks/chrome_sso_internal_dynamic_framework.ios_asan.zip.sha1 b/ios/google_internal/frameworks/chrome_sso_internal_dynamic_framework.ios_asan.zip.sha1 index 19d6316..9380032 100644 --- a/ios/google_internal/frameworks/chrome_sso_internal_dynamic_framework.ios_asan.zip.sha1 +++ b/ios/google_internal/frameworks/chrome_sso_internal_dynamic_framework.ios_asan.zip.sha1
@@ -1 +1 @@ -4c5f966d22884d9e1e1ad226bba706da3beea805 \ No newline at end of file +db5180af136b36b4ac86a3d636f72da81a3defbb \ No newline at end of file
diff --git a/ios/google_internal/frameworks/chrome_sso_internal_dynamic_framework.iossimulator.zip.sha1 b/ios/google_internal/frameworks/chrome_sso_internal_dynamic_framework.iossimulator.zip.sha1 index fb6c95e..9b3d8e07 100644 --- a/ios/google_internal/frameworks/chrome_sso_internal_dynamic_framework.iossimulator.zip.sha1 +++ b/ios/google_internal/frameworks/chrome_sso_internal_dynamic_framework.iossimulator.zip.sha1
@@ -1 +1 @@ -c941e9c9fe7db116bbd41fe75740cb8a5fb7f5ea \ No newline at end of file +21fc8f676c80e179c22077a190aa1605122a867e \ No newline at end of file
diff --git a/ios/google_internal/frameworks/chrome_sso_internal_dynamic_framework.iossimulator_asan.zip.sha1 b/ios/google_internal/frameworks/chrome_sso_internal_dynamic_framework.iossimulator_asan.zip.sha1 index 4895101..5f6d497 100644 --- a/ios/google_internal/frameworks/chrome_sso_internal_dynamic_framework.iossimulator_asan.zip.sha1 +++ b/ios/google_internal/frameworks/chrome_sso_internal_dynamic_framework.iossimulator_asan.zip.sha1
@@ -1 +1 @@ -27340797590eaf41ee263392bb2e6e538bb83e31 \ No newline at end of file +233c42a6b34a5a496720df783fda5d12e9a992f3 \ No newline at end of file
diff --git a/ios/google_internal/frameworks/chrome_test_internal_dynamic_framework.ios.zip.sha1 b/ios/google_internal/frameworks/chrome_test_internal_dynamic_framework.ios.zip.sha1 index fdb35349..e5dc60b 100644 --- a/ios/google_internal/frameworks/chrome_test_internal_dynamic_framework.ios.zip.sha1 +++ b/ios/google_internal/frameworks/chrome_test_internal_dynamic_framework.ios.zip.sha1
@@ -1 +1 @@ -0c148475a11d1e709630080abea5af44301dce84 \ No newline at end of file +5d2c14c41b400d6cec13cd2bfb312fb8171ce65f \ No newline at end of file
diff --git a/ios/google_internal/frameworks/chrome_test_internal_dynamic_framework.iossimulator.zip.sha1 b/ios/google_internal/frameworks/chrome_test_internal_dynamic_framework.iossimulator.zip.sha1 index 809a634..8647970 100644 --- a/ios/google_internal/frameworks/chrome_test_internal_dynamic_framework.iossimulator.zip.sha1 +++ b/ios/google_internal/frameworks/chrome_test_internal_dynamic_framework.iossimulator.zip.sha1
@@ -1 +1 @@ -4edc5acf0526e467e0e7fad39af04418de6de7b0 \ No newline at end of file +8bff29097ec83bd424f5c214986e93590634e9b0 \ No newline at end of file
diff --git a/ios/google_internal/frameworks/web_view_shell_internal_dynamic_framework.ios.zip.sha1 b/ios/google_internal/frameworks/web_view_shell_internal_dynamic_framework.ios.zip.sha1 index 15356597..09386d7 100644 --- a/ios/google_internal/frameworks/web_view_shell_internal_dynamic_framework.ios.zip.sha1 +++ b/ios/google_internal/frameworks/web_view_shell_internal_dynamic_framework.ios.zip.sha1
@@ -1 +1 @@ -c375b800c1df241bddbf3f5d5fa613d88cc9ccfc \ No newline at end of file +def7a088522a79d00cbaed49b8b2830135db68ef \ No newline at end of file
diff --git a/ios/google_internal/frameworks/web_view_shell_internal_dynamic_framework.ios_asan.zip.sha1 b/ios/google_internal/frameworks/web_view_shell_internal_dynamic_framework.ios_asan.zip.sha1 index cfa8ea7f..86e5ad63 100644 --- a/ios/google_internal/frameworks/web_view_shell_internal_dynamic_framework.ios_asan.zip.sha1 +++ b/ios/google_internal/frameworks/web_view_shell_internal_dynamic_framework.ios_asan.zip.sha1
@@ -1 +1 @@ -35445eff442f5de365e9554939030da5fea1a388 \ No newline at end of file +9713f3fdc81a7a022e45dd7eca57f3ba7b596647 \ No newline at end of file
diff --git a/ios/google_internal/frameworks/web_view_shell_internal_dynamic_framework.iossimulator.zip.sha1 b/ios/google_internal/frameworks/web_view_shell_internal_dynamic_framework.iossimulator.zip.sha1 index 812b0818..d29e84640 100644 --- a/ios/google_internal/frameworks/web_view_shell_internal_dynamic_framework.iossimulator.zip.sha1 +++ b/ios/google_internal/frameworks/web_view_shell_internal_dynamic_framework.iossimulator.zip.sha1
@@ -1 +1 @@ -7706dfdfa882757df0ddee4d970c0f8e298cd875 \ No newline at end of file +8161bfbff7a15998264c39d741f5ab68c50e369b \ No newline at end of file
diff --git a/ios/google_internal/frameworks/web_view_shell_internal_dynamic_framework.iossimulator_asan.zip.sha1 b/ios/google_internal/frameworks/web_view_shell_internal_dynamic_framework.iossimulator_asan.zip.sha1 index 1f60a6a1..11f20769 100644 --- a/ios/google_internal/frameworks/web_view_shell_internal_dynamic_framework.iossimulator_asan.zip.sha1 +++ b/ios/google_internal/frameworks/web_view_shell_internal_dynamic_framework.iossimulator_asan.zip.sha1
@@ -1 +1 @@ -8d49c2da25ae37c955655cf388f5ce8b4ca969e2 \ No newline at end of file +0b292942570b55b1e8ac509237ec071cecec93cd \ No newline at end of file
diff --git a/ios/testing/test_expectations.txt b/ios/testing/test_expectations.txt index 1801940..a4fea773 100644 --- a/ios/testing/test_expectations.txt +++ b/ios/testing/test_expectations.txt
@@ -308,7 +308,6 @@ crbug.com/40279461 CredentialSuggestionBottomSheetEGTest/testOpenCredentialBottomSheetNoUsername [ Pass Failure ] crbug.com/361518360 CredentialSuggestionBottomSheetEGTest/testOpenCredentialBottomSheetWithSingleSharedPassword [ Pass Failure ] crbug.com/361518360 CredentialSuggestionBottomSheetEGTest/testOpenCredentialBottomSheetWithSharedPasswordsAndUseKeyboard [ Pass Failure ] -crbug.com/361518360 [ iPhone Device ] CredentialSuggestionBottomSheetEGTest/testOpenCredentialBottomSheetWithSharedPasswordsAndUseKeyboard [ Failure ] crbug.com/40260214 [ Simulator ] PasswordControllerEGTest/testPasswordGeneration [ Pass Failure ] crbug.com/453627553 PasswordControllerEGTest/testSaveTypedCredentialInUff [ Pass Failure ] crbug.com/453627553 PasswordControllerEGTest/testUpdateTypedCredentialInUff [ Pass Failure ]
diff --git a/ios_internal b/ios_internal index cc09476..be79606 160000 --- a/ios_internal +++ b/ios_internal
@@ -1 +1 @@ -Subproject commit cc09476ef46b7e0499573b1fd066895ed1027b7b +Subproject commit be796067523c8f9236d4d3c277a4f98342edb8f1
diff --git a/third_party/blink/common/DEPS b/third_party/blink/common/DEPS index 77c9880..59b736b8 100644 --- a/third_party/blink/common/DEPS +++ b/third_party/blink/common/DEPS
@@ -37,9 +37,7 @@ "+third_party/blink/common", "+third_party/blink/public/common", "+third_party/blink/public/mojom", - "+third_party/icu/source/common/unicode/uchar.h", "+third_party/icu/source/common/unicode/unistr.h", - "+third_party/icu/source/common/unicode/utf16.h", "+ui/base/page_transition_types.h", "+ui/base/ui_base_switches_util.h", "+ui/base/mojom/menu_source_type.mojom-forward.h",
diff --git a/third_party/blink/common/input/synthetic_web_input_event_builders.cc b/third_party/blink/common/input/synthetic_web_input_event_builders.cc index 6a3783b3..9768a58 100644 --- a/third_party/blink/common/input/synthetic_web_input_event_builders.cc +++ b/third_party/blink/common/input/synthetic_web_input_event_builders.cc
@@ -154,7 +154,7 @@ } SyntheticWebTouchEvent::SyntheticWebTouchEvent() : WebTouchEvent() { - unique_touch_event_id = ui::GetNextTouchEventId(); + unique_touch_event_id = ui::GetNextEventId(); SetTimestamp(ui::EventTimeForNow()); pointer_id_ = 0; } @@ -185,7 +185,7 @@ touches_length = activePointCount; type_ = WebInputEvent::Type::kUndefined; moved_beyond_slop_region = false; - unique_touch_event_id = ui::GetNextTouchEventId(); + unique_touch_event_id = ui::GetNextEventId(); } int SyntheticWebTouchEvent::PressPoint(float x,
diff --git a/third_party/blink/common/manifest/manifest_invariants.cc b/third_party/blink/common/manifest/manifest_invariants.cc index 3e23988..1f19af9 100644 --- a/third_party/blink/common/manifest/manifest_invariants.cc +++ b/third_party/blink/common/manifest/manifest_invariants.cc
@@ -7,6 +7,7 @@ #include <optional> #include <string_view> +#include "base/i18n/unicode_string_util.h" #include "base/notreached.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" @@ -15,8 +16,6 @@ #include "third_party/blink/public/common/manifest/manifest.h" #include "third_party/blink/public/common/manifest/manifest_util.h" #include "third_party/blink/public/common/scheme_registry.h" -#include "third_party/icu/source/common/unicode/uchar.h" -#include "third_party/icu/source/common/unicode/utf16.h" #include "url/gurl.h" #include "url/origin.h" #include "url/url_constants.h" @@ -152,13 +151,9 @@ if (!extension.starts_with(u".") || extension.length() <= 1) { return ManifestInvariantError::kFileHandlerInvalidExtension; } - for (size_t i = 0; i < extension.length();) { - UChar32 c; - U16_NEXT(extension, i, extension.length(), c); - if (base::IsUnicodeControl(c) || u_charType(c) == U_FORMAT_CHAR) { - return ManifestInvariantError:: - kFileHandlerExtensionContainsControlOrFormat; - } + if (base::i18n::ContainsUnicodeControlOrFormat(extension)) { + return ManifestInvariantError:: + kFileHandlerExtensionContainsControlOrFormat; } } }
diff --git a/third_party/blink/renderer/core/input/pointer_event_manager.cc b/third_party/blink/renderer/core/input/pointer_event_manager.cc index 580fe0d..9cd8089 100644 --- a/third_party/blink/renderer/core/input/pointer_event_manager.cc +++ b/third_party/blink/renderer/core/input/pointer_event_manager.cc
@@ -1521,8 +1521,8 @@ bool PointerEventManager::PrimaryPointerdownCanceled( uint32_t unique_touch_event_id) { // It's safe to assume that uniqueTouchEventIds won't wrap back to 0 from - // 2^32-1 (>4.2 billion): even with a generous 100 unique ids per touch - // sequence & one sequence per 10 second, it takes 13+ years to wrap back. + // 2^32-1 (>4.2 billion): the ids are shared with all input events, and + // even continuous 60Hz input events take more than 2 years to wrap back. while (!touch_ids_for_canceled_pointerdowns_.empty()) { uint32_t first_id = touch_ids_for_canceled_pointerdowns_.front(); if (first_id > unique_touch_event_id)
diff --git a/third_party/blink/renderer/modules/manifest/manifest_parser.cc b/third_party/blink/renderer/modules/manifest/manifest_parser.cc index 0f8caeb..984a38b 100644 --- a/third_party/blink/renderer/modules/manifest/manifest_parser.cc +++ b/third_party/blink/renderer/modules/manifest/manifest_parser.cc
@@ -4,8 +4,6 @@ #include "third_party/blink/renderer/modules/manifest/manifest_parser.h" -#include <unicode/uchar.h> - #include <cstddef> #include <memory> #include <optional> @@ -20,7 +18,6 @@ #include "base/i18n/tag_converters.h" #include "base/metrics/histogram_functions.h" #include "base/notreached.h" -#include "base/strings/string_util.h" #include "net/base/mime_util.h" #include "net/base/registry_controlled_domains/registry_controlled_domain.h" #include "services/device/public/mojom/screen_orientation_lock_types.mojom-blink.h" @@ -48,10 +45,10 @@ #include "third_party/blink/renderer/platform/json/json_parser.h" #include "third_party/blink/renderer/platform/json/json_values.h" #include "third_party/blink/renderer/platform/runtime_enabled_features.h" +#include "third_party/blink/renderer/platform/text/character.h" #include "third_party/blink/renderer/platform/weborigin/kurl.h" #include "third_party/blink/renderer/platform/weborigin/security_origin.h" #include "third_party/blink/renderer/platform/wtf/hash_map.h" -#include "third_party/blink/renderer/platform/wtf/text/code_point_iterator.h" #include "third_party/blink/renderer/platform/wtf/text/format.h" #include "third_party/blink/renderer/platform/wtf/text/strcat.h" #include "third_party/blink/renderer/platform/wtf/text/string_impl.h" @@ -71,6 +68,7 @@ namespace blink { namespace { + static constexpr char kScopeExtensionsMissingKeysErrorMessage[] = "scope_extensions entry ignored, required properties 'type' and 'origin' " "are missing."; @@ -1707,17 +1705,11 @@ return false; } - // TODO(crbug.com/530303003): This check for control and format characters is - // duplicated across manifest parsing, IPC validation, and PWA display. - // Consider consolidating it into a shared helper in - // //base/strings/string_util.h. - for (UChar32 c : extension) { - if (base::IsUnicodeControl(c) || u_charType(c) == U_FORMAT_CHAR) { - AddErrorInfo( - "property 'accept' file extension ignored, contains invalid " - "control or format characters."); - return false; - } + if (unicode::ContainsUnicodeControlOrFormat(extension)) { + AddErrorInfo( + "property 'accept' file extension ignored, contains invalid " + "control or format characters."); + return false; } return true;
diff --git a/third_party/blink/renderer/platform/DEPS b/third_party/blink/renderer/platform/DEPS index 29273db..ce0c770 100644 --- a/third_party/blink/renderer/platform/DEPS +++ b/third_party/blink/renderer/platform/DEPS
@@ -19,6 +19,7 @@ "+base/cpu.h", "+base/files", "+base/i18n/icu_util.h", + "+base/i18n/unicode_string_util.h", "+base/json", "+base/lazy_instance.h", "+base/mac/mac_util.h",
diff --git a/third_party/blink/renderer/platform/text/character.cc b/third_party/blink/renderer/platform/text/character.cc index 4bd86dc..4fcbedc 100644 --- a/third_party/blink/renderer/platform/text/character.cc +++ b/third_party/blink/renderer/platform/text/character.cc
@@ -39,6 +39,7 @@ #include <algorithm> +#include "base/i18n/unicode_string_util.h" #include "base/no_destructor.h" #include "base/synchronization/lock.h" #include "third_party/abseil-cpp/absl/strings/ascii.h" @@ -79,6 +80,16 @@ } // namespace +bool ContainsUnicodeControlOrFormat(const String& str) { + if (str.empty()) { + return false; + } + if (str.Is8Bit()) { + return base::i18n::ContainsUnicodeControlOrFormatLatin1(str.Span8()); + } + return base::i18n::ContainsUnicodeControlOrFormat(str.View16()); +} + void internal::ApplyPatternAndFreezeIfEmpty(icu::UnicodeSet* unicode_set, const char* pattern) { base::AutoLock locker(GetFreezePatternLock());
diff --git a/third_party/blink/renderer/platform/text/character.h b/third_party/blink/renderer/platform/text/character.h index 3d40c67f..b370e336 100644 --- a/third_party/blink/renderer/platform/text/character.h +++ b/third_party/blink/renderer/platform/text/character.h
@@ -166,6 +166,10 @@ return u_hasBinaryProperty(c, UCHAR_DEFAULT_IGNORABLE_CODE_POINT); } +// Returns true if the string contains any Control (Cc) or Format (Cf) +// characters. +PLATFORM_EXPORT bool ContainsUnicodeControlOrFormat(const String& str); + inline bool TreatAsZeroWidthSpaceInComplexScript(UChar32 c) { if (c == uchar::kFormFeed || c == uchar::kCarriageReturn || c == uchar::kObjectReplacementCharacter) {
diff --git a/third_party/blink/renderer/platform/text/character_test.cc b/third_party/blink/renderer/platform/text/character_test.cc index bba4972f..bf3137c9 100644 --- a/third_party/blink/renderer/platform/text/character_test.cc +++ b/third_party/blink/renderer/platform/text/character_test.cc
@@ -514,6 +514,35 @@ EXPECT_FALSE(unicode::IsBidiControl(0x05D0)); } +TEST(CharacterTest, ContainsUnicodeControlOrFormat) { + // Null and empty strings. + EXPECT_FALSE(unicode::ContainsUnicodeControlOrFormat(String())); + EXPECT_FALSE(unicode::ContainsUnicodeControlOrFormat(g_empty_string)); + EXPECT_FALSE(unicode::ContainsUnicodeControlOrFormat("")); + + // 8-bit strings without control or format characters. + String str8("hello world"); + ASSERT_TRUE(str8.Is8Bit()); + EXPECT_FALSE(unicode::ContainsUnicodeControlOrFormat(str8)); + + // 8-bit strings with ASCII control characters (Cc) and Latin-1 Soft Hyphen + // (Cf, 0xAD). + EXPECT_TRUE(unicode::ContainsUnicodeControlOrFormat("hello\nworld")); + EXPECT_TRUE(unicode::ContainsUnicodeControlOrFormat("hello\x7Fworld")); + EXPECT_TRUE(unicode::ContainsUnicodeControlOrFormat("hello\x85world")); + EXPECT_TRUE(unicode::ContainsUnicodeControlOrFormat("hello\xADworld")); + + // 16-bit strings without control or format characters. + String str16(u"hello \u3042 \U0002070E"); + ASSERT_FALSE(str16.Is8Bit()); + EXPECT_FALSE(unicode::ContainsUnicodeControlOrFormat(str16)); + + // 16-bit strings with BMP and supplementary Format characters (Cf). + EXPECT_TRUE(unicode::ContainsUnicodeControlOrFormat(u"hello\u200Bworld")); + EXPECT_TRUE(unicode::ContainsUnicodeControlOrFormat(u"hello\u202Eworld")); + EXPECT_TRUE(unicode::ContainsUnicodeControlOrFormat(u"hello\U000E0001world")); +} + TEST(CharacterTest, IsNonCharacter) { // See http://www.unicode.org/faq/private_use.html#nonchar4 EXPECT_FALSE(unicode::IsNonCharacter(0xFDD0 - 1));
diff --git a/third_party/blink/tools/blinkpy/presubmit/audit_non_blink_usage.py b/third_party/blink/tools/blinkpy/presubmit/audit_non_blink_usage.py index 6f8d66c..e88aba4 100755 --- a/third_party/blink/tools/blinkpy/presubmit/audit_non_blink_usage.py +++ b/third_party/blink/tools/blinkpy/presubmit/audit_non_blink_usage.py
@@ -265,7 +265,6 @@ 'base::ClampFloor', 'base::ClampRound', 'base::IsTypeInRangeForNumericType', - 'base::IsUnicodeControl', 'base::IsValueInRangeForNumericType', 'base::IsValueNegative', 'base::MakeStrictNum', @@ -425,6 +424,9 @@ 'allowed': [ # BCP47 language tags used as keys in manifest localization maps. 'base::i18n::LanguageTag', + # Validate manifest file handler extensions for Unicode control and + # format characters. + 'base::i18n::ContainsUnicodeControlOrFormat', # Abseil containers for locale-keyed maps. 'absl::flat_hash_map', # Base types for string conversions and error handling.
diff --git a/third_party/blink/web_tests/TestExpectations b/third_party/blink/web_tests/TestExpectations index 4bcbd37..065f366 100644 --- a/third_party/blink/web_tests/TestExpectations +++ b/third_party/blink/web_tests/TestExpectations
@@ -8833,3 +8833,4 @@ # Gardener 2026-11-28 crbug.com/591173527 [ Debug Linux ] external/wpt/webdriver/tests/classic/perform_actions/key_events.py [ Failure Pass Timeout ] crbug.com/590646349 [ Debug Linux ] external/wpt/webdriver/tests/classic/set_window_rect/user_prompts.py [ Failure Pass Timeout ] +crbug.com/591308488 [ Debug Linux ] external/wpt/encoding/unsupported-labels.window.html [ Crash Pass ]
diff --git a/third_party/compiler-rt/README.chromium b/third_party/compiler-rt/README.chromium index 7a3c34c2e..e1eb4455d 100644 --- a/third_party/compiler-rt/README.chromium +++ b/third_party/compiler-rt/README.chromium
@@ -2,7 +2,7 @@ Short Name: compiler-rt URL: https://compiler-rt.llvm.org/ Version: N/A -Revision: dfcaf3782c0ff818be24554712ce2e04352da92d +Revision: d10af25449fd0a16ae59e4a88582947f3adf53cd Update Mechanism: Autoroll License: NCSA, Apache-with-LLVM-Exception, MIT License File: src/LICENSE.TXT
diff --git a/third_party/compiler-rt/src b/third_party/compiler-rt/src index dfcaf37..d10af25 160000 --- a/third_party/compiler-rt/src +++ b/third_party/compiler-rt/src
@@ -1 +1 @@ -Subproject commit dfcaf3782c0ff818be24554712ce2e04352da92d +Subproject commit d10af25449fd0a16ae59e4a88582947f3adf53cd
diff --git a/third_party/crashpad/crashpad/test/ios/crash_type_xctest.mm b/third_party/crashpad/crashpad/test/ios/crash_type_xctest.mm index e49a6c3..7ae63e3 100644 --- a/third_party/crashpad/crashpad/test/ios/crash_type_xctest.mm +++ b/third_party/crashpad/crashpad/test/ios/crash_type_xctest.mm
@@ -465,13 +465,7 @@ XCTAssertFalse(reader.Pop(ringBufferEntry)); } -// TODO(crbug.com/590805901): Fails on devices. -#if !TARGET_IPHONE_SIMULATOR -#define MAYBE_testCrashWithExtraMemory DISABLED_testCrashWithExtraMemory -#else -#define MAYBE_testCrashWithExtraMemory testCrashWithExtraMemory -#endif -- (void)MAYBE_testCrashWithExtraMemory { +- (void)testCrashWithExtraMemory { #if TARGET_OS_SIMULATOR // This test will fail on <iOS17 simulators when running on macOS >=14.3 or // <iOS18 simulators when running on macOS >=15.4 due to a bug in Simulator.
diff --git a/third_party/fuzztest/BUILD.gn b/third_party/fuzztest/BUILD.gn index c5920d2..68a7703 100644 --- a/third_party/fuzztest/BUILD.gn +++ b/third_party/fuzztest/BUILD.gn
@@ -119,14 +119,14 @@ source_set("centipede_runner_no_main") { testonly = true sources = [ + "src/centipede/engine_flag_helper.cc", + "src/centipede/engine_flag_helper.h", "src/centipede/engine_worker.cc", "src/centipede/engine_worker_abi.h", "src/centipede/runner.cc", "src/centipede/runner.h", "src/centipede/runner_fork_server.cc", "src/centipede/runner_interface.h", - "src/centipede/runner_utils.cc", - "src/centipede/runner_utils.h", "src/framework_shared/internal/coverage_interceptors.cc", "src/framework_shared/internal/interceptor_utils.h", "src/framework_shared/internal/runner_dl_info.cc", @@ -137,6 +137,8 @@ "src/framework_shared/internal/sancov_object_array.h", "src/framework_shared/internal/sancov_state.cc", "src/framework_shared/internal/sancov_state.h", + "src/framework_shared/internal/sancov_utils.cc", + "src/framework_shared/internal/sancov_utils.h", ] deps = [ @@ -381,6 +383,7 @@ "src/common/escaping.h", "src/common/hash.cc", "src/common/hash.h", + "src/common/logging.cc", "src/common/logging.h", "src/common/remote_file.cc", "src/common/remote_file.h",
diff --git a/third_party/fuzztest/README.chromium b/third_party/fuzztest/README.chromium index 0a10bb0..73f65c3d 100644 --- a/third_party/fuzztest/README.chromium +++ b/third_party/fuzztest/README.chromium
@@ -1,7 +1,7 @@ Name: Fuzztest URL: https://github.com/google/fuzztest Version: N/A -Revision: b7ef234c594beeb90ef6089fa30d6b3c0c65e82b +Revision: 45d65d84fe1ee1489c3249560a5b386a2afb8ef6 Update Mechanism: Autoroll License: dtoa, BSD-3-Clause, Apache-2.0 Security Critical: no
diff --git a/third_party/fuzztest/src b/third_party/fuzztest/src index b7ef234..45d65d8 160000 --- a/third_party/fuzztest/src +++ b/third_party/fuzztest/src
@@ -1 +1 @@ -Subproject commit b7ef234c594beeb90ef6089fa30d6b3c0c65e82b +Subproject commit 45d65d84fe1ee1489c3249560a5b386a2afb8ef6
diff --git a/third_party/googletest/README.chromium b/third_party/googletest/README.chromium index f08e8f12..6b26345 100644 --- a/third_party/googletest/README.chromium +++ b/third_party/googletest/README.chromium
@@ -2,7 +2,7 @@ Short Name: googletest URL: https://github.com/google/googletest.git Version: N/A -Revision: a46a6012a133c7c0929fdae55b321c2fe65f3c5f +Revision: 29c6d63146d587e062217a5dfbbbaaedfab04f9e Update Mechanism: Autoroll License: BSD-3-Clause License File: src/LICENSE
diff --git a/third_party/googletest/src b/third_party/googletest/src index a46a601..29c6d63 160000 --- a/third_party/googletest/src +++ b/third_party/googletest/src
@@ -1 +1 @@ -Subproject commit a46a6012a133c7c0929fdae55b321c2fe65f3c5f +Subproject commit 29c6d63146d587e062217a5dfbbbaaedfab04f9e
diff --git a/third_party/libFuzzer/README.chromium b/third_party/libFuzzer/README.chromium index 7f3c2a16..5d6b74dd 100644 --- a/third_party/libFuzzer/README.chromium +++ b/third_party/libFuzzer/README.chromium
@@ -1,7 +1,7 @@ Name: libFuzzer URL: http://llvm.org/docs/LibFuzzer.html Version: N/A -Revision: c7ea90fb61105752fa78e257e77a7c5d62fff7d3 +Revision: d4e508d39abe38b2d7c271820010c59f21c42537 Update Mechanism: Autoroll License: Apache-with-LLVM-Exception, NCSA, MIT License File: LICENSE.TXT
diff --git a/third_party/libFuzzer/src b/third_party/libFuzzer/src index c7ea90f..d4e508d 160000 --- a/third_party/libFuzzer/src +++ b/third_party/libFuzzer/src
@@ -1 +1 @@ -Subproject commit c7ea90fb61105752fa78e257e77a7c5d62fff7d3 +Subproject commit d4e508d39abe38b2d7c271820010c59f21c42537
diff --git a/third_party/llvm-libc/README.chromium b/third_party/llvm-libc/README.chromium index db470fb..ad40e64 100644 --- a/third_party/llvm-libc/README.chromium +++ b/third_party/llvm-libc/README.chromium
@@ -1,7 +1,7 @@ Name: llvm-libc URL: https://libc.llvm.org/ Version: N/A -Revision: 150dd464918cc5a61d509d6ff52fc9edcfc0a195 +Revision: 7fc0017c937ba7f741993d61b365c4a2199cdfef Update Mechanism: Autoroll License: Apache-with-LLVM-Exception, NCSA License File: src/LICENSE.TXT
diff --git a/third_party/llvm-libc/src b/third_party/llvm-libc/src index 150dd46..7fc0017 160000 --- a/third_party/llvm-libc/src +++ b/third_party/llvm-libc/src
@@ -1 +1 @@ -Subproject commit 150dd464918cc5a61d509d6ff52fc9edcfc0a195 +Subproject commit 7fc0017c937ba7f741993d61b365c4a2199cdfef
diff --git a/third_party/openscreen/README.chromium b/third_party/openscreen/README.chromium index e2a710d..27a9fc3 100644 --- a/third_party/openscreen/README.chromium +++ b/third_party/openscreen/README.chromium
@@ -2,7 +2,7 @@ Short Name: openscreen URL: https://chromium.googlesource.com/openscreen Version: N/A -Revision: 7642acff5a5251781a87bfeff98bbb92081b71bf +Revision: 43a6f17b5efeaa4470e3b200cc6d4b6297d68fe5 Update Mechanism: Autoroll License: BSD-3-Clause License File: src/LICENSE
diff --git a/third_party/openscreen/src b/third_party/openscreen/src index 7642acf..43a6f17 160000 --- a/third_party/openscreen/src +++ b/third_party/openscreen/src
@@ -1 +1 @@ -Subproject commit 7642acff5a5251781a87bfeff98bbb92081b71bf +Subproject commit 43a6f17b5efeaa4470e3b200cc6d4b6297d68fe5
diff --git a/third_party/perfetto b/third_party/perfetto index f98fd37..6ff067a 160000 --- a/third_party/perfetto +++ b/third_party/perfetto
@@ -1 +1 @@ -Subproject commit f98fd37411f2096b4eb382922511c485926db6e4 +Subproject commit 6ff067a989b7609a5887e26e966217db0f2d689a
diff --git a/third_party/webrtc b/third_party/webrtc index ebfaa71..b2b37fe 160000 --- a/third_party/webrtc +++ b/third_party/webrtc
@@ -1 +1 @@ -Subproject commit ebfaa7178364cb929bab049758d09f223a2c61e1 +Subproject commit b2b37fe09462f47423ae1d9270dd9e8789a171f6
diff --git a/tools/metrics/ukm/ukm.xml b/tools/metrics/ukm/ukm.xml index 647e66d..887324cd 100644 --- a/tools/metrics/ukm/ukm.xml +++ b/tools/metrics/ukm/ukm.xml
@@ -7072,39 +7072,11 @@ <owner>picarella@google.com</owner> <owner>mmaryia@google.com</owner> <summary> - As of M153, recorded when either a copy/cut or a subsequent paste event - occurs for a user with the AutofillAtMemory feature disabled (prior to M153, - it was recorded regardless of the feature status). A separate event entry is - logged for each action: a copy or cut from a tab records an entry with - `CopyFromTabNonce`, while a subsequent paste of that data from a different - tab and within 10 minutes, records a separate entry with - `PasteFromTabNonce`. - </summary> - <metric name="CopyFromTabNonce"> - <summary> - A random 64-bit integer recorded when a user copies or cuts data from a - non-incognito tab. - </summary> - </metric> - <metric name="PasteFromTabNonce"> - <summary> - The 64-bit nonce of the matching copy event, recorded when the user pastes - the copied data into a different tab within 10 minutes. Used to link the - copy and paste events. - </summary> - </metric> -</event> - -<event name="Clipboard.CopyPasteEvent.WithAtMemory"> - <owner>picarella@google.com</owner> - <owner>mmaryia@google.com</owner> - <summary> - Added in M153. Recorded when either a copy/cut or a subsequent paste event - occurs for a user with the AutofillAtMemory feature enabled. A separate - event entry is logged for each action: a copy or cut from a tab records an - entry with `CopyFromTabNonce`, while a subsequent paste of that data from a - different tab and within 10 minutes, records a separate entry with - `PasteFromTabNonce`. + Recorded when either a copy/cut or a subsequent paste event occurs. A + separate event entry is logged for each action: a copy or cut from a tab + records an entry with `CopyFromTabNonce`, while a subsequent paste of that + data from a different tab and within 10 minutes, records a separate entry + with `PasteFromTabNonce`. </summary> <metric name="CopyFromTabNonce"> <summary>
diff --git a/tools/perf/core/perfetto_binary_roller/binary_deps.json b/tools/perf/core/perfetto_binary_roller/binary_deps.json index 210b0b5..6737be3c 100644 --- a/tools/perf/core/perfetto_binary_roller/binary_deps.json +++ b/tools/perf/core/perfetto_binary_roller/binary_deps.json
@@ -5,8 +5,8 @@ "full_remote_path": "perfetto-luci-artifacts/f98fd37411f2096b4eb382922511c485926db6e4/linux-arm64/trace_processor_shell" }, "win": { - "hash": "6ddd0690dc35f13efab125bd75c285e654641d28", - "full_remote_path": "chromium-telemetry/perfetto_binaries/trace_processor_shell/win/f98fd37411f2096b4eb382922511c485926db6e4/trace_processor_shell.exe" + "hash": "4200b47281d7c17597390df1e88100a466b16855", + "full_remote_path": "chromium-telemetry/perfetto_binaries/trace_processor_shell/win/430f93ac92ab14b4faa3a50f7edddc2733a1dcf1/trace_processor_shell.exe" }, "linux_arm": { "hash": "53cf191100c15f3c0d8de8c6e62440782552fa66", @@ -21,8 +21,8 @@ "full_remote_path": "perfetto-luci-artifacts/f98fd37411f2096b4eb382922511c485926db6e4/mac-arm64/trace_processor_shell" }, "linux": { - "hash": "835b35b169d6c97030c14e63c23345c0cb77a15c", - "full_remote_path": "chromium-telemetry/perfetto_binaries/trace_processor_shell/linux/f98fd37411f2096b4eb382922511c485926db6e4/trace_processor_shell" + "hash": "9b14ca816eaf6ebc36129bb1da9c1271a6cd7ed1", + "full_remote_path": "chromium-telemetry/perfetto_binaries/trace_processor_shell/linux/6ff067a989b7609a5887e26e966217db0f2d689a/trace_processor_shell" } }, "power_profile.sql": {
diff --git a/ui/aura/window_event_dispatcher.cc b/ui/aura/window_event_dispatcher.cc index 6a6c990c..2a9db6dc 100644 --- a/ui/aura/window_event_dispatcher.cc +++ b/ui/aura/window_event_dispatcher.cc
@@ -434,7 +434,8 @@ bool WindowEventDispatcher::is_dispatched_held_event( const ui::Event& event) const { - return dispatching_held_event_ == &event; + return dispatching_held_event_id_ != 0 && + dispatching_held_event_id_ == event.unique_event_id(); } //////////////////////////////////////////////////////////////////////////////// @@ -612,7 +613,7 @@ CHECK(window()->Contains(target_window)); auto target_window_weak = target_window->GetWeakPtrAsWindow(); - if (!dispatching_held_event_) { + if (dispatching_held_event_id_ == 0) { bool can_be_held = IsEventCandidateForHold(*event); if (!move_hold_count_ || !can_be_held) { if (can_be_held) @@ -867,7 +868,7 @@ return DispatchDetails(); } - CHECK(!dispatching_held_event_); + CHECK_EQ(dispatching_held_event_id_, 0u); DispatchDetails dispatch_details; if (held_repostable_event_) { @@ -875,7 +876,7 @@ held_repostable_event_->type() == ui::EventType::kTouchPressed) { std::unique_ptr<ui::LocatedEvent> event = std::move(held_repostable_event_); - dispatching_held_event_ = event.get(); + dispatching_held_event_id_ = event->unique_event_id(); dispatch_details = OnEventFromSource(event.get()); } else { // TODO(rbyers): GESTURE_TAP_DOWN not yet supported: crbug.com/170987. @@ -896,13 +897,13 @@ // so drop the held mouse event. if (event->IsTouchEvent() || (event->IsMouseEvent() && !synthesize_mouse_move_)) { - dispatching_held_event_ = event.get(); + dispatching_held_event_id_ = event->unique_event_id(); dispatch_details = OnEventFromSource(event.get()); } } if (!dispatch_details.dispatcher_destroyed) { - dispatching_held_event_ = nullptr; + dispatching_held_event_id_ = 0; if (did_dispatch_held_move_event_callback_) std::move(did_dispatch_held_move_event_callback_).Run(); } @@ -1026,7 +1027,7 @@ Env::GetInstance()->env_controller()->UpdateStateForMouseEvent( window(), target, *event); - if (IsEventCandidateForHold(*event) && !dispatching_held_event_) { + if (IsEventCandidateForHold(*event) && dispatching_held_event_id_ == 0) { if (move_hold_count_) { held_move_event_ = base::WrapUnique<ui::MouseEvent>( event->Clone().release()->AsMouseEvent()); @@ -1133,7 +1134,7 @@ Window* target, ui::TouchEvent* event) { if (event->type() == ui::EventType::kTouchMoved && move_hold_count_ && - !dispatching_held_event_) { + dispatching_held_event_id_ == 0) { held_move_event_ = base::WrapUnique<ui::TouchEvent>( event->Clone().release()->AsTouchEvent()); held_move_event_->ConvertLocationToTarget(target, window());
diff --git a/ui/aura/window_event_dispatcher.h b/ui/aura/window_event_dispatcher.h index 0e331bc..6b9c9a3 100644 --- a/ui/aura/window_event_dispatcher.h +++ b/ui/aura/window_event_dispatcher.h
@@ -5,6 +5,8 @@ #ifndef UI_AURA_WINDOW_EVENT_DISPATCHER_H_ #define UI_AURA_WINDOW_EVENT_DISPATCHER_H_ +#include <stdint.h> + #include <memory> #include <queue> #include <vector> @@ -305,9 +307,9 @@ // Allowing for reposting of events. Used when exiting context menus. std::unique_ptr<ui::LocatedEvent> held_repostable_event_; - // Set when dispatching a held event. - raw_ptr<ui::LocatedEvent, DanglingUntriaged> dispatching_held_event_ = - nullptr; + // The unique id of the held event being dispatched, or 0 if no held event + // is being dispatched. + uint32_t dispatching_held_event_id_ = 0; base::ScopedMultiSourceObservation<aura::Window, aura::WindowObserver> observation_manager_{this};
diff --git a/ui/compositor/total_animation_throughput_reporter.cc b/ui/compositor/total_animation_throughput_reporter.cc index 4d8e55a..6a83b38c 100644 --- a/ui/compositor/total_animation_throughput_reporter.cc +++ b/ui/compositor/total_animation_throughput_reporter.cc
@@ -4,6 +4,7 @@ #include "ui/compositor/total_animation_throughput_reporter.h" +#include "base/check.h" #include "base/observer_list.h" #include "ui/compositor/compositor.h" @@ -18,8 +19,11 @@ TotalAnimationThroughputReporter::ScopedThroughputReporterBlocker:: ~ScopedThroughputReporterBlocker() { - if (reporter_) - reporter_->scoped_blocker_count_--; + if (reporter_) { + if (--reporter_->scoped_blocker_count_ == 0) { + reporter_->StopIfNotAnimating(); + } + } } TotalAnimationThroughputReporter::TotalAnimationThroughputReporter( @@ -66,27 +70,16 @@ void TotalAnimationThroughputReporter::OnFirstNonAnimatedFrameStarted( ui::Compositor* compositor) { - if (has_finished_observing_ || IsBlocked()) { + if (has_finished_observing_) { return; } timestamp_last_animation_finished_at_ = base::TimeTicks::Now(); - - bool will_report = compositor_metrics_tracker_->Stop(); - compositor_metrics_tracker_.reset(); - // Stop observing if no need to report multiple times. - if (report_repeating_callback_.is_null()) { - has_finished_observing_ = true; - if (!will_report) { - if (compositor_) { - compositor_->RemoveObserver(this); - compositor_ = nullptr; - } - if (should_delete_) { - delete this; - } - } + if (IsBlocked()) { + return; } + + StopTracking(); } void TotalAnimationThroughputReporter::OnCompositingShuttingDown( @@ -133,6 +126,33 @@ OnFirstAnimationStarted(compositor_); } +void TotalAnimationThroughputReporter::StopIfNotAnimating() { + if (has_finished_observing_ || !compositor_metrics_tracker_ || !compositor_ || + compositor_->IsAnimating()) { + return; + } + StopTracking(); +} + +void TotalAnimationThroughputReporter::StopTracking() { + CHECK(compositor_metrics_tracker_); + bool will_report = compositor_metrics_tracker_->Stop(); + compositor_metrics_tracker_.reset(); + // Stop observing if no need to report multiple times. + if (report_repeating_callback_.is_null()) { + has_finished_observing_ = true; + if (!will_report) { + if (compositor_) { + compositor_->RemoveObserver(this); + compositor_ = nullptr; + } + if (should_delete_) { + delete this; + } + } + } +} + void TotalAnimationThroughputReporter::Report( const cc::FrameSequenceMetrics::CustomReportData& data) { if (!report_once_callback_.is_null()) {
diff --git a/ui/compositor/total_animation_throughput_reporter.h b/ui/compositor/total_animation_throughput_reporter.h index 5b142656..da76414 100644 --- a/ui/compositor/total_animation_throughput_reporter.h +++ b/ui/compositor/total_animation_throughput_reporter.h
@@ -46,8 +46,8 @@ class COMPOSITOR_EXPORT TotalAnimationThroughputReporter : public CompositorObserver { public: - // This allows to temporarily ignore OnFirstNonAnimatedFrameStarted event - // until an interesting event happens. + // Delays reporting until the blocker is destroyed. If all animations have + // already finished when the last blocker is destroyed, stops tracking. class COMPOSITOR_EXPORT ScopedThroughputReporterBlocker { public: explicit ScopedThroughputReporterBlocker( @@ -100,9 +100,11 @@ return compositor_metrics_tracker_.has_value(); } - // The returned scope will delay the animation report until the next - // |OnFirstNonAnimatedFrameStarted| received after it is destructed. See - // |ScopedThroughputReporterBlocker| above. + // Delays the animation report until the returned scope is destructed. If + // animations have already finished by then, stops tracking immediately + // (which may delete `this` if `should_delete` is true); otherwise waits for + // the next `OnFirstNonAnimatedFrameStarted()`. See + // `ScopedThroughputReporterBlocker` above. std::unique_ptr<ScopedThroughputReporterBlocker> NewScopedBlocker(); private: @@ -113,6 +115,8 @@ ReportOnceCallback once_callback, bool should_delete); + void StopIfNotAnimating(); + void StopTracking(); void Report(const cc::FrameSequenceMetrics::CustomReportData& data); // Returns true if there is an active ScopedThroughputReporterBlocker. @@ -125,11 +129,8 @@ bool has_finished_observing_ = false; std::optional<CompositorMetricsTracker> compositor_metrics_tracker_; - // These are always recorded in pairs. Specifically, - // `timestamp_first_animation_started_at_` is recorded when - // `compositor_metrics_tracker_` is created/started, and - // `timestamp_last_animation_finished_at_` is recorded when the tracker is - // stopped/destructed. + // Start of the first animation and end of the last animation in the + // tracked sequence. base::TimeTicks timestamp_first_animation_started_at_; base::TimeTicks timestamp_last_animation_finished_at_;
diff --git a/ui/compositor/total_animation_throughput_reporter_unittest.cc b/ui/compositor/total_animation_throughput_reporter_unittest.cc index b4828e2..4480264 100644 --- a/ui/compositor/total_animation_throughput_reporter_unittest.cc +++ b/ui/compositor/total_animation_throughput_reporter_unittest.cc
@@ -134,12 +134,11 @@ EXPECT_FALSE(checker.reported()); scoped_blocker.reset(); - // No animation should be running yet, nothing to report. - EXPECT_FALSE(checker.reported()); - Advance(base::Milliseconds(200)); - EXPECT_FALSE(checker.reported()); + EXPECT_FALSE(reporter.IsMeasuringForTesting()); + EXPECT_TRUE(checker.WaitUntilReported()); // Animation of opacity goes to 0.5. + checker.reset(); SetLayerOpacity(layer, 0.5f, base::Milliseconds(48)); Advance(base::Milliseconds(32)); EXPECT_FALSE(checker.reported()); @@ -386,33 +385,86 @@ // from compositor as observer. ObserverChecker observer_checker(compositor(), &reporter); - // Report data for animation of opacity goes to 1. SetLayerOpacity(layer, 1.0f, base::Milliseconds(48)); - Advance(base::Milliseconds(100)); - - // No report should happen while scoped_blocker exists. - EXPECT_FALSE(checker.reported()); - - // Make sure there are no animations running. compositor_monitor.WaitForAllAnimationsEnd(); - - scoped_blocker.reset(); - // No animation should be running yet, nothing to report. - EXPECT_FALSE(checker.reported()); Advance(base::Milliseconds(100)); + // No report should happen while scoped_blocker exists, even after the + // animation finishes. EXPECT_FALSE(checker.reported()); - // Animation of opacity goes to 0.5. + // Start a second animation and destroy scoped_blocker while it is still + // running; reporting should wait until this animation finishes. SetLayerOpacity(layer, 0.7f, base::Milliseconds(48)); + scoped_blocker.reset(); + EXPECT_TRUE(reporter.IsMeasuringForTesting()); EXPECT_TRUE(checker.WaitUntilReported()); - // Report data for animation of opacity goes to 0.5. + // OnceReporter should not report subsequent animations. checker.reset(); SetLayerOpacity(layer, 1.0f, base::Milliseconds(48)); + compositor_monitor.WaitForAllAnimationsEnd(); Advance(base::Milliseconds(100)); EXPECT_FALSE(checker.reported()); } +// Tests that destroying the last ScopedThroughputReporterBlocker stops tracking +// and reports animations that already finished while blocked. +TEST_F(TotalAnimationThroughputReporterTest, + ScopedBlockerDestructionReportsFinishedAnimation) { + TestCompositorMonitor compositor_monitor(compositor()); + LayerTextured layer; + layer.SetOpacity(0.5f); + root_layer()->Add(&layer); + + CompositorMetricsReportChecker checker(this); + base::TimeTicks reported_first_started; + base::TimeTicks reported_last_finished; + TotalAnimationThroughputReporter reporter( + compositor(), + base::BindLambdaForTesting( + [&](const cc::FrameSequenceMetrics::CustomReportData& data, + base::TimeTicks first_animation_started_at, + base::TimeTicks last_animation_finished_at) { + reported_first_started = first_animation_started_at; + reported_last_finished = last_animation_finished_at; + checker.once_callback().Run(data); + }), + /*should_delete=*/false); + ObserverChecker observer_checker(compositor(), &reporter); + + // Destroying a blocker before any animation starts is a no-op. + reporter.NewScopedBlocker().reset(); + EXPECT_FALSE(reporter.IsMeasuringForTesting()); + EXPECT_FALSE(checker.reported()); + + auto scoped_blocker_1 = reporter.NewScopedBlocker(); + auto scoped_blocker_2 = reporter.NewScopedBlocker(); + const base::TimeTicks before_first_animation = base::TimeTicks::Now(); + SetLayerOpacity(layer, 1.0f, base::Milliseconds(48)); + compositor_monitor.WaitForAllAnimationsEnd(); + + // Destroying one of multiple active blockers keeps the reporter blocked. + scoped_blocker_2.reset(); + EXPECT_TRUE(reporter.IsMeasuringForTesting()); + Advance(base::Milliseconds(50)); + EXPECT_FALSE(checker.reported()); + + const base::TimeTicks before_second_animation = base::TimeTicks::Now(); + SetLayerOpacity(layer, 0.7f, base::Milliseconds(48)); + compositor_monitor.WaitForAllAnimationsEnd(); + const base::TimeTicks after_second_animation = base::TimeTicks::Now(); + + Advance(base::Milliseconds(50)); + scoped_blocker_1.reset(); + EXPECT_FALSE(reporter.IsMeasuringForTesting()); + EXPECT_TRUE(checker.WaitUntilReported()); + EXPECT_FALSE(reported_first_started.is_null()); + EXPECT_GE(reported_first_started, before_first_animation); + EXPECT_LE(reported_first_started, before_second_animation); + EXPECT_GE(reported_last_finished, before_second_animation); + EXPECT_LE(reported_last_finished, after_second_animation); +} + // One reporter marked as "should_delete" should be deleted when // reported. TEST_F(TotalAnimationThroughputReporterTest, OnceReporterShouldDelete) { @@ -461,15 +513,12 @@ // Make sure there are no animations running. compositor_monitor.WaitForAllAnimationsEnd(); - - scoped_blocker.reset(); - // No animation should be running yet, nothing to report. - EXPECT_FALSE(deleted); Advance(base::Milliseconds(100)); EXPECT_FALSE(deleted); // Animation of opacity goes to 0.5. layer.SetOpacity(0.7f); + scoped_blocker.reset(); EXPECT_FALSE(deleted); Advance(base::Milliseconds(100)); EXPECT_TRUE(deleted); @@ -511,15 +560,12 @@ // Make sure there are no animations running. compositor_monitor.WaitForAllAnimationsEnd(); - - scoped_blocker.reset(); - // No animation should be running yet, nothing to report. - EXPECT_FALSE(checker.reported()); Advance(base::Milliseconds(100)); EXPECT_FALSE(checker.reported()); // Animation of opacity goes to 0.5. layer.SetOpacity(0.7f); + scoped_blocker.reset(); EXPECT_TRUE(checker.WaitUntilReported()); }
diff --git a/ui/events/android/motion_event_android.cc b/ui/events/android/motion_event_android.cc index e8c7677..f459f70 100644 --- a/ui/events/android/motion_event_android.cc +++ b/ui/events/android/motion_event_android.cc
@@ -169,7 +169,7 @@ MotionEventAndroid::CachedPointer::CachedPointer() = default; MotionEventAndroid::MotionEventAndroid() - : unique_event_id_(ui::GetNextTouchEventId()) {} + : unique_event_id_(ui::GetNextEventId()) {} MotionEventAndroid::MotionEventAndroid( float pix_to_dip, @@ -211,7 +211,7 @@ cached_flags_(ToEventFlags(android_meta_state, android_button_state)), cached_raw_position_offset_(ToDips(raw_offset_x_pixels), ToDips(raw_offset_y_pixels)), - unique_event_id_(ui::GetNextTouchEventId()), + unique_event_id_(ui::GetNextEventId()), source_(std::move(source)) { CHECK_GT(cached_pointer_count_, 0U, base::NotFatalUntil::M163); CHECK(cached_pointer_count_ == 1 || pointer1, base::NotFatalUntil::M163); @@ -241,7 +241,7 @@ cached_button_state_(e.cached_button_state_), cached_flags_(e.cached_flags_), cached_raw_position_offset_(e.cached_raw_position_offset_), - unique_event_id_(ui::GetNextTouchEventId()), + unique_event_id_(ui::GetNextEventId()), source_(e.source_->Clone()) { cached_pointers_.push_back(CreateCachedPointer(e.cached_pointers_[0], point)); if (cached_pointer_count_ > 1) {
diff --git a/ui/events/base_event_utils.cc b/ui/events/base_event_utils.cc index 73fc5a0..36943a8c 100644 --- a/ui/events/base_event_utils.cc +++ b/ui/events/base_event_utils.cc
@@ -5,7 +5,6 @@ #include "ui/events/base_event_utils.h" #include "base/atomic_sequence_num.h" -#include "base/check_op.h" #include "base/command_line.h" #include "base/time/time.h" #include "build/build_config.h" @@ -29,15 +28,15 @@ } // namespace -base::AtomicSequenceNumber g_next_event_id; +base::AtomicSequenceNumberT<uint32_t> g_next_event_id; -uint32_t GetNextTouchEventId() { - // Set the first touch event ID to 1 because we set id to 0 for other types - // of events. +uint32_t GetNextEventId() { + // Skip 0, which is used to mean "no event", both for the first id and + // when the id wraps around. uint32_t id = g_next_event_id.GetNext(); - if (id == 0) + if (id == 0) { id = g_next_event_id.GetNext(); - CHECK_NE(0U, id, base::NotFatalUntil::M163); + } return id; }
diff --git a/ui/events/base_event_utils.h b/ui/events/base_event_utils.h index e55eee2..8333745 100644 --- a/ui/events/base_event_utils.h +++ b/ui/events/base_event_utils.h
@@ -18,7 +18,7 @@ namespace ui { // Generate an unique identifier for events. -EVENTS_BASE_EXPORT uint32_t GetNextTouchEventId(); +EVENTS_BASE_EXPORT uint32_t GetNextEventId(); // Checks if |flags| contains system key modifiers. EVENTS_BASE_EXPORT bool IsSystemKeyModifier(int flags);
diff --git a/ui/events/event.cc b/ui/events/event.cc index 7e0a8ce8..b6d33b3 100644 --- a/ui/events/event.cc +++ b/ui/events/event.cc
@@ -282,13 +282,14 @@ : type_(type), time_stamp_(time_stamp.is_null() ? EventTimeForNow() : time_stamp), flags_(flags), - native_event_(CreateInvalidPlatformEvent()) { -} + unique_event_id_(GetNextEventId()), + native_event_(CreateInvalidPlatformEvent()) {} Event::Event(const PlatformEvent& native_event, EventType type, int flags) : type_(type), time_stamp_(EventTimeFromNative(native_event)), flags_(flags), + unique_event_id_(GetNextEventId()), // Note that the construction of an Event directly from a PlatformEvent // is the only time that ShouldCopyPlatformEvents() is not consulted. native_event_(native_event) { @@ -306,6 +307,7 @@ time_stamp_(copy.time_stamp_), latency_(copy.latency_), flags_(copy.flags_), + unique_event_id_(copy.unique_event_id_), native_event_(ShouldCopyPlatformEvents() ? copy.native_event_ : CreateInvalidPlatformEvent()), source_device_id_(copy.source_device_id_), @@ -319,6 +321,7 @@ time_stamp_ = rhs.time_stamp_; latency_ = rhs.latency_; flags_ = rhs.flags_; + unique_event_id_ = rhs.unique_event_id_; native_event_ = ShouldCopyPlatformEvents() ? rhs.native_event_ : CreateInvalidPlatformEvent(); cancelable_ = rhs.cancelable_; @@ -684,7 +687,6 @@ TouchEvent::TouchEvent(const PlatformEvent& native_event) : LocatedEvent(native_event), - unique_event_id_(ui::GetNextTouchEventId()), pointer_details_(GetTouchPointerDetailsFromNative(native_event)) { latency()->AddLatencyNumberWithTimestamp( INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, time_stamp()); @@ -698,7 +700,6 @@ const PointerDetails& pointer_details, int flags) : LocatedEvent(type, location, root_location, time_stamp, flags), - unique_event_id_(ui::GetNextTouchEventId()), pointer_details_(pointer_details) { latency()->AddLatencyNumber(INPUT_EVENT_LATENCY_UI_COMPONENT); } @@ -717,7 +718,6 @@ TouchEvent::TouchEvent(const TouchEvent& copy) : LocatedEvent(copy), - unique_event_id_(copy.unique_event_id_), may_cause_scrolling_(copy.may_cause_scrolling_), hovering_(copy.hovering_), pointer_details_(copy.pointer_details_) {
diff --git a/ui/events/event.h b/ui/events/event.h index 490fc066..0b6afad 100644 --- a/ui/events/event.h +++ b/ui/events/event.h
@@ -100,6 +100,12 @@ const LatencyInfo* latency() const { return &latency_; } void set_latency(const LatencyInfo& latency) { latency_ = latency; } + // A unique identifier for this event. Copies of an event share the id + // of the original, so it tells if two events are the same event. + // NOTE: this is *not* serialized over mojom, as the number is unique + // to a particular process. + uint32_t unique_event_id() const { return unique_event_id_; } + int source_device_id() const { return source_device_id_; } void set_source_device_id(int id) { source_device_id_ = id; } @@ -343,6 +349,7 @@ base::TimeTicks time_stamp_; LatencyInfo latency_; int flags_; + uint32_t unique_event_id_; PlatformEvent native_event_; bool cancelable_ = true; // Neither Event copy constructor nor the assignment operator copies @@ -687,7 +694,6 @@ template <class T> TouchEvent(const TouchEvent& model, T* source, T* target) : LocatedEvent(model, source, target), - unique_event_id_(model.unique_event_id_), may_cause_scrolling_(model.may_cause_scrolling_), pointer_details_(model.pointer_details_) {} @@ -709,9 +715,6 @@ ~TouchEvent() override; - // A unique identifier for this event. - uint32_t unique_event_id() const { return unique_event_id_; } - void set_may_cause_scrolling(bool causes) { may_cause_scrolling_ = causes; } bool may_cause_scrolling() const { return may_cause_scrolling_; } @@ -745,12 +748,6 @@ std::unique_ptr<Event> Clone() const override; private: - // A unique identifier for the touch event. - // NOTE: this is *not* serialized over mojom, as the number is unique to - // a particular process, and as mojom may go cross process, to serialize could - // lead to conflicts. - uint32_t unique_event_id_; - // Whether the (unhandled) touch event will produce a scroll event (e.g., a // touchmove that exceeds the platform slop region, or a touchend that // causes a fling). Defaults to false.
diff --git a/ui/events/event_unittest.cc b/ui/events/event_unittest.cc index d6a193fc..2c624e2 100644 --- a/ui/events/event_unittest.cc +++ b/ui/events/event_unittest.cc
@@ -392,6 +392,47 @@ EXPECT_EQ(copied_key->key_code(), key.key_code()); } +// Tests that every event gets its own unique id regardless of its type. +TEST(EventTest, UniqueEventId) { + const KeyEvent key1(EventType::kKeyPressed, VKEY_A, EF_NONE); + const KeyEvent key2(EventType::kKeyPressed, VKEY_A, EF_NONE); + const MouseEvent mouse(EventType::kMousePressed, gfx::Point(), gfx::Point(), + EventTimeForNow(), EF_NONE, EF_NONE); + const TouchEvent touch(EventType::kTouchPressed, gfx::Point(), + EventTimeForNow(), PointerDetails()); + const GestureEvent gesture(0, 0, EF_NONE, EventTimeForNow(), + GestureEventDetails(EventType::kGestureTap)); + + const std::array<uint32_t, 5> ids = { + key1.unique_event_id(), key2.unique_event_id(), mouse.unique_event_id(), + touch.unique_event_id(), gesture.unique_event_id()}; + for (size_t i = 0; i < ids.size(); ++i) { + EXPECT_NE(0u, ids[i]); + for (size_t j = i + 1; j < ids.size(); ++j) { + EXPECT_NE(ids[i], ids[j]) << i << " vs " << j; + } + } +} + +// Tests that a copy of an event shares the unique id of the original. +TEST(EventTest, UniqueEventIdIsCopied) { + const KeyEvent key(EventType::kKeyPressed, VKEY_A, EF_NONE); + const KeyEvent copied_key(key); + EXPECT_EQ(key.unique_event_id(), copied_key.unique_event_id()); + EXPECT_EQ(key.unique_event_id(), key.Clone()->unique_event_id()); + + KeyEvent assigned_key(EventType::kKeyReleased, VKEY_B, EF_NONE); + EXPECT_NE(key.unique_event_id(), assigned_key.unique_event_id()); + assigned_key = key; + EXPECT_EQ(key.unique_event_id(), assigned_key.unique_event_id()); + + const TouchEvent touch(EventType::kTouchPressed, gfx::Point(), + EventTimeForNow(), PointerDetails()); + const TouchEvent copied_touch(touch); + EXPECT_EQ(touch.unique_event_id(), copied_touch.unique_event_id()); + EXPECT_EQ(touch.unique_event_id(), touch.Clone()->unique_event_id()); +} + TEST(EventTest, KeyEventCode) { const DomCode kDomCodeForSpace = DomCode::SPACE; const char kCodeForSpace[] = "Space";
diff --git a/ui/events/test/motion_event_test_utils.cc b/ui/events/test/motion_event_test_utils.cc index 0350853..90fe10d 100644 --- a/ui/events/test/motion_event_test_utils.cc +++ b/ui/events/test/motion_event_test_utils.cc
@@ -83,7 +83,7 @@ const std::vector<gfx::PointF>& positions) { set_action(action); set_event_time(time); - set_unique_event_id(ui::GetNextTouchEventId()); + set_unique_event_id(ui::GetNextEventId()); if (action == Action::POINTER_UP || action == Action::POINTER_DOWN) set_action_index(static_cast<int>(positions.size()) - 1); for (auto position : positions) { @@ -190,7 +190,7 @@ } void MockMotionEvent::UpdatePointersAndID() { - set_unique_event_id(ui::GetNextTouchEventId()); + set_unique_event_id(ui::GetNextEventId()); switch (GetAction()) { case Action::POINTER_UP: { int index = GetActionIndex();
diff --git a/ui/events/velocity_tracker/motion_event_generic.cc b/ui/events/velocity_tracker/motion_event_generic.cc index 19bdff12..a63798b 100644 --- a/ui/events/velocity_tracker/motion_event_generic.cc +++ b/ui/events/velocity_tracker/motion_event_generic.cc
@@ -101,7 +101,7 @@ const PointerProperties& pointer) : action_(action), event_time_(event_time), - unique_event_id_(ui::GetNextTouchEventId()), + unique_event_id_(ui::GetNextEventId()), action_index_(0), button_state_(0), flags_(0) { @@ -299,7 +299,7 @@ cancel_event->RemovePointerAt(event.GetActionIndex()); } cancel_event->set_action(Action::CANCEL); - cancel_event->set_unique_event_id(ui::GetNextTouchEventId()); + cancel_event->set_unique_event_id(ui::GetNextEventId()); return cancel_event; } @@ -328,7 +328,7 @@ MotionEventGeneric::MotionEventGeneric() : action_(Action::NONE), - unique_event_id_(ui::GetNextTouchEventId()), + unique_event_id_(ui::GetNextEventId()), action_index_(-1), button_state_(0) {}
diff --git a/ui/gfx/render_text_harfbuzz.cc b/ui/gfx/render_text_harfbuzz.cc index 7451ff1..13661e4 100644 --- a/ui/gfx/render_text_harfbuzz.cc +++ b/ui/gfx/render_text_harfbuzz.cc
@@ -403,58 +403,101 @@ first.has_emoji == second.has_emoji && first.block == second.block; } -// Returns the end of the current grapheme cluster. This function is finding the -// breaking point where grapheme properties are no longer compatible -// (see: UNICODE TEXT SEGMENTATION (http://unicode.org/reports/tr29/). -// Breaks between |run_start| and |run_end| and force break after the grapheme -// starting at |run_break|. -size_t FindRunBreakingCharacter(std::u16string_view text, - UScriptCode script, - size_t run_start, - size_t run_break, - size_t run_end) { - const size_t run_length = run_end - run_start; - const std::u16string_view run_text(text.substr(run_start, run_length)); - const bool is_common_script = (script == USCRIPT_COMMON); - - DCHECK(!run_text.empty()); - - // Create an iterator to split the text in graphemes. - base::i18n::BreakIterator grapheme_iterator( - run_text, base::i18n::BreakIterator::BREAK_CHARACTER); - if (!grapheme_iterator.Init() || !grapheme_iterator.Advance()) { - NOTREACHED(); +// Splits a text into graphemes with one ICU break iterator that walks forward +// over the text. The callers cut the graphemes at the end of the run they are +// splitting. A grapheme break only depends on the text before it and the next +// character, so a run that starts at a grapheme boundary has the same graphemes +// as the text. After a grapheme was cut, the next run starts inside a grapheme, +// so the iterator restarts there, as if the text started there. +class RunGraphemeIterator { + public: + explicit RunGraphemeIterator(std::u16string_view text) + : text_(text), + icu_iterator_(text, base::i18n::BreakIterator::BREAK_CHARACTER) { + CHECK(icu_iterator_.Init()); } + // Returns the start of the next grapheme. + size_t pos() const { return pos_; } + + // Returns the next grapheme, cut at |end|. Does not move pos(); call Skip() + // to move past it. + std::u16string_view GetNextGrapheme(size_t end) { + DCHECK_LT(pos_, end); + DCHECK_LE(end, text_.size()); + if (pos_ == grapheme_.end()) { + ReadGrapheme(); + } else if (grapheme_.start() < pos_ && pos_ < grapheme_.end()) { + // The previous grapheme was cut, so |pos_| is inside |grapheme_|. + // Restart ICU at |pos_|, as if the text started there. + icu_iterator_.SetText(text_.substr(pos_)); + offset_ = pos_; + ReadGrapheme(); + } + return text_.substr(pos_, std::min<size_t>(grapheme_.end(), end) - pos_); + } + + // Moves pos() past |grapheme|, which was returned by GetNextGrapheme(). + void Skip(std::u16string_view grapheme) { pos_ += grapheme.size(); } + + private: + // Reads the grapheme at |pos_| from ICU into |grapheme_|. + void ReadGrapheme() { + CHECK(icu_iterator_.Advance()); + grapheme_ = Range(pos_, offset_ + icu_iterator_.pos()); + } + + const std::u16string_view text_; + base::i18n::BreakIterator icu_iterator_; + // Where the text of |icu_iterator_| starts in |text_|. + size_t offset_ = 0; + // The last grapheme read from |icu_iterator_|. + Range grapheme_; + // The start of the next grapheme. + size_t pos_ = 0; +}; + +// Returns the next run, which starts at the position of |grapheme_iterator|, +// and moves |grapheme_iterator| to its end. This function is finding the +// breaking point where grapheme properties are no longer compatible +// (see: UNICODE TEXT SEGMENTATION (http://unicode.org/reports/tr29/). +// Breaks before |run_end| and force break after the grapheme starting at +// |run_break|. +Range FindRunBreakingCharacter(UScriptCode script, + size_t run_break, + size_t run_end, + RunGraphemeIterator& grapheme_iterator) { + const bool is_common_script = (script == USCRIPT_COMMON); + const size_t run_start = grapheme_iterator.pos(); + // Retrieve the first grapheme and its codepoint properties. - const std::u16string_view first_grapheme_text = grapheme_iterator.GetString(); + const std::u16string_view first_grapheme_text = + grapheme_iterator.GetNextGrapheme(run_end); const GraphemeProperties first_grapheme_properties = RetrieveGraphemeProperties(first_grapheme_text, is_common_script); + grapheme_iterator.Skip(first_grapheme_text); // Append subsequent graphemes in this grapheme cluster if they are // compatible, otherwise break the current run. - while (grapheme_iterator.Advance()) { + while (grapheme_iterator.pos() < run_end) { const std::u16string_view current_grapheme_text = - grapheme_iterator.GetString(); + grapheme_iterator.GetNextGrapheme(run_end); const GraphemeProperties current_grapheme_properties = RetrieveGraphemeProperties(current_grapheme_text, is_common_script); - const size_t current_breaking_position = - run_start + grapheme_iterator.prev(); if (!AreGraphemePropertiesCompatible(first_grapheme_properties, current_grapheme_properties)) { - return current_breaking_position; + break; } // Break if the beginning of this grapheme is after |run_break|. - if (run_start + grapheme_iterator.prev() >= run_break) { - DCHECK_LE(current_breaking_position, run_end); - return current_breaking_position; + if (grapheme_iterator.pos() >= run_break) { + break; } + grapheme_iterator.Skip(current_grapheme_text); } - // Do not break this run, returns end of the text. - return run_end; + return Range(run_start, grapheme_iterator.pos()); } // Find the longest sequence of characters from 0 and up to |length| that have @@ -2231,10 +2274,13 @@ // break text runs to keep ligature between graphemes (e.g. Arabic word). internal::StyleIterator style = GetLayoutTextStyleIterator(); + // Iterator to split runs in graphemes, shared by all the runs. + RunGraphemeIterator grapheme_iterator(text); + // Split the original text by logical runs, then each logical run by common // script and each sequence at special characters and style boundaries. This - // invariant holds: bidi_run_start <= script_run_start <= breaking_run_start - // <= breaking_run_end <= script_run_end <= bidi_run_end + // invariant holds: bidi_run_start <= script_run_start <= run_range.start() + // < run_range.end() <= script_run_end <= bidi_run_end for (size_t bidi_run_start = 0; bidi_run_start < text.length();) { // Determine the longest logical run (e.g. same bidi direction) from this // point. @@ -2260,38 +2306,35 @@ script_run_start; DCHECK_LT(script_run_start, script_run_end); - for (size_t breaking_run_start = script_run_start; - breaking_run_start < script_run_end;) { + DCHECK_EQ(grapheme_iterator.pos(), script_run_start); + while (grapheme_iterator.pos() < script_run_end) { // Find the break boundary for style. The style won't break a grapheme // since the style of the first character is applied to the whole // grapheme. - style.IncrementToPosition(breaking_run_start); + style.IncrementToPosition(grapheme_iterator.pos()); size_t text_style_end = style.GetTextBreakingRange().end(); // Break runs at certain characters that need to be rendered separately // to prevent an unusual character from forcing a fallback font on the // entire run. After script intersection, many codepoints end up in the // script COMMON but can't be rendered together. - size_t breaking_run_end = FindRunBreakingCharacter( - text, script, breaking_run_start, text_style_end, script_run_end); + const Range run_range = FindRunBreakingCharacter( + script, text_style_end, script_run_end, grapheme_iterator); - DCHECK_LT(breaking_run_start, breaking_run_end); - DCHECK(IsValidCodePointIndex(text, breaking_run_end)); + DCHECK(!run_range.is_empty()); + DCHECK(IsValidCodePointIndex(text, run_range.end())); // Set the font params for the current run for the current run break. internal::TextRunHarfBuzz::FontParams font_params = CreateFontParams(primary_font, bidi_level, script, style); - // Create the current run from [breaking_run_start, breaking_run_end[. + // Create the current run from |run_range|. auto run = std::make_unique<internal::TextRunHarfBuzz>(primary_font); - run->range = Range(breaking_run_start, breaking_run_end); + run->range = run_range; // Add the created run to the set of runs. (*out_commonized_run_map)[font_params].push_back(run.get()); out_run_list->Add(std::move(run)); - - // Move to the next run. - breaking_run_start = breaking_run_end; } // Move to the next script sequence.
diff --git a/ui/gfx/render_text_unittest.cc b/ui/gfx/render_text_unittest.cc index 2903d1d0..4f988003 100644 --- a/ui/gfx/render_text_unittest.cc +++ b/ui/gfx/render_text_unittest.cc
@@ -7734,6 +7734,42 @@ kText, face_params, range)); } +// One iterator that walks over the whole text splits all the runs into +// graphemes, but a run must be split as if it were the whole text. The runs +// below start inside a grapheme of the whole text. +TEST_F(RenderTextTest, HarfBuzz_RunStartsInsideGrapheme) { + RenderText* render_text = GetRenderText(); + // Only test how the text is itemized, whatever the fonts support. + render_text->ignore_missing_glyph_breaks_for_test(true); + + // U+0600 (ARABIC NUMBER SIGN) joins the following "1" into one grapheme, but + // they have different scripts, so "1" starts a run. + render_text->SetText(u"x\u06001y"); + EXPECT_EQ("[0][1][2][3]", GetRunListStructureString()); + + // ㊗ (U+3297), 🏽 (U+1F3FD, a skin tone), U+200D (ZERO WIDTH JOINER) and + // 👧 (U+1F467) are one grapheme. ㊗ has a different script, so 🏽 starts a + // run. Without ㊗, the joiner does not join 👧, which is then a grapheme and, + // as a pictograph, a run of its own. + render_text->SetText(u"\u3297\U0001F3FD\u200D\U0001F467"); + EXPECT_EQ("[0][1->3][4->5]", GetRunListStructureString()); + + // U+0600 (ARABIC NUMBER SIGN, Prepend) joins the following regional indicator + // flag pair (🇺🇸) into one grapheme, but has a different script. After + // cutting at index 1, the two flag pairs (🇺🇸🇺🇸) must still pair by GB12/13 + // as [1->4] and [5->8] (a weight break at index 3 must not split the first + // flag). + render_text->SetText(u"\u0600\U0001F1FA\U0001F1F8\U0001F1FA\U0001F1F8"); + render_text->ApplyWeight(Font::Weight::BOLD, Range(3, 9)); + EXPECT_EQ("[0][1->4][5->8]", GetRunListStructureString()); + + // The same with 🅰 (U+1F170), which has the same script as the rest, but is + // left-to-right in a right-to-left text. + render_text->SetDirectionalityMode(DIRECTIONALITY_FORCE_RTL); + render_text->SetText(u"\U0001F170\U0001F3FD\u200D\U0001F467"); + EXPECT_EQ("[6<-5][4<-2][0->1]", GetRunListStructureString()); +} + TEST_F(RenderTextTest, GlyphBounds) { const auto kTestStrings = std::to_array<const char16_t*>( {u"asdf 1234 qwer", u"\u0647\u0654", u"\u0645\u0631\u062D\u0628\u0627"});
diff --git a/v8 b/v8 index 3cf8db6..9172040 160000 --- a/v8 +++ b/v8
@@ -1 +1 @@ -Subproject commit 3cf8db6cd03fa5bc0333ce701c2c23cd86efb09c +Subproject commit 9172040972f8859c52faca4cad2c0eb54fb673c9