Paint backgrounds and borders for inline elements in the foreground layer. b=36710, 27757 r=buster@netscape.com

This commit is contained in:
dbaron%fas.harvard.edu 2000-09-04 21:45:47 +00:00
Родитель 37748e21f8
Коммит d415d67ba1
2 изменённых файлов: 12 добавлений и 2 удалений

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

@ -61,7 +61,12 @@ nsHTMLContainerFrame::Paint(nsIPresContext* aPresContext,
if (NS_FRAME_IS_UNFLOWABLE & mState) {
return NS_OK;
}
if (NS_FRAME_PAINT_LAYER_BACKGROUND == aWhichLayer) {
nsCOMPtr<nsIAtom> frameType;
GetFrameType(getter_AddRefs(frameType));
// Paint inline element backgrounds in the foreground layer, but
// others in the background (bug 36710).
if (((frameType.get() == nsLayoutAtoms::inlineFrame)?NS_FRAME_PAINT_LAYER_FOREGROUND:NS_FRAME_PAINT_LAYER_BACKGROUND) == aWhichLayer) {
const nsStyleDisplay* disp = (const nsStyleDisplay*)
mStyleContext->GetStyleData(eStyleStruct_Display);
if (disp->IsVisible() && mRect.width && mRect.height) {

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

@ -61,7 +61,12 @@ nsHTMLContainerFrame::Paint(nsIPresContext* aPresContext,
if (NS_FRAME_IS_UNFLOWABLE & mState) {
return NS_OK;
}
if (NS_FRAME_PAINT_LAYER_BACKGROUND == aWhichLayer) {
nsCOMPtr<nsIAtom> frameType;
GetFrameType(getter_AddRefs(frameType));
// Paint inline element backgrounds in the foreground layer, but
// others in the background (bug 36710).
if (((frameType.get() == nsLayoutAtoms::inlineFrame)?NS_FRAME_PAINT_LAYER_FOREGROUND:NS_FRAME_PAINT_LAYER_BACKGROUND) == aWhichLayer) {
const nsStyleDisplay* disp = (const nsStyleDisplay*)
mStyleContext->GetStyleData(eStyleStruct_Display);
if (disp->IsVisible() && mRect.width && mRect.height) {