[Pkg-mozext-commits] [firebug] 04/16: Preview of 'currentcolor' within gradients is incorrect in Computed side panel (issue 7777)
David Prévot
taffit at moszumanska.debian.org
Fri Apr 10 02:19:01 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository firebug.
commit a5d45cde8f5e7089c1002cd4bd91ad809f89122d
Author: SebastianZ <sebastianzartner at gmail.com>
Date: Mon Mar 16 09:47:41 2015 +0100
Preview of 'currentcolor' within gradients is incorrect in Computed side
panel (issue 7777)
---
extension/content/firebug/css/computedPanel.js | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/extension/content/firebug/css/computedPanel.js b/extension/content/firebug/css/computedPanel.js
index e69abe8..c4d64eb 100644
--- a/extension/content/firebug/css/computedPanel.js
+++ b/extension/content/firebug/css/computedPanel.js
@@ -668,6 +668,14 @@ CSSComputedPanel.prototype = Obj.extend(Panel,
if (!cssValue)
return false;
+ if (cssValue.type === "colorKeyword" || cssValue.type === "gradient")
+ {
+ var currentColor = this.getCurrentColor();
+ cssValue.value = cssValue.value.replace(/currentcolor/gi, currentColor);
+ if (cssValue.value === "")
+ return false;
+ }
+
if (cssValue.value == this.infoTipValue)
return true;
@@ -712,6 +720,12 @@ CSSComputedPanel.prototype = Obj.extend(Panel,
}
},
+ getCurrentColor: function()
+ {
+ var cs = this.selection.ownerDocument.defaultView.getComputedStyle(this.selection);
+ return cs.getPropertyValue("color");
+ },
+
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Change Listener
--
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