From 1cd4c9979b90082517bb95155c5fe433ca1efea9 Mon Sep 17 00:00:00 2001 From: "bzbarsky%mit.edu" Date: Tue, 20 Jul 2004 19:11:04 +0000 Subject: [PATCH] Fix bug 237628 -- unable to resize images with CSS size set. r=glazman, sr=peterv. git-svn-id: svn://10.0.0.236/trunk@159546 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/editor/ui/dialogs/content/EdImageOverlay.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mozilla/editor/ui/dialogs/content/EdImageOverlay.js b/mozilla/editor/ui/dialogs/content/EdImageOverlay.js index a0b2f71f601..52636e548cb 100644 --- a/mozilla/editor/ui/dialogs/content/EdImageOverlay.js +++ b/mozilla/editor/ui/dialogs/content/EdImageOverlay.js @@ -590,12 +590,12 @@ function ValidateImage() // and we couldn't obtain actual dimensions var srcChanged = (src != gOriginalSrc); if (width) - globalElement.setAttribute("width", width); + editor.setAttributeOrEquivalent(globalElement, "width", width, true); else if (srcChanged) editor.removeAttributeOrEquivalent(globalElement, "width", true); if (height) - globalElement.setAttribute("height", height); + editor.setAttributeOrEquivalent(globalElement, "height", height, true); else if (srcChanged) editor.removeAttributeOrEquivalent(globalElement, "height", true); @@ -627,7 +627,8 @@ function ValidateImage() case "middle": case "right": case "left": - globalElement.setAttribute( "align", gDialog.alignTypeSelect.value ); + editor.setAttributeOrEquivalent( globalElement, "align", + gDialog.alignTypeSelect.value , true); break; default: try {