Bug 565024 - accel+click doesn't restore about:sessionrestore entries on OS X. r=paul

This commit is contained in:
Dão Gottwald 2010-05-12 09:10:25 +02:00
Родитель 0dc25817c0
Коммит ebff31d20c
3 изменённых файлов: 10 добавлений и 5 удалений

Просмотреть файл

@ -160,9 +160,14 @@ function onListClick(aEvent) {
var row = {}, col = {};
treeView.treeBox.getCellAt(aEvent.clientX, aEvent.clientY, row, col, {});
if (col.value) {
// restore this specific tab in the same window for double clicking or middle clicking
// or Ctrl+clicking on a tab's title - note: ctrl clicking doesn't work on Mac
if ((aEvent.button == 1 || aEvent.button == 0 && aEvent.detail == 2 || aEvent.ctrlKey) &&
// Restore this specific tab in the same window for middle/double/accel clicking
// on a tab's title.
#ifdef XP_MACOSX
let accelKey = aEvent.metaKey;
#else
let accelKey = aEvent.ctrlKey;
#endif
if ((aEvent.button == 1 || aEvent.button == 0 && aEvent.detail == 2 || accelKey) &&
col.value.id == "title" &&
!treeView.isContainer(row.value))
restoreSingleTab(row.value, aEvent.shiftKey);

Просмотреть файл

@ -54,7 +54,7 @@
<link rel="stylesheet" href="chrome://browser/skin/aboutSessionRestore.css" type="text/css" media="all"/>
<link rel="icon" type="image/png" href="chrome://global/skin/icons/warning-16.png"/>
<script type="application/javascript" src="chrome://browser/content/aboutSessionRestore.js"/>
<script type="application/javascript;version=1.8" src="chrome://browser/content/aboutSessionRestore.js"/>
</head>
<body dir="&locale.dir;">

Просмотреть файл

@ -1,3 +1,3 @@
browser.jar:
* content/browser/aboutSessionRestore.xhtml (content/aboutSessionRestore.xhtml)
content/browser/aboutSessionRestore.js (content/aboutSessionRestore.js)
* content/browser/aboutSessionRestore.js (content/aboutSessionRestore.js)