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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/ui/TabbedPane.js

Issue 2163893003: Start sending auxclick instead of click for non-primary buttons (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Start sending auxclick instead of click for non-primary buttons Created 4 years, 4 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 1057 matching lines...) Expand 10 before | Expand all | Expand 10 after
1068 if (!measuring) 1068 if (!measuring)
1069 this._titleElement = titleElement; 1069 this._titleElement = titleElement;
1070 1070
1071 if (this._closeable) 1071 if (this._closeable)
1072 tabElement.createChild("div", "tabbed-pane-close-button", "dt-close- button").gray = true; 1072 tabElement.createChild("div", "tabbed-pane-close-button", "dt-close- button").gray = true;
1073 1073
1074 if (measuring) { 1074 if (measuring) {
1075 tabElement.classList.add("measuring"); 1075 tabElement.classList.add("measuring");
1076 } else { 1076 } else {
1077 tabElement.addEventListener("click", this._tabClicked.bind(this), fa lse); 1077 tabElement.addEventListener("click", this._tabClicked.bind(this), fa lse);
1078 tabElement.addEventListener("auxclick", this._tabClicked.bind(this), false);
dgozman 2016/07/27 20:30:43 Note that if you stop sending regular click events
Navid Zolghadr 2016/07/27 20:39:09 I was under the impression that this code in the w
dgozman 2016/07/27 20:49:27 We have old version in the cloud, which are used r
dtapuska 2016/07/28 23:41:11 We can probably polyfill for auxclick. Although yo
1078 tabElement.addEventListener("mousedown", this._tabMouseDown.bind(thi s), false); 1079 tabElement.addEventListener("mousedown", this._tabMouseDown.bind(thi s), false);
1079 tabElement.addEventListener("mouseup", this._tabMouseUp.bind(this), false); 1080 tabElement.addEventListener("mouseup", this._tabMouseUp.bind(this), false);
1080 1081
1081 tabElement.addEventListener("contextmenu", this._tabContextMenu.bind (this), false); 1082 tabElement.addEventListener("contextmenu", this._tabContextMenu.bind (this), false);
1082 if (this._tabbedPane._allowTabReorder) 1083 if (this._tabbedPane._allowTabReorder)
1083 WebInspector.installDragHandle(tabElement, this._startTabDraggin g.bind(this), this._tabDragging.bind(this), this._endTabDragging.bind(this), "-w ebkit-grabbing", "pointer", 200); 1084 WebInspector.installDragHandle(tabElement, this._startTabDraggin g.bind(this), this._tabDragging.bind(this), this._endTabDragging.bind(this), "-w ebkit-grabbing", "pointer", 200);
1084 } 1085 }
1085 1086
1086 return tabElement; 1087 return tabElement;
1087 }, 1088 },
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
1452 if (this._viewCallback && view) 1453 if (this._viewCallback && view)
1453 this._viewCallback(id, view); 1454 this._viewCallback(id, view);
1454 var shouldFocus = this._tabbedPane.visibleView.element.isSelfOrAnces tor(WebInspector.currentFocusElement()); 1455 var shouldFocus = this._tabbedPane.visibleView.element.isSelfOrAnces tor(WebInspector.currentFocusElement());
1455 this._tabbedPane.changeTabView(id, view); 1456 this._tabbedPane.changeTabView(id, view);
1456 if (shouldFocus) 1457 if (shouldFocus)
1457 view.focus(); 1458 view.focus();
1458 return view; 1459 return view;
1459 } 1460 }
1460 } 1461 }
1461 } 1462 }
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/input/EventHandler.cpp ('k') | third_party/WebKit/Source/devtools/front_end/ui/treeoutline.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698