From f54d51dfd4e77662cd2a437c46f236156b6ed0a8 Mon Sep 17 00:00:00 2001 From: "dbaron%fas.harvard.edu" Date: Thu, 14 Sep 2000 14:18:24 +0000 Subject: [PATCH] Change the names of behavior and opacity DOM properties to MozBinding and MozOpacity, and make them work again with new CSS property names. r=jst, except for case change (Moz not moz) agreed on mozilla-style b=3935 git-svn-id: svn://10.0.0.236/trunk@79133 18797224-902f-48f8-a5cc-f745e15eee43 --- .../html/style/src/nsDOMCSSDeclaration.cpp | 43 +++++++++++-------- mozilla/dom/public/css/nsIDOMCSS2Properties.h | 24 +++++------ mozilla/dom/public/idl/css/CSS2Properties.idl | 4 +- mozilla/dom/public/nsDOMPropEnums.h | 4 +- mozilla/dom/src/css/nsJSCSS2Properties.cpp | 32 +++++++------- .../html/style/src/nsDOMCSSDeclaration.cpp | 43 +++++++++++-------- mozilla/layout/style/nsDOMCSSDeclaration.cpp | 43 +++++++++++-------- 7 files changed, 107 insertions(+), 86 deletions(-) diff --git a/mozilla/content/html/style/src/nsDOMCSSDeclaration.cpp b/mozilla/content/html/style/src/nsDOMCSSDeclaration.cpp index d5129565354..7d8f41e5ec1 100644 --- a/mozilla/content/html/style/src/nsDOMCSSDeclaration.cpp +++ b/mozilla/content/html/style/src/nsDOMCSSDeclaration.cpp @@ -334,18 +334,6 @@ nsDOMCSSDeclaration::SetBackgroundRepeat(const nsAReadableString& aBackgroundRep return SetProperty(NS_ConvertASCIItoUCS2("background-repeat"), aBackgroundRepeat, nsAutoString()); } -NS_IMETHODIMP -nsDOMCSSDeclaration::GetBehavior(nsAWritableString& aBehavior) -{ - return GetPropertyValue(NS_ConvertASCIItoUCS2("behavior"), aBehavior); -} - -NS_IMETHODIMP -nsDOMCSSDeclaration::SetBehavior(const nsAReadableString& aBehavior) -{ - return SetProperty(NS_ConvertASCIItoUCS2("behavior"), aBehavior, nsAutoString()); -} - NS_IMETHODIMP nsDOMCSSDeclaration::GetBorder(nsAWritableString& aBorder) { @@ -1153,48 +1141,56 @@ nsDOMCSSDeclaration::SetOrphans(const nsAReadableString& aOrphans) NS_IMETHODIMP nsDOMCSSDeclaration::GetOutline(nsAWritableString& aOutline) { + // XXX Because of the renaming to -moz-outline, this does nothing. return GetPropertyValue(NS_ConvertASCIItoUCS2("outline"), aOutline); } NS_IMETHODIMP nsDOMCSSDeclaration::SetOutline(const nsAReadableString& aOutline) { + // XXX Because of the renaming to -moz-outline, this does nothing. return SetProperty(NS_ConvertASCIItoUCS2("outline"), aOutline, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetOutlineColor(nsAWritableString& aOutlineColor) { + // XXX Because of the renaming to -moz-outline, this does nothing. return GetPropertyValue(NS_ConvertASCIItoUCS2("outline-color"), aOutlineColor); } NS_IMETHODIMP nsDOMCSSDeclaration::SetOutlineColor(const nsAReadableString& aOutlineColor) { + // XXX Because of the renaming to -moz-outline, this does nothing. return SetProperty(NS_ConvertASCIItoUCS2("outline-color"), aOutlineColor, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetOutlineStyle(nsAWritableString& aOutlineStyle) { + // XXX Because of the renaming to -moz-outline, this does nothing. return GetPropertyValue(NS_ConvertASCIItoUCS2("outline-style"), aOutlineStyle); } NS_IMETHODIMP nsDOMCSSDeclaration::SetOutlineStyle(const nsAReadableString& aOutlineStyle) { + // XXX Because of the renaming to -moz-outline, this does nothing. return SetProperty(NS_ConvertASCIItoUCS2("outline-style"), aOutlineStyle, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetOutlineWidth(nsAWritableString& aOutlineWidth) { + // XXX Because of the renaming to -moz-outline, this does nothing. return GetPropertyValue(NS_ConvertASCIItoUCS2("outline-width"), aOutlineWidth); } NS_IMETHODIMP nsDOMCSSDeclaration::SetOutlineWidth(const nsAReadableString& aOutlineWidth) { + // XXX Because of the renaming to -moz-outline, this does nothing. return SetProperty(NS_ConvertASCIItoUCS2("outline-width"), aOutlineWidth, nsAutoString()); } @@ -1726,15 +1722,26 @@ nsDOMCSSDeclaration::SetZIndex(const nsAReadableString& aZIndex) return SetProperty(NS_ConvertASCIItoUCS2("z-index"), aZIndex, nsAutoString()); } - -NS_IMETHODIMP -nsDOMCSSDeclaration::GetOpacity(nsAWritableString& aOpacity) +NS_IMETHODIMP +nsDOMCSSDeclaration::GetMozBinding(nsAWritableString& aBehavior) { - return GetPropertyValue(NS_ConvertASCIItoUCS2("opacity"), aOpacity); + return GetPropertyValue(NS_ConvertASCIItoUCS2("-moz-binding"), aBehavior); } NS_IMETHODIMP -nsDOMCSSDeclaration::SetOpacity(const nsAReadableString& aOpacity) +nsDOMCSSDeclaration::SetMozBinding(const nsAReadableString& aBehavior) { - return SetProperty(NS_ConvertASCIItoUCS2("opacity"), aOpacity, nsAutoString()); + return SetProperty(NS_ConvertASCIItoUCS2("-moz-binding"), aBehavior, nsAutoString()); +} + +NS_IMETHODIMP +nsDOMCSSDeclaration::GetMozOpacity(nsAWritableString& aOpacity) +{ + return GetPropertyValue(NS_ConvertASCIItoUCS2("-moz-opacity"), aOpacity); +} + +NS_IMETHODIMP +nsDOMCSSDeclaration::SetMozOpacity(const nsAReadableString& aOpacity) +{ + return SetProperty(NS_ConvertASCIItoUCS2("-moz-opacity"), aOpacity, nsAutoString()); } diff --git a/mozilla/dom/public/css/nsIDOMCSS2Properties.h b/mozilla/dom/public/css/nsIDOMCSS2Properties.h index 699021668f7..6e16b583589 100644 --- a/mozilla/dom/public/css/nsIDOMCSS2Properties.h +++ b/mozilla/dom/public/css/nsIDOMCSS2Properties.h @@ -404,11 +404,11 @@ public: NS_IMETHOD GetZIndex(nsAWritableString& aZIndex)=0; NS_IMETHOD SetZIndex(const nsAReadableString& aZIndex)=0; - NS_IMETHOD GetBehavior(nsAWritableString& aBehavior)=0; - NS_IMETHOD SetBehavior(const nsAReadableString& aBehavior)=0; + NS_IMETHOD GetMozBinding(nsAWritableString& aMozBinding)=0; + NS_IMETHOD SetMozBinding(const nsAReadableString& aMozBinding)=0; - NS_IMETHOD GetOpacity(nsAWritableString& aOpacity)=0; - NS_IMETHOD SetOpacity(const nsAReadableString& aOpacity)=0; + NS_IMETHOD GetMozOpacity(nsAWritableString& aMozOpacity)=0; + NS_IMETHOD SetMozOpacity(const nsAReadableString& aMozOpacity)=0; }; @@ -657,10 +657,10 @@ public: NS_IMETHOD SetWordSpacing(const nsAReadableString& aWordSpacing); \ NS_IMETHOD GetZIndex(nsAWritableString& aZIndex); \ NS_IMETHOD SetZIndex(const nsAReadableString& aZIndex); \ - NS_IMETHOD GetBehavior(nsAWritableString& aBehavior); \ - NS_IMETHOD SetBehavior(const nsAReadableString& aBehavior); \ - NS_IMETHOD GetOpacity(nsAWritableString& aOpacity); \ - NS_IMETHOD SetOpacity(const nsAReadableString& aOpacity); \ + NS_IMETHOD GetMozBinding(nsAWritableString& aMozBinding); \ + NS_IMETHOD SetMozBinding(const nsAReadableString& aMozBinding); \ + NS_IMETHOD GetMozOpacity(nsAWritableString& aMozOpacity); \ + NS_IMETHOD SetMozOpacity(const nsAReadableString& aMozOpacity); \ @@ -909,10 +909,10 @@ public: NS_IMETHOD SetWordSpacing(const nsAReadableString& aWordSpacing) { return _to SetWordSpacing(aWordSpacing); } \ NS_IMETHOD GetZIndex(nsAWritableString& aZIndex) { return _to GetZIndex(aZIndex); } \ NS_IMETHOD SetZIndex(const nsAReadableString& aZIndex) { return _to SetZIndex(aZIndex); } \ - NS_IMETHOD GetBehavior(nsAWritableString& aBehavior) { return _to GetBehavior(aBehavior); } \ - NS_IMETHOD SetBehavior(const nsAReadableString& aBehavior) { return _to SetBehavior(aBehavior); } \ - NS_IMETHOD GetOpacity(nsAWritableString& aOpacity) { return _to GetOpacity(aOpacity); } \ - NS_IMETHOD SetOpacity(const nsAReadableString& aOpacity) { return _to SetOpacity(aOpacity); } \ + NS_IMETHOD GetMozBinding(nsAWritableString& aMozBinding) { return _to GetMozBinding(aMozBinding); } \ + NS_IMETHOD SetMozBinding(const nsAReadableString& aMozBinding) { return _to SetMozBinding(aMozBinding); } \ + NS_IMETHOD GetMozOpacity(nsAWritableString& aMozOpacity) { return _to GetMozOpacity(aMozOpacity); } \ + NS_IMETHOD SetMozOpacity(const nsAReadableString& aMozOpacity) { return _to SetMozOpacity(aMozOpacity); } \ extern "C" NS_DOM nsresult NS_InitCSS2PropertiesClass(nsIScriptContext *aContext, void **aPrototype); diff --git a/mozilla/dom/public/idl/css/CSS2Properties.idl b/mozilla/dom/public/idl/css/CSS2Properties.idl index 93a2bdc53b6..faee659168f 100644 --- a/mozilla/dom/public/idl/css/CSS2Properties.idl +++ b/mozilla/dom/public/idl/css/CSS2Properties.idl @@ -369,11 +369,11 @@ interface CSS2Properties : CSSStyleDeclaration { // raises(DOMException) on setting /* Non-DOM 2 extensions */ - attribute DOMString behavior; + attribute DOMString MozBinding; // raises(DOMException) on setting /* XXX Kipp was here */ - attribute DOMString opacity; + attribute DOMString MozOpacity; // raises(DOMException) on setting }; diff --git a/mozilla/dom/public/nsDOMPropEnums.h b/mozilla/dom/public/nsDOMPropEnums.h index 2262fb2c8c5..d4eba0c8630 100644 --- a/mozilla/dom/public/nsDOMPropEnums.h +++ b/mozilla/dom/public/nsDOMPropEnums.h @@ -73,7 +73,6 @@ enum nsDOMProp { NS_DOM_PROP_CSS2PROPERTIES_BACKGROUNDIMAGE, NS_DOM_PROP_CSS2PROPERTIES_BACKGROUNDPOSITION, NS_DOM_PROP_CSS2PROPERTIES_BACKGROUNDREPEAT, - NS_DOM_PROP_CSS2PROPERTIES_BEHAVIOR, NS_DOM_PROP_CSS2PROPERTIES_BORDER, NS_DOM_PROP_CSS2PROPERTIES_BORDERBOTTOM, NS_DOM_PROP_CSS2PROPERTIES_BORDERBOTTOMCOLOR, @@ -140,7 +139,8 @@ enum nsDOMProp { NS_DOM_PROP_CSS2PROPERTIES_MAXWIDTH, NS_DOM_PROP_CSS2PROPERTIES_MINHEIGHT, NS_DOM_PROP_CSS2PROPERTIES_MINWIDTH, - NS_DOM_PROP_CSS2PROPERTIES_OPACITY, + NS_DOM_PROP_CSS2PROPERTIES_MOZBINDING, + NS_DOM_PROP_CSS2PROPERTIES_MOZOPACITY, NS_DOM_PROP_CSS2PROPERTIES_ORPHANS, NS_DOM_PROP_CSS2PROPERTIES_OUTLINE, NS_DOM_PROP_CSS2PROPERTIES_OUTLINECOLOR, diff --git a/mozilla/dom/src/css/nsJSCSS2Properties.cpp b/mozilla/dom/src/css/nsJSCSS2Properties.cpp index 38a95224499..a6d5c686826 100644 --- a/mozilla/dom/src/css/nsJSCSS2Properties.cpp +++ b/mozilla/dom/src/css/nsJSCSS2Properties.cpp @@ -168,8 +168,8 @@ enum CSS2Properties_slots { CSS2PROPERTIES_WIDTH = -120, CSS2PROPERTIES_WORDSPACING = -121, CSS2PROPERTIES_ZINDEX = -122, - CSS2PROPERTIES_BEHAVIOR = -123, - CSS2PROPERTIES_OPACITY = -124 + CSS2PROPERTIES_MOZBINDING = -123, + CSS2PROPERTIES_MOZOPACITY = -124 }; /***********************************************************************/ @@ -1656,24 +1656,24 @@ GetCSS2PropertiesProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) } break; } - case CSS2PROPERTIES_BEHAVIOR: + case CSS2PROPERTIES_MOZBINDING: { - rv = secMan->CheckScriptAccess(cx, obj, NS_DOM_PROP_CSS2PROPERTIES_BEHAVIOR, PR_FALSE); + rv = secMan->CheckScriptAccess(cx, obj, NS_DOM_PROP_CSS2PROPERTIES_MOZBINDING, PR_FALSE); if (NS_SUCCEEDED(rv)) { nsAutoString prop; - rv = a->GetBehavior(prop); + rv = a->GetMozBinding(prop); if (NS_SUCCEEDED(rv)) { nsJSUtils::nsConvertStringToJSVal(prop, cx, vp); } } break; } - case CSS2PROPERTIES_OPACITY: + case CSS2PROPERTIES_MOZOPACITY: { - rv = secMan->CheckScriptAccess(cx, obj, NS_DOM_PROP_CSS2PROPERTIES_OPACITY, PR_FALSE); + rv = secMan->CheckScriptAccess(cx, obj, NS_DOM_PROP_CSS2PROPERTIES_MOZOPACITY, PR_FALSE); if (NS_SUCCEEDED(rv)) { nsAutoString prop; - rv = a->GetOpacity(prop); + rv = a->GetMozOpacity(prop); if (NS_SUCCEEDED(rv)) { nsJSUtils::nsConvertStringToJSVal(prop, cx, vp); } @@ -3177,26 +3177,26 @@ SetCSS2PropertiesProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) } break; } - case CSS2PROPERTIES_BEHAVIOR: + case CSS2PROPERTIES_MOZBINDING: { - rv = secMan->CheckScriptAccess(cx, obj, NS_DOM_PROP_CSS2PROPERTIES_BEHAVIOR, PR_TRUE); + rv = secMan->CheckScriptAccess(cx, obj, NS_DOM_PROP_CSS2PROPERTIES_MOZBINDING, PR_TRUE); if (NS_SUCCEEDED(rv)) { nsAutoString prop; nsJSUtils::nsConvertJSValToString(prop, cx, *vp); - rv = a->SetBehavior(prop); + rv = a->SetMozBinding(prop); } break; } - case CSS2PROPERTIES_OPACITY: + case CSS2PROPERTIES_MOZOPACITY: { - rv = secMan->CheckScriptAccess(cx, obj, NS_DOM_PROP_CSS2PROPERTIES_OPACITY, PR_TRUE); + rv = secMan->CheckScriptAccess(cx, obj, NS_DOM_PROP_CSS2PROPERTIES_MOZOPACITY, PR_TRUE); if (NS_SUCCEEDED(rv)) { nsAutoString prop; nsJSUtils::nsConvertJSValToString(prop, cx, *vp); - rv = a->SetOpacity(prop); + rv = a->SetMozOpacity(prop); } break; @@ -3392,8 +3392,8 @@ static JSPropertySpec CSS2PropertiesProperties[] = {"width", CSS2PROPERTIES_WIDTH, JSPROP_ENUMERATE}, {"wordSpacing", CSS2PROPERTIES_WORDSPACING, JSPROP_ENUMERATE}, {"zIndex", CSS2PROPERTIES_ZINDEX, JSPROP_ENUMERATE}, - {"behavior", CSS2PROPERTIES_BEHAVIOR, JSPROP_ENUMERATE}, - {"opacity", CSS2PROPERTIES_OPACITY, JSPROP_ENUMERATE}, + {"MozBinding", CSS2PROPERTIES_MOZBINDING, JSPROP_ENUMERATE}, + {"MozOpacity", CSS2PROPERTIES_MOZOPACITY, JSPROP_ENUMERATE}, {0} }; diff --git a/mozilla/layout/html/style/src/nsDOMCSSDeclaration.cpp b/mozilla/layout/html/style/src/nsDOMCSSDeclaration.cpp index d5129565354..7d8f41e5ec1 100644 --- a/mozilla/layout/html/style/src/nsDOMCSSDeclaration.cpp +++ b/mozilla/layout/html/style/src/nsDOMCSSDeclaration.cpp @@ -334,18 +334,6 @@ nsDOMCSSDeclaration::SetBackgroundRepeat(const nsAReadableString& aBackgroundRep return SetProperty(NS_ConvertASCIItoUCS2("background-repeat"), aBackgroundRepeat, nsAutoString()); } -NS_IMETHODIMP -nsDOMCSSDeclaration::GetBehavior(nsAWritableString& aBehavior) -{ - return GetPropertyValue(NS_ConvertASCIItoUCS2("behavior"), aBehavior); -} - -NS_IMETHODIMP -nsDOMCSSDeclaration::SetBehavior(const nsAReadableString& aBehavior) -{ - return SetProperty(NS_ConvertASCIItoUCS2("behavior"), aBehavior, nsAutoString()); -} - NS_IMETHODIMP nsDOMCSSDeclaration::GetBorder(nsAWritableString& aBorder) { @@ -1153,48 +1141,56 @@ nsDOMCSSDeclaration::SetOrphans(const nsAReadableString& aOrphans) NS_IMETHODIMP nsDOMCSSDeclaration::GetOutline(nsAWritableString& aOutline) { + // XXX Because of the renaming to -moz-outline, this does nothing. return GetPropertyValue(NS_ConvertASCIItoUCS2("outline"), aOutline); } NS_IMETHODIMP nsDOMCSSDeclaration::SetOutline(const nsAReadableString& aOutline) { + // XXX Because of the renaming to -moz-outline, this does nothing. return SetProperty(NS_ConvertASCIItoUCS2("outline"), aOutline, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetOutlineColor(nsAWritableString& aOutlineColor) { + // XXX Because of the renaming to -moz-outline, this does nothing. return GetPropertyValue(NS_ConvertASCIItoUCS2("outline-color"), aOutlineColor); } NS_IMETHODIMP nsDOMCSSDeclaration::SetOutlineColor(const nsAReadableString& aOutlineColor) { + // XXX Because of the renaming to -moz-outline, this does nothing. return SetProperty(NS_ConvertASCIItoUCS2("outline-color"), aOutlineColor, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetOutlineStyle(nsAWritableString& aOutlineStyle) { + // XXX Because of the renaming to -moz-outline, this does nothing. return GetPropertyValue(NS_ConvertASCIItoUCS2("outline-style"), aOutlineStyle); } NS_IMETHODIMP nsDOMCSSDeclaration::SetOutlineStyle(const nsAReadableString& aOutlineStyle) { + // XXX Because of the renaming to -moz-outline, this does nothing. return SetProperty(NS_ConvertASCIItoUCS2("outline-style"), aOutlineStyle, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetOutlineWidth(nsAWritableString& aOutlineWidth) { + // XXX Because of the renaming to -moz-outline, this does nothing. return GetPropertyValue(NS_ConvertASCIItoUCS2("outline-width"), aOutlineWidth); } NS_IMETHODIMP nsDOMCSSDeclaration::SetOutlineWidth(const nsAReadableString& aOutlineWidth) { + // XXX Because of the renaming to -moz-outline, this does nothing. return SetProperty(NS_ConvertASCIItoUCS2("outline-width"), aOutlineWidth, nsAutoString()); } @@ -1726,15 +1722,26 @@ nsDOMCSSDeclaration::SetZIndex(const nsAReadableString& aZIndex) return SetProperty(NS_ConvertASCIItoUCS2("z-index"), aZIndex, nsAutoString()); } - -NS_IMETHODIMP -nsDOMCSSDeclaration::GetOpacity(nsAWritableString& aOpacity) +NS_IMETHODIMP +nsDOMCSSDeclaration::GetMozBinding(nsAWritableString& aBehavior) { - return GetPropertyValue(NS_ConvertASCIItoUCS2("opacity"), aOpacity); + return GetPropertyValue(NS_ConvertASCIItoUCS2("-moz-binding"), aBehavior); } NS_IMETHODIMP -nsDOMCSSDeclaration::SetOpacity(const nsAReadableString& aOpacity) +nsDOMCSSDeclaration::SetMozBinding(const nsAReadableString& aBehavior) { - return SetProperty(NS_ConvertASCIItoUCS2("opacity"), aOpacity, nsAutoString()); + return SetProperty(NS_ConvertASCIItoUCS2("-moz-binding"), aBehavior, nsAutoString()); +} + +NS_IMETHODIMP +nsDOMCSSDeclaration::GetMozOpacity(nsAWritableString& aOpacity) +{ + return GetPropertyValue(NS_ConvertASCIItoUCS2("-moz-opacity"), aOpacity); +} + +NS_IMETHODIMP +nsDOMCSSDeclaration::SetMozOpacity(const nsAReadableString& aOpacity) +{ + return SetProperty(NS_ConvertASCIItoUCS2("-moz-opacity"), aOpacity, nsAutoString()); } diff --git a/mozilla/layout/style/nsDOMCSSDeclaration.cpp b/mozilla/layout/style/nsDOMCSSDeclaration.cpp index d5129565354..7d8f41e5ec1 100644 --- a/mozilla/layout/style/nsDOMCSSDeclaration.cpp +++ b/mozilla/layout/style/nsDOMCSSDeclaration.cpp @@ -334,18 +334,6 @@ nsDOMCSSDeclaration::SetBackgroundRepeat(const nsAReadableString& aBackgroundRep return SetProperty(NS_ConvertASCIItoUCS2("background-repeat"), aBackgroundRepeat, nsAutoString()); } -NS_IMETHODIMP -nsDOMCSSDeclaration::GetBehavior(nsAWritableString& aBehavior) -{ - return GetPropertyValue(NS_ConvertASCIItoUCS2("behavior"), aBehavior); -} - -NS_IMETHODIMP -nsDOMCSSDeclaration::SetBehavior(const nsAReadableString& aBehavior) -{ - return SetProperty(NS_ConvertASCIItoUCS2("behavior"), aBehavior, nsAutoString()); -} - NS_IMETHODIMP nsDOMCSSDeclaration::GetBorder(nsAWritableString& aBorder) { @@ -1153,48 +1141,56 @@ nsDOMCSSDeclaration::SetOrphans(const nsAReadableString& aOrphans) NS_IMETHODIMP nsDOMCSSDeclaration::GetOutline(nsAWritableString& aOutline) { + // XXX Because of the renaming to -moz-outline, this does nothing. return GetPropertyValue(NS_ConvertASCIItoUCS2("outline"), aOutline); } NS_IMETHODIMP nsDOMCSSDeclaration::SetOutline(const nsAReadableString& aOutline) { + // XXX Because of the renaming to -moz-outline, this does nothing. return SetProperty(NS_ConvertASCIItoUCS2("outline"), aOutline, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetOutlineColor(nsAWritableString& aOutlineColor) { + // XXX Because of the renaming to -moz-outline, this does nothing. return GetPropertyValue(NS_ConvertASCIItoUCS2("outline-color"), aOutlineColor); } NS_IMETHODIMP nsDOMCSSDeclaration::SetOutlineColor(const nsAReadableString& aOutlineColor) { + // XXX Because of the renaming to -moz-outline, this does nothing. return SetProperty(NS_ConvertASCIItoUCS2("outline-color"), aOutlineColor, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetOutlineStyle(nsAWritableString& aOutlineStyle) { + // XXX Because of the renaming to -moz-outline, this does nothing. return GetPropertyValue(NS_ConvertASCIItoUCS2("outline-style"), aOutlineStyle); } NS_IMETHODIMP nsDOMCSSDeclaration::SetOutlineStyle(const nsAReadableString& aOutlineStyle) { + // XXX Because of the renaming to -moz-outline, this does nothing. return SetProperty(NS_ConvertASCIItoUCS2("outline-style"), aOutlineStyle, nsAutoString()); } NS_IMETHODIMP nsDOMCSSDeclaration::GetOutlineWidth(nsAWritableString& aOutlineWidth) { + // XXX Because of the renaming to -moz-outline, this does nothing. return GetPropertyValue(NS_ConvertASCIItoUCS2("outline-width"), aOutlineWidth); } NS_IMETHODIMP nsDOMCSSDeclaration::SetOutlineWidth(const nsAReadableString& aOutlineWidth) { + // XXX Because of the renaming to -moz-outline, this does nothing. return SetProperty(NS_ConvertASCIItoUCS2("outline-width"), aOutlineWidth, nsAutoString()); } @@ -1726,15 +1722,26 @@ nsDOMCSSDeclaration::SetZIndex(const nsAReadableString& aZIndex) return SetProperty(NS_ConvertASCIItoUCS2("z-index"), aZIndex, nsAutoString()); } - -NS_IMETHODIMP -nsDOMCSSDeclaration::GetOpacity(nsAWritableString& aOpacity) +NS_IMETHODIMP +nsDOMCSSDeclaration::GetMozBinding(nsAWritableString& aBehavior) { - return GetPropertyValue(NS_ConvertASCIItoUCS2("opacity"), aOpacity); + return GetPropertyValue(NS_ConvertASCIItoUCS2("-moz-binding"), aBehavior); } NS_IMETHODIMP -nsDOMCSSDeclaration::SetOpacity(const nsAReadableString& aOpacity) +nsDOMCSSDeclaration::SetMozBinding(const nsAReadableString& aBehavior) { - return SetProperty(NS_ConvertASCIItoUCS2("opacity"), aOpacity, nsAutoString()); + return SetProperty(NS_ConvertASCIItoUCS2("-moz-binding"), aBehavior, nsAutoString()); +} + +NS_IMETHODIMP +nsDOMCSSDeclaration::GetMozOpacity(nsAWritableString& aOpacity) +{ + return GetPropertyValue(NS_ConvertASCIItoUCS2("-moz-opacity"), aOpacity); +} + +NS_IMETHODIMP +nsDOMCSSDeclaration::SetMozOpacity(const nsAReadableString& aOpacity) +{ + return SetProperty(NS_ConvertASCIItoUCS2("-moz-opacity"), aOpacity, nsAutoString()); }