зеркало из https://github.com/mozilla/gecko-dev.git
Fix image preview by working around the XUL reflow bug. Bug 265416, r=glazou,
sr=neil
This commit is contained in:
Родитель
d0d98288f4
Коммит
0b1edd092b
|
@ -332,6 +332,8 @@ function PreviewImageLoaded()
|
|||
function LoadPreviewImage()
|
||||
{
|
||||
gDialog.PreviewSize.collapsed = true;
|
||||
// XXXbz workaround for bug 265416 / bug 266284
|
||||
gDialog.ImageHolder.collapsed = true;
|
||||
|
||||
var imageSrc = TrimString(gDialog.srcInput.value);
|
||||
if (!imageSrc)
|
||||
|
@ -374,6 +376,7 @@ function LoadPreviewImage()
|
|||
{
|
||||
// set the src before appending to the document -- see bug 198435 for why
|
||||
// this is needed.
|
||||
// XXXbz that bug is long-since fixed. Is this still needed?
|
||||
gDialog.PreviewImage.addEventListener("load", PreviewImageLoaded, true);
|
||||
gDialog.PreviewImage.src = imageSrc;
|
||||
gDialog.ImageHolder.appendChild(gDialog.PreviewImage);
|
||||
|
|
Загрузка…
Ссылка в новой задаче