diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2021-10-26 13:57:00 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2021-11-02 11:31:01 +0000 |
commit | 1943b3c2a1dcee36c233724fc4ee7613d71b9cf6 (patch) | |
tree | 8c1b5f12357025c197da5427ae02cfdc2f3570d6 /chromium/ui/base/webui/web_ui_util.cc | |
parent | 21ba0c5d4bf8fba15dddd97cd693bad2358b77fd (diff) | |
download | qtwebengine-chromium-1943b3c2a1dcee36c233724fc4ee7613d71b9cf6.tar.gz |
BASELINE: Update Chromium to 94.0.4606.111
Change-Id: I924781584def20fc800bedf6ff41fdb96c438193
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/ui/base/webui/web_ui_util.cc')
-rw-r--r-- | chromium/ui/base/webui/web_ui_util.cc | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/chromium/ui/base/webui/web_ui_util.cc b/chromium/ui/base/webui/web_ui_util.cc index c6cd6de9ee1..b324acf5775 100644 --- a/chromium/ui/base/webui/web_ui_util.cc +++ b/chromium/ui/base/webui/web_ui_util.cc @@ -72,17 +72,13 @@ std::string GetPngDataUrl(const unsigned char* data, size_t size) { WindowOpenDisposition GetDispositionFromClick(const base::ListValue* args, int start_index) { - double button = 0.0; - bool alt_key = false; - bool ctrl_key = false; - bool meta_key = false; - bool shift_key = false; - - CHECK(args->GetDouble(start_index++, &button)); - CHECK(args->GetBoolean(start_index++, &alt_key)); - CHECK(args->GetBoolean(start_index++, &ctrl_key)); - CHECK(args->GetBoolean(start_index++, &meta_key)); - CHECK(args->GetBoolean(start_index++, &shift_key)); + base::Value::ConstListView list = args->GetList(); + double button = list[start_index].GetDouble(); + bool alt_key = list[start_index + 1].GetBool(); + bool ctrl_key = list[start_index + 2].GetBool(); + bool meta_key = list[start_index + 3].GetBool(); + bool shift_key = list[start_index + 4].GetBool(); + return ui::DispositionFromClick( button == 1.0, alt_key, ctrl_key, meta_key, shift_key); } @@ -184,11 +180,12 @@ void ParsePathAndScale(const GURL& url, } void SetLoadTimeDataDefaults(const std::string& app_locale, - base::DictionaryValue* localized_strings) { - localized_strings->SetString("fontfamily", GetFontFamily()); - localized_strings->SetString("fontsize", GetFontSize()); - localized_strings->SetString("language", l10n_util::GetLanguage(app_locale)); - localized_strings->SetString("textdirection", GetTextDirection()); + base::Value* localized_strings) { + localized_strings->SetStringKey("fontfamily", GetFontFamily()); + localized_strings->SetStringKey("fontsize", GetFontSize()); + localized_strings->SetStringKey("language", + l10n_util::GetLanguage(app_locale)); + localized_strings->SetStringKey("textdirection", GetTextDirection()); } void SetLoadTimeDataDefaults(const std::string& app_locale, |