From 024ff28d3abe160b8f38d66b2f3f965e58fbf726 Mon Sep 17 00:00:00 2001 From: kipp Date: Thu, 28 May 1998 02:01:19 +0000 Subject: [PATCH] Use default text alignment; setup opacity properly --- content/base/src/nsStyleContext.cpp | 4 +++- layout/base/src/nsStyleContext.cpp | 4 +++- layout/style/nsStyleContext.cpp | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/content/base/src/nsStyleContext.cpp b/content/base/src/nsStyleContext.cpp index fdfcd44d6d11..f2796e842e92 100644 --- a/content/base/src/nsStyleContext.cpp +++ b/content/base/src/nsStyleContext.cpp @@ -85,9 +85,11 @@ void StyleColorImpl::ResetFrom(const nsStyleColor* aParent, nsIPresContext* aPre { if (nsnull != aParent) { mColor = aParent->mColor; + mOpacity = aParent->mOpacity; } else { mColor = NS_RGB(0, 0, 0); + mOpacity.SetPercentValue(1.0F); } mBackgroundAttachment = NS_STYLE_BG_ATTACHMENT_SCROLL; @@ -459,7 +461,7 @@ void StyleTextImpl::ResetFrom(const nsStyleText* aParent, nsIPresContext* aPresC mWordSpacing = aParent->mWordSpacing; } else { - mTextAlign = NS_STYLE_TEXT_ALIGN_LEFT; + mTextAlign = NS_STYLE_TEXT_ALIGN_DEFAULT; mTextTransform = NS_STYLE_TEXT_TRANSFORM_NONE; mWhiteSpace = NS_STYLE_WHITESPACE_NORMAL; diff --git a/layout/base/src/nsStyleContext.cpp b/layout/base/src/nsStyleContext.cpp index fdfcd44d6d11..f2796e842e92 100644 --- a/layout/base/src/nsStyleContext.cpp +++ b/layout/base/src/nsStyleContext.cpp @@ -85,9 +85,11 @@ void StyleColorImpl::ResetFrom(const nsStyleColor* aParent, nsIPresContext* aPre { if (nsnull != aParent) { mColor = aParent->mColor; + mOpacity = aParent->mOpacity; } else { mColor = NS_RGB(0, 0, 0); + mOpacity.SetPercentValue(1.0F); } mBackgroundAttachment = NS_STYLE_BG_ATTACHMENT_SCROLL; @@ -459,7 +461,7 @@ void StyleTextImpl::ResetFrom(const nsStyleText* aParent, nsIPresContext* aPresC mWordSpacing = aParent->mWordSpacing; } else { - mTextAlign = NS_STYLE_TEXT_ALIGN_LEFT; + mTextAlign = NS_STYLE_TEXT_ALIGN_DEFAULT; mTextTransform = NS_STYLE_TEXT_TRANSFORM_NONE; mWhiteSpace = NS_STYLE_WHITESPACE_NORMAL; diff --git a/layout/style/nsStyleContext.cpp b/layout/style/nsStyleContext.cpp index fdfcd44d6d11..f2796e842e92 100644 --- a/layout/style/nsStyleContext.cpp +++ b/layout/style/nsStyleContext.cpp @@ -85,9 +85,11 @@ void StyleColorImpl::ResetFrom(const nsStyleColor* aParent, nsIPresContext* aPre { if (nsnull != aParent) { mColor = aParent->mColor; + mOpacity = aParent->mOpacity; } else { mColor = NS_RGB(0, 0, 0); + mOpacity.SetPercentValue(1.0F); } mBackgroundAttachment = NS_STYLE_BG_ATTACHMENT_SCROLL; @@ -459,7 +461,7 @@ void StyleTextImpl::ResetFrom(const nsStyleText* aParent, nsIPresContext* aPresC mWordSpacing = aParent->mWordSpacing; } else { - mTextAlign = NS_STYLE_TEXT_ALIGN_LEFT; + mTextAlign = NS_STYLE_TEXT_ALIGN_DEFAULT; mTextTransform = NS_STYLE_TEXT_TRANSFORM_NONE; mWhiteSpace = NS_STYLE_WHITESPACE_NORMAL;