From 6737cb1c392fbe238a7bd3937d3babcd7bef1e7f Mon Sep 17 00:00:00 2001 From: "mjudge%netscape.com" Date: Thu, 13 Apr 2000 22:39:39 +0000 Subject: [PATCH] made the table temporarily pull from nsLookandFeel until we get style rule working correctly git-svn-id: svn://10.0.0.236/trunk@65890 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/html/table/src/nsTableCellFrame.cpp | 6 ++++++ mozilla/layout/tables/nsTableCellFrame.cpp | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/mozilla/layout/html/table/src/nsTableCellFrame.cpp b/mozilla/layout/html/table/src/nsTableCellFrame.cpp index e2c590796f1..9357c26048b 100644 --- a/mozilla/layout/html/table/src/nsTableCellFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableCellFrame.cpp @@ -49,6 +49,7 @@ //TABLECELL SELECTION #include "nsIFrameSelection.h" +#include "nsILookAndFeel.h" static NS_DEFINE_IID(kIHTMLTableCellElementIID, NS_IHTMLTABLECELLELEMENT_IID); static NS_DEFINE_IID(kIDOMHTMLTableCellElementIID, NS_IDOMHTMLTABLECELLELEMENT_IID); @@ -277,6 +278,11 @@ NS_METHOD nsTableCellFrame::Paint(nsIPresContext* aPresContext, if (NS_SUCCEEDED(result) && tableCellSelectionMode) { frameSelection->GetTableCellSelectionStyleColor(&myColor); + nsILookAndFeel* look = nsnull; + if (NS_SUCCEEDED(aPresContext->GetLookAndFeel(&look)) && look) { + look->GetColor(nsILookAndFeel::eColor_TextSelectBackground, ((nsStyleColor *)myColor)->mBackgroundColor);//VERY BAD CAST..TEMPORARY + NS_RELEASE(look); + } } } } diff --git a/mozilla/layout/tables/nsTableCellFrame.cpp b/mozilla/layout/tables/nsTableCellFrame.cpp index e2c590796f1..9357c26048b 100644 --- a/mozilla/layout/tables/nsTableCellFrame.cpp +++ b/mozilla/layout/tables/nsTableCellFrame.cpp @@ -49,6 +49,7 @@ //TABLECELL SELECTION #include "nsIFrameSelection.h" +#include "nsILookAndFeel.h" static NS_DEFINE_IID(kIHTMLTableCellElementIID, NS_IHTMLTABLECELLELEMENT_IID); static NS_DEFINE_IID(kIDOMHTMLTableCellElementIID, NS_IDOMHTMLTABLECELLELEMENT_IID); @@ -277,6 +278,11 @@ NS_METHOD nsTableCellFrame::Paint(nsIPresContext* aPresContext, if (NS_SUCCEEDED(result) && tableCellSelectionMode) { frameSelection->GetTableCellSelectionStyleColor(&myColor); + nsILookAndFeel* look = nsnull; + if (NS_SUCCEEDED(aPresContext->GetLookAndFeel(&look)) && look) { + look->GetColor(nsILookAndFeel::eColor_TextSelectBackground, ((nsStyleColor *)myColor)->mBackgroundColor);//VERY BAD CAST..TEMPORARY + NS_RELEASE(look); + } } } }