Don't create style rule DOM wrappers for inline style, since we are not supposed to, and ours crash when used on inline style. b=218222 r+sr=bzbarsky

git-svn-id: svn://10.0.0.236/trunk@146845 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
dbaron%dbaron.org
2003-09-13 19:18:52 +00:00
parent 1b71e7ac3e
commit 2f071d5ceb
9 changed files with 28 additions and 55 deletions

View File

@@ -27,22 +27,13 @@
// build attribute list in tree form from element attributes
function BuildCSSAttributeTable()
{
// we can't trust DOM 2 ElementCSSInlineStyle because gElement can be
// outside of the document's tree
var styleAttr = gElement.getAttribute("style");
var styleRule;
try {
var editor = GetCurrentEditor();
styleRule = editor.parseStyleAttrIntoCSSRule(styleAttr);
} catch(ex) {}
if (styleRule == undefined)
var style = gElement.style;
if (style == undefined)
{
dump("Inline styles undefined\n");
return;
}
var style = styleRule.style;
var declLength = style.length;
if (declLength == undefined || declLength == 0)