зеркало из https://github.com/mozilla/gecko-dev.git
Temporary workaround so that plugins display correctly. This will change after support for
CSS borders and padding are added.
This commit is contained in:
Родитель
7aea7d38db
Коммит
0adb3694fe
|
@ -298,13 +298,6 @@ nsObjectFrame::GetDesiredSize(nsIPresContext* aPresContext,
|
|||
PRUint32 width = EMBED_DEF_DIM;
|
||||
PRUint32 height = EMBED_DEF_DIM;
|
||||
|
||||
// the first time, mInstanceOwner will be null, so we a temporary default
|
||||
if(mInstanceOwner != nsnull)
|
||||
{
|
||||
mInstanceOwner->GetWidth(&width);
|
||||
mInstanceOwner->GetHeight(&height);
|
||||
}
|
||||
|
||||
if (aReflowState.HaveFixedContentWidth()) {
|
||||
aMetrics.width = aReflowState.computedWidth;
|
||||
haveWidth = PR_TRUE;
|
||||
|
@ -314,6 +307,17 @@ nsObjectFrame::GetDesiredSize(nsIPresContext* aPresContext,
|
|||
haveHeight = PR_TRUE;
|
||||
}
|
||||
|
||||
// the first time, mInstanceOwner will be null, so we a temporary default
|
||||
if(mInstanceOwner != nsnull)
|
||||
{
|
||||
mInstanceOwner->GetWidth(&width);
|
||||
mInstanceOwner->GetHeight(&height);
|
||||
// XXX this is temporary fix so plugins display until we support padding
|
||||
haveHeight = PR_FALSE;
|
||||
haveWidth = PR_FALSE;
|
||||
}
|
||||
|
||||
|
||||
// XXX Temporary auto-sizing logic
|
||||
if (!haveWidth) {
|
||||
if (haveHeight) {
|
||||
|
|
|
@ -298,13 +298,6 @@ nsObjectFrame::GetDesiredSize(nsIPresContext* aPresContext,
|
|||
PRUint32 width = EMBED_DEF_DIM;
|
||||
PRUint32 height = EMBED_DEF_DIM;
|
||||
|
||||
// the first time, mInstanceOwner will be null, so we a temporary default
|
||||
if(mInstanceOwner != nsnull)
|
||||
{
|
||||
mInstanceOwner->GetWidth(&width);
|
||||
mInstanceOwner->GetHeight(&height);
|
||||
}
|
||||
|
||||
if (aReflowState.HaveFixedContentWidth()) {
|
||||
aMetrics.width = aReflowState.computedWidth;
|
||||
haveWidth = PR_TRUE;
|
||||
|
@ -314,6 +307,17 @@ nsObjectFrame::GetDesiredSize(nsIPresContext* aPresContext,
|
|||
haveHeight = PR_TRUE;
|
||||
}
|
||||
|
||||
// the first time, mInstanceOwner will be null, so we a temporary default
|
||||
if(mInstanceOwner != nsnull)
|
||||
{
|
||||
mInstanceOwner->GetWidth(&width);
|
||||
mInstanceOwner->GetHeight(&height);
|
||||
// XXX this is temporary fix so plugins display until we support padding
|
||||
haveHeight = PR_FALSE;
|
||||
haveWidth = PR_FALSE;
|
||||
}
|
||||
|
||||
|
||||
// XXX Temporary auto-sizing logic
|
||||
if (!haveWidth) {
|
||||
if (haveHeight) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче