From ffac1eec98fcc795179ca8bc329a46c8dad35dc3 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Mon, 19 Jan 2015 08:44:56 +0100 Subject: [PATCH] mshtml-sessionStorage: Remove patches (because of incompatibility with new Gecko version). These patches have been disabled for quite some time now because of fundamental changes in Gecko (see https://github.com/wine-compholio/wine-staging/issues/119). As there wasn't any attempt to fix that yet, we will remove them (until a solution compatible with the current version is found). --- ...html-Added-nsIDOMStorage-declaration.patch | 49 ----- ...ate_storage-and-IHTMLStorage-Release.patch | 152 -------------- ...MLStorage-getItem-setItem-methods-im.patch | 189 ------------------ patches/mshtml-sessionStorage/definition | 2 - patches/patchinstall.sh | 30 +-- 5 files changed, 15 insertions(+), 407 deletions(-) delete mode 100644 patches/mshtml-sessionStorage/0001-mshtml-Added-nsIDOMStorage-declaration.patch delete mode 100644 patches/mshtml-sessionStorage/0002-mshtml-Fixed-create_storage-and-IHTMLStorage-Release.patch delete mode 100644 patches/mshtml-sessionStorage/0003-mshtml-Added-IHTMLStorage-getItem-setItem-methods-im.patch delete mode 100644 patches/mshtml-sessionStorage/definition diff --git a/patches/mshtml-sessionStorage/0001-mshtml-Added-nsIDOMStorage-declaration.patch b/patches/mshtml-sessionStorage/0001-mshtml-Added-nsIDOMStorage-declaration.patch deleted file mode 100644 index 6d124822..00000000 --- a/patches/mshtml-sessionStorage/0001-mshtml-Added-nsIDOMStorage-declaration.patch +++ /dev/null @@ -1,49 +0,0 @@ -From de10d96b512a279fcd24e402ad5249680c6c5970 Mon Sep 17 00:00:00 2001 -From: Zhenbo Li -Date: Sat, 23 Aug 2014 21:25:19 +0800 -Subject: [PATCH 1/3] mshtml: Added nsIDOMStorage declaration. -To: wine-patches@winehq.org -Reply-To: wine-devel@winehq.org -CC: litimetal@gmail.com - ---- - dlls/mshtml/nsiface.idl | 16 +++++++++++++++- - 1 file changed, 15 insertions(+), 1 deletion(-) - -diff --git a/dlls/mshtml/nsiface.idl b/dlls/mshtml/nsiface.idl -index a5275e7..d2bfd8c 100644 ---- a/dlls/mshtml/nsiface.idl -+++ b/dlls/mshtml/nsiface.idl -@@ -155,7 +155,6 @@ typedef nsISupports nsIContentViewer; - typedef nsISupports nsIDocumentCharsetInfo; - typedef nsISupports nsILayoutHistoryState; - typedef nsISupports nsISecureBrowserUI; --typedef nsISupports nsIDOMStorage; - typedef nsISupports nsIDOMDOMTokenList; - typedef nsISupports nsITransferable; - typedef nsISupports nsIDOMFileList; -@@ -1360,6 +1359,21 @@ interface nsIDOMWindowCollection : nsISupports - - [ - object, -+ uuid(43e5edad-1e02-42c4-9d99-c3d9dee22a20), -+ local -+] -+interface nsIDOMStorage : nsISupports -+{ -+ nsresult GetLength(uint32_t *aLength); -+ nsresult Key(uint32_t index, nsAString *_retval); -+ nsresult GetItem(const nsAString *key, nsAString *_retval); -+ nsresult SetItem(const nsAString *key, const nsAString *data); -+ nsresult RemoveItem(const nsAString *key); -+ nsresult Clear(); -+}; -+ -+[ -+ object, - uuid(be62660a-e3f6-409c-a4a9-378364a9526f), - local - ] --- -1.9.3 - diff --git a/patches/mshtml-sessionStorage/0002-mshtml-Fixed-create_storage-and-IHTMLStorage-Release.patch b/patches/mshtml-sessionStorage/0002-mshtml-Fixed-create_storage-and-IHTMLStorage-Release.patch deleted file mode 100644 index ba34532a..00000000 --- a/patches/mshtml-sessionStorage/0002-mshtml-Fixed-create_storage-and-IHTMLStorage-Release.patch +++ /dev/null @@ -1,152 +0,0 @@ -From 9bff529406fa08caff24dc208f4e0506f0952d0f Mon Sep 17 00:00:00 2001 -From: Zhenbo Li -Date: Thu, 4 Sep 2014 21:08:57 +0800 -Subject: [PATCH 2/3] mshtml: Fixed create_storage() and - IHTMLStorage::Release(). -To: wine-patches@winehq.org -Reply-To: wine-devel@winehq.org -CC: litimetal@gmail.com - ---- - dlls/mshtml/htmlstorage.c | 7 ++++++- - dlls/mshtml/htmlwindow.c | 12 ++++++++++-- - dlls/mshtml/mshtml_private.h | 2 +- - dlls/mshtml/tests/htmldoc.c | 37 +++++++++++++++++++++++++++++++++++++ - 4 files changed, 54 insertions(+), 4 deletions(-) - -diff --git a/dlls/mshtml/htmlstorage.c b/dlls/mshtml/htmlstorage.c -index 60a2a3a..2d391f8 100644 ---- a/dlls/mshtml/htmlstorage.c -+++ b/dlls/mshtml/htmlstorage.c -@@ -34,6 +34,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(mshtml); - typedef struct { - DispatchEx dispex; - IHTMLStorage IHTMLStorage_iface; -+ nsIDOMStorage *nsstorage; - LONG ref; - } HTMLStorage; - -@@ -82,6 +83,8 @@ static ULONG WINAPI HTMLStorage_Release(IHTMLStorage *iface) - TRACE("(%p) ref=%d\n", This, ref); - - if(!ref) { -+ if (This->nsstorage) -+ nsIDOMStorage_Release(This->nsstorage); - release_dispex(&This->dispex); - heap_free(This); - } -@@ -198,7 +201,7 @@ static dispex_static_data_t HTMLStorage_dispex = { - HTMLStorage_iface_tids - }; - --HRESULT create_storage(IHTMLStorage **p) -+HRESULT create_storage(nsIDOMStorage *nsstorage, IHTMLStorage **p) - { - HTMLStorage *storage; - -@@ -211,5 +214,7 @@ HRESULT create_storage(IHTMLStorage **p) - init_dispex(&storage->dispex, (IUnknown*)&storage->IHTMLStorage_iface, &HTMLStorage_dispex); - - *p = &storage->IHTMLStorage_iface; -+ storage->nsstorage = nsstorage; -+ nsIDOMStorage_AddRef(nsstorage); - return S_OK; - } -diff --git a/dlls/mshtml/htmlwindow.c b/dlls/mshtml/htmlwindow.c -index 6c6c328..a26cf4e 100644 ---- a/dlls/mshtml/htmlwindow.c -+++ b/dlls/mshtml/htmlwindow.c -@@ -2018,12 +2018,20 @@ static HRESULT WINAPI HTMLWindow6_get_sessionStorage(IHTMLWindow6 *iface, IHTMLS - { - HTMLWindow *This = impl_from_IHTMLWindow6(iface); - -- FIXME("(%p)->(%p)\n", This, p); -+ TRACE("(%p)->(%p)\n", This, p); - - if(!This->inner_window->session_storage) { - HRESULT hres; -+ nsresult nsres; -+ nsIDOMStorage *nsstorage; - -- hres = create_storage(&This->inner_window->session_storage); -+ nsres = nsIDOMWindow_GetSessionStorage(This->outer_window->nswindow, &nsstorage); -+ if (NS_FAILED(nsres)) { -+ ERR("GetSessionStorage failed: %08x\n", nsres); -+ return E_FAIL; -+ } -+ hres = create_storage(nsstorage, &This->inner_window->session_storage); -+ nsIDOMStorage_Release(nsstorage); - if(FAILED(hres)) - return hres; - } -diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h -index b69fd26..b118177 100644 ---- a/dlls/mshtml/mshtml_private.h -+++ b/dlls/mshtml/mshtml_private.h -@@ -767,7 +767,7 @@ HRESULT HTMLScreen_Create(IHTMLScreen**) DECLSPEC_HIDDEN; - HRESULT create_history(HTMLInnerWindow*,OmHistory**) DECLSPEC_HIDDEN; - HRESULT create_dom_implementation(IHTMLDOMImplementation**) DECLSPEC_HIDDEN; - --HRESULT create_storage(IHTMLStorage**) DECLSPEC_HIDDEN; -+HRESULT create_storage(nsIDOMStorage*,IHTMLStorage**) DECLSPEC_HIDDEN; - - void HTMLDocument_Persist_Init(HTMLDocument*) DECLSPEC_HIDDEN; - void HTMLDocument_OleCmd_Init(HTMLDocument*) DECLSPEC_HIDDEN; -diff --git a/dlls/mshtml/tests/htmldoc.c b/dlls/mshtml/tests/htmldoc.c -index 84b8806..d79f4b5 100644 ---- a/dlls/mshtml/tests/htmldoc.c -+++ b/dlls/mshtml/tests/htmldoc.c -@@ -7431,6 +7431,42 @@ static void test_QueryInterface(IHTMLDocument2 *htmldoc) - IUnknown_Release(qi); - } - -+static void test_sessionStorage(IHTMLWindow6 *window) -+{ -+ HRESULT hres; -+ IHTMLStorage *storage; -+ -+ hres = IHTMLWindow6_get_sessionStorage(window, &storage); -+ ok(hres == S_OK, "get_sessionStorage failed: %08x\n", hres); -+ ok(storage != NULL, "storage == NULL\n"); -+ if(hres != S_OK || storage == NULL) -+ return; -+ -+ IHTMLStorage_Release(storage); -+} -+ -+static void test_Storage(IHTMLDocument2 *doc) -+{ -+ IHTMLWindow2 *win2; -+ IHTMLWindow6 *win6; -+ HRESULT hres; -+ -+ trace("Testing HTMLStorage\n"); -+ -+ hres = IHTMLDocument2_get_parentWindow(doc, &win2); -+ ok(hres == S_OK, "get_parentWindow failed: %08x\n", hres); -+ -+ hres = IHTMLWindow2_QueryInterface(win2, &IID_IHTMLWindow6, (void**)&win6); -+ if(hres == S_OK) { -+ test_sessionStorage(win6); -+ IHTMLWindow6_Release(win6); -+ }else { -+ win_skip("IHTMLWindow6 not support: %08x\n", hres); -+ } -+ -+ IHTMLWindow2_Release(win2); -+} -+ - static void init_test(enum load_state_t ls) { - doc_unk = NULL; - doc_hwnd = last_hwnd = NULL; -@@ -7687,6 +7723,7 @@ static void test_HTMLDocument_http(BOOL with_wbapp) - nav_url = nav_serv_url = "http://test.winehq.org/tests/winehq_snapshot/"; /* for valid prev nav_url */ - if(support_wbapp) { - test_put_href(doc, FALSE, "#test", "http://test.winehq.org/tests/winehq_snapshot/#test", FALSE, TRUE, 0); -+ test_Storage(doc); - test_travellog(doc); - test_refresh(doc); - } --- -1.9.3 - diff --git a/patches/mshtml-sessionStorage/0003-mshtml-Added-IHTMLStorage-getItem-setItem-methods-im.patch b/patches/mshtml-sessionStorage/0003-mshtml-Added-IHTMLStorage-getItem-setItem-methods-im.patch deleted file mode 100644 index 4d2fafa0..00000000 --- a/patches/mshtml-sessionStorage/0003-mshtml-Added-IHTMLStorage-getItem-setItem-methods-im.patch +++ /dev/null @@ -1,189 +0,0 @@ -From 0f801caf1a0f94eb13198afda3ef1f484e1fac19 Mon Sep 17 00:00:00 2001 -From: Zhenbo Li -Date: Tue, 26 Aug 2014 23:02:38 +0800 -Subject: [PATCH 3/3] mshtml: Added IHTMLStorage:: getItem/setItem methods - implementation. -To: wine-patches@winehq.org -Reply-To: wine-devel@winehq.org -CC: litimetal@gmail.com - ---- - dlls/mshtml/htmlstorage.c | 50 ++++++++++++++++++++++++++++++--- - dlls/mshtml/tests/htmldoc.c | 67 +++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 113 insertions(+), 4 deletions(-) - -diff --git a/dlls/mshtml/htmlstorage.c b/dlls/mshtml/htmlstorage.c -index 2d391f8..b46c474 100644 ---- a/dlls/mshtml/htmlstorage.c -+++ b/dlls/mshtml/htmlstorage.c -@@ -148,15 +148,57 @@ static HRESULT WINAPI HTMLStorage_key(IHTMLStorage *iface, LONG lIndex, BSTR *p) - static HRESULT WINAPI HTMLStorage_getItem(IHTMLStorage *iface, BSTR bstrKey, VARIANT *p) - { - HTMLStorage *This = impl_from_IHTMLStorage(iface); -- FIXME("(%p)->(%s %p)\n", This, debugstr_w(bstrKey), p); -- return E_NOTIMPL; -+ nsAString key, value; -+ const PRUnichar *pval; -+ nsresult nsres; -+ -+ TRACE("(%p)->(%s %p)\n", This, debugstr_w(bstrKey), p); -+ -+ nsAString_InitDepend(&key, bstrKey); -+ nsAString_Init(&value, NULL); -+ -+ nsres = nsIDOMStorage_GetItem(This->nsstorage, &key, &value); -+ nsAString_Finish(&key); -+ if (NS_FAILED(nsres)) { -+ ERR("GetItem failed: %08x\n", nsres); -+ V_VT(p) = VT_NULL; -+ nsAString_Finish(&value); -+ return E_FAIL; -+ } -+ -+ nsAString_GetData(&value, &pval); -+ if(*pval) { -+ V_VT(p) = VT_BSTR; -+ V_BSTR(p) = SysAllocString(pval); -+ }else { -+ V_VT(p) = VT_NULL; -+ } -+ nsAString_Finish(&value); -+ -+ return S_OK; - } - - static HRESULT WINAPI HTMLStorage_setItem(IHTMLStorage *iface, BSTR bstrKey, BSTR bstrValue) - { - HTMLStorage *This = impl_from_IHTMLStorage(iface); -- FIXME("(%p)->(%s %s)\n", This, debugstr_w(bstrKey), debugstr_w(bstrValue)); -- return E_NOTIMPL; -+ nsAString key, value; -+ nsresult nsres; -+ -+ TRACE("(%p)->(%s %s)\n", This, debugstr_w(bstrKey), debugstr_w(bstrValue)); -+ -+ nsAString_InitDepend(&key, bstrKey); -+ nsAString_InitDepend(&value, bstrValue); -+ -+ nsres = nsIDOMStorage_SetItem(This->nsstorage, &key, &value); -+ nsAString_Finish(&key); -+ nsAString_Finish(&value); -+ -+ if (NS_FAILED(nsres)) { -+ ERR("SetItem failed: %08x\n", nsres); -+ return E_FAIL; -+ } -+ -+ return S_OK; - } - - static HRESULT WINAPI HTMLStorage_removeItem(IHTMLStorage *iface, BSTR bstrKey) -diff --git a/dlls/mshtml/tests/htmldoc.c b/dlls/mshtml/tests/htmldoc.c -index d79f4b5..45accdb 100644 ---- a/dlls/mshtml/tests/htmldoc.c -+++ b/dlls/mshtml/tests/htmldoc.c -@@ -262,6 +262,35 @@ static const WCHAR wszTimesNewRoman[] = - static const WCHAR wszArial[] = - {'A','r','i','a','l',0}; - -+/* Based on debugstr_variant in dlls/jscript/jsutils.c. */ -+static const char *debugstr_variant(const VARIANT *var) -+{ -+ static char buf[400]; -+ -+ if (!var) -+ return "(null)"; -+ -+ switch (V_VT(var)) -+ { -+ case VT_EMPTY: -+ return "{VT_EMPTY}"; -+ case VT_BSTR: -+ sprintf(buf, "{VT_BSTR: %s}", wine_dbgstr_w(V_BSTR(var))); -+ break; -+ case VT_BOOL: -+ sprintf(buf, "{VT_BOOL: %x}", V_BOOL(var)); -+ break; -+ case VT_UI4: -+ sprintf(buf, "{VT_UI4: %u}", V_UI4(var)); -+ break; -+ default: -+ sprintf(buf, "{vt %d}", V_VT(var)); -+ break; -+ } -+ -+ return buf; -+} -+ - static int strcmp_wa(LPCWSTR strw, const char *stra) - { - CHAR buf[512]; -@@ -979,6 +1008,7 @@ static HRESULT WINAPI PropertyNotifySink_OnChanged(IPropertyNotifySink *iface, D - case 3000030: - case 3000031: - case 3000032: -+ case 3000033: - /* TODO */ - return S_OK; - } -@@ -3272,6 +3302,7 @@ static HRESULT WINAPI EventDispatch_Invoke(IDispatch *iface, DISPID dispIdMember - case 1044: - case 1048: - case 1049: -+ case 1057: - break; /* FIXME: Handle these events. */ - default: - ok(0, "Unexpected DISPID: %d\n", dispIdMember); -@@ -7431,6 +7462,38 @@ static void test_QueryInterface(IHTMLDocument2 *htmldoc) - IUnknown_Release(qi); - } - -+#define test_storage_set(s,k,v) _test_storage_set(__LINE__,s,k,v) -+static void _test_storage_set(unsigned line, IHTMLStorage *storage, const char *key, const char *value) -+{ -+ BSTR bstrKey, bstrValue; -+ HRESULT hres; -+ -+ bstrKey = a2bstr(key); -+ bstrValue = a2bstr(value); -+ hres = IHTMLStorage_setItem(storage, bstrKey, bstrValue); -+ SysFreeString(bstrKey); -+ SysFreeString(bstrValue); -+ -+ ok_(__FILE__,line) (hres == S_OK, "setItem (\"%s\": \"%s\") failed: %08x\n", key, value, hres); -+} -+ -+#define test_storage_get(s,k,e) _test_storage_get(__LINE__,s,k,e) -+static void _test_storage_get(unsigned line, IHTMLStorage *storage, const char *key, const char *exval) -+{ -+ BSTR bstrKey; -+ VARIANT var; -+ HRESULT hres; -+ -+ bstrKey = a2bstr(key); -+ hres = IHTMLStorage_getItem(storage, bstrKey, &var); -+ -+ ok_(__FILE__,line) (hres == S_OK, "getItem (\"%s\") failed: %08x\n", key, hres); -+ ok_(__FILE__,line) (!strcmp_wa(V_BSTR(&var), exval), "expect %s, got %s\n", exval, debugstr_variant(&var)); -+ -+ SysFreeString(bstrKey); -+ VariantClear(&var); -+} -+ - static void test_sessionStorage(IHTMLWindow6 *window) - { - HRESULT hres; -@@ -7442,6 +7505,10 @@ static void test_sessionStorage(IHTMLWindow6 *window) - if(hres != S_OK || storage == NULL) - return; - -+ test_storage_set(storage, "test key", "test value"); -+ test_storage_get(storage, "test key", "test value"); -+ -+ - IHTMLStorage_Release(storage); - } - --- -1.9.3 - diff --git a/patches/mshtml-sessionStorage/definition b/patches/mshtml-sessionStorage/definition deleted file mode 100644 index 8a43c9e1..00000000 --- a/patches/mshtml-sessionStorage/definition +++ /dev/null @@ -1,2 +0,0 @@ -# Fixes: Add partially support for sessionStorage -Disabled: true diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 3efbfb55..463e3243 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -2811,6 +2811,21 @@ if test "$enable_winebuild_LinkerVersion" -eq 1; then ) >> "$patchlist" fi +# Patchset wined3d-Color_Key +# | +# | This patchset fixes the following Wine bugs: +# | * [#37748] Fix color key regression causing pink rectangles around text +# | +# | Modified files: +# | * dlls/wined3d/surface.c +# | +if test "$enable_wined3d_Color_Key" -eq 1; then + patch_apply wined3d-Color_Key/0001-wined3d-Use-proper-color-key-type-define-when-callin.patch + ( + echo '+ { "Christian Costa", "wined3d: Use proper color key type define when calling wined3d_texture_set_color_key.", 1 },'; + ) >> "$patchlist" +fi + # Patchset wined3d-CSMT_Helper # | # | Modified files: @@ -2827,21 +2842,6 @@ if test "$enable_wined3d_CSMT_Helper" -eq 1; then ) >> "$patchlist" fi -# Patchset wined3d-Color_Key -# | -# | This patchset fixes the following Wine bugs: -# | * [#37748] Fix color key regression causing pink rectangles around text -# | -# | Modified files: -# | * dlls/wined3d/surface.c -# | -if test "$enable_wined3d_Color_Key" -eq 1; then - patch_apply wined3d-Color_Key/0001-wined3d-Use-proper-color-key-type-define-when-callin.patch - ( - echo '+ { "Christian Costa", "wined3d: Use proper color key type define when calling wined3d_texture_set_color_key.", 1 },'; - ) >> "$patchlist" -fi - # Patchset wined3d-CSMT_Main # | # | This patchset fixes the following Wine bugs: