Part of bug 57576; adding support for getting list-style-image; r=harishd, sr=jst

This commit is contained in:
law%netscape.com 2001-03-08 00:55:01 +00:00
Родитель bf70d028ae
Коммит a96fc9cbfa
2 изменённых файлов: 52 добавлений и 0 удалений

Просмотреть файл

@ -117,6 +117,9 @@ private:
// z-index
nsresult GetZIndex(nsIFrame *aFrame, nsIDOMCSSPrimitiveValue*& aValue);
// List properties
nsresult GetListStyleImage(nsIFrame *aFrame, nsIDOMCSSPrimitiveValue*& aValue);
nsresult GetBehavior(nsIFrame *aFrame, nsIDOMCSSPrimitiveValue*& aValue);
nsROCSSPrimitiveValue* GetROCSSPrimitiveValue();
@ -367,6 +370,8 @@ nsComputedDOMStyle::GetPropertyCSSValue(const nsAReadableString& aPropertyName,
rv = GetBorderRightWidth(frame, *getter_AddRefs(val)); break;
case eCSSProperty_z_index:
rv = GetZIndex(frame, *getter_AddRefs(val)); break;
case eCSSProperty_list_style_image:
rv = GetListStyleImage(frame, *getter_AddRefs(val)); break;
default :
break;
}
@ -1042,6 +1047,27 @@ nsComputedDOMStyle::GetZIndex(nsIFrame *aFrame,
return result;
}
nsresult
nsComputedDOMStyle::GetListStyleImage(nsIFrame *aFrame,
nsIDOMCSSPrimitiveValue*& aValue)
{
nsresult result=NS_OK;
if(aFrame) {
const nsStyleList* list;
GetStyleData(eStyleStruct_List,(const nsStyleStruct*&)list,aFrame);
if(list) {
nsROCSSPrimitiveValue* val=GetROCSSPrimitiveValue();
if(val) {
val->SetString(list->mListStyleImage);
result = val->QueryInterface(NS_GET_IID(nsIDOMCSSPrimitiveValue),(void**)&aValue);
} else {
result = NS_ERROR_OUT_OF_MEMORY;
}
}
}
return result;
}
#if 0
NS_IMETHODIMP
nsComputedDOMStyle::GetCaptionSide(nsAWritableString& aCaptionSide)

Просмотреть файл

@ -117,6 +117,9 @@ private:
// z-index
nsresult GetZIndex(nsIFrame *aFrame, nsIDOMCSSPrimitiveValue*& aValue);
// List properties
nsresult GetListStyleImage(nsIFrame *aFrame, nsIDOMCSSPrimitiveValue*& aValue);
nsresult GetBehavior(nsIFrame *aFrame, nsIDOMCSSPrimitiveValue*& aValue);
nsROCSSPrimitiveValue* GetROCSSPrimitiveValue();
@ -367,6 +370,8 @@ nsComputedDOMStyle::GetPropertyCSSValue(const nsAReadableString& aPropertyName,
rv = GetBorderRightWidth(frame, *getter_AddRefs(val)); break;
case eCSSProperty_z_index:
rv = GetZIndex(frame, *getter_AddRefs(val)); break;
case eCSSProperty_list_style_image:
rv = GetListStyleImage(frame, *getter_AddRefs(val)); break;
default :
break;
}
@ -1042,6 +1047,27 @@ nsComputedDOMStyle::GetZIndex(nsIFrame *aFrame,
return result;
}
nsresult
nsComputedDOMStyle::GetListStyleImage(nsIFrame *aFrame,
nsIDOMCSSPrimitiveValue*& aValue)
{
nsresult result=NS_OK;
if(aFrame) {
const nsStyleList* list;
GetStyleData(eStyleStruct_List,(const nsStyleStruct*&)list,aFrame);
if(list) {
nsROCSSPrimitiveValue* val=GetROCSSPrimitiveValue();
if(val) {
val->SetString(list->mListStyleImage);
result = val->QueryInterface(NS_GET_IID(nsIDOMCSSPrimitiveValue),(void**)&aValue);
} else {
result = NS_ERROR_OUT_OF_MEMORY;
}
}
}
return result;
}
#if 0
NS_IMETHODIMP
nsComputedDOMStyle::GetCaptionSide(nsAWritableString& aCaptionSide)