From dc543d8c470ad01515ddca01ba94a6b197785e14 Mon Sep 17 00:00:00 2001 From: "dbaron%dbaron.org" Date: Mon, 13 Sep 2004 20:40:46 +0000 Subject: [PATCH] Fix VC7 bustage. b=258793 --- content/shared/public/nsStyleStruct.h | 11 ++++------- content/shared/src/nsStyleStruct.cpp | 6 ++++++ layout/style/nsStyleStruct.cpp | 6 ++++++ layout/style/nsStyleStruct.h | 11 ++++------- 4 files changed, 20 insertions(+), 14 deletions(-) diff --git a/content/shared/public/nsStyleStruct.h b/content/shared/public/nsStyleStruct.h index eef469608bf..a5b7e9e7dd6 100644 --- a/content/shared/public/nsStyleStruct.h +++ b/content/shared/public/nsStyleStruct.h @@ -188,13 +188,10 @@ struct nsStyleBackground : public nsStyleStruct { (NS_STYLE_BG_COLOR_TRANSPARENT | NS_STYLE_BG_IMAGE_NONE); } - PRBool HasFixedBackground() const - { - // We have to take slower codepaths for fixed background attachment, - // but we don't want to do that when there's no image. - return mBackgroundAttachment == NS_STYLE_BG_ATTACHMENT_FIXED && - mBackgroundImage; - } + // We have to take slower codepaths for fixed background attachment, + // but we don't want to do that when there's no image. + // Not inline because it uses an nsCOMPtr + PRBool HasFixedBackground() const; }; #define BORDER_COLOR_DEFINED 0x80 diff --git a/content/shared/src/nsStyleStruct.cpp b/content/shared/src/nsStyleStruct.cpp index eb4e27f48c2..5b2a1210077 100644 --- a/content/shared/src/nsStyleStruct.cpp +++ b/content/shared/src/nsStyleStruct.cpp @@ -1088,6 +1088,12 @@ nsChangeHint nsStyleBackground::CalcDifference(const nsStyleBackground& aOther) return NS_STYLE_HINT_VISUAL; } +PRBool nsStyleBackground::HasFixedBackground() const +{ + return mBackgroundAttachment == NS_STYLE_BG_ATTACHMENT_FIXED && + mBackgroundImage; +} + // -------------------- // nsStyleDisplay // diff --git a/layout/style/nsStyleStruct.cpp b/layout/style/nsStyleStruct.cpp index eb4e27f48c2..5b2a1210077 100644 --- a/layout/style/nsStyleStruct.cpp +++ b/layout/style/nsStyleStruct.cpp @@ -1088,6 +1088,12 @@ nsChangeHint nsStyleBackground::CalcDifference(const nsStyleBackground& aOther) return NS_STYLE_HINT_VISUAL; } +PRBool nsStyleBackground::HasFixedBackground() const +{ + return mBackgroundAttachment == NS_STYLE_BG_ATTACHMENT_FIXED && + mBackgroundImage; +} + // -------------------- // nsStyleDisplay // diff --git a/layout/style/nsStyleStruct.h b/layout/style/nsStyleStruct.h index eef469608bf..a5b7e9e7dd6 100644 --- a/layout/style/nsStyleStruct.h +++ b/layout/style/nsStyleStruct.h @@ -188,13 +188,10 @@ struct nsStyleBackground : public nsStyleStruct { (NS_STYLE_BG_COLOR_TRANSPARENT | NS_STYLE_BG_IMAGE_NONE); } - PRBool HasFixedBackground() const - { - // We have to take slower codepaths for fixed background attachment, - // but we don't want to do that when there's no image. - return mBackgroundAttachment == NS_STYLE_BG_ATTACHMENT_FIXED && - mBackgroundImage; - } + // We have to take slower codepaths for fixed background attachment, + // but we don't want to do that when there's no image. + // Not inline because it uses an nsCOMPtr + PRBool HasFixedBackground() const; }; #define BORDER_COLOR_DEFINED 0x80