mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-30 01:59:29 +00:00
Moved hacked call to floater adds out of nsPlaceholderFrame and into nsLineLayout
This commit is contained in:
parent
a570e5b6c0
commit
3ecd939521
@ -26,6 +26,7 @@
|
||||
#include "nsIPresContext.h"
|
||||
#include "nsIFontMetrics.h"
|
||||
#include "nsIRenderingContext.h"
|
||||
#include "nsLayoutAtoms.h"
|
||||
|
||||
#ifdef DEBUG
|
||||
#undef NOISY_HORIZONTAL_ALIGN
|
||||
@ -834,6 +835,22 @@ nsLineLayout::ReflowFrame(nsIFrame* aFrame,
|
||||
nscoord ty = y - psd->mReflowState->mComputedBorderPadding.top;
|
||||
mSpaceManager->Translate(tx, ty);
|
||||
htmlReflow->Reflow(mPresContext, metrics, reflowState, aReflowStatus);
|
||||
|
||||
// XXX
|
||||
nsIAtom* frameType;
|
||||
aFrame->GetFrameType(&frameType);
|
||||
if (frameType) {
|
||||
if (frameType == nsLayoutAtoms::placeholderFrame) {
|
||||
if (eReflowReason_Incremental == reason) {
|
||||
InitFloater((nsPlaceholderFrame*)aFrame);
|
||||
}
|
||||
else {
|
||||
AddFloater((nsPlaceholderFrame*)aFrame);
|
||||
}
|
||||
}
|
||||
NS_RELEASE(frameType);
|
||||
}
|
||||
|
||||
mSpaceManager->Translate(-tx, -ty);
|
||||
|
||||
#ifdef DEBUG
|
||||
|
@ -45,15 +45,6 @@ nsPlaceholderFrame::Reflow(nsIPresContext& aPresContext,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
if (nsnull != aReflowState.lineLayout) {
|
||||
if (eReflowReason_Initial == aReflowState.reason) {
|
||||
aReflowState.lineLayout->InitFloater(this);
|
||||
}
|
||||
else {
|
||||
aReflowState.lineLayout->AddFloater(this);
|
||||
}
|
||||
}
|
||||
|
||||
aDesiredSize.width = 0;
|
||||
aDesiredSize.height = 0;
|
||||
aDesiredSize.ascent = 0;
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include "nsIPresContext.h"
|
||||
#include "nsIFontMetrics.h"
|
||||
#include "nsIRenderingContext.h"
|
||||
#include "nsLayoutAtoms.h"
|
||||
|
||||
#ifdef DEBUG
|
||||
#undef NOISY_HORIZONTAL_ALIGN
|
||||
@ -834,6 +835,22 @@ nsLineLayout::ReflowFrame(nsIFrame* aFrame,
|
||||
nscoord ty = y - psd->mReflowState->mComputedBorderPadding.top;
|
||||
mSpaceManager->Translate(tx, ty);
|
||||
htmlReflow->Reflow(mPresContext, metrics, reflowState, aReflowStatus);
|
||||
|
||||
// XXX
|
||||
nsIAtom* frameType;
|
||||
aFrame->GetFrameType(&frameType);
|
||||
if (frameType) {
|
||||
if (frameType == nsLayoutAtoms::placeholderFrame) {
|
||||
if (eReflowReason_Incremental == reason) {
|
||||
InitFloater((nsPlaceholderFrame*)aFrame);
|
||||
}
|
||||
else {
|
||||
AddFloater((nsPlaceholderFrame*)aFrame);
|
||||
}
|
||||
}
|
||||
NS_RELEASE(frameType);
|
||||
}
|
||||
|
||||
mSpaceManager->Translate(-tx, -ty);
|
||||
|
||||
#ifdef DEBUG
|
||||
|
@ -45,15 +45,6 @@ nsPlaceholderFrame::Reflow(nsIPresContext& aPresContext,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
if (nsnull != aReflowState.lineLayout) {
|
||||
if (eReflowReason_Initial == aReflowState.reason) {
|
||||
aReflowState.lineLayout->InitFloater(this);
|
||||
}
|
||||
else {
|
||||
aReflowState.lineLayout->AddFloater(this);
|
||||
}
|
||||
}
|
||||
|
||||
aDesiredSize.width = 0;
|
||||
aDesiredSize.height = 0;
|
||||
aDesiredSize.ascent = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user