mshtml: Add IHTMLCSSStyleDeclaration::getPropertyValue implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
16803516ef
commit
069d5de90a
|
@ -4989,11 +4989,21 @@ static HRESULT WINAPI HTMLCSSStyleDeclaration_get_parentRule(IHTMLCSSStyleDeclar
|
|||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI HTMLCSSStyleDeclaration_getPropertyValue(IHTMLCSSStyleDeclaration *iface, BSTR bstrPropertyName, BSTR *pbstrPropertyValue)
|
||||
static HRESULT WINAPI HTMLCSSStyleDeclaration_getPropertyValue(IHTMLCSSStyleDeclaration *iface, BSTR name, BSTR *value)
|
||||
{
|
||||
CSSStyle *This = impl_from_IHTMLCSSStyleDeclaration(iface);
|
||||
FIXME("(%p)->(%s %p)\n", This, debugstr_w(bstrPropertyName), pbstrPropertyValue);
|
||||
return E_NOTIMPL;
|
||||
const style_tbl_entry_t *style_entry;
|
||||
nsAString name_str, value_str;
|
||||
nsresult nsres;
|
||||
|
||||
TRACE("(%p)->(%s %p)\n", This, debugstr_w(name), value);
|
||||
|
||||
style_entry = lookup_style_tbl(name);
|
||||
nsAString_InitDepend(&name_str, style_entry ? style_entry->name : name);
|
||||
nsAString_InitDepend(&value_str, NULL);
|
||||
nsres = nsIDOMCSSStyleDeclaration_GetPropertyValue(This->nsstyle, &name_str, &value_str);
|
||||
nsAString_Finish(&name_str);
|
||||
return return_nsstr(nsres, &value_str, value);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI HTMLCSSStyleDeclaration_getPropertyPriority(IHTMLCSSStyleDeclaration *iface, BSTR bstrPropertyName, BSTR *pbstrPropertyPriority)
|
||||
|
|
|
@ -238,6 +238,10 @@ function test_style_properties() {
|
|||
|
||||
style.cssFloat = "left";
|
||||
ok(style.cssFloat === "left", "cssFloat = " + style.cssFloat);
|
||||
ok(style.getPropertyValue("float") === "left",
|
||||
'style.getPropertyValue("float") = ' + style.getPropertyValue("float"));
|
||||
ok(style.getPropertyValue("cssFloat") === "",
|
||||
'style.getPropertyValue("cssFloat") = ' + style.getPropertyValue("cssFloat"));
|
||||
|
||||
val = style.removeProperty("float");
|
||||
ok(val === "left", "removeProperty() returned " + val);
|
||||
|
@ -262,6 +266,10 @@ function test_style_properties() {
|
|||
style["z-index"] = 1;
|
||||
ok(style.zIndex === 1, "zIndex = " + style.zIndex);
|
||||
ok(style["z-index"] === 1, "z-index = " + style["z-index"]);
|
||||
ok(style.getPropertyValue("z-index") === "1",
|
||||
'style.getPropertyValue("x-index") = ' + style.getPropertyValue("z-index"));
|
||||
ok(style.getPropertyValue("zIndex") === "",
|
||||
'style.getPropertyValue("xIndex") = ' + style.getPropertyValue("zIndex"));
|
||||
|
||||
style.setProperty("border-width", "5px");
|
||||
ok(style.borderWidth === "5px", "style.borderWidth = " + style.borderWidth);
|
||||
|
|
Loading…
Reference in New Issue