Loading browser/base/content/tabview/groupitems.js +3 −2 Original line number Diff line number Diff line Loading @@ -1656,11 +1656,12 @@ GroupItem.prototype = Utils.extend(new Item(), new Subscribable(), { container.mousedown(function(e) { let target = e.target; // only set the last mouse down target if it is a left click, not on the // close button, not on the new tab button, not on the title bar and its // element // close button, not on the expand button, not on the title bar and its // elements if (Utils.isLeftClick(e) && self.$closeButton[0] != target && self.$titlebar[0] != target && self.$expander[0] != target && !self.$titlebar.contains(target) && !self.$appTabTray.contains(target)) { lastMouseDownTarget = target; Loading browser/base/content/test/tabview/Makefile.in +1 −0 Original line number Diff line number Diff line Loading @@ -150,6 +150,7 @@ _BROWSER_FILES = \ browser_tabview_bug663421.js \ browser_tabview_bug665502.js \ browser_tabview_bug669694.js \ browser_tabview_bug673729.js \ browser_tabview_click_group.js \ browser_tabview_dragdrop.js \ browser_tabview_exit_button.js \ Loading browser/base/content/test/tabview/browser_tabview_bug673729.js 0 → 100644 +42 −0 Original line number Diff line number Diff line /* Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/ */ function test() { waitForExplicitFinish(); newWindowWithTabView(function (win) { let cw = win.TabView.getContentWindow(); // turn off zoom animations cw.gPrefBranch.setBoolPref("animate_zoom", false); registerCleanupFunction(function () { cw.gPrefBranch.clearUserPref("animate_zoom"); win.close(); }); let group = cw.GroupItems.groupItems[0]; group.setSize(100, 100, true); while (!group.isStacked()) win.gBrowser.addTab(); waitForFocus(function () { whenGroupIsExpanded(group, function () { ok(win.TabView.isVisible(), "tabview is visible"); finish(); }); let expander = group.$expander[0]; EventUtils.synthesizeMouseAtCenter(expander, {}, cw); }, cw); }); } // ---------- function whenGroupIsExpanded(group, callback) { group.addSubscriber("expanded", function onExpanded() { group.removeSubscriber("expanded", onExpanded); executeSoon(callback); }); } Loading
browser/base/content/tabview/groupitems.js +3 −2 Original line number Diff line number Diff line Loading @@ -1656,11 +1656,12 @@ GroupItem.prototype = Utils.extend(new Item(), new Subscribable(), { container.mousedown(function(e) { let target = e.target; // only set the last mouse down target if it is a left click, not on the // close button, not on the new tab button, not on the title bar and its // element // close button, not on the expand button, not on the title bar and its // elements if (Utils.isLeftClick(e) && self.$closeButton[0] != target && self.$titlebar[0] != target && self.$expander[0] != target && !self.$titlebar.contains(target) && !self.$appTabTray.contains(target)) { lastMouseDownTarget = target; Loading
browser/base/content/test/tabview/Makefile.in +1 −0 Original line number Diff line number Diff line Loading @@ -150,6 +150,7 @@ _BROWSER_FILES = \ browser_tabview_bug663421.js \ browser_tabview_bug665502.js \ browser_tabview_bug669694.js \ browser_tabview_bug673729.js \ browser_tabview_click_group.js \ browser_tabview_dragdrop.js \ browser_tabview_exit_button.js \ Loading
browser/base/content/test/tabview/browser_tabview_bug673729.js 0 → 100644 +42 −0 Original line number Diff line number Diff line /* Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/ */ function test() { waitForExplicitFinish(); newWindowWithTabView(function (win) { let cw = win.TabView.getContentWindow(); // turn off zoom animations cw.gPrefBranch.setBoolPref("animate_zoom", false); registerCleanupFunction(function () { cw.gPrefBranch.clearUserPref("animate_zoom"); win.close(); }); let group = cw.GroupItems.groupItems[0]; group.setSize(100, 100, true); while (!group.isStacked()) win.gBrowser.addTab(); waitForFocus(function () { whenGroupIsExpanded(group, function () { ok(win.TabView.isVisible(), "tabview is visible"); finish(); }); let expander = group.$expander[0]; EventUtils.synthesizeMouseAtCenter(expander, {}, cw); }, cw); }); } // ---------- function whenGroupIsExpanded(group, callback) { group.addSubscriber("expanded", function onExpanded() { group.removeSubscriber("expanded", onExpanded); executeSoon(callback); }); }