From: Gabriel Ivăncescu gabrielopcode@gmail.com
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/mshtml/htmlstyle.c | 19 +++++++++++++++---- dlls/mshtml/htmlstyle.h | 1 + dlls/mshtml/tests/documentmode.js | 2 ++ dlls/mshtml/tests/dom.js | 14 ++++++++++++++ 4 files changed, 32 insertions(+), 4 deletions(-)
diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c index 0e2c2a2407c..5124fa5713a 100644 --- a/dlls/mshtml/htmlstyle.c +++ b/dlls/mshtml/htmlstyle.c @@ -120,6 +120,13 @@ typedef struct { } style_tbl_entry_t;
static const style_tbl_entry_t style_tbl[] = { + { + L"-ms-transition", + DISPID_IHTMLCSSSTYLEDECLARATION2_MSTRANSITION, + DISPID_UNKNOWN, + ATTR_COMPAT_IE10, NULL, + L"transition" + }, { L"animation", DISPID_IHTMLCSSSTYLEDECLARATION2_ANIMATION, @@ -8773,15 +8780,19 @@ static HRESULT WINAPI HTMLCSSStyleDeclaration2_get_msTransitionDelay(IHTMLCSSSty static HRESULT WINAPI HTMLCSSStyleDeclaration2_put_msTransition(IHTMLCSSStyleDeclaration2 *iface, BSTR v) { CSSStyle *This = impl_from_IHTMLCSSStyleDeclaration2(iface); - FIXME("(%p)->(%s)\n", This, debugstr_w(v)); - return E_NOTIMPL; + + TRACE("(%p)->(%s)\n", This, debugstr_w(v)); + + return set_style_property(This, STYLEID_MSTRANSITION, v); }
static HRESULT WINAPI HTMLCSSStyleDeclaration2_get_msTransition(IHTMLCSSStyleDeclaration2 *iface, BSTR *p) { CSSStyle *This = impl_from_IHTMLCSSStyleDeclaration2(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + + TRACE("(%p)->(%p)\n", This, p); + + return get_style_property(This, STYLEID_MSTRANSITION, p); }
static HRESULT WINAPI HTMLCSSStyleDeclaration2_put_msTouchAction(IHTMLCSSStyleDeclaration2 *iface, BSTR v) diff --git a/dlls/mshtml/htmlstyle.h b/dlls/mshtml/htmlstyle.h index 0818e555cb9..47b006a9105 100644 --- a/dlls/mshtml/htmlstyle.h +++ b/dlls/mshtml/htmlstyle.h @@ -40,6 +40,7 @@ struct HTMLStyle {
/* NOTE: Make sure to keep in sync with style_tbl in htmlstyle.c */ typedef enum { + STYLEID_MSTRANSITION, STYLEID_ANIMATION, STYLEID_ANIMATION_NAME, STYLEID_BACKGROUND, diff --git a/dlls/mshtml/tests/documentmode.js b/dlls/mshtml/tests/documentmode.js index 6cc4edf0c63..16f2056ba93 100644 --- a/dlls/mshtml/tests/documentmode.js +++ b/dlls/mshtml/tests/documentmode.js @@ -693,7 +693,9 @@ sync_test("style_props", function() { test_exposed("removeProperty", v >= 9, v >= 9, v >= 9); test_exposed("background-clip", v >= 9, v >= 9, v >= 9); test_exposed("msTransform", v >= 9, v >= 9, v >= 9); + test_exposed("msTransition", v >= 10, v >= 10, v >= 10); test_exposed("transform", v >= 10, v >= 10, v >= 10); + test_exposed("transition", v >= 10, v >= 10, v >= 10); });
sync_test("createElement_inline_attr", function() { diff --git a/dlls/mshtml/tests/dom.js b/dlls/mshtml/tests/dom.js index 63baf691d43..2199829a6d9 100644 --- a/dlls/mshtml/tests/dom.js +++ b/dlls/mshtml/tests/dom.js @@ -472,6 +472,20 @@ sync_test("style_properties", function() { ok(computed_style.zIndex === 4, "computed_style.zIndex = " + computed_style.zIndex);
window.getComputedStyle(elem, null); + + /* ms* prefixed styles alias */ + var list = [ + [ "transition", "background-color 0.5s linear 0.1s" ] + ]; + for(var i = 0; i < list.length; i++) { + var s = list[i][0], v = list[i][1], ms = "ms" + s[0].toUpperCase() + s.substring(1); + style[s] = v; + ok(style[s] === v, "style." + s + " = " + style[s] + ", expected " + v); + ok(style[ms] === v, "style." + ms + " = " + style[ms] + ", expected " + v); + elem.style[ms] = v; + ok(elem.style[s] === v, "elem.style." + s + " = " + elem.style[s] + ", expected " + v); + ok(elem.style[ms] === v, "elem.style." + ms + " = " + elem.style[ms] + ", expected " + v); + } });
sync_test("stylesheets", function() {