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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user