Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into issue6551
Browse files Browse the repository at this point in the history
  • Loading branch information
fflorent committed Sep 18, 2013
2 parents 854a3ce + a14453e commit 8cf9d8a
Show file tree
Hide file tree
Showing 115 changed files with 2,487 additions and 2,957 deletions.
2 changes: 1 addition & 1 deletion extension/content/firebug/branch.properties
@@ -1,5 +1,5 @@
# DO NOT MERGE INTO TRUNK
RELEASE=.0a0
RELEASE=.0a2
VERSION=1.13
TRUNK=
# To allow build.xml to drop the xpi directly into the svn working copy for getfirebug.com
Expand Down
4 changes: 2 additions & 2 deletions extension/content/firebug/chrome/activation.js
Expand Up @@ -24,8 +24,8 @@ const Ci = Components.interfaces;
*
* 1) Part of the logic is based on annotation service (see components/firebug-annotations.js)
* in order to remember whether Firebug is activated for given site or not.
* If there is "firebugged.showFirebug" annotation for a given site Firbug is activated.
* If there is "firebugged.closed" annotation for a given site Firbug is not activated.
* If there is "firebugged.showFirebug" annotation for a given site Firebug is activated.
* If there is "firebugged.closed" annotation for a given site Firebug is not activated.
*
* 2) Other part is based on extensions.firebug.allPagesActivation option. This option
* can be set to the following values:
Expand Down
11 changes: 8 additions & 3 deletions extension/content/firebug/chrome/balloonNote.js
@@ -1,6 +1,11 @@
/* See license.txt for terms of usage */

define(["firebug/lib/domplate"], function(Domplate) {
define([
"firebug/lib/domplate"
],
function(Domplate) {

"use strict";

// ********************************************************************************************* //
// Constants
Expand All @@ -10,7 +15,8 @@ Firebug.BalloonNote = function(doc, object)
this.initialize(doc, object);
};

with (Domplate) {
var {domplate, DIV, SPAN, TAG} = Domplate;

Firebug.BalloonNote.prototype = domplate(
{
tag:
Expand Down Expand Up @@ -53,7 +59,6 @@ Firebug.BalloonNote.prototype = domplate(
// move from Firebug.BreakNotification
}
});
};

// ********************************************************************************************* //
});
5 changes: 3 additions & 2 deletions extension/content/firebug/chrome/infotip.js
Expand Up @@ -10,14 +10,16 @@ define([
],
function(Obj, Firebug, Domplate, Locale, Events, Dom) {

"use strict";

// ********************************************************************************************* //
// Constants

const infoTipMargin = 10;

// ********************************************************************************************* //

with (Domplate) {
var {domplate, DIV} = Domplate;
Firebug.InfoTip = Obj.extend(Firebug.Module,
{
dispatchName: "infoTip",
Expand Down Expand Up @@ -173,7 +175,6 @@ Firebug.InfoTip = Obj.extend(Firebug.Module,
this.showPanel(browser, panel);
}
});
};

// ********************************************************************************************* //
// Registration
Expand Down
2 changes: 1 addition & 1 deletion extension/content/firebug/chrome/knownIssues.js
Expand Up @@ -18,7 +18,7 @@ const Ci = Components.interfaces;
// ********************************************************************************************* //

/**
* This module is responsible for varisous hacky solutions related to known issues.
* This module is responsible for various hacky solutions related to known issues.
*/
Firebug.KnownIssues = Obj.extend(Firebug.Module,
/** @lends Firebug.KnownIssues */
Expand Down
13 changes: 3 additions & 10 deletions extension/content/firebug/chrome/menu.js
Expand Up @@ -5,9 +5,10 @@ define([
"firebug/lib/locale",
"firebug/lib/options",
"firebug/lib/css",
"firebug/lib/deprecated"
"firebug/lib/deprecated",
"firebug/lib/system",
],
function(FBTrace, Locale, Options, Css, Deprecated) {
function(FBTrace, Locale, Options, Css, Deprecated, System) {

"use strict";

Expand Down Expand Up @@ -145,14 +146,6 @@ Menu.setItemIntoElement = function(element, item)
if (item.name)
element.setAttribute("name", item.name);

if (item.items && (item.command || item.commandID))
{
element.setAttribute("type", "splitmenu");
element.setAttribute("iconic", "true");
}

// xxxHonza: must be done after 'type' == 'splitmenu' otherwise the menu-item
// is not checked (the check icon is not displayed from some reason).
if (item.checked)
element.setAttribute("checked", "true");

Expand Down
19 changes: 11 additions & 8 deletions extension/content/firebug/chrome/navigationHistory.js
Expand Up @@ -9,15 +9,15 @@ define([
],
function(Obj, Locale, Firebug, Dom, Menu) {

// ************************************************************************************************
// ********************************************************************************************* //
// Constants

const Cc = Components.classes;
const Ci = Components.interfaces;

const MAX_HISTORY_MENU_ITEMS = 15;

// ************************************************************************************************
// ********************************************************************************************* //

/**
* @class Support for back and forward pattern for navigating within Firebug UI (panels).
Expand All @@ -26,7 +26,7 @@ Firebug.NavigationHistory = Obj.extend(Firebug.Module,
{
dispatchName: "navigationHistory",

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Extending Module

initContext: function(context, persistedState)
Expand Down Expand Up @@ -55,15 +55,18 @@ Firebug.NavigationHistory = Obj.extend(Firebug.Module,
}
},

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// History popup menu

onPopupShowing: function(popup, context)
{
var currIndex = this.getCurrentIndex(context);

if (FBTrace.DBG_HISTORY)
FBTrace.sysout("history.onPopupShowing; " + currIndex + ", " + context.getName(), context);
{
FBTrace.sysout("history.onPopupShowing; " + currIndex + ", " +
context.getName(), context);
}

Dom.eraseNode(popup);

Expand Down Expand Up @@ -221,7 +224,7 @@ Firebug.NavigationHistory = Obj.extend(Firebug.Module,
return context.navigationHistoryIndex;
},

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// UI Listener

onPanelNavigate: function(location, panel)
Expand Down Expand Up @@ -282,13 +285,13 @@ Firebug.NavigationHistory = Obj.extend(Firebug.Module,
}
});

// ************************************************************************************************
// ********************************************************************************************* //
// Registration

Firebug.registerModule(Firebug.NavigationHistory);
Firebug.registerUIListener(Firebug.NavigationHistory);

return Firebug.NavigationHistory;

// ************************************************************************************************
// ********************************************************************************************* //
});
13 changes: 9 additions & 4 deletions extension/content/firebug/chrome/panelActivation.js
Expand Up @@ -13,6 +13,8 @@ define([
],
function(Obj, Firebug, Firefox, Locale, Domplate, Xpcom, Url, Dom, Options) {

"use strict";

// ********************************************************************************************* //
// Constants

Expand Down Expand Up @@ -243,8 +245,8 @@ Firebug.PanelActivation = Obj.extend(Firebug.Module,
if (Options.get(clearConfirmationPref))
{
var check = {value: false};
var flags = prompts.BUTTON_POS_0 * prompts.BUTTON_TITLE_YES +
prompts.BUTTON_POS_1 * prompts.BUTTON_TITLE_NO;
var flags = prompts.BUTTON_POS_0 * prompts.BUTTON_TITLE_YES +
prompts.BUTTON_POS_1 * prompts.BUTTON_TITLE_NO;

if (!prompts.confirmEx(Firebug.chrome.window, Locale.$STR("Firebug"),
Locale.$STR("annotations.confirm.clear"), flags, "", "", "",
Expand Down Expand Up @@ -308,7 +310,9 @@ Firebug.PanelActivation = Obj.extend(Firebug.Module,
/**
* @domplate This template renders default content for disabled panels.
*/
with (Domplate) {

var {domplate, DIV, H1, SPAN, P, A} = Domplate;

Firebug.DisabledPanelBox = domplate(Firebug.Rep,
/** @lends Firebug.DisabledPanelBox */
{
Expand Down Expand Up @@ -343,8 +347,10 @@ Firebug.DisabledPanelBox = domplate(Firebug.Rep,
else
{
if (FBTrace.DBG_ERRORS)
{
FBTrace.sysout("panelActivation.onEnable; panel is not activable: " +
Firebug.getPanelTitle(panelType));
}
}
},

Expand Down Expand Up @@ -391,7 +397,6 @@ Firebug.DisabledPanelBox = domplate(Firebug.Rep,
return doc.documentElement.querySelector(".disabledPanelNode");
},
});
};

// ********************************************************************************************* //
// Registration
Expand Down
90 changes: 90 additions & 0 deletions extension/content/firebug/chrome/panelNotification.js
@@ -0,0 +1,90 @@
/* See license.txt for terms of usage */

define([
"firebug/firebug",
"firebug/lib/trace",
"firebug/lib/domplate",
"firebug/lib/locale",
"firebug/chrome/window",
"firebug/lib/css",
"firebug/lib/dom",
],
function(Firebug, FBTrace, Domplate, Locale, Win, Css, Dom) {

"use strict";

// ********************************************************************************************* //
// Constants

const Cc = Components.classes;
const Ci = Components.interfaces;

var {domplate, DIV, TABLE, TBODY, TR, TD, SPAN, BUTTON} = Domplate;

// ********************************************************************************************* //
// Implementation

var PanelNotification = domplate(
{
tag:
TABLE({"class": "panelNotification", cellpadding: 0, cellspacing: 0},
TBODY(
TR({"class": "panelNotificationRow"},
TD({"class": "panelNotificationCol"},
SPAN({"class": "panelNotificationMessage"},
"$message"
)
),
TD({"class": "panelSeparatorCol"}),
TD({"class": "panelNotificationCol"},
BUTTON({"class": "panelNotificationButton",
title: "$buttonTooltip",
onclick: "$onPreferences"},
"$buttonLabel"
)
)
)
)
),

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

onPreferences: function(event)
{
var table = Dom.getAncestorByClass(event.target, "panelNotification");
Win.openNewTab("about:config?filter=" + table.config.prefName);
},

// xxxHonza: this API should be a little more generic
updateCounter: function(row)
{
var container = Dom.getAncestorByClass(row, "panelNotificationBox");
if (container)
Css.removeClass(container, "collapsed");

// Update info within the limit row.
var message = row.getElementsByClassName("panelNotificationMessage").item(0);
message.firstChild.nodeValue = Locale.$STRP("plural.Limit_Exceeded2",
[row.config.totalCount]);
},

render: function(parent, config)
{
// Set default values
config.buttonTooltip = config.buttonTooltip || null;
config.buttonLabel = config.buttonLabel || Locale.$STR("LimitPrefs");
config.message = config.message || Locale.$STRP("plural.Limit_Exceeded2", [0]);

var element = this.tag.append(config, parent, this);
element.config = config;
return element;
}
});

// ********************************************************************************************* //
// Registration

return PanelNotification;

// ********************************************************************************************* //
});
15 changes: 9 additions & 6 deletions extension/content/firebug/chrome/plugin.js
Expand Up @@ -7,7 +7,7 @@ define([
],
function(Obj, Firebug, Debug) {

// ************************************************************************************************
// ********************************************************************************************* //
// This is a panel implemented as its own browser with its own URL

Firebug.PluginPanel = function() {};
Expand Down Expand Up @@ -39,7 +39,10 @@ Firebug.PluginPanel.prototype = Obj.extend(Firebug.Panel,
browserReady: function()
{
this.browser.removeEventListener("DOMContentLoaded", this.browserReady, false);
if (FBTrace.DBG_INITIALIZE) FBTrace.sysout("plugin.browserReady DOMContentLoaded addEventListener\n");

if (FBTrace.DBG_INITIALIZE)
FBTrace.sysout("plugin.browserReady DOMContentLoaded addEventListener");

this.innerPanel = this.browser.contentWindow.FirebugPanel; // XXXjjb ?
if (this.visible)
{
Expand All @@ -49,7 +52,7 @@ Firebug.PluginPanel.prototype = Obj.extend(Firebug.Panel,
}
},

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// extends Panel

initialize: function()
Expand Down Expand Up @@ -115,7 +118,7 @@ Firebug.PluginPanel.prototype = Obj.extend(Firebug.Panel,
}
});

// ************************************************************************************************
// ********************************************************************************************* //

function innerCall(innerPanel, name, args)
{
Expand All @@ -129,10 +132,10 @@ function innerCall(innerPanel, name, args)
}
}

// ************************************************************************************************
// ********************************************************************************************* //
// Registration

return Firebug.PluginPanel;

// ************************************************************************************************
// ********************************************************************************************* //
});

0 comments on commit 8cf9d8a

Please sign in to comment.