diff --git a/mozilla/content/html/style/src/nsComputedDOMStyle.cpp b/mozilla/content/html/style/src/nsComputedDOMStyle.cpp
index 8a95f8bf777..635411d0154 100644
--- a/mozilla/content/html/style/src/nsComputedDOMStyle.cpp
+++ b/mozilla/content/html/style/src/nsComputedDOMStyle.cpp
@@ -216,6 +216,7 @@ private:
nsresult GetDisplay(nsIFrame *aFrame, nsIDOMCSSPrimitiveValue*& aValue);
nsresult GetPosition(nsIFrame *aFrame, nsIDOMCSSPrimitiveValue*& aValue);
nsresult GetClip(nsIFrame *aFrame, nsIDOMCSSPrimitiveValue*& aValue);
+ nsresult GetOverflow(nsIFrame *aFrame, nsIDOMCSSPrimitiveValue*& aValue);
nsROCSSPrimitiveValue* GetROCSSPrimitiveValue();
@@ -237,6 +238,7 @@ static const nsCSSProperty queryableProperties[] = {
eCSSProperty_right,
eCSSProperty_bottom,
eCSSProperty_clip,
+ eCSSProperty_overflow,
eCSSProperty_color,
eCSSProperty_font_family,
@@ -249,6 +251,7 @@ static const nsCSSProperty queryableProperties[] = {
eCSSProperty_background_image,
eCSSProperty_display,
+ eCSSProperty_visibility,
eCSSProperty_position,
eCSSProperty_binding,
eCSSProperty_float,
@@ -576,6 +579,8 @@ nsComputedDOMStyle::GetPropertyCSSValue(const nsAReadableString& aPropertyName,
// Clip
case eCSSProperty_clip:
rv = GetClip(frame, *getter_AddRefs(val)); break;
+ case eCSSProperty_overflow:
+ rv = GetOverflow(frame, *getter_AddRefs(val)); break;
default :
break;
}
@@ -1872,6 +1877,29 @@ nsComputedDOMStyle::GetClip(nsIFrame *aFrame,
return CallQueryInterface(val, &aValue);
}
+nsresult
+nsComputedDOMStyle::GetOverflow(nsIFrame *aFrame,
+ nsIDOMCSSPrimitiveValue*& aValue)
+{
+ nsROCSSPrimitiveValue* val=GetROCSSPrimitiveValue();
+ NS_ENSURE_TRUE(val, NS_ERROR_OUT_OF_MEMORY);
+
+ const nsStyleDisplay* display=nsnull;
+ GetStyleData(eStyleStruct_Display,(const nsStyleStruct*&)display,aFrame);
+
+ if (display && display->mOverflow != NS_STYLE_OVERFLOW_AUTO) {
+ const nsAFlatCString& overflow =
+ nsCSSProps::SearchKeywordTable(display->mOverflow,
+ nsCSSProps::kOverflowKTable);
+ val->SetString(overflow);
+ }
+ else {
+ val->SetString(NS_LITERAL_STRING("auto"));
+ }
+
+ return CallQueryInterface(val, &aValue);
+}
+
#if 0
NS_IMETHODIMP
nsComputedDOMStyle::GetElevation(nsAWritableString& aElevation)
diff --git a/mozilla/layout/style/nsComputedDOMStyle.cpp b/mozilla/layout/style/nsComputedDOMStyle.cpp
index 8a95f8bf777..635411d0154 100644
--- a/mozilla/layout/style/nsComputedDOMStyle.cpp
+++ b/mozilla/layout/style/nsComputedDOMStyle.cpp
@@ -216,6 +216,7 @@ private:
nsresult GetDisplay(nsIFrame *aFrame, nsIDOMCSSPrimitiveValue*& aValue);
nsresult GetPosition(nsIFrame *aFrame, nsIDOMCSSPrimitiveValue*& aValue);
nsresult GetClip(nsIFrame *aFrame, nsIDOMCSSPrimitiveValue*& aValue);
+ nsresult GetOverflow(nsIFrame *aFrame, nsIDOMCSSPrimitiveValue*& aValue);
nsROCSSPrimitiveValue* GetROCSSPrimitiveValue();
@@ -237,6 +238,7 @@ static const nsCSSProperty queryableProperties[] = {
eCSSProperty_right,
eCSSProperty_bottom,
eCSSProperty_clip,
+ eCSSProperty_overflow,
eCSSProperty_color,
eCSSProperty_font_family,
@@ -249,6 +251,7 @@ static const nsCSSProperty queryableProperties[] = {
eCSSProperty_background_image,
eCSSProperty_display,
+ eCSSProperty_visibility,
eCSSProperty_position,
eCSSProperty_binding,
eCSSProperty_float,
@@ -576,6 +579,8 @@ nsComputedDOMStyle::GetPropertyCSSValue(const nsAReadableString& aPropertyName,
// Clip
case eCSSProperty_clip:
rv = GetClip(frame, *getter_AddRefs(val)); break;
+ case eCSSProperty_overflow:
+ rv = GetOverflow(frame, *getter_AddRefs(val)); break;
default :
break;
}
@@ -1872,6 +1877,29 @@ nsComputedDOMStyle::GetClip(nsIFrame *aFrame,
return CallQueryInterface(val, &aValue);
}
+nsresult
+nsComputedDOMStyle::GetOverflow(nsIFrame *aFrame,
+ nsIDOMCSSPrimitiveValue*& aValue)
+{
+ nsROCSSPrimitiveValue* val=GetROCSSPrimitiveValue();
+ NS_ENSURE_TRUE(val, NS_ERROR_OUT_OF_MEMORY);
+
+ const nsStyleDisplay* display=nsnull;
+ GetStyleData(eStyleStruct_Display,(const nsStyleStruct*&)display,aFrame);
+
+ if (display && display->mOverflow != NS_STYLE_OVERFLOW_AUTO) {
+ const nsAFlatCString& overflow =
+ nsCSSProps::SearchKeywordTable(display->mOverflow,
+ nsCSSProps::kOverflowKTable);
+ val->SetString(overflow);
+ }
+ else {
+ val->SetString(NS_LITERAL_STRING("auto"));
+ }
+
+ return CallQueryInterface(val, &aValue);
+}
+
#if 0
NS_IMETHODIMP
nsComputedDOMStyle::GetElevation(nsAWritableString& aElevation)