Support clear attribute on floaters; nicer ListTag method

This commit is contained in:
kipp%netscape.com 1998-10-15 23:27:12 +00:00
Родитель d7988acfa8
Коммит f2de42911f
6 изменённых файлов: 114 добавлений и 84 удалений

Просмотреть файл

@ -1542,7 +1542,9 @@ NS_IMETHODIMP
nsBlockFrame::ListTag(FILE* out) const
{
if ((nsnull != mGeometricParent) && IsPseudoFrame()) {
fprintf(out, "*block<");
fprintf(out, "*");
}
fprintf(out, "Block<");
nsIAtom* atom;
mContent->GetTag(atom);
if (nsnull != atom) {
@ -1551,9 +1553,6 @@ nsBlockFrame::ListTag(FILE* out) const
fputs(tmp, out);
}
fprintf(out, ">(%d)@%p", ContentIndexInContainer(this), this);
} else {
nsBlockFrameSuper::ListTag(out);
}
return NS_OK;
}
@ -4118,9 +4117,6 @@ nsBlockReflowState::PlaceFloater(nsPlaceholderFrame* aPlaceholder,
}
}
// Get the band of available space
GetAvailableSpace();
// Get the type of floater
const nsStyleDisplay* floaterDisplay;
const nsStyleSpacing* floaterSpacing;
@ -4129,6 +4125,15 @@ nsBlockReflowState::PlaceFloater(nsPlaceholderFrame* aPlaceholder,
floater->GetStyleData(eStyleStruct_Spacing,
(const nsStyleStruct*&)floaterSpacing);
// See if the floater should clear any preceeding floaters...
if (NS_STYLE_CLEAR_NONE != floaterDisplay->mBreakType) {
ClearFloaters(floaterDisplay->mBreakType);
}
else {
// Get the band of available space
GetAvailableSpace();
}
// Get the floaters bounding box and margin information
nsRect region;
floater->GetRect(region);

Просмотреть файл

@ -1542,7 +1542,9 @@ NS_IMETHODIMP
nsBlockFrame::ListTag(FILE* out) const
{
if ((nsnull != mGeometricParent) && IsPseudoFrame()) {
fprintf(out, "*block<");
fprintf(out, "*");
}
fprintf(out, "Block<");
nsIAtom* atom;
mContent->GetTag(atom);
if (nsnull != atom) {
@ -1551,9 +1553,6 @@ nsBlockFrame::ListTag(FILE* out) const
fputs(tmp, out);
}
fprintf(out, ">(%d)@%p", ContentIndexInContainer(this), this);
} else {
nsBlockFrameSuper::ListTag(out);
}
return NS_OK;
}
@ -4118,9 +4117,6 @@ nsBlockReflowState::PlaceFloater(nsPlaceholderFrame* aPlaceholder,
}
}
// Get the band of available space
GetAvailableSpace();
// Get the type of floater
const nsStyleDisplay* floaterDisplay;
const nsStyleSpacing* floaterSpacing;
@ -4129,6 +4125,15 @@ nsBlockReflowState::PlaceFloater(nsPlaceholderFrame* aPlaceholder,
floater->GetStyleData(eStyleStruct_Spacing,
(const nsStyleStruct*&)floaterSpacing);
// See if the floater should clear any preceeding floaters...
if (NS_STYLE_CLEAR_NONE != floaterDisplay->mBreakType) {
ClearFloaters(floaterDisplay->mBreakType);
}
else {
// Get the band of available space
GetAvailableSpace();
}
// Get the floaters bounding box and margin information
nsRect region;
floater->GetRect(region);

Просмотреть файл

@ -1542,7 +1542,9 @@ NS_IMETHODIMP
nsBlockFrame::ListTag(FILE* out) const
{
if ((nsnull != mGeometricParent) && IsPseudoFrame()) {
fprintf(out, "*block<");
fprintf(out, "*");
}
fprintf(out, "Block<");
nsIAtom* atom;
mContent->GetTag(atom);
if (nsnull != atom) {
@ -1551,9 +1553,6 @@ nsBlockFrame::ListTag(FILE* out) const
fputs(tmp, out);
}
fprintf(out, ">(%d)@%p", ContentIndexInContainer(this), this);
} else {
nsBlockFrameSuper::ListTag(out);
}
return NS_OK;
}
@ -4118,9 +4117,6 @@ nsBlockReflowState::PlaceFloater(nsPlaceholderFrame* aPlaceholder,
}
}
// Get the band of available space
GetAvailableSpace();
// Get the type of floater
const nsStyleDisplay* floaterDisplay;
const nsStyleSpacing* floaterSpacing;
@ -4129,6 +4125,15 @@ nsBlockReflowState::PlaceFloater(nsPlaceholderFrame* aPlaceholder,
floater->GetStyleData(eStyleStruct_Spacing,
(const nsStyleStruct*&)floaterSpacing);
// See if the floater should clear any preceeding floaters...
if (NS_STYLE_CLEAR_NONE != floaterDisplay->mBreakType) {
ClearFloaters(floaterDisplay->mBreakType);
}
else {
// Get the band of available space
GetAvailableSpace();
}
// Get the floaters bounding box and margin information
nsRect region;
floater->GetRect(region);

Просмотреть файл

@ -1542,7 +1542,9 @@ NS_IMETHODIMP
nsBlockFrame::ListTag(FILE* out) const
{
if ((nsnull != mGeometricParent) && IsPseudoFrame()) {
fprintf(out, "*block<");
fprintf(out, "*");
}
fprintf(out, "Block<");
nsIAtom* atom;
mContent->GetTag(atom);
if (nsnull != atom) {
@ -1551,9 +1553,6 @@ nsBlockFrame::ListTag(FILE* out) const
fputs(tmp, out);
}
fprintf(out, ">(%d)@%p", ContentIndexInContainer(this), this);
} else {
nsBlockFrameSuper::ListTag(out);
}
return NS_OK;
}
@ -4118,9 +4117,6 @@ nsBlockReflowState::PlaceFloater(nsPlaceholderFrame* aPlaceholder,
}
}
// Get the band of available space
GetAvailableSpace();
// Get the type of floater
const nsStyleDisplay* floaterDisplay;
const nsStyleSpacing* floaterSpacing;
@ -4129,6 +4125,15 @@ nsBlockReflowState::PlaceFloater(nsPlaceholderFrame* aPlaceholder,
floater->GetStyleData(eStyleStruct_Spacing,
(const nsStyleStruct*&)floaterSpacing);
// See if the floater should clear any preceeding floaters...
if (NS_STYLE_CLEAR_NONE != floaterDisplay->mBreakType) {
ClearFloaters(floaterDisplay->mBreakType);
}
else {
// Get the band of available space
GetAvailableSpace();
}
// Get the floaters bounding box and margin information
nsRect region;
floater->GetRect(region);

Просмотреть файл

@ -1542,7 +1542,9 @@ NS_IMETHODIMP
nsBlockFrame::ListTag(FILE* out) const
{
if ((nsnull != mGeometricParent) && IsPseudoFrame()) {
fprintf(out, "*block<");
fprintf(out, "*");
}
fprintf(out, "Block<");
nsIAtom* atom;
mContent->GetTag(atom);
if (nsnull != atom) {
@ -1551,9 +1553,6 @@ nsBlockFrame::ListTag(FILE* out) const
fputs(tmp, out);
}
fprintf(out, ">(%d)@%p", ContentIndexInContainer(this), this);
} else {
nsBlockFrameSuper::ListTag(out);
}
return NS_OK;
}
@ -4118,9 +4117,6 @@ nsBlockReflowState::PlaceFloater(nsPlaceholderFrame* aPlaceholder,
}
}
// Get the band of available space
GetAvailableSpace();
// Get the type of floater
const nsStyleDisplay* floaterDisplay;
const nsStyleSpacing* floaterSpacing;
@ -4129,6 +4125,15 @@ nsBlockReflowState::PlaceFloater(nsPlaceholderFrame* aPlaceholder,
floater->GetStyleData(eStyleStruct_Spacing,
(const nsStyleStruct*&)floaterSpacing);
// See if the floater should clear any preceeding floaters...
if (NS_STYLE_CLEAR_NONE != floaterDisplay->mBreakType) {
ClearFloaters(floaterDisplay->mBreakType);
}
else {
// Get the band of available space
GetAvailableSpace();
}
// Get the floaters bounding box and margin information
nsRect region;
floater->GetRect(region);

Просмотреть файл

@ -1542,7 +1542,9 @@ NS_IMETHODIMP
nsBlockFrame::ListTag(FILE* out) const
{
if ((nsnull != mGeometricParent) && IsPseudoFrame()) {
fprintf(out, "*block<");
fprintf(out, "*");
}
fprintf(out, "Block<");
nsIAtom* atom;
mContent->GetTag(atom);
if (nsnull != atom) {
@ -1551,9 +1553,6 @@ nsBlockFrame::ListTag(FILE* out) const
fputs(tmp, out);
}
fprintf(out, ">(%d)@%p", ContentIndexInContainer(this), this);
} else {
nsBlockFrameSuper::ListTag(out);
}
return NS_OK;
}
@ -4118,9 +4117,6 @@ nsBlockReflowState::PlaceFloater(nsPlaceholderFrame* aPlaceholder,
}
}
// Get the band of available space
GetAvailableSpace();
// Get the type of floater
const nsStyleDisplay* floaterDisplay;
const nsStyleSpacing* floaterSpacing;
@ -4129,6 +4125,15 @@ nsBlockReflowState::PlaceFloater(nsPlaceholderFrame* aPlaceholder,
floater->GetStyleData(eStyleStruct_Spacing,
(const nsStyleStruct*&)floaterSpacing);
// See if the floater should clear any preceeding floaters...
if (NS_STYLE_CLEAR_NONE != floaterDisplay->mBreakType) {
ClearFloaters(floaterDisplay->mBreakType);
}
else {
// Get the band of available space
GetAvailableSpace();
}
// Get the floaters bounding box and margin information
nsRect region;
floater->GetRect(region);