зеркало из https://github.com/mozilla/gecko-dev.git
Bug 673729 - When a stacked group's expand button is clicked the group starts to zoom; r=dietrich
This commit is contained in:
Родитель
b1d98d2330
Коммит
7a7f4e604a
|
@ -1656,11 +1656,12 @@ GroupItem.prototype = Utils.extend(new Item(), new Subscribable(), {
|
||||||
container.mousedown(function(e) {
|
container.mousedown(function(e) {
|
||||||
let target = e.target;
|
let target = e.target;
|
||||||
// only set the last mouse down target if it is a left click, not on the
|
// 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
|
// close button, not on the expand button, not on the title bar and its
|
||||||
// element
|
// elements
|
||||||
if (Utils.isLeftClick(e) &&
|
if (Utils.isLeftClick(e) &&
|
||||||
self.$closeButton[0] != target &&
|
self.$closeButton[0] != target &&
|
||||||
self.$titlebar[0] != target &&
|
self.$titlebar[0] != target &&
|
||||||
|
self.$expander[0] != target &&
|
||||||
!self.$titlebar.contains(target) &&
|
!self.$titlebar.contains(target) &&
|
||||||
!self.$appTabTray.contains(target)) {
|
!self.$appTabTray.contains(target)) {
|
||||||
lastMouseDownTarget = target;
|
lastMouseDownTarget = target;
|
||||||
|
|
|
@ -150,6 +150,7 @@ _BROWSER_FILES = \
|
||||||
browser_tabview_bug663421.js \
|
browser_tabview_bug663421.js \
|
||||||
browser_tabview_bug665502.js \
|
browser_tabview_bug665502.js \
|
||||||
browser_tabview_bug669694.js \
|
browser_tabview_bug669694.js \
|
||||||
|
browser_tabview_bug673729.js \
|
||||||
browser_tabview_click_group.js \
|
browser_tabview_click_group.js \
|
||||||
browser_tabview_dragdrop.js \
|
browser_tabview_dragdrop.js \
|
||||||
browser_tabview_exit_button.js \
|
browser_tabview_exit_button.js \
|
||||||
|
|
|
@ -0,0 +1,42 @@
|
||||||
|
/* 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);
|
||||||
|
});
|
||||||
|
}
|
Загрузка…
Ссылка в новой задаче