Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2299)

Unified Diff: chrome/browser/resources/synthetic_middleclick.js

Issue 2124533002: Revert middle click related changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/ntp4/new_tab.html ('k') | chrome/browser/ui/browser_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/synthetic_middleclick.js
diff --git a/chrome/browser/resources/synthetic_middleclick.js b/chrome/browser/resources/synthetic_middleclick.js
deleted file mode 100644
index 03b982e47a6bba36a526b67badbb6db7b0f5b5c2..0000000000000000000000000000000000000000
--- a/chrome/browser/resources/synthetic_middleclick.js
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-(function() {
-
-var middleButtonMouseDownTarget = null;
-
-document.addEventListener('mousedown', function(e) {
- if (e.button == 1)
- middleButtonMouseDownTarget = e.path[0];
-}, true);
-
-document.addEventListener('mouseup', function(e) {
- if (e.button != 1)
- return;
-
- if (e.path.length > 0 && e.path[0] == middleButtonMouseDownTarget)
- middleButtonMouseDownTarget.dispatchEvent(new MouseEvent('click', e));
-
- middleButtonMouseDownTarget = null;
-}, true);
-
-window.addEventListener('click', function(e) {
- if (e.button == 1 && !e.isTrusted)
- e.preventDefault();
-});
-
-})();
« no previous file with comments | « chrome/browser/resources/ntp4/new_tab.html ('k') | chrome/browser/ui/browser_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698