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