From 6617ad5d8034c35c1f0e6458cdc2e5aabed21809 Mon Sep 17 00:00:00 2001 From: "kipp%netscape.com" Date: Fri, 17 Sep 1999 00:57:40 +0000 Subject: [PATCH] Removed list item hack git-svn-id: svn://10.0.0.236/trunk@47888 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/generic/nsBlockFrame.cpp | 27 ------------------- mozilla/layout/generic/nsBlockReflowState.cpp | 27 ------------------- mozilla/layout/generic/nsBlockReflowState.h | 27 ------------------- mozilla/layout/html/base/src/nsBlockFrame.cpp | 27 ------------------- .../html/base/src/nsBlockReflowState.cpp | 27 ------------------- .../layout/html/base/src/nsBlockReflowState.h | 27 ------------------- 6 files changed, 162 deletions(-) diff --git a/mozilla/layout/generic/nsBlockFrame.cpp b/mozilla/layout/generic/nsBlockFrame.cpp index ec0390053a0..cb083c964b2 100644 --- a/mozilla/layout/generic/nsBlockFrame.cpp +++ b/mozilla/layout/generic/nsBlockFrame.cpp @@ -657,33 +657,6 @@ nsBlockReflowState::ComputeBlockAvailSpace(nsIFrame* aFrame, // but not overlap the floater. aResult.x = mAvailSpaceRect.x + borderPadding.left; aResult.width = mAvailSpaceRect.width; - - // Compatability hack: See if we have a list-item and if - // the bullet would end up overlapping the floater. - if ((NS_STYLE_DISPLAY_LIST_ITEM == aDisplay->mDisplay) && - ((mBand.GetLeftFloaterCount() && - (NS_STYLE_DIRECTION_LTR == aDisplay->mDirection)) || - (mBand.GetRightFloaterCount() && - (NS_STYLE_DIRECTION_RTL == aDisplay->mDirection)))) { - // Ok, we have a list-item and its bullet will be - // impacted by the floater. - nscoord marginValue = 0; - nsStyleUnit unit = spacing->mCompatFloaterMargin.GetUnit(); - if (eStyleUnit_Auto == unit) { - // This is the default value: do nothing - } - else if (eStyleUnit_Percent == unit) { - // XXX write me - } - else if (eStyleUnit_Coord == unit) { - marginValue = spacing->mCompatFloaterMargin.GetCoordValue(); - } - else if (eStyleUnit_Inherit == unit) { - // XXX write me - } - aResult.x += marginValue; - aResult.width -= marginValue; - } } break; } diff --git a/mozilla/layout/generic/nsBlockReflowState.cpp b/mozilla/layout/generic/nsBlockReflowState.cpp index ec0390053a0..cb083c964b2 100644 --- a/mozilla/layout/generic/nsBlockReflowState.cpp +++ b/mozilla/layout/generic/nsBlockReflowState.cpp @@ -657,33 +657,6 @@ nsBlockReflowState::ComputeBlockAvailSpace(nsIFrame* aFrame, // but not overlap the floater. aResult.x = mAvailSpaceRect.x + borderPadding.left; aResult.width = mAvailSpaceRect.width; - - // Compatability hack: See if we have a list-item and if - // the bullet would end up overlapping the floater. - if ((NS_STYLE_DISPLAY_LIST_ITEM == aDisplay->mDisplay) && - ((mBand.GetLeftFloaterCount() && - (NS_STYLE_DIRECTION_LTR == aDisplay->mDirection)) || - (mBand.GetRightFloaterCount() && - (NS_STYLE_DIRECTION_RTL == aDisplay->mDirection)))) { - // Ok, we have a list-item and its bullet will be - // impacted by the floater. - nscoord marginValue = 0; - nsStyleUnit unit = spacing->mCompatFloaterMargin.GetUnit(); - if (eStyleUnit_Auto == unit) { - // This is the default value: do nothing - } - else if (eStyleUnit_Percent == unit) { - // XXX write me - } - else if (eStyleUnit_Coord == unit) { - marginValue = spacing->mCompatFloaterMargin.GetCoordValue(); - } - else if (eStyleUnit_Inherit == unit) { - // XXX write me - } - aResult.x += marginValue; - aResult.width -= marginValue; - } } break; } diff --git a/mozilla/layout/generic/nsBlockReflowState.h b/mozilla/layout/generic/nsBlockReflowState.h index ec0390053a0..cb083c964b2 100644 --- a/mozilla/layout/generic/nsBlockReflowState.h +++ b/mozilla/layout/generic/nsBlockReflowState.h @@ -657,33 +657,6 @@ nsBlockReflowState::ComputeBlockAvailSpace(nsIFrame* aFrame, // but not overlap the floater. aResult.x = mAvailSpaceRect.x + borderPadding.left; aResult.width = mAvailSpaceRect.width; - - // Compatability hack: See if we have a list-item and if - // the bullet would end up overlapping the floater. - if ((NS_STYLE_DISPLAY_LIST_ITEM == aDisplay->mDisplay) && - ((mBand.GetLeftFloaterCount() && - (NS_STYLE_DIRECTION_LTR == aDisplay->mDirection)) || - (mBand.GetRightFloaterCount() && - (NS_STYLE_DIRECTION_RTL == aDisplay->mDirection)))) { - // Ok, we have a list-item and its bullet will be - // impacted by the floater. - nscoord marginValue = 0; - nsStyleUnit unit = spacing->mCompatFloaterMargin.GetUnit(); - if (eStyleUnit_Auto == unit) { - // This is the default value: do nothing - } - else if (eStyleUnit_Percent == unit) { - // XXX write me - } - else if (eStyleUnit_Coord == unit) { - marginValue = spacing->mCompatFloaterMargin.GetCoordValue(); - } - else if (eStyleUnit_Inherit == unit) { - // XXX write me - } - aResult.x += marginValue; - aResult.width -= marginValue; - } } break; } diff --git a/mozilla/layout/html/base/src/nsBlockFrame.cpp b/mozilla/layout/html/base/src/nsBlockFrame.cpp index ec0390053a0..cb083c964b2 100644 --- a/mozilla/layout/html/base/src/nsBlockFrame.cpp +++ b/mozilla/layout/html/base/src/nsBlockFrame.cpp @@ -657,33 +657,6 @@ nsBlockReflowState::ComputeBlockAvailSpace(nsIFrame* aFrame, // but not overlap the floater. aResult.x = mAvailSpaceRect.x + borderPadding.left; aResult.width = mAvailSpaceRect.width; - - // Compatability hack: See if we have a list-item and if - // the bullet would end up overlapping the floater. - if ((NS_STYLE_DISPLAY_LIST_ITEM == aDisplay->mDisplay) && - ((mBand.GetLeftFloaterCount() && - (NS_STYLE_DIRECTION_LTR == aDisplay->mDirection)) || - (mBand.GetRightFloaterCount() && - (NS_STYLE_DIRECTION_RTL == aDisplay->mDirection)))) { - // Ok, we have a list-item and its bullet will be - // impacted by the floater. - nscoord marginValue = 0; - nsStyleUnit unit = spacing->mCompatFloaterMargin.GetUnit(); - if (eStyleUnit_Auto == unit) { - // This is the default value: do nothing - } - else if (eStyleUnit_Percent == unit) { - // XXX write me - } - else if (eStyleUnit_Coord == unit) { - marginValue = spacing->mCompatFloaterMargin.GetCoordValue(); - } - else if (eStyleUnit_Inherit == unit) { - // XXX write me - } - aResult.x += marginValue; - aResult.width -= marginValue; - } } break; } diff --git a/mozilla/layout/html/base/src/nsBlockReflowState.cpp b/mozilla/layout/html/base/src/nsBlockReflowState.cpp index ec0390053a0..cb083c964b2 100644 --- a/mozilla/layout/html/base/src/nsBlockReflowState.cpp +++ b/mozilla/layout/html/base/src/nsBlockReflowState.cpp @@ -657,33 +657,6 @@ nsBlockReflowState::ComputeBlockAvailSpace(nsIFrame* aFrame, // but not overlap the floater. aResult.x = mAvailSpaceRect.x + borderPadding.left; aResult.width = mAvailSpaceRect.width; - - // Compatability hack: See if we have a list-item and if - // the bullet would end up overlapping the floater. - if ((NS_STYLE_DISPLAY_LIST_ITEM == aDisplay->mDisplay) && - ((mBand.GetLeftFloaterCount() && - (NS_STYLE_DIRECTION_LTR == aDisplay->mDirection)) || - (mBand.GetRightFloaterCount() && - (NS_STYLE_DIRECTION_RTL == aDisplay->mDirection)))) { - // Ok, we have a list-item and its bullet will be - // impacted by the floater. - nscoord marginValue = 0; - nsStyleUnit unit = spacing->mCompatFloaterMargin.GetUnit(); - if (eStyleUnit_Auto == unit) { - // This is the default value: do nothing - } - else if (eStyleUnit_Percent == unit) { - // XXX write me - } - else if (eStyleUnit_Coord == unit) { - marginValue = spacing->mCompatFloaterMargin.GetCoordValue(); - } - else if (eStyleUnit_Inherit == unit) { - // XXX write me - } - aResult.x += marginValue; - aResult.width -= marginValue; - } } break; } diff --git a/mozilla/layout/html/base/src/nsBlockReflowState.h b/mozilla/layout/html/base/src/nsBlockReflowState.h index ec0390053a0..cb083c964b2 100644 --- a/mozilla/layout/html/base/src/nsBlockReflowState.h +++ b/mozilla/layout/html/base/src/nsBlockReflowState.h @@ -657,33 +657,6 @@ nsBlockReflowState::ComputeBlockAvailSpace(nsIFrame* aFrame, // but not overlap the floater. aResult.x = mAvailSpaceRect.x + borderPadding.left; aResult.width = mAvailSpaceRect.width; - - // Compatability hack: See if we have a list-item and if - // the bullet would end up overlapping the floater. - if ((NS_STYLE_DISPLAY_LIST_ITEM == aDisplay->mDisplay) && - ((mBand.GetLeftFloaterCount() && - (NS_STYLE_DIRECTION_LTR == aDisplay->mDirection)) || - (mBand.GetRightFloaterCount() && - (NS_STYLE_DIRECTION_RTL == aDisplay->mDirection)))) { - // Ok, we have a list-item and its bullet will be - // impacted by the floater. - nscoord marginValue = 0; - nsStyleUnit unit = spacing->mCompatFloaterMargin.GetUnit(); - if (eStyleUnit_Auto == unit) { - // This is the default value: do nothing - } - else if (eStyleUnit_Percent == unit) { - // XXX write me - } - else if (eStyleUnit_Coord == unit) { - marginValue = spacing->mCompatFloaterMargin.GetCoordValue(); - } - else if (eStyleUnit_Inherit == unit) { - // XXX write me - } - aResult.x += marginValue; - aResult.width -= marginValue; - } } break; }