Update to Chromium version 91.0.4472.0 (#870763)

This commit is contained in:
Marshall Greenblatt
2021-04-20 18:52:34 -04:00
parent b189c7b472
commit ae4f68f695
193 changed files with 1381 additions and 1897 deletions

View File

@@ -19,7 +19,7 @@ const int kMenuBarGroupId = 100;
// If the mnemonic is capital I and the UI language is Turkish, lowercasing it
// results in 'small dotless i', which is different from a 'dotted i'. Similar
// issues may exist for az and lt locales.
base::char16 ToLower(base::char16 c) {
char16 ToLower(char16 c) {
CefStringUTF16 str16;
cef_string_utf16_to_lower(&c, 1, str16.GetWritableStruct());
return str16.length() > 0 ? str16.c_str()[0] : 0;
@@ -27,16 +27,16 @@ base::char16 ToLower(base::char16 c) {
// Extract the mnemonic character from |title|. For example, if |title| is
// "&Test" then the mnemonic character is 'T'.
base::char16 GetMnemonic(const base::string16& title) {
char16 GetMnemonic(const std::u16string& title) {
size_t index = 0;
do {
index = title.find('&', index);
if (index != base::string16::npos) {
if (index != std::u16string::npos) {
if (index + 1 != title.size() && title[index + 1] != '&')
return ToLower(title[index + 1]);
index++;
}
} while (index != base::string16::npos);
} while (index != std::u16string::npos);
return 0;
}
@@ -89,7 +89,7 @@ CefRefPtr<CefMenuModel> ViewsMenuBar::CreateMenuModel(const CefString& label,
panel_->AddChildView(button);
// Extract the mnemonic that triggers the menu, if any.
base::char16 mnemonic = GetMnemonic(label);
char16 mnemonic = GetMnemonic(label);
if (mnemonic != 0)
mnemonics_.insert(std::make_pair(mnemonic, new_menu_id));

View File

@@ -112,7 +112,7 @@ class ViewsMenuBar : public CefMenuButtonDelegate, public CefMenuModelDelegate {
bool last_nav_with_keyboard_;
// Map of mnemonic to MenuButton ID.
typedef std::map<base::char16, int> MnemonicMap;
typedef std::map<char16, int> MnemonicMap;
MnemonicMap mnemonics_;
IMPLEMENT_REFCOUNTING(ViewsMenuBar);

View File

@@ -5,7 +5,6 @@
#include <map>
#include <vector>
#include "include/base/cef_string16.h"
#include "include/internal/cef_string.h"
#include "include/internal/cef_string_list.h"
#include "include/internal/cef_string_map.h"
@@ -126,12 +125,12 @@ TEST(StringTest, Wide) {
EXPECT_EQ(str1, str2);
}
// Test base::string16 convertion to/from CefString types.
// Test std::u16string convertion to/from CefString types.
TEST(StringTest, string16) {
CefStringUTF8 str8("Test String 1"), str8b;
CefStringUTF16 str16("Test String 2"), str16b;
CefStringWide strwide("Test String 3"), strwideb;
base::string16 base_str;
std::u16string base_str;
base_str = str8;
str8b = base_str;