[Pkg-mozext-commits] [firebug] 30/48: Issue 7487: Scroll bar button not visible when debugger notification displayed
David Prévot
taffit at moszumanska.debian.org
Tue Jun 3 01:47:45 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository firebug.
commit 4246de711c72bfae338b94c4cb19f1703800adee
Author: Jan Odvarko <odvarko at gmail.com>
Date: Thu May 29 13:56:27 2014 +0200
Issue 7487: Scroll bar button not visible when debugger notification displayed
---
.../firebug/debugger/script/breakNotification.js | 11 ++++--
.../content/firebug/debugger/script/scriptPanel.js | 44 +++++++++++++++++++++-
2 files changed, 51 insertions(+), 4 deletions(-)
diff --git a/extension/content/firebug/debugger/script/breakNotification.js b/extension/content/firebug/debugger/script/breakNotification.js
index 6061078..09ebced 100644
--- a/extension/content/firebug/debugger/script/breakNotification.js
+++ b/extension/content/firebug/debugger/script/breakNotification.js
@@ -37,9 +37,10 @@ var Trace = FBTrace.to("DBG_BREAKNOTIFICATION");
* elements: target
* objects: prevValue, newValue
*/
-function BreakNotification(cause)
+function BreakNotification(cause, listener)
{
this.cause = cause;
+ this.listener = listener;
}
BreakNotification.prototype = domplate(Rep,
@@ -300,6 +301,8 @@ BreakNotification.prototype = domplate(Rep,
// xxxHonza: disable the animation, the interval seems to be frozen during debugger break.
this.box.style.top = "0";
+
+ this.listener.onNotificationShow(this);
return;
// Animation
@@ -332,6 +335,8 @@ BreakNotification.prototype = domplate(Rep,
// xxxHonza: disable the animation, the interval seems to be frozen during debugger break.
if (this.box.parentNode)
this.box.parentNode.removeChild(this.box);
+
+ this.listener.onNotificationHide(this);
return;
// Animation
@@ -361,7 +366,7 @@ BreakNotification.prototype = domplate(Rep,
// ********************************************************************************************* //
// Public API
-BreakNotification.show = function(context, parentNode, breakType)
+BreakNotification.show = function(context, parentNode, breakType, listener)
{
Trace.sysout("BreakNotification.show");
@@ -374,7 +379,7 @@ BreakNotification.show = function(context, parentNode, breakType)
if (!context.breakingCause)
return;
- var box = new BreakNotification(context.breakingCause);
+ var box = new BreakNotification(context.breakingCause, listener);
box.show(parentNode);
// Remember the box, we need to hide it when the debugger is resumed.
diff --git a/extension/content/firebug/debugger/script/scriptPanel.js b/extension/content/firebug/debugger/script/scriptPanel.js
index 1f4788c..7ee4eef 100644
--- a/extension/content/firebug/debugger/script/scriptPanel.js
+++ b/extension/content/firebug/debugger/script/scriptPanel.js
@@ -116,6 +116,22 @@ ScriptPanel.prototype = Obj.extend(BasePanel,
Firebug.registerUIListener(this);
},
+ initializeNode : function()
+ {
+ this.onResizer = this.onResize.bind(this);
+ this.resizeEventTarget = Firebug.chrome.$("fbContentBox");
+ Events.addEventListener(this.panelNode, "resize", this.onResizer, true);
+
+ BasePanel.initializeNode.apply(this, arguments);
+ },
+
+ destroyNode : function()
+ {
+ Events.removeEventListener(this.panelNode, "resize", this.onResizer, true);
+
+ BasePanel.destroyNode.apply(this, arguments);
+ },
+
destroy: function(state)
{
// We want the location (compilationUnit) to persist, not the selection (e.g. stackFrame).
@@ -241,6 +257,32 @@ ScriptPanel.prototype = Obj.extend(BasePanel,
},
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+ // Editor Size Update
+
+ onResize: function()
+ {
+ var editor = this.panelNode.querySelector(".CodeMirror");
+ if (!editor)
+ return;
+
+ var box = this.panelNode.querySelector(".notificationBox");
+ if (!box)
+ editor.style.height = "";
+ else
+ editor.style.height = (this.panelNode.clientHeight - box.clientHeight) + "px";
+ },
+
+ onNotificationShow: function()
+ {
+ this.onResize();
+ },
+
+ onNotificationHide: function()
+ {
+ this.onResize();
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
updateSidePanels: function(panel)
{
@@ -1666,7 +1708,7 @@ ScriptPanel.prototype = Obj.extend(BasePanel,
this.highlight(true);
// Display break notification box.
- BreakNotification.show(this.context, this.panelNode, packet.why.type);
+ BreakNotification.show(this.context, this.panelNode, packet.why.type, this);
}
catch (exc)
{
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/firebug.git
More information about the Pkg-mozext-commits
mailing list