Fix bug 237628 -- unable to resize images with CSS size set. r=glazman, sr=peterv.

This commit is contained in:
bzbarsky%mit.edu 2004-07-20 19:11:04 +00:00
Родитель 121ac127b9
Коммит 89e1208ecf
1 изменённых файлов: 4 добавлений и 3 удалений

Просмотреть файл

@ -590,12 +590,12 @@ function ValidateImage()
// and we couldn't obtain actual dimensions // and we couldn't obtain actual dimensions
var srcChanged = (src != gOriginalSrc); var srcChanged = (src != gOriginalSrc);
if (width) if (width)
globalElement.setAttribute("width", width); editor.setAttributeOrEquivalent(globalElement, "width", width, true);
else if (srcChanged) else if (srcChanged)
editor.removeAttributeOrEquivalent(globalElement, "width", true); editor.removeAttributeOrEquivalent(globalElement, "width", true);
if (height) if (height)
globalElement.setAttribute("height", height); editor.setAttributeOrEquivalent(globalElement, "height", height, true);
else if (srcChanged) else if (srcChanged)
editor.removeAttributeOrEquivalent(globalElement, "height", true); editor.removeAttributeOrEquivalent(globalElement, "height", true);
@ -627,7 +627,8 @@ function ValidateImage()
case "middle": case "middle":
case "right": case "right":
case "left": case "left":
globalElement.setAttribute( "align", gDialog.alignTypeSelect.value ); editor.setAttributeOrEquivalent( globalElement, "align",
gDialog.alignTypeSelect.value , true);
break; break;
default: default:
try { try {