mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
More setting of presentational attributes that should use the CSS equivalent
stuff. Bug 239476, r=glazman, sr=peterv
This commit is contained in:
parent
debcc046a2
commit
d179ca744c
@ -404,13 +404,14 @@ function ValidateData()
|
||||
// from windows, but I don't know how to do that!
|
||||
var tmpColor = customTextColor.toLowerCase();
|
||||
if (tmpColor != "windowtext")
|
||||
globalElement.setAttribute(textStr, customTextColor);
|
||||
editor.setAttributeOrEquivalent(globalElement, textStr,
|
||||
customTextColor, true);
|
||||
else
|
||||
editor.removeAttributeOrEquivalent(globalElement, textStr, true);
|
||||
|
||||
tmpColor = customBackgroundColor.toLowerCase();
|
||||
if (tmpColor != "window")
|
||||
globalElement.setAttribute(bgcolorStr, customBackgroundColor);
|
||||
editor.setAttributeOrEquivalent(globalElement, bgcolorStr, customBackgroundColor, true);
|
||||
else
|
||||
editor.removeAttributeOrEquivalent(globalElement, bgcolorStr, true);
|
||||
|
||||
|
@ -502,7 +502,10 @@ function SetColor(ColorWellID, color)
|
||||
{
|
||||
if (color)
|
||||
{
|
||||
globalCellElement.setAttribute(bgcolor, color);
|
||||
try {
|
||||
gActiveEditor.setAttributeOrEquivalent(globalCellElement, bgcolor,
|
||||
color, true);
|
||||
} catch(e) {}
|
||||
gDialog.CellInheritColor.collapsed = true;
|
||||
}
|
||||
else
|
||||
@ -518,7 +521,10 @@ function SetColor(ColorWellID, color)
|
||||
{
|
||||
if (color)
|
||||
{
|
||||
globalTableElement.setAttribute(bgcolor, color);
|
||||
try {
|
||||
gActiveEditor.setAttributeOrEquivalent(globalTableElement, bgcolor,
|
||||
color, true);
|
||||
} catch(e) {}
|
||||
gDialog.TableInheritColor.collapsed = true;
|
||||
}
|
||||
else
|
||||
@ -801,10 +807,14 @@ function SetAlign(listID, defaultValue, element, attName)
|
||||
{
|
||||
try {
|
||||
gActiveEditor.removeAttributeOrEquivalent(element, attName, true);
|
||||
} catch(e) {}
|
||||
} catch(e) {}
|
||||
}
|
||||
else
|
||||
element.setAttribute(attName, value);
|
||||
{
|
||||
try {
|
||||
gActiveEditor.setAttributeOrEquivalent(element, attName, value, true);
|
||||
} catch(e) {}
|
||||
}
|
||||
}
|
||||
|
||||
function ValidateTableData()
|
||||
@ -908,7 +918,10 @@ function ValidateCellData()
|
||||
if (gDialog.TextWrapCheckbox.checked)
|
||||
{
|
||||
if (gDialog.TextWrapList.value == "nowrap")
|
||||
globalCellElement.setAttribute("nowrap","nowrap");
|
||||
try {
|
||||
gActiveEditor.setAttributeOrEquivalent(globalCellElement, "nowrap",
|
||||
"nowrap", true);
|
||||
} catch(e) {}
|
||||
else
|
||||
try {
|
||||
gActiveEditor.removeAttributeOrEquivalent(globalCellElement, "nowrap", true);
|
||||
|
Loading…
Reference in New Issue
Block a user