Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Issue 2643 (Make Break On ... feature more obvious in panel tabs)

  • Loading branch information...
commit 1fb87ae2ad940cc790673a0a5c03a5116b98c960 1 parent 896ee3c
@SebastianZ SebastianZ authored
View
14 extension/content/firebug/firebug.css
@@ -337,8 +337,20 @@ panelTab > panelTabMenu .menuPopup:-moz-locale-dir(rtl) {
/************************************************************************************************/
+@-moz-keyframes armedBlinking {
+ 100% {
+ text-shadow: 1px 1px 2px darkGray, 0px 0px 1em orange, 0px 0px 0.2em orange;
+ }
+}
+
panelTab[breakOnNextArmed="true"] > .panelTab-text {
- text-shadow: 1px 1px 2px darkGray, 0 0 1em orange, 0 0 0.2em orange !important;
+ -moz-animation: armedBlinking 0.8s ease-out infinite alternate;
+}
+
+panelTab.highlighted {
+ text-shadow: 1px 1px 2px darkGray, 0px 0px 1em orange, 0px 0px 0.2em orange !important;
+ -moz-transition-property: text-shadow;
+ -moz-transition-duration: 0.8s;
}
panelTab[aria-disabled='true'] {
View
54 extension/content/firebug/js/breakpoint.js
@@ -23,6 +23,11 @@ function(Obj, Firebug, Domplate, FirebugReps, Locale, Events, SourceLink,
StackFrame, Css, Dom, Str, Arr, Persist, Menu, FBS) {
// ********************************************************************************************* //
+// Constants
+
+const animationDuration = 0.8;
+
+ // ********************************************************************************************* //
// Breakpoints
Firebug.Breakpoint = Obj.extend(Firebug.Module,
@@ -107,6 +112,26 @@ Firebug.Breakpoint = Obj.extend(Firebug.Module,
Menu.createMenuItem(menuPopup, menuItems[i]);
},
+ toggleTabHighlighting: function(event)
+ {
+ // Don't continue if it's the wrong animation phase
+ if (Math.floor(event.elapsedTime * 10) % (animationDuration * 20) != 0)
+ return;
+
+ Events.removeEventListener(event.target, "animationiteration",
+ Firebug.Breakpoint.toggleTabHighlighting, true);
+
+ var panel = Firebug.currentContext.getPanel(event.target.panelType.prototype.name);
+ if (!panel)
+ return;
+
+ if (!panel.context.delayedArmedTab)
+ return;
+
+ panel.context.delayedArmedTab.setAttribute("breakOnNextArmed", "true");
+ delete panel.context.delayedArmedTab;
+ },
+
updateBreakOnNextTooltips: function(panel)
{
var breakable = Firebug.chrome.getGlobalAttribute("cmd_toggleBreakOn", "breakable");
@@ -145,7 +170,34 @@ Firebug.Breakpoint = Obj.extend(Firebug.Module,
var panelBar = Firebug.chrome.$("fbPanelBar1");
var tab = panelBar.getTab(panel.name);
if (tab)
- tab.setAttribute("breakOnNextArmed", armed ? "true" : "false");
+ {
+ if (armed)
+ {
+ // If there is already a panel armed synchronize highlighting of the panel tabs
+ var tabPanel = tab.parentNode;
+ var otherTabIsArmed = false;
+ for (var i = 0; i < tabPanel.children.length; ++i)
+ {
+ var panelTab = tabPanel.children[i];
+ if (panelTab !== tab && panelTab.getAttribute("breakOnNextArmed") == "true")
+ {
+ panel.context.delayedArmedTab = tab;
+ Events.addEventListener(panelTab, "animationiteration",
+ this.toggleTabHighlighting, true);
+ otherTabIsArmed = true;
+ break;
+ }
+ }
+
+ if (!otherTabIsArmed)
+ tab.setAttribute("breakOnNextArmed", "true");
+ }
+ else
+ {
+ delete panel.context.delayedArmedTab;
+ tab.setAttribute("breakOnNextArmed", "false");
+ }
+ }
},
updatePanelTabs: function(context)
Please sign in to comment.
Something went wrong with that request. Please try again.