From 99ed50bd06ed549bab1da9e5a87b54eb4280282a Mon Sep 17 00:00:00 2001 From: "peterl%netscape.com" Date: Thu, 25 Mar 1999 06:34:57 +0000 Subject: [PATCH] made opacity inherit by default --- content/base/src/nsStyleContext.cpp | 3 ++- layout/base/src/nsStyleContext.cpp | 3 ++- layout/style/nsStyleContext.cpp | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/content/base/src/nsStyleContext.cpp b/content/base/src/nsStyleContext.cpp index 02db1ed732e9..edb401fe3f28 100644 --- a/content/base/src/nsStyleContext.cpp +++ b/content/base/src/nsStyleContext.cpp @@ -110,6 +110,7 @@ void StyleColorImpl::ResetFrom(const nsStyleColor* aParent, nsIPresContext* aPre { if (nsnull != aParent) { mColor = aParent->mColor; + mOpacity = aParent->mOpacity; } else { if (nsnull != aPresContext) { @@ -118,9 +119,9 @@ void StyleColorImpl::ResetFrom(const nsStyleColor* aParent, nsIPresContext* aPre else { mColor = NS_RGB(0x00, 0x00, 0x00); } + mOpacity = 1.0f; } - mOpacity = 1.0f; mBackgroundAttachment = NS_STYLE_BG_ATTACHMENT_SCROLL; mBackgroundFlags = NS_STYLE_BG_COLOR_TRANSPARENT | NS_STYLE_BG_IMAGE_NONE; diff --git a/layout/base/src/nsStyleContext.cpp b/layout/base/src/nsStyleContext.cpp index 02db1ed732e9..edb401fe3f28 100644 --- a/layout/base/src/nsStyleContext.cpp +++ b/layout/base/src/nsStyleContext.cpp @@ -110,6 +110,7 @@ void StyleColorImpl::ResetFrom(const nsStyleColor* aParent, nsIPresContext* aPre { if (nsnull != aParent) { mColor = aParent->mColor; + mOpacity = aParent->mOpacity; } else { if (nsnull != aPresContext) { @@ -118,9 +119,9 @@ void StyleColorImpl::ResetFrom(const nsStyleColor* aParent, nsIPresContext* aPre else { mColor = NS_RGB(0x00, 0x00, 0x00); } + mOpacity = 1.0f; } - mOpacity = 1.0f; mBackgroundAttachment = NS_STYLE_BG_ATTACHMENT_SCROLL; mBackgroundFlags = NS_STYLE_BG_COLOR_TRANSPARENT | NS_STYLE_BG_IMAGE_NONE; diff --git a/layout/style/nsStyleContext.cpp b/layout/style/nsStyleContext.cpp index 02db1ed732e9..edb401fe3f28 100644 --- a/layout/style/nsStyleContext.cpp +++ b/layout/style/nsStyleContext.cpp @@ -110,6 +110,7 @@ void StyleColorImpl::ResetFrom(const nsStyleColor* aParent, nsIPresContext* aPre { if (nsnull != aParent) { mColor = aParent->mColor; + mOpacity = aParent->mOpacity; } else { if (nsnull != aPresContext) { @@ -118,9 +119,9 @@ void StyleColorImpl::ResetFrom(const nsStyleColor* aParent, nsIPresContext* aPre else { mColor = NS_RGB(0x00, 0x00, 0x00); } + mOpacity = 1.0f; } - mOpacity = 1.0f; mBackgroundAttachment = NS_STYLE_BG_ATTACHMENT_SCROLL; mBackgroundFlags = NS_STYLE_BG_COLOR_TRANSPARENT | NS_STYLE_BG_IMAGE_NONE;