Browse Source

Update for Chromium 94

Blaise 3 years ago
parent
commit
75a3258b71

+ 13 - 30
tweaks/shortcuts/macos-hotkeys-on-linux.patch

@@ -2,7 +2,7 @@
 # Copy to /etc/portage/patches/www-client/ungoogled-chromium/ and emerge like normal
 --- a/chrome/browser/ui/views/renderer_context_menu/render_view_context_menu_views.cc
 +++ b/chrome/browser/ui/views/renderer_context_menu/render_view_context_menu_views.cc
-@@ -144,39 +144,39 @@ bool RenderViewContextMenuViews::GetAcce
+@@ -144,34 +144,34 @@ bool RenderViewContextMenuViews::GetAcce
        return true;
  
      case IDC_CONTENT_CONTEXT_UNDO:
@@ -27,12 +27,6 @@
 +      *accel = ui::Accelerator(ui::VKEY_C, ui::EF_PLATFORM_ACCELERATOR);
        return true;
  
-     case IDC_CONTENT_CONTEXT_INSPECTELEMENT:
-       *accel = ui::Accelerator(ui::VKEY_I,
--                               ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN);
-+                               ui::EF_SHIFT_DOWN | ui::EF_PLATFORM_ACCELERATOR);
-       return true;
- 
      case IDC_CONTENT_CONTEXT_PASTE:
 -      *accel = ui::Accelerator(ui::VKEY_V, ui::EF_CONTROL_DOWN);
 +      *accel = ui::Accelerator(ui::VKEY_V, ui::EF_PLATFORM_ACCELERATOR);
@@ -50,7 +44,7 @@
        return true;
  
      case IDC_CONTENT_CONTEXT_ROTATECCW:
-@@ -192,11 +192,11 @@ bool RenderViewContextMenuViews::GetAcce
+@@ -187,11 +187,11 @@ bool RenderViewContextMenuViews::GetAcce
        return true;
  
      case IDC_PRINT:
@@ -75,20 +69,9 @@
        } else if (platform_key == values::kKeybindingPlatformDefault) {
          // If we see "Command+foo" in the Default section it can mean two
          // things, depending on the platform:
---- a/content/renderer/pepper/pepper_plugin_instance_impl.cc
-+++ b/content/renderer/pepper/pepper_plugin_instance_impl.cc
-@@ -1437,7 +1437,7 @@ void PepperPluginInstanceImpl::SelectAll
- 
-   // TODO(https://crbug.com/836074) |kPlatformModifier| should be
-   // |ui::EF_PLATFORM_ACCELERATOR| (|ui::EF_COMMAND_DOWN| on Mac).
--  static const ui::EventFlags kPlatformModifier = ui::EF_CONTROL_DOWN;
-+  static const ui::EventFlags kPlatformModifier = ui::EF_COMMAND_DOWN;
-   // Synthesize a ctrl + a key event to send to the plugin and let it sort out
-   // the event. See also https://crbug.com/739529.
-   ui::KeyEvent char_event(L'A', ui::VKEY_A, ui::DomCode::NONE,
 --- a/third_party/blink/renderer/core/editing/editing_behavior.cc
 +++ b/third_party/blink/renderer/core/editing/editing_behavior.cc
-@@ -45,7 +45,7 @@ const unsigned kCtrlKey = WebInputEvent:
+@@ -44,7 +44,7 @@ const unsigned kCtrlKey = WebInputEvent:
  const unsigned kAltKey = WebInputEvent::kAltKey;
  const unsigned kShiftKey = WebInputEvent::kShiftKey;
  const unsigned kMetaKey = WebInputEvent::kMetaKey;
@@ -97,7 +80,7 @@
  // Aliases for the generic key defintions to make kbd shortcuts definitions more
  // readable on OS X.
  const unsigned kOptionKey = kAltKey;
-@@ -88,7 +88,7 @@ struct DomKeyKeyDownEntry {
+@@ -87,7 +87,7 @@ struct DomKeyKeyDownEntry {
  const KeyboardCodeKeyDownEntry kKeyboardCodeKeyDownEntries[] = {
      {VKEY_LEFT, 0, "MoveLeft"},
      {VKEY_LEFT, kShiftKey, "MoveLeftAndModifySelection"},
@@ -106,7 +89,7 @@
      {VKEY_LEFT, kOptionKey, "MoveWordLeft"},
      {VKEY_LEFT, kOptionKey | kShiftKey, "MoveWordLeftAndModifySelection"},
  #else
-@@ -97,7 +97,7 @@ const KeyboardCodeKeyDownEntry kKeyboard
+@@ -96,7 +96,7 @@ const KeyboardCodeKeyDownEntry kKeyboard
  #endif
      {VKEY_RIGHT, 0, "MoveRight"},
      {VKEY_RIGHT, kShiftKey, "MoveRightAndModifySelection"},
@@ -115,7 +98,7 @@
      {VKEY_RIGHT, kOptionKey, "MoveWordRight"},
      {VKEY_RIGHT, kOptionKey | kShiftKey, "MoveWordRightAndModifySelection"},
  #else
-@@ -110,7 +110,7 @@ const KeyboardCodeKeyDownEntry kKeyboard
+@@ -109,7 +109,7 @@ const KeyboardCodeKeyDownEntry kKeyboard
      {VKEY_DOWN, 0, "MoveDown"},
      {VKEY_DOWN, kShiftKey, "MoveDownAndModifySelection"},
      {VKEY_NEXT, kShiftKey, "MovePageDownAndModifySelection"},
@@ -124,7 +107,7 @@
      {VKEY_UP, kCtrlKey, "MoveParagraphBackward"},
      {VKEY_UP, kCtrlKey | kShiftKey, "MoveParagraphBackwardAndModifySelection"},
      {VKEY_DOWN, kCtrlKey, "MoveParagraphForward"},
-@@ -120,18 +120,18 @@ const KeyboardCodeKeyDownEntry kKeyboard
+@@ -119,18 +119,18 @@ const KeyboardCodeKeyDownEntry kKeyboard
  #endif
      {VKEY_HOME, 0, "MoveToBeginningOfLine"},
      {VKEY_HOME, kShiftKey, "MoveToBeginningOfLineAndModifySelection"},
@@ -146,7 +129,7 @@
      {VKEY_END, kCtrlKey, "MoveToEndOfDocument"},
      {VKEY_END, kCtrlKey | kShiftKey, "MoveToEndOfDocumentAndModifySelection"},
  #endif
-@@ -145,7 +145,7 @@ const KeyboardCodeKeyDownEntry kKeyboard
+@@ -144,7 +144,7 @@ const KeyboardCodeKeyDownEntry kKeyboard
      {VKEY_BACK, kCtrlKey, "DeleteWordBackward"},
      {VKEY_DELETE, kCtrlKey, "DeleteWordForward"},
  #endif
@@ -155,7 +138,7 @@
      {'B', kCommandKey, "ToggleBold"},
      {'I', kCommandKey, "ToggleItalic"},
  #else
-@@ -168,14 +168,14 @@ const KeyboardCodeKeyDownEntry kKeyboard
+@@ -167,14 +167,14 @@ const KeyboardCodeKeyDownEntry kKeyboard
  #if !defined(OS_MAC)
      // On OS X, we pipe these back to the browser, so that it can do menu item
      // blinking.
@@ -178,7 +161,7 @@
  #endif
  #if defined(OS_WIN)
      {VKEY_BACK, kAltKey, "Undo"},
-@@ -274,19 +274,19 @@ bool EditingBehavior::ShouldInsertCharac
+@@ -276,19 +276,19 @@ bool EditingBehavior::ShouldInsertCharac
    // unexpected behaviour
    if (ch < ' ')
      return false;
@@ -240,7 +223,7 @@
  
 --- a/ui/views/controls/textfield/textfield.cc
 +++ b/ui/views/controls/textfield/textfield.cc
-@@ -253,9 +253,9 @@ Textfield::Textfield()
+@@ -249,9 +249,9 @@ Textfield::Textfield()
    // These allow BrowserView to pass edit commands from the Chrome menu to us
    // when we're focused by simply asking the FocusManager to
    // ProcessAccelerator() with the relevant accelerators.
@@ -253,7 +236,7 @@
  #endif
  
    // Sometimes there are additional ignored views, such as the View representing
-@@ -2160,46 +2160,47 @@ ui::TextEditCommand Textfield::GetComman
+@@ -2145,46 +2145,47 @@ ui::TextEditCommand Textfield::GetComman
  #endif
    const bool control = event.IsControlDown() || event.IsCommandDown();
    const bool alt = event.IsAltDown() || event.IsAltGrDown();
@@ -311,7 +294,7 @@
                       : ui::TextEditCommand::MOVE_LEFT_AND_MODIFY_SELECTION;
      case ui::VKEY_HOME:
        if (shift) {
-@@ -2270,12 +2271,12 @@ ui::TextEditCommand Textfield::GetComman
+@@ -2255,12 +2256,12 @@ ui::TextEditCommand Textfield::GetComman
        if (shift && control)
          return ui::TextEditCommand::DELETE_TO_END_OF_LINE;
  #endif

+ 1 - 1
tweaks/visual/hide-source-indicator-for-extensions.patch

@@ -7,7 +7,7 @@
 # subtle-source-indicator-for-extensions.patch - as no indicator is shown.
 ##
 
---- a/chrome/browser/resources/extensions/item.html.orig
+--- a/chrome/browser/resources/extensions/item.html
 +++ b/chrome/browser/resources/extensions/item.html
 @@ -136,6 +136,7 @@
      margin-inline-start: 24px;

+ 8 - 14
tweaks/visual/remove-focusring-from-locationbar.patch

@@ -4,13 +4,12 @@
 
 --- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
 +++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
-@@ -152,26 +152,6 @@ LocationBarView::LocationBarView(Browser
-       profile_(profile),
+@@ -167,20 +167,6 @@ LocationBarView::LocationBarView(Browser
        delegate_(delegate),
        is_popup_mode_(is_popup_mode) {
--  if (!is_popup_mode_) {
--    focus_ring_ = views::FocusRing::Install(this);
--    focus_ring_->SetHasFocusPredicate([](View* view) -> bool {
+   if (!is_popup_mode_) {
+-    views::FocusRing::Install(this);
+-    views::FocusRing::Get(this)->SetHasFocusPredicate([](View* view) -> bool {
 -      DCHECK(views::IsViewClass<LocationBarView>(view));
 -      auto* v = static_cast<LocationBarView*>(view);
 -
@@ -20,14 +19,9 @@
 -             !v->GetOmniboxPopupView()->IsOpen();
 -    });
 -
--    focus_ring_->SetPathGenerator(
+-    views::FocusRing::Get(this)->SetPathGenerator(
 -        std::make_unique<views::PillHighlightPathGenerator>());
 -
--#if defined(OS_MAC)
--    geolocation_permission_observation_.Observe(
--        g_browser_process->platform_part()->location_permission_manager());
--#endif
--  }
- }
- 
- LocationBarView::~LocationBarView() = default;
+ #if defined(OS_MAC)
+     geolocation_permission_observation_.Observe(
+         g_browser_process->platform_part()->geolocation_manager());

+ 0 - 24
tweaks/visual/remove-tab-search-button.patch

@@ -1,24 +0,0 @@
-## This patch removes the tab search button from the tab strip.
-
---- a/chrome/browser/ui/views/frame/tab_strip_region_view.cc
-+++ b/chrome/browser/ui/views/frame/tab_strip_region_view.cc
-@@ -258,19 +258,6 @@ TabStripRegionView::TabStripRegionView(s
-   tip_marquee_view_->SetProperty(views::kCrossAxisAlignmentKey,
-                                  views::LayoutAlignment::kCenter);
-   tip_marquee_view_->SetProperty(views::kMarginsKey, control_padding);
--
--  const Browser* browser = tab_strip_->controller()->GetBrowser();
--  if (browser && browser->is_type_normal()) {
--    auto tab_search_button = std::make_unique<TabSearchButton>(tab_strip_);
--    tab_search_button->SetTooltipText(
--        l10n_util::GetStringUTF16(IDS_TOOLTIP_TAB_SEARCH));
--    tab_search_button->SetAccessibleName(
--        l10n_util::GetStringUTF16(IDS_ACCNAME_TAB_SEARCH));
--    tab_search_button->SetProperty(views::kCrossAxisAlignmentKey,
--                                   views::LayoutAlignment::kCenter);
--    tab_search_button_ = AddChildView(std::move(tab_search_button));
--    tab_search_button_->SetProperty(views::kMarginsKey, control_padding);
--  }
- }
- 
- TabStripRegionView::~TabStripRegionView() = default;

+ 3 - 2
tweaks/visual/subtle-source-indicator-for-extensions.patch

@@ -6,9 +6,9 @@
 # is __not__ applied - otherwise no indicator is shown.
 ##
 
---- a/chrome/browser/resources/extensions/item.html.orig
+--- a/chrome/browser/resources/extensions/item.html
 +++ b/chrome/browser/resources/extensions/item.html
-@@ -133,27 +133,27 @@
+@@ -133,28 +133,28 @@
    }
  
    #source-indicator {
@@ -17,6 +17,7 @@
      position: absolute;
 +    right: -2px;
 +    bottom: -2px;
+     display: none;
    }
  
    .source-icon-wrapper {

+ 3 - 3
tweaks/visual/thinner-tabbar-toolbar-bookmarkbar-downloadbar.patch

@@ -62,7 +62,7 @@
      case TOOLBAR_ELEMENT_PADDING:
        return touch_ui ? 0 : 4;
      case TOOLBAR_STANDARD_SPACING:
-@@ -107,7 +107,7 @@ gfx::Insets GetLayoutInsets(LayoutInset
+@@ -109,7 +109,7 @@ gfx::Insets GetLayoutInsets(LayoutInset
      }
  
      case TOOLBAR_INTERIOR_MARGIN:
@@ -73,7 +73,7 @@
    return gfx::Insets();
 --- a/chrome/browser/ui/views/download/download_item_view.cc
 +++ b/chrome/browser/ui/views/download/download_item_view.cc
-@@ -132,7 +132,7 @@ constexpr int kProgressIndicatorSize = 2
+@@ -130,7 +130,7 @@ constexpr int kProgressIndicatorSize = 2
  
  // The vertical distance between the item's visual upper bound (as delineated
  // by the separator on the right) and the edge of the shelf.
@@ -82,7 +82,7 @@
  
  // The minimum vertical padding above and below contents of the download item.
  // This is only used when the text size is large.
-@@ -540,7 +540,7 @@ gfx::Size DownloadItemView::CalculatePre
+@@ -593,7 +593,7 @@ gfx::Size DownloadItemView::CalculatePre
    }
  
    // The normal height of the item which may be exceeded if text is large.