зеркало из https://github.com/mozilla/pjs.git
Fixed bug with flow of control - reflows after the first one no longer call
CantRenderDisplacedElement() when it's not supposed to.
This commit is contained in:
Родитель
7eafa61459
Коммит
25093ccc16
|
@ -865,7 +865,7 @@ nsObjectFrame::Reflow(nsIPresContext& aPresContext,
|
||||||
const nsHTMLReflowState& aReflowState,
|
const nsHTMLReflowState& aReflowState,
|
||||||
nsReflowStatus& aStatus)
|
nsReflowStatus& aStatus)
|
||||||
{
|
{
|
||||||
nsresult rv;
|
nsresult rv = NS_OK;
|
||||||
char* mimeType = nsnull;
|
char* mimeType = nsnull;
|
||||||
PRUint32 buflen;
|
PRUint32 buflen;
|
||||||
|
|
||||||
|
@ -894,6 +894,7 @@ nsObjectFrame::Reflow(nsIPresContext& aPresContext,
|
||||||
|
|
||||||
nsAutoString classid;
|
nsAutoString classid;
|
||||||
PRInt32 nameSpaceID;
|
PRInt32 nameSpaceID;
|
||||||
|
|
||||||
// if we have a clsid, we're either an internal widget or an ActiveX control
|
// if we have a clsid, we're either an internal widget or an ActiveX control
|
||||||
mContent->GetNameSpaceID(nameSpaceID);
|
mContent->GetNameSpaceID(nameSpaceID);
|
||||||
if (NS_CONTENT_ATTR_HAS_VALUE == mContent->GetAttribute(nameSpaceID, nsHTMLAtoms::classid, classid))
|
if (NS_CONTENT_ATTR_HAS_VALUE == mContent->GetAttribute(nameSpaceID, nsHTMLAtoms::classid, classid))
|
||||||
|
@ -963,8 +964,6 @@ nsObjectFrame::Reflow(nsIPresContext& aPresContext,
|
||||||
rv = InstantiatePlugin(aPresContext, aMetrics, aReflowState, pluginHost, "application/x-oleobject", fullURL);
|
rv = InstantiatePlugin(aPresContext, aMetrics, aReflowState, pluginHost, "application/x-oleobject", fullURL);
|
||||||
else if(pluginHost->IsPluginEnabledForType("application/oleobject") == NS_OK)
|
else if(pluginHost->IsPluginEnabledForType("application/oleobject") == NS_OK)
|
||||||
rv = InstantiatePlugin(aPresContext, aMetrics, aReflowState, pluginHost, "application/oleobject", fullURL);
|
rv = InstantiatePlugin(aPresContext, aMetrics, aReflowState, pluginHost, "application/oleobject", fullURL);
|
||||||
else if(pluginHost->IsPluginEnabledForType("*") == NS_OK)
|
|
||||||
rv = InstantiatePlugin(aPresContext, aMetrics, aReflowState, pluginHost, "*", fullURL);
|
|
||||||
else
|
else
|
||||||
rv = NS_ERROR_FAILURE;
|
rv = NS_ERROR_FAILURE;
|
||||||
|
|
||||||
|
@ -973,8 +972,18 @@ nsObjectFrame::Reflow(nsIPresContext& aPresContext,
|
||||||
NS_RELEASE(container);
|
NS_RELEASE(container);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(rv == NS_OK)
|
||||||
|
{
|
||||||
aStatus = NS_FRAME_COMPLETE;
|
aStatus = NS_FRAME_COMPLETE;
|
||||||
return rv;
|
return NS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
nsIPresShell* presShell;
|
||||||
|
aPresContext.GetShell(&presShell);
|
||||||
|
presShell->CantRenderReplacedElement(&aPresContext, this);
|
||||||
|
NS_RELEASE(presShell);
|
||||||
|
aStatus = NS_FRAME_COMPLETE;
|
||||||
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
// if we're here, the object is either an applet or a plugin
|
// if we're here, the object is either an applet or a plugin
|
||||||
|
@ -1092,13 +1101,13 @@ nsObjectFrame::Reflow(nsIPresContext& aPresContext,
|
||||||
NS_IF_RELEASE(pluginHost);
|
NS_IF_RELEASE(pluginHost);
|
||||||
NS_IF_RELEASE(cv);
|
NS_IF_RELEASE(cv);
|
||||||
NS_IF_RELEASE(container);
|
NS_IF_RELEASE(container);
|
||||||
|
}
|
||||||
|
|
||||||
if(rv == NS_OK)
|
if(rv == NS_OK)
|
||||||
{
|
{
|
||||||
aStatus = NS_FRAME_COMPLETE;
|
aStatus = NS_FRAME_COMPLETE;
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
nsIPresShell* presShell;
|
nsIPresShell* presShell;
|
||||||
aPresContext.GetShell(&presShell);
|
aPresContext.GetShell(&presShell);
|
||||||
|
|
|
@ -865,7 +865,7 @@ nsObjectFrame::Reflow(nsIPresContext& aPresContext,
|
||||||
const nsHTMLReflowState& aReflowState,
|
const nsHTMLReflowState& aReflowState,
|
||||||
nsReflowStatus& aStatus)
|
nsReflowStatus& aStatus)
|
||||||
{
|
{
|
||||||
nsresult rv;
|
nsresult rv = NS_OK;
|
||||||
char* mimeType = nsnull;
|
char* mimeType = nsnull;
|
||||||
PRUint32 buflen;
|
PRUint32 buflen;
|
||||||
|
|
||||||
|
@ -894,6 +894,7 @@ nsObjectFrame::Reflow(nsIPresContext& aPresContext,
|
||||||
|
|
||||||
nsAutoString classid;
|
nsAutoString classid;
|
||||||
PRInt32 nameSpaceID;
|
PRInt32 nameSpaceID;
|
||||||
|
|
||||||
// if we have a clsid, we're either an internal widget or an ActiveX control
|
// if we have a clsid, we're either an internal widget or an ActiveX control
|
||||||
mContent->GetNameSpaceID(nameSpaceID);
|
mContent->GetNameSpaceID(nameSpaceID);
|
||||||
if (NS_CONTENT_ATTR_HAS_VALUE == mContent->GetAttribute(nameSpaceID, nsHTMLAtoms::classid, classid))
|
if (NS_CONTENT_ATTR_HAS_VALUE == mContent->GetAttribute(nameSpaceID, nsHTMLAtoms::classid, classid))
|
||||||
|
@ -963,8 +964,6 @@ nsObjectFrame::Reflow(nsIPresContext& aPresContext,
|
||||||
rv = InstantiatePlugin(aPresContext, aMetrics, aReflowState, pluginHost, "application/x-oleobject", fullURL);
|
rv = InstantiatePlugin(aPresContext, aMetrics, aReflowState, pluginHost, "application/x-oleobject", fullURL);
|
||||||
else if(pluginHost->IsPluginEnabledForType("application/oleobject") == NS_OK)
|
else if(pluginHost->IsPluginEnabledForType("application/oleobject") == NS_OK)
|
||||||
rv = InstantiatePlugin(aPresContext, aMetrics, aReflowState, pluginHost, "application/oleobject", fullURL);
|
rv = InstantiatePlugin(aPresContext, aMetrics, aReflowState, pluginHost, "application/oleobject", fullURL);
|
||||||
else if(pluginHost->IsPluginEnabledForType("*") == NS_OK)
|
|
||||||
rv = InstantiatePlugin(aPresContext, aMetrics, aReflowState, pluginHost, "*", fullURL);
|
|
||||||
else
|
else
|
||||||
rv = NS_ERROR_FAILURE;
|
rv = NS_ERROR_FAILURE;
|
||||||
|
|
||||||
|
@ -973,8 +972,18 @@ nsObjectFrame::Reflow(nsIPresContext& aPresContext,
|
||||||
NS_RELEASE(container);
|
NS_RELEASE(container);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(rv == NS_OK)
|
||||||
|
{
|
||||||
aStatus = NS_FRAME_COMPLETE;
|
aStatus = NS_FRAME_COMPLETE;
|
||||||
return rv;
|
return NS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
nsIPresShell* presShell;
|
||||||
|
aPresContext.GetShell(&presShell);
|
||||||
|
presShell->CantRenderReplacedElement(&aPresContext, this);
|
||||||
|
NS_RELEASE(presShell);
|
||||||
|
aStatus = NS_FRAME_COMPLETE;
|
||||||
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
// if we're here, the object is either an applet or a plugin
|
// if we're here, the object is either an applet or a plugin
|
||||||
|
@ -1092,13 +1101,13 @@ nsObjectFrame::Reflow(nsIPresContext& aPresContext,
|
||||||
NS_IF_RELEASE(pluginHost);
|
NS_IF_RELEASE(pluginHost);
|
||||||
NS_IF_RELEASE(cv);
|
NS_IF_RELEASE(cv);
|
||||||
NS_IF_RELEASE(container);
|
NS_IF_RELEASE(container);
|
||||||
|
}
|
||||||
|
|
||||||
if(rv == NS_OK)
|
if(rv == NS_OK)
|
||||||
{
|
{
|
||||||
aStatus = NS_FRAME_COMPLETE;
|
aStatus = NS_FRAME_COMPLETE;
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
nsIPresShell* presShell;
|
nsIPresShell* presShell;
|
||||||
aPresContext.GetShell(&presShell);
|
aPresContext.GetShell(&presShell);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче