diff --git a/content/html/style/src/nsCSSStyleRule.cpp b/content/html/style/src/nsCSSStyleRule.cpp
index bbca6ac82d66..a11c6c594618 100644
--- a/content/html/style/src/nsCSSStyleRule.cpp
+++ b/content/html/style/src/nsCSSStyleRule.cpp
@@ -1726,6 +1726,7 @@ MapDeclarationColorInto(nsICSSDeclaration* aDeclaration,
color->mBackgroundFlags &= ~NS_STYLE_BG_COLOR_TRANSPARENT;
}
else if (eCSSUnit_Enumerated == ourColor->mBackColor.GetUnit()) {
+ color->mBackgroundColor = parentColor->mBackgroundColor;
color->mBackgroundFlags |= NS_STYLE_BG_COLOR_TRANSPARENT;
}
diff --git a/layout/html/style/src/nsCSSStyleRule.cpp b/layout/html/style/src/nsCSSStyleRule.cpp
index bbca6ac82d66..a11c6c594618 100644
--- a/layout/html/style/src/nsCSSStyleRule.cpp
+++ b/layout/html/style/src/nsCSSStyleRule.cpp
@@ -1726,6 +1726,7 @@ MapDeclarationColorInto(nsICSSDeclaration* aDeclaration,
color->mBackgroundFlags &= ~NS_STYLE_BG_COLOR_TRANSPARENT;
}
else if (eCSSUnit_Enumerated == ourColor->mBackColor.GetUnit()) {
+ color->mBackgroundColor = parentColor->mBackgroundColor;
color->mBackgroundFlags |= NS_STYLE_BG_COLOR_TRANSPARENT;
}
diff --git a/layout/style/nsCSSStyleRule.cpp b/layout/style/nsCSSStyleRule.cpp
index bbca6ac82d66..a11c6c594618 100644
--- a/layout/style/nsCSSStyleRule.cpp
+++ b/layout/style/nsCSSStyleRule.cpp
@@ -1726,6 +1726,7 @@ MapDeclarationColorInto(nsICSSDeclaration* aDeclaration,
color->mBackgroundFlags &= ~NS_STYLE_BG_COLOR_TRANSPARENT;
}
else if (eCSSUnit_Enumerated == ourColor->mBackColor.GetUnit()) {
+ color->mBackgroundColor = parentColor->mBackgroundColor;
color->mBackgroundFlags |= NS_STYLE_BG_COLOR_TRANSPARENT;
}