mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-22 02:09:28 +00:00
Bug #225357. Plugins that specify coordinates that exceed maximum X coordinates cause X errors. Limit the size of plugins on this platform to the maximum size for X windows. r=bz, sr=roc
This commit is contained in:
parent
9432632968
commit
f01bca0a21
@ -930,6 +930,15 @@ nsObjectFrame::GetDesiredSize(nsIPresContext* aPresContext,
|
||||
aReflowState.mComputedMinHeight),
|
||||
aReflowState.mComputedMaxHeight);
|
||||
}
|
||||
|
||||
#if defined (MOZ_WIDGET_GTK) || defined (MOZ_WIDGET_GTK2) || defined (MOZ_WIDGET_XLIB)
|
||||
// We need to make sure that the size of the object frame does not
|
||||
// exceed the maximum size of X coordinates. See bug #225357 for
|
||||
// more information. In theory Gtk2 can handle large coordinates,
|
||||
// but underlying plugins can't.
|
||||
aMetrics.height = PR_MIN(NSIntPixelsToTwips(PR_INT16_MAX, p2t), aMetrics.height);
|
||||
aMetrics.width = PR_MIN(NSIntPixelsToTwips(PR_INT16_MAX, p2t), aMetrics.width);
|
||||
#endif
|
||||
}
|
||||
|
||||
// At this point, the width has an unconstrained value only if we have
|
||||
|
@ -930,6 +930,15 @@ nsObjectFrame::GetDesiredSize(nsIPresContext* aPresContext,
|
||||
aReflowState.mComputedMinHeight),
|
||||
aReflowState.mComputedMaxHeight);
|
||||
}
|
||||
|
||||
#if defined (MOZ_WIDGET_GTK) || defined (MOZ_WIDGET_GTK2) || defined (MOZ_WIDGET_XLIB)
|
||||
// We need to make sure that the size of the object frame does not
|
||||
// exceed the maximum size of X coordinates. See bug #225357 for
|
||||
// more information. In theory Gtk2 can handle large coordinates,
|
||||
// but underlying plugins can't.
|
||||
aMetrics.height = PR_MIN(NSIntPixelsToTwips(PR_INT16_MAX, p2t), aMetrics.height);
|
||||
aMetrics.width = PR_MIN(NSIntPixelsToTwips(PR_INT16_MAX, p2t), aMetrics.width);
|
||||
#endif
|
||||
}
|
||||
|
||||
// At this point, the width has an unconstrained value only if we have
|
||||
|
Loading…
x
Reference in New Issue
Block a user