From e14e849e2f6e4d4b07b8b09ab1f89e9665100b51 Mon Sep 17 00:00:00 2001 From: "kipp@netscape.com" Date: Fri, 18 Dec 1998 22:12:15 +0000 Subject: [PATCH] Display inline borders/background during content painting, not during background painting (per css2 spec) --- layout/generic/nsBlockFrame.cpp | 5 ++++- layout/generic/nsBlockReflowState.cpp | 5 ++++- layout/generic/nsBlockReflowState.h | 5 ++++- layout/html/base/src/nsBlockFrame.cpp | 5 ++++- layout/html/base/src/nsBlockReflowState.cpp | 5 ++++- layout/html/base/src/nsBlockReflowState.h | 5 ++++- 6 files changed, 24 insertions(+), 6 deletions(-) diff --git a/layout/generic/nsBlockFrame.cpp b/layout/generic/nsBlockFrame.cpp index 1ea54c68f5ea..b93e44a7681d 100644 --- a/layout/generic/nsBlockFrame.cpp +++ b/layout/generic/nsBlockFrame.cpp @@ -3844,7 +3844,10 @@ nsBaseIBFrame::Paint(nsIPresContext& aPresContext, mStyleContext->GetStyleData(eStyleStruct_Display); // Only paint the border and background if we're visible - if ((eFramePaintLayer_Underlay == aWhichLayer) && disp->mVisible) { + if (disp->mVisible && + (((0 != (BLOCK_IS_INLINE & mFlags)) && + (eFramePaintLayer_Content == aWhichLayer)) || + (eFramePaintLayer_Underlay == aWhichLayer))) { PRIntn skipSides = GetSkipSides(); const nsStyleColor* color = (const nsStyleColor*) mStyleContext->GetStyleData(eStyleStruct_Color); diff --git a/layout/generic/nsBlockReflowState.cpp b/layout/generic/nsBlockReflowState.cpp index 1ea54c68f5ea..b93e44a7681d 100644 --- a/layout/generic/nsBlockReflowState.cpp +++ b/layout/generic/nsBlockReflowState.cpp @@ -3844,7 +3844,10 @@ nsBaseIBFrame::Paint(nsIPresContext& aPresContext, mStyleContext->GetStyleData(eStyleStruct_Display); // Only paint the border and background if we're visible - if ((eFramePaintLayer_Underlay == aWhichLayer) && disp->mVisible) { + if (disp->mVisible && + (((0 != (BLOCK_IS_INLINE & mFlags)) && + (eFramePaintLayer_Content == aWhichLayer)) || + (eFramePaintLayer_Underlay == aWhichLayer))) { PRIntn skipSides = GetSkipSides(); const nsStyleColor* color = (const nsStyleColor*) mStyleContext->GetStyleData(eStyleStruct_Color); diff --git a/layout/generic/nsBlockReflowState.h b/layout/generic/nsBlockReflowState.h index 1ea54c68f5ea..b93e44a7681d 100644 --- a/layout/generic/nsBlockReflowState.h +++ b/layout/generic/nsBlockReflowState.h @@ -3844,7 +3844,10 @@ nsBaseIBFrame::Paint(nsIPresContext& aPresContext, mStyleContext->GetStyleData(eStyleStruct_Display); // Only paint the border and background if we're visible - if ((eFramePaintLayer_Underlay == aWhichLayer) && disp->mVisible) { + if (disp->mVisible && + (((0 != (BLOCK_IS_INLINE & mFlags)) && + (eFramePaintLayer_Content == aWhichLayer)) || + (eFramePaintLayer_Underlay == aWhichLayer))) { PRIntn skipSides = GetSkipSides(); const nsStyleColor* color = (const nsStyleColor*) mStyleContext->GetStyleData(eStyleStruct_Color); diff --git a/layout/html/base/src/nsBlockFrame.cpp b/layout/html/base/src/nsBlockFrame.cpp index 1ea54c68f5ea..b93e44a7681d 100644 --- a/layout/html/base/src/nsBlockFrame.cpp +++ b/layout/html/base/src/nsBlockFrame.cpp @@ -3844,7 +3844,10 @@ nsBaseIBFrame::Paint(nsIPresContext& aPresContext, mStyleContext->GetStyleData(eStyleStruct_Display); // Only paint the border and background if we're visible - if ((eFramePaintLayer_Underlay == aWhichLayer) && disp->mVisible) { + if (disp->mVisible && + (((0 != (BLOCK_IS_INLINE & mFlags)) && + (eFramePaintLayer_Content == aWhichLayer)) || + (eFramePaintLayer_Underlay == aWhichLayer))) { PRIntn skipSides = GetSkipSides(); const nsStyleColor* color = (const nsStyleColor*) mStyleContext->GetStyleData(eStyleStruct_Color); diff --git a/layout/html/base/src/nsBlockReflowState.cpp b/layout/html/base/src/nsBlockReflowState.cpp index 1ea54c68f5ea..b93e44a7681d 100644 --- a/layout/html/base/src/nsBlockReflowState.cpp +++ b/layout/html/base/src/nsBlockReflowState.cpp @@ -3844,7 +3844,10 @@ nsBaseIBFrame::Paint(nsIPresContext& aPresContext, mStyleContext->GetStyleData(eStyleStruct_Display); // Only paint the border and background if we're visible - if ((eFramePaintLayer_Underlay == aWhichLayer) && disp->mVisible) { + if (disp->mVisible && + (((0 != (BLOCK_IS_INLINE & mFlags)) && + (eFramePaintLayer_Content == aWhichLayer)) || + (eFramePaintLayer_Underlay == aWhichLayer))) { PRIntn skipSides = GetSkipSides(); const nsStyleColor* color = (const nsStyleColor*) mStyleContext->GetStyleData(eStyleStruct_Color); diff --git a/layout/html/base/src/nsBlockReflowState.h b/layout/html/base/src/nsBlockReflowState.h index 1ea54c68f5ea..b93e44a7681d 100644 --- a/layout/html/base/src/nsBlockReflowState.h +++ b/layout/html/base/src/nsBlockReflowState.h @@ -3844,7 +3844,10 @@ nsBaseIBFrame::Paint(nsIPresContext& aPresContext, mStyleContext->GetStyleData(eStyleStruct_Display); // Only paint the border and background if we're visible - if ((eFramePaintLayer_Underlay == aWhichLayer) && disp->mVisible) { + if (disp->mVisible && + (((0 != (BLOCK_IS_INLINE & mFlags)) && + (eFramePaintLayer_Content == aWhichLayer)) || + (eFramePaintLayer_Underlay == aWhichLayer))) { PRIntn skipSides = GetSkipSides(); const nsStyleColor* color = (const nsStyleColor*) mStyleContext->GetStyleData(eStyleStruct_Color);