Bug 581222. Back out patch that disabled box-shadows for native-themed content elements.

--HG--
extra : rebase_source : 4685dfdddd9e0bf1ed9e5f8401d6bc73b91a5600
This commit is contained in:
Robert O'Callahan 2010-08-23 21:30:07 +12:00
Родитель 64c4e38da6
Коммит 032420c7f2
3 изменённых файлов: 4 добавлений и 19 удалений

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

@ -1176,7 +1176,7 @@ nsCSSRendering::PaintBoxShadowOuter(nsPresContext* aPresContext,
const nsRect& aFrameArea,
const nsRect& aDirtyRect)
{
nsCSSShadowArray* shadows = aForFrame->GetEffectiveBoxShadows();
nsCSSShadowArray* shadows = aForFrame->GetStyleBorder()->mBoxShadow;
if (!shadows)
return;
const nsStyleBorder* styleBorder = aForFrame->GetStyleBorder();
@ -1304,7 +1304,7 @@ nsCSSRendering::PaintBoxShadowInner(nsPresContext* aPresContext,
const nsRect& aFrameArea,
const nsRect& aDirtyRect)
{
nsCSSShadowArray* shadows = aForFrame->GetEffectiveBoxShadows();
nsCSSShadowArray* shadows = aForFrame->GetStyleBorder()->mBoxShadow;
if (!shadows)
return;
const nsStyleBorder* styleBorder = aForFrame->GetStyleBorder();

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

@ -749,17 +749,6 @@ nsFrame::SetAdditionalStyleContext(PRInt32 aIndex,
NS_PRECONDITION(aIndex >= 0, "invalid index number");
}
nsCSSShadowArray*
nsIFrame::GetEffectiveBoxShadows()
{
nsCSSShadowArray* shadows = GetStyleBorder()->mBoxShadow;
if (!shadows ||
(IsThemed() && GetContent() &&
!nsContentUtils::IsChromeDoc(GetContent()->GetCurrentDoc())))
return nsnull;
return shadows;
}
nscoord
nsFrame::GetBaseline() const
{
@ -1008,7 +997,7 @@ nsFrame::DisplayBorderBackgroundOutline(nsDisplayListBuilder* aBuilder,
if (!IsVisibleForPainting(aBuilder))
return NS_OK;
PRBool hasBoxShadow = GetEffectiveBoxShadows() != nsnull;
PRBool hasBoxShadow = GetStyleBorder()->mBoxShadow != nsnull;
if (hasBoxShadow) {
nsresult rv = aLists.BorderBackground()->AppendNewToTop(new (aBuilder)
nsDisplayBoxShadowOuter(aBuilder, this));
@ -4056,7 +4045,7 @@ ComputeOutlineAndEffectsRect(nsIFrame* aFrame, PRBool* aAnyOutlineOrEffects,
*aAnyOutlineOrEffects = PR_FALSE;
// box-shadow
nsCSSShadowArray* boxShadows = aFrame->GetEffectiveBoxShadows();
nsCSSShadowArray* boxShadows = aFrame->GetStyleBorder()->mBoxShadow;
if (boxShadows) {
nsRect shadows;
for (PRUint32 i = 0; i < boxShadows->Length(); ++i) {

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

@ -747,10 +747,6 @@ public:
virtual void SetAdditionalStyleContext(PRInt32 aIndex,
nsStyleContext* aStyleContext) = 0;
// returns GetStyleBorder()->mBoxShadow unless this frame is using
// -moz-appearance and is not chrome
nsCSSShadowArray* GetEffectiveBoxShadows();
/**
* @return PR_FALSE if this frame definitely has no borders at all
*/