Browse Source

chore: upgrade chromium to 76 (#17921)

Samuel Attard 6 years ago
parent
commit
f1fa589779

+ 1 - 1
DEPS

@@ -10,7 +10,7 @@ gclient_gn_args = [
 
 vars = {
   'chromium_version':
-    '75.0.3770.3',
+    '76.0.3774.1',
   'node_version':
     '2dc0f8811b2b295c08d797b8a11b030234c98502',
 

+ 3 - 3
atom/browser/api/atom_api_app.cc

@@ -529,9 +529,9 @@ int ImportIntoCertStore(CertificateManagerModel* model,
 }
 #endif
 
-void OnIconDataAvailable(util::Promise promise, gfx::Image* icon) {
-  if (icon && !icon->IsEmpty()) {
-    promise.Resolve(*icon);
+void OnIconDataAvailable(util::Promise promise, gfx::Image icon) {
+  if (!icon.IsEmpty()) {
+    promise.Resolve(icon);
   } else {
     promise.RejectWithErrorMessage("Failed to get file icon.");
   }

+ 2 - 2
atom/browser/browser_win.cc

@@ -96,7 +96,7 @@ void Browser::Focus() {
 }
 
 void Browser::AddRecentDocument(const base::FilePath& path) {
-  if (base::win::GetVersion() < base::win::VERSION_WIN7)
+  if (base::win::GetVersion() < base::win::Version::WIN7)
     return;
 
   CComPtr<IShellItem> item;
@@ -346,7 +346,7 @@ std::string Browser::GetExecutableFileProductName() const {
 
 bool Browser::IsEmojiPanelSupported() {
   // emoji picker is supported on Windows 10's Spring 2018 update & above.
-  return base::win::GetVersion() >= base::win::Version::VERSION_WIN10_RS4;
+  return base::win::GetVersion() >= base::win::Version::WIN10_RS4;
 }
 
 void Browser::ShowEmojiPanel() {

+ 1 - 1
atom/browser/notifications/win/notification_presenter_win.cc

@@ -47,7 +47,7 @@ bool SaveIconToPath(const SkBitmap& bitmap, const base::FilePath& path) {
 // static
 NotificationPresenter* NotificationPresenter::Create() {
   auto version = base::win::GetVersion();
-  if (version < base::win::VERSION_WIN8)
+  if (version < base::win::Version::WIN8)
     return new NotificationPresenterWin7;
   if (!WindowsToastNotification::Initialize())
     return nullptr;

+ 3 - 2
atom/browser/ui/views/autofill_popup_view.cc

@@ -150,7 +150,7 @@ void AutofillPopupView::OnSelectedRowChanged(
 
   if (current_row_selection) {
     int selected = current_row_selection.value_or(-1);
-    if (selected == -1 || selected >= child_count())
+    if (selected == -1 || static_cast<size_t>(selected) >= children().size())
       return;
     child_at(selected)->NotifyAccessibilityEvent(ax::mojom::Event::kSelection,
                                                  true);
@@ -232,7 +232,8 @@ void AutofillPopupView::DoUpdateBoundsAndRedrawPopup() {
 }
 
 void AutofillPopupView::OnPaint(gfx::Canvas* canvas) {
-  if (!popup_ || popup_->GetLineCount() != child_count())
+  if (!popup_ ||
+      static_cast<size_t>(popup_->GetLineCount()) != children().size())
     return;
   gfx::Canvas* draw_canvas = canvas;
   SkBitmap bitmap;

+ 4 - 3
atom/browser/ui/views/menu_delegate.cc

@@ -43,9 +43,10 @@ void MenuDelegate::RunMenu(AtomMenuModel* model,
   menu_runner_.reset(new views::MenuRunner(
       item,
       views::MenuRunner::CONTEXT_MENU | views::MenuRunner::HAS_MNEMONICS));
-  menu_runner_->RunMenuAt(button->GetWidget()->GetTopLevelWidget(),
-                          static_cast<views::MenuButton*>(button), bounds,
-                          views::MenuAnchorPosition::kTopRight, source_type);
+  menu_runner_->RunMenuAt(
+      button->GetWidget()->GetTopLevelWidget(),
+      static_cast<views::MenuButton*>(button)->button_controller(), bounds,
+      views::MenuAnchorPosition::kTopRight, source_type);
 }
 
 void MenuDelegate::ExecuteCommand(int id) {

+ 2 - 2
atom/browser/ui/views/root_view.cc

@@ -92,10 +92,10 @@ void RootView::SetMenuBarVisibility(bool visible) {
 
   menu_bar_visible_ = visible;
   if (visible) {
-    DCHECK_EQ(child_count(), 1);
+    DCHECK_EQ(children().size(), 1ul);
     AddChildView(menu_bar_.get());
   } else {
-    DCHECK_EQ(child_count(), 2);
+    DCHECK_EQ(children().size(), 2ul);
     RemoveChildView(menu_bar_.get());
   }
 

+ 1 - 1
atom/common/platform_util_win.cc

@@ -341,7 +341,7 @@ bool MoveItemToTrash(const base::FilePath& path) {
   // Elevation prompt enabled for UAC protected files.  This overrides the
   // SILENT, NO_UI and NOERRORUI flags.
 
-  if (base::win::GetVersion() >= base::win::VERSION_WIN8) {
+  if (base::win::GetVersion() >= base::win::Version::WIN8) {
     // Windows 8 introduces the flag RECYCLEONDELETE and deprecates the
     // ALLOWUNDO in favor of ADDUNDORECORD.
     if (FAILED(pfo->SetOperationFlags(

+ 1 - 0
patches/common/chromium/.patches

@@ -75,3 +75,4 @@ unsandboxed_ppapi_processes_skip_zygote.patch
 viz_osr.patch
 patch_the_ensure_gn_version_py_script_to_work_on_mac_ci.patch
 revert_roll_clang_356356_357569.patch
+disable_custom_libcxx_on_windows.patch

+ 19 - 0
patches/common/chromium/disable_custom_libcxx_on_windows.patch

@@ -0,0 +1,19 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Samuel Attard <[email protected]>
+Date: Fri, 26 Apr 2019 13:19:34 -0700
+Subject: disable custom libcxx on windows
+
+
+diff --git a/build/config/c++/c++.gni b/build/config/c++/c++.gni
+index 678019a257e0bd9d43a659b1303fd99bae161849..3bf8e926d1e818ed77eb4b6119e37eef26b8b0ab 100644
+--- a/build/config/c++/c++.gni
++++ b/build/config/c++/c++.gni
+@@ -11,7 +11,7 @@ declare_args() {
+   # Don't check in changes that set this to false for more platforms; doing so
+   # is not supported.
+   use_custom_libcxx =
+-      is_fuchsia || is_android || is_mac || is_ios || (is_win && is_clang) ||
++      is_fuchsia || is_android || is_mac || is_ios || (is_win && is_clang && !is_electron_build) ||
+       (is_linux &&
+        (!is_chromeos || default_toolchain != "//build/toolchain/cros:target"))
+