Support clear attribute on floaters; nicer ListTag method
This commit is contained in:
@@ -1542,7 +1542,9 @@ NS_IMETHODIMP
|
|||||||
nsBlockFrame::ListTag(FILE* out) const
|
nsBlockFrame::ListTag(FILE* out) const
|
||||||
{
|
{
|
||||||
if ((nsnull != mGeometricParent) && IsPseudoFrame()) {
|
if ((nsnull != mGeometricParent) && IsPseudoFrame()) {
|
||||||
fprintf(out, "*block<");
|
fprintf(out, "*");
|
||||||
|
}
|
||||||
|
fprintf(out, "Block<");
|
||||||
nsIAtom* atom;
|
nsIAtom* atom;
|
||||||
mContent->GetTag(atom);
|
mContent->GetTag(atom);
|
||||||
if (nsnull != atom) {
|
if (nsnull != atom) {
|
||||||
@@ -1551,9 +1553,6 @@ nsBlockFrame::ListTag(FILE* out) const
|
|||||||
fputs(tmp, out);
|
fputs(tmp, out);
|
||||||
}
|
}
|
||||||
fprintf(out, ">(%d)@%p", ContentIndexInContainer(this), this);
|
fprintf(out, ">(%d)@%p", ContentIndexInContainer(this), this);
|
||||||
} else {
|
|
||||||
nsBlockFrameSuper::ListTag(out);
|
|
||||||
}
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4118,9 +4117,6 @@ nsBlockReflowState::PlaceFloater(nsPlaceholderFrame* aPlaceholder,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the band of available space
|
|
||||||
GetAvailableSpace();
|
|
||||||
|
|
||||||
// Get the type of floater
|
// Get the type of floater
|
||||||
const nsStyleDisplay* floaterDisplay;
|
const nsStyleDisplay* floaterDisplay;
|
||||||
const nsStyleSpacing* floaterSpacing;
|
const nsStyleSpacing* floaterSpacing;
|
||||||
@@ -4129,6 +4125,15 @@ nsBlockReflowState::PlaceFloater(nsPlaceholderFrame* aPlaceholder,
|
|||||||
floater->GetStyleData(eStyleStruct_Spacing,
|
floater->GetStyleData(eStyleStruct_Spacing,
|
||||||
(const nsStyleStruct*&)floaterSpacing);
|
(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
|
// Get the floaters bounding box and margin information
|
||||||
nsRect region;
|
nsRect region;
|
||||||
floater->GetRect(region);
|
floater->GetRect(region);
|
||||||
|
|||||||
@@ -1542,7 +1542,9 @@ NS_IMETHODIMP
|
|||||||
nsBlockFrame::ListTag(FILE* out) const
|
nsBlockFrame::ListTag(FILE* out) const
|
||||||
{
|
{
|
||||||
if ((nsnull != mGeometricParent) && IsPseudoFrame()) {
|
if ((nsnull != mGeometricParent) && IsPseudoFrame()) {
|
||||||
fprintf(out, "*block<");
|
fprintf(out, "*");
|
||||||
|
}
|
||||||
|
fprintf(out, "Block<");
|
||||||
nsIAtom* atom;
|
nsIAtom* atom;
|
||||||
mContent->GetTag(atom);
|
mContent->GetTag(atom);
|
||||||
if (nsnull != atom) {
|
if (nsnull != atom) {
|
||||||
@@ -1551,9 +1553,6 @@ nsBlockFrame::ListTag(FILE* out) const
|
|||||||
fputs(tmp, out);
|
fputs(tmp, out);
|
||||||
}
|
}
|
||||||
fprintf(out, ">(%d)@%p", ContentIndexInContainer(this), this);
|
fprintf(out, ">(%d)@%p", ContentIndexInContainer(this), this);
|
||||||
} else {
|
|
||||||
nsBlockFrameSuper::ListTag(out);
|
|
||||||
}
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4118,9 +4117,6 @@ nsBlockReflowState::PlaceFloater(nsPlaceholderFrame* aPlaceholder,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the band of available space
|
|
||||||
GetAvailableSpace();
|
|
||||||
|
|
||||||
// Get the type of floater
|
// Get the type of floater
|
||||||
const nsStyleDisplay* floaterDisplay;
|
const nsStyleDisplay* floaterDisplay;
|
||||||
const nsStyleSpacing* floaterSpacing;
|
const nsStyleSpacing* floaterSpacing;
|
||||||
@@ -4129,6 +4125,15 @@ nsBlockReflowState::PlaceFloater(nsPlaceholderFrame* aPlaceholder,
|
|||||||
floater->GetStyleData(eStyleStruct_Spacing,
|
floater->GetStyleData(eStyleStruct_Spacing,
|
||||||
(const nsStyleStruct*&)floaterSpacing);
|
(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
|
// Get the floaters bounding box and margin information
|
||||||
nsRect region;
|
nsRect region;
|
||||||
floater->GetRect(region);
|
floater->GetRect(region);
|
||||||
|
|||||||
@@ -1542,7 +1542,9 @@ NS_IMETHODIMP
|
|||||||
nsBlockFrame::ListTag(FILE* out) const
|
nsBlockFrame::ListTag(FILE* out) const
|
||||||
{
|
{
|
||||||
if ((nsnull != mGeometricParent) && IsPseudoFrame()) {
|
if ((nsnull != mGeometricParent) && IsPseudoFrame()) {
|
||||||
fprintf(out, "*block<");
|
fprintf(out, "*");
|
||||||
|
}
|
||||||
|
fprintf(out, "Block<");
|
||||||
nsIAtom* atom;
|
nsIAtom* atom;
|
||||||
mContent->GetTag(atom);
|
mContent->GetTag(atom);
|
||||||
if (nsnull != atom) {
|
if (nsnull != atom) {
|
||||||
@@ -1551,9 +1553,6 @@ nsBlockFrame::ListTag(FILE* out) const
|
|||||||
fputs(tmp, out);
|
fputs(tmp, out);
|
||||||
}
|
}
|
||||||
fprintf(out, ">(%d)@%p", ContentIndexInContainer(this), this);
|
fprintf(out, ">(%d)@%p", ContentIndexInContainer(this), this);
|
||||||
} else {
|
|
||||||
nsBlockFrameSuper::ListTag(out);
|
|
||||||
}
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4118,9 +4117,6 @@ nsBlockReflowState::PlaceFloater(nsPlaceholderFrame* aPlaceholder,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the band of available space
|
|
||||||
GetAvailableSpace();
|
|
||||||
|
|
||||||
// Get the type of floater
|
// Get the type of floater
|
||||||
const nsStyleDisplay* floaterDisplay;
|
const nsStyleDisplay* floaterDisplay;
|
||||||
const nsStyleSpacing* floaterSpacing;
|
const nsStyleSpacing* floaterSpacing;
|
||||||
@@ -4129,6 +4125,15 @@ nsBlockReflowState::PlaceFloater(nsPlaceholderFrame* aPlaceholder,
|
|||||||
floater->GetStyleData(eStyleStruct_Spacing,
|
floater->GetStyleData(eStyleStruct_Spacing,
|
||||||
(const nsStyleStruct*&)floaterSpacing);
|
(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
|
// Get the floaters bounding box and margin information
|
||||||
nsRect region;
|
nsRect region;
|
||||||
floater->GetRect(region);
|
floater->GetRect(region);
|
||||||
|
|||||||
@@ -1542,7 +1542,9 @@ NS_IMETHODIMP
|
|||||||
nsBlockFrame::ListTag(FILE* out) const
|
nsBlockFrame::ListTag(FILE* out) const
|
||||||
{
|
{
|
||||||
if ((nsnull != mGeometricParent) && IsPseudoFrame()) {
|
if ((nsnull != mGeometricParent) && IsPseudoFrame()) {
|
||||||
fprintf(out, "*block<");
|
fprintf(out, "*");
|
||||||
|
}
|
||||||
|
fprintf(out, "Block<");
|
||||||
nsIAtom* atom;
|
nsIAtom* atom;
|
||||||
mContent->GetTag(atom);
|
mContent->GetTag(atom);
|
||||||
if (nsnull != atom) {
|
if (nsnull != atom) {
|
||||||
@@ -1551,9 +1553,6 @@ nsBlockFrame::ListTag(FILE* out) const
|
|||||||
fputs(tmp, out);
|
fputs(tmp, out);
|
||||||
}
|
}
|
||||||
fprintf(out, ">(%d)@%p", ContentIndexInContainer(this), this);
|
fprintf(out, ">(%d)@%p", ContentIndexInContainer(this), this);
|
||||||
} else {
|
|
||||||
nsBlockFrameSuper::ListTag(out);
|
|
||||||
}
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4118,9 +4117,6 @@ nsBlockReflowState::PlaceFloater(nsPlaceholderFrame* aPlaceholder,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the band of available space
|
|
||||||
GetAvailableSpace();
|
|
||||||
|
|
||||||
// Get the type of floater
|
// Get the type of floater
|
||||||
const nsStyleDisplay* floaterDisplay;
|
const nsStyleDisplay* floaterDisplay;
|
||||||
const nsStyleSpacing* floaterSpacing;
|
const nsStyleSpacing* floaterSpacing;
|
||||||
@@ -4129,6 +4125,15 @@ nsBlockReflowState::PlaceFloater(nsPlaceholderFrame* aPlaceholder,
|
|||||||
floater->GetStyleData(eStyleStruct_Spacing,
|
floater->GetStyleData(eStyleStruct_Spacing,
|
||||||
(const nsStyleStruct*&)floaterSpacing);
|
(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
|
// Get the floaters bounding box and margin information
|
||||||
nsRect region;
|
nsRect region;
|
||||||
floater->GetRect(region);
|
floater->GetRect(region);
|
||||||
|
|||||||
@@ -1542,7 +1542,9 @@ NS_IMETHODIMP
|
|||||||
nsBlockFrame::ListTag(FILE* out) const
|
nsBlockFrame::ListTag(FILE* out) const
|
||||||
{
|
{
|
||||||
if ((nsnull != mGeometricParent) && IsPseudoFrame()) {
|
if ((nsnull != mGeometricParent) && IsPseudoFrame()) {
|
||||||
fprintf(out, "*block<");
|
fprintf(out, "*");
|
||||||
|
}
|
||||||
|
fprintf(out, "Block<");
|
||||||
nsIAtom* atom;
|
nsIAtom* atom;
|
||||||
mContent->GetTag(atom);
|
mContent->GetTag(atom);
|
||||||
if (nsnull != atom) {
|
if (nsnull != atom) {
|
||||||
@@ -1551,9 +1553,6 @@ nsBlockFrame::ListTag(FILE* out) const
|
|||||||
fputs(tmp, out);
|
fputs(tmp, out);
|
||||||
}
|
}
|
||||||
fprintf(out, ">(%d)@%p", ContentIndexInContainer(this), this);
|
fprintf(out, ">(%d)@%p", ContentIndexInContainer(this), this);
|
||||||
} else {
|
|
||||||
nsBlockFrameSuper::ListTag(out);
|
|
||||||
}
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4118,9 +4117,6 @@ nsBlockReflowState::PlaceFloater(nsPlaceholderFrame* aPlaceholder,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the band of available space
|
|
||||||
GetAvailableSpace();
|
|
||||||
|
|
||||||
// Get the type of floater
|
// Get the type of floater
|
||||||
const nsStyleDisplay* floaterDisplay;
|
const nsStyleDisplay* floaterDisplay;
|
||||||
const nsStyleSpacing* floaterSpacing;
|
const nsStyleSpacing* floaterSpacing;
|
||||||
@@ -4129,6 +4125,15 @@ nsBlockReflowState::PlaceFloater(nsPlaceholderFrame* aPlaceholder,
|
|||||||
floater->GetStyleData(eStyleStruct_Spacing,
|
floater->GetStyleData(eStyleStruct_Spacing,
|
||||||
(const nsStyleStruct*&)floaterSpacing);
|
(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
|
// Get the floaters bounding box and margin information
|
||||||
nsRect region;
|
nsRect region;
|
||||||
floater->GetRect(region);
|
floater->GetRect(region);
|
||||||
|
|||||||
@@ -1542,7 +1542,9 @@ NS_IMETHODIMP
|
|||||||
nsBlockFrame::ListTag(FILE* out) const
|
nsBlockFrame::ListTag(FILE* out) const
|
||||||
{
|
{
|
||||||
if ((nsnull != mGeometricParent) && IsPseudoFrame()) {
|
if ((nsnull != mGeometricParent) && IsPseudoFrame()) {
|
||||||
fprintf(out, "*block<");
|
fprintf(out, "*");
|
||||||
|
}
|
||||||
|
fprintf(out, "Block<");
|
||||||
nsIAtom* atom;
|
nsIAtom* atom;
|
||||||
mContent->GetTag(atom);
|
mContent->GetTag(atom);
|
||||||
if (nsnull != atom) {
|
if (nsnull != atom) {
|
||||||
@@ -1551,9 +1553,6 @@ nsBlockFrame::ListTag(FILE* out) const
|
|||||||
fputs(tmp, out);
|
fputs(tmp, out);
|
||||||
}
|
}
|
||||||
fprintf(out, ">(%d)@%p", ContentIndexInContainer(this), this);
|
fprintf(out, ">(%d)@%p", ContentIndexInContainer(this), this);
|
||||||
} else {
|
|
||||||
nsBlockFrameSuper::ListTag(out);
|
|
||||||
}
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4118,9 +4117,6 @@ nsBlockReflowState::PlaceFloater(nsPlaceholderFrame* aPlaceholder,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the band of available space
|
|
||||||
GetAvailableSpace();
|
|
||||||
|
|
||||||
// Get the type of floater
|
// Get the type of floater
|
||||||
const nsStyleDisplay* floaterDisplay;
|
const nsStyleDisplay* floaterDisplay;
|
||||||
const nsStyleSpacing* floaterSpacing;
|
const nsStyleSpacing* floaterSpacing;
|
||||||
@@ -4129,6 +4125,15 @@ nsBlockReflowState::PlaceFloater(nsPlaceholderFrame* aPlaceholder,
|
|||||||
floater->GetStyleData(eStyleStruct_Spacing,
|
floater->GetStyleData(eStyleStruct_Spacing,
|
||||||
(const nsStyleStruct*&)floaterSpacing);
|
(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
|
// Get the floaters bounding box and margin information
|
||||||
nsRect region;
|
nsRect region;
|
||||||
floater->GetRect(region);
|
floater->GetRect(region);
|
||||||
|
|||||||
Reference in New Issue
Block a user