Quellcode durchsuchen

Merge pull request #6 from hparadiz/master

Update for ungoogled-chromium-88.0.4324.150-r2
Eloston vor 4 Jahren
Ursprung
Commit
d51002cc2e
1 geänderte Dateien mit 19 neuen und 37 gelöschten Zeilen
  1. 19 37
      tweaks/shortcuts/macos-hotkeys-on-linux.patch

+ 19 - 37
tweaks/shortcuts/macos-hotkeys-on-linux.patch

@@ -1,6 +1,7 @@
-# Provides an experiance closer to macOS in Linux for shortcut keys
+# Working patch for Portage Overlay pf4public www-client/ungoogled-chromium-88.0.4324.150-r2
+# Copy to /etc/portage/patches/www-client/ungoogled-chromium/ and emerge like normal
 diff --git 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
-index 4995b3c75c44..a4014f0482c5 100644
+index 234cb7afe1..d3f598278f 100644
 --- 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
 @@ -140,39 +140,39 @@ bool RenderViewContextMenuViews::GetAcceleratorForCommandId(
@@ -51,7 +52,7 @@ index 4995b3c75c44..a4014f0482c5 100644
        return true;
  
      case IDC_CONTENT_CONTEXT_ROTATECCW:
-@@ -188,16 +188,16 @@ bool RenderViewContextMenuViews::GetAcceleratorForCommandId(
+@@ -188,11 +188,11 @@ bool RenderViewContextMenuViews::GetAcceleratorForCommandId(
        return true;
  
      case IDC_PRINT:
@@ -65,14 +66,8 @@ index 4995b3c75c44..a4014f0482c5 100644
        return true;
  
      case IDC_CONTENT_CONTEXT_SAVEAVAS:
-     case IDC_SAVE_PAGE:
--      *accel = ui::Accelerator(ui::VKEY_S, ui::EF_CONTROL_DOWN);
-+      *accel = ui::Accelerator(ui::VKEY_S, ui::EF_PLATFORM_ACCELERATOR);
-       return true;
- 
-     case IDC_CONTENT_CONTEXT_EXIT_FULLSCREEN: {
 diff --git a/chrome/common/extensions/command.cc b/chrome/common/extensions/command.cc
-index 4732019d473a..aa07642f4070 100644
+index 4732019d47..aa07642f40 100644
 --- a/chrome/common/extensions/command.cc
 +++ b/chrome/common/extensions/command.cc
 @@ -103,7 +103,7 @@ ui::Accelerator ParseImpl(const std::string& accelerator,
@@ -85,10 +80,10 @@ index 4732019d473a..aa07642f4070 100644
          // If we see "Command+foo" in the Default section it can mean two
          // things, depending on the platform:
 diff --git a/content/renderer/pepper/pepper_plugin_instance_impl.cc b/content/renderer/pepper/pepper_plugin_instance_impl.cc
-index d59a7ed97051..c40238bf113c 100644
+index 9692196ee8..12dcbd57e3 100644
 --- a/content/renderer/pepper/pepper_plugin_instance_impl.cc
 +++ b/content/renderer/pepper/pepper_plugin_instance_impl.cc
-@@ -1503,7 +1503,7 @@ void PepperPluginInstanceImpl::SelectAll() {
+@@ -1434,7 +1434,7 @@ void PepperPluginInstanceImpl::SelectAll() {
  
    // TODO(https://crbug.com/836074) |kPlatformModifier| should be
    // |ui::EF_PLATFORM_ACCELERATOR| (|ui::EF_COMMAND_DOWN| on Mac).
@@ -98,7 +93,7 @@ index d59a7ed97051..c40238bf113c 100644
    // the event. See also https://crbug.com/739529.
    ui::KeyEvent char_event(L'A', ui::VKEY_A, ui::DomCode::NONE,
 diff --git a/third_party/blink/renderer/core/editing/editing_behavior.cc b/third_party/blink/renderer/core/editing/editing_behavior.cc
-index e3585bdb1eac..cdd1bb8c475e 100644
+index 0bfbf2d335..b2060a134f 100644
 --- 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::kControlKey;
@@ -204,7 +199,7 @@ index e3585bdb1eac..cdd1bb8c475e 100644
 -    return false;
 -#elif !defined(OS_WIN)
 +  //if (event.ctrlKey())
-+    //return false;
++  //  return false;
 +#if !defined(OS_WIN)
    // Don't insert ASCII character if ctrl w/o alt or meta is on.
    // On Mac, we should ignore events when meta is on (Command-<x>).
@@ -216,21 +211,8 @@ index e3585bdb1eac..cdd1bb8c475e 100644
      if (event.metaKey())
        return false;
  #endif
-diff --git a/ui/base/accelerators/accelerator.cc b/ui/base/accelerators/accelerator.cc
-index 627e077480fe..e35db380b877 100644
---- a/ui/base/accelerators/accelerator.cc
-+++ b/ui/base/accelerators/accelerator.cc
-@@ -414,7 +414,7 @@ base::string16 Accelerator::ApplyLongFormModifiers(
-     shortcut = ApplyModifierToAcceleratorString(shortcut, IDS_APP_ALT_KEY);
- 
-   if (IsCmdDown()) {
--#if defined(OS_APPLE)
-+#if defined(OS_APPLE) || defined(OS_LINUX)
-     shortcut = ApplyModifierToAcceleratorString(shortcut, IDS_APP_COMMAND_KEY);
- #elif defined(OS_CHROMEOS)
-     shortcut = ApplyModifierToAcceleratorString(shortcut, IDS_APP_SEARCH_KEY);
 diff --git a/ui/base/window_open_disposition.cc b/ui/base/window_open_disposition.cc
-index d90ce70031fc..32dfebc127ac 100644
+index d90ce70031..32dfebc127 100644
 --- a/ui/base/window_open_disposition.cc
 +++ b/ui/base/window_open_disposition.cc
 @@ -17,7 +17,7 @@ WindowOpenDisposition DispositionFromClick(
@@ -243,7 +225,7 @@ index d90ce70031fc..32dfebc127ac 100644
  #else
    if (middle_button || ctrl_key)
 diff --git a/ui/events/base_event_utils.cc b/ui/events/base_event_utils.cc
-index f5c709d2e650..61230220818d 100644
+index f5c709d2e6..6123022081 100644
 --- a/ui/events/base_event_utils.cc
 +++ b/ui/events/base_event_utils.cc
 @@ -22,6 +22,8 @@ const int kSystemKeyModifierMask = EF_ALT_DOWN | EF_COMMAND_DOWN;
@@ -256,25 +238,25 @@ index f5c709d2e650..61230220818d 100644
  const int kSystemKeyModifierMask = EF_ALT_DOWN;
  #endif  // !defined(OS_CHROMEOS) && !defined(OS_APPLE)
 diff --git a/ui/events/event_constants.h b/ui/events/event_constants.h
-index 0b60cb443edc..f8da4fa50dd0 100644
+index bc04d9d67b..58c446d1fe 100644
 --- a/ui/events/event_constants.h
 +++ b/ui/events/event_constants.h
-@@ -47,7 +47,9 @@ enum EventFlags {
+@@ -50,7 +50,9 @@ enum EventFlags {
  #if defined(OS_APPLE)
    EF_PLATFORM_ACCELERATOR = EF_COMMAND_DOWN,
  #else
 -  EF_PLATFORM_ACCELERATOR = EF_CONTROL_DOWN,
++  //EF_PLATFORM_ACCELERATOR = EF_CONTROL_DOWN,
 +  // TODO(hparadiz): Build Configurable EF_PLATFORM_ACCELERATOR from chrome://flags
 +  EF_PLATFORM_ACCELERATOR = EF_COMMAND_DOWN,
-+  //EF_PLATFORM_ACCELERATOR = EF_CONTROL_DOWN,
  #endif
  };
  
 diff --git a/ui/views/controls/textfield/textfield.cc b/ui/views/controls/textfield/textfield.cc
-index 31ad40b5fe99..c22e138a91b7 100644
+index 432332a7fa..b70ae97293 100644
 --- a/ui/views/controls/textfield/textfield.cc
 +++ b/ui/views/controls/textfield/textfield.cc
-@@ -127,46 +127,47 @@ ui::TextEditCommand GetCommandForKeyEvent(const ui::KeyEvent& event) {
+@@ -130,46 +130,47 @@ ui::TextEditCommand GetCommandForKeyEvent(const ui::KeyEvent& event) {
    const bool shift = event.IsShiftDown();
    const bool control = event.IsControlDown() || event.IsCommandDown();
    const bool alt = event.IsAltDown() || event.IsAltGrDown();
@@ -332,7 +314,7 @@ index 31ad40b5fe99..c22e138a91b7 100644
                       : ui::TextEditCommand::MOVE_LEFT_AND_MODIFY_SELECTION;
      case ui::VKEY_HOME:
        return shift ? ui::TextEditCommand::
-@@ -204,12 +205,12 @@ ui::TextEditCommand GetCommandForKeyEvent(const ui::KeyEvent& event) {
+@@ -207,12 +208,12 @@ ui::TextEditCommand GetCommandForKeyEvent(const ui::KeyEvent& event) {
        if (shift && control)
          return ui::TextEditCommand::DELETE_TO_END_OF_LINE;
  #endif
@@ -347,7 +329,7 @@ index 31ad40b5fe99..c22e138a91b7 100644
          return ui::TextEditCommand::COPY;
        return (shift && !control) ? ui::TextEditCommand::PASTE
                                   : ui::TextEditCommand::INVALID_COMMAND;
-@@ -351,9 +352,9 @@ Textfield::Textfield()
+@@ -354,9 +355,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.
@@ -359,4 +341,4 @@ index 31ad40b5fe99..c22e138a91b7 100644
 +  AddAccelerator(ui::Accelerator(ui::VKEY_V, ui::EF_PLATFORM_ACCELERATOR));
  #endif
  
-   // Sometimes there are additional ignored views, such as the View representing
+   // Sometimes there are additional ignored views, such as the View representing