diff --git a/content/html/style/src/nsDOMCSSDeclaration.cpp b/content/html/style/src/nsDOMCSSDeclaration.cpp
index a10f72e1926..7be133f7268 100644
--- a/content/html/style/src/nsDOMCSSDeclaration.cpp
+++ b/content/html/style/src/nsDOMCSSDeclaration.cpp
@@ -67,8 +67,15 @@ NS_IMPL_RELEASE(nsDOMCSSDeclaration);
NS_IMETHODIMP
nsDOMCSSDeclaration::GetCssText(nsAWritableString& aCssText)
{
+ nsCOMPtr decl;
aCssText.Truncate();
- // XXX TBI
+ GetCSSDeclaration(getter_AddRefs(decl), PR_FALSE);
+ NS_ASSERTION(decl, "null CSSDeclaration");
+
+ if (decl) {
+ decl->ToString(aCssText);
+ }
+
return NS_OK;
}
diff --git a/layout/style/nsDOMCSSDeclaration.cpp b/layout/style/nsDOMCSSDeclaration.cpp
index a10f72e1926..7be133f7268 100644
--- a/layout/style/nsDOMCSSDeclaration.cpp
+++ b/layout/style/nsDOMCSSDeclaration.cpp
@@ -67,8 +67,15 @@ NS_IMPL_RELEASE(nsDOMCSSDeclaration);
NS_IMETHODIMP
nsDOMCSSDeclaration::GetCssText(nsAWritableString& aCssText)
{
+ nsCOMPtr decl;
aCssText.Truncate();
- // XXX TBI
+ GetCSSDeclaration(getter_AddRefs(decl), PR_FALSE);
+ NS_ASSERTION(decl, "null CSSDeclaration");
+
+ if (decl) {
+ decl->ToString(aCssText);
+ }
+
return NS_OK;
}