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); + } } } }