[Pkg-mozext-commits] [firebug] 11/16: Don't store property values as rep objects
David Prévot
taffit at moszumanska.debian.org
Mon Mar 31 22:45:31 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to tag fbtest-1.11.1
in repository firebug.
commit b71762dc68aa7f1c84357d0e37a74b406d1066c4
Author: Simon Lindholm <simon.lindholm10 at gmail.com>
Date: Wed Dec 12 00:35:55 2012 +0100
Don't store property values as rep objects
Related to issue 6129.
---
extension/content/firebug/css/cssPanel.js | 52 ++++++-------------------------
1 file changed, 9 insertions(+), 43 deletions(-)
diff --git a/extension/content/firebug/css/cssPanel.js b/extension/content/firebug/css/cssPanel.js
index 89e1f29..90f70a0 100644
--- a/extension/content/firebug/css/cssPanel.js
+++ b/extension/content/firebug/css/cssPanel.js
@@ -83,8 +83,8 @@ var CSSPropTag = domplate(CSSDomplateBase,
// Use a space here, so that "copy to clipboard" has it (issue 3266).
SPAN({"class": "cssColon"}, ": "),
- SPAN({"class": "cssPropValue", $editable: "$rule|isEditable",
- _repObject: "$prop.value$prop.important"}, "$prop|getPropertyValue$prop.important"
+ SPAN({"class": "cssPropValue", $editable: "$rule|isEditable"},
+ "$prop|getPropertyValue$prop.important"
),
SPAN({"class": "cssSemi"}, ";")
)
@@ -798,7 +798,7 @@ Firebug.CSSStyleSheetPanel.prototype = Obj.extend(Firebug.Panel,
disabledMap.set(rule, []);
var map = disabledMap.get(rule);
- var propValue = Firebug.getRepObject(Dom.getChildByClass(row, "cssPropValue"));
+ var propValue = Dom.getChildByClass(row, "cssPropValue").textContent;
var parsedValue = parsePriority(propValue);
CSSModule.disableProperty(Css.hasClass(row, "disabledStyle"), rule,
@@ -1470,10 +1470,12 @@ Firebug.CSSStyleSheetPanel.prototype = Obj.extend(Firebug.Panel,
{
var rule = child.repObject;
if (rule)
+ {
return {
line: getRuleLine(rule),
offset: panelNode.scrollTop-child.offsetTop
};
+ }
}
}
return 0;
@@ -1619,7 +1621,7 @@ Firebug.CSSStyleSheetPanel.prototype = Obj.extend(Firebug.Panel,
continue;
var name = Dom.getChildByClass(row, "cssPropName").textContent;
- var value = Firebug.getRepObject(Dom.getChildByClass(row, "cssPropValue"));
+ var value = Dom.getChildByClass(row, "cssPropValue").textContent;
lines.push(name + ": " + value + ";");
}
@@ -1738,8 +1740,6 @@ CSSEditor.prototype = domplate(Firebug.InlineEditor.prototype,
var parsedValue = parsePriority(value);
CSSModule.setProperty(rule, propName, parsedValue.value,
parsedValue.priority);
- // Save in rep object.
- Dom.getAncestorByClass(target, "cssPropValue").repObject = value;
}
else if (previousValue && previousValue != "null")
{
@@ -1837,7 +1837,7 @@ CSSEditor.prototype = domplate(Firebug.InlineEditor.prototype,
var rule = Firebug.getRepObject(cssRule);
var baseText = rule.style ? rule.style.cssText : rule.cssText;
var prop = Dom.getAncestorByClass(target, "cssProp");
- var propValue = Firebug.getRepObject(Dom.getChildByClass(prop, "cssPropValue"));
+ var propValue = Dom.getChildByClass(prop, "cssPropValue").textContent;
var parsedValue = parsePriority(propValue);
if (previous)
@@ -1881,20 +1881,6 @@ CSSEditor.prototype = domplate(Firebug.InlineEditor.prototype,
}
},
- getInitialValue: function(target, value)
- {
- if (value == "")
- return value;
-
- var propValue = Dom.getAncestorByClass(target, "cssPropValue");
- if (propValue)
- {
- var row = Dom.getAncestorByClass(target, "cssProp");
- value = Firebug.getRepObject(propValue);
- }
- return value;
- },
-
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
getAutoCompleteRange: function(value, offset)
@@ -2363,7 +2349,7 @@ CSSRuleEditor.prototype = domplate(SelectorEditor.prototype,
if (!Css.hasClass(propEl, "disabledStyle"))
{
var propName = Dom.getChildByClass(propEl, "cssPropName").textContent;
- var propValue = Dom.getChildByClass(propEl, "cssPropValue").repObject;
+ var propValue = Dom.getChildByClass(propEl, "cssPropValue").textContent;
cssText.push(propName + ":" + propValue + ";");
}
}
@@ -2645,27 +2631,7 @@ function getRuleLine(rule)
{
return Dom.domUtils.getRuleLine(rule);
}
- catch(e)
- {
-
- }
- return 0;
-}
-
-function getTopmostRuleLine(panelNode)
-{
- for (var child = panelNode.firstChild; child; child = child.nextSibling)
- {
- if (child.offsetTop+child.offsetHeight > panelNode.scrollTop)
- {
- var rule = child.repObject;
- if (rule)
- return {
- line: getRuleLine(rule),
- offset: panelNode.scrollTop-child.offsetTop
- };
- }
- }
+ catch (e) {}
return 0;
}
--
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