From: Gabriel Ivăncescu gabrielopcode@gmail.com
-ms-* prefix is not accepted by gecko anyway, and it needs to be implemented manually.
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/mshtml/htmlstyle.c | 2 +- dlls/mshtml/tests/dom.js | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c index 0e2c2a2407c..40cee5d1890 100644 --- a/dlls/mshtml/htmlstyle.c +++ b/dlls/mshtml/htmlstyle.c @@ -712,7 +712,7 @@ static const WCHAR *get_style_nsname(const style_tbl_entry_t *style_entry)
static const WCHAR *get_style_prop_nsname(const style_tbl_entry_t *style_entry, const WCHAR *orig_name) { - return style_entry ? get_style_nsname(style_entry) : orig_name; + return style_entry ? get_style_nsname(style_entry) : orig_name[0] == '-' ? L"" : orig_name; }
static const style_tbl_entry_t *lookup_style_tbl(CSSStyle *style, const WCHAR *name) diff --git a/dlls/mshtml/tests/dom.js b/dlls/mshtml/tests/dom.js index 325cacf4823..df47e45cf4b 100644 --- a/dlls/mshtml/tests/dom.js +++ b/dlls/mshtml/tests/dom.js @@ -399,6 +399,25 @@ sync_test("style_properties", function() { ok(val === "", "removeProperty() returned " + val); ok(style.testVal === "test", "testVal = " + style.testVal);
+ val = style.getPropertyValue("testVal"); + ok(val === "", 'style.getPropertyValue("testVal") = ' + val); + ok(style.testVal === "test", "testVal = " + style.testVal); + + style.setProperty("testVal", "1px"); + val = style.getPropertyValue("testVal"); + ok(val === "", 'style.getPropertyValue("testVal") = ' + val); + ok(style.testVal === "test", "testVal = " + style.testVal); + + style.setProperty("test", "1px"); + val = style.getPropertyValue("test"); + ok(val === "", 'style.getPropertyValue("test") = ' + val); + ok(!("test" in style), "test in style"); + + style.setProperty("-moz-box-sizing", "border-box"); + val = style.getPropertyValue("-moz-box-sizing"); + ok(val === "", 'style.getPropertyValue("-moz-box-sizing") = ' + val); + ok(!("-moz-box-sizing" in style), "-moz-box-sizing in style"); + style["z-index"] = 1; ok(style.zIndex === 1, "zIndex = " + style.zIndex); ok(style["z-index"] === 1, "z-index = " + style["z-index"]);