winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
November 2022
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
1 participants
1171 discussions
Start a n
N
ew thread
Gabriel Ivăncescu : mshtml: Implement `onload` prop for input elements.
by Alexandre Julliard
28 Nov '22
28 Nov '22
Module: wine Branch: master Commit: 12213e13ab3e104bcf9572502738f05d605c3722 URL:
https://gitlab.winehq.org/wine/wine/-/commit/12213e13ab3e104bcf9572502738f0…
Author: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Date: Fri Nov 25 19:10:03 2022 +0200 mshtml: Implement `onload` prop for input elements. Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> --- dlls/mshtml/htmlinput.c | 12 ++++++---- dlls/mshtml/tests/events.c | 58 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+), 4 deletions(-) diff --git a/dlls/mshtml/htmlinput.c b/dlls/mshtml/htmlinput.c index b9e527eac3b..7a3dc848f7d 100644 --- a/dlls/mshtml/htmlinput.c +++ b/dlls/mshtml/htmlinput.c @@ -719,15 +719,19 @@ static HRESULT WINAPI HTMLInputElement_get_align(IHTMLInputElement *iface, BSTR static HRESULT WINAPI HTMLInputElement_put_onload(IHTMLInputElement *iface, VARIANT v) { HTMLInputElement *This = impl_from_IHTMLInputElement(iface); - FIXME("(%p)->()\n", This); - return E_NOTIMPL; + + TRACE("(%p)->()\n", This); + + return set_node_event(&This->element.node, EVENTID_LOAD, &v); } static HRESULT WINAPI HTMLInputElement_get_onload(IHTMLInputElement *iface, VARIANT *p) { HTMLInputElement *This = impl_from_IHTMLInputElement(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + + TRACE("(%p)->(%p)\n", This, p); + + return get_node_event(&This->element.node, EVENTID_LOAD, p); } static HRESULT WINAPI HTMLInputElement_put_onerror(IHTMLInputElement *iface, VARIANT v) diff --git a/dlls/mshtml/tests/events.c b/dlls/mshtml/tests/events.c index 643993bc475..e5ad840df7f 100644 --- a/dlls/mshtml/tests/events.c +++ b/dlls/mshtml/tests/events.c @@ -83,6 +83,7 @@ DEFINE_EXPECT(iframe_onreadystatechange_complete); DEFINE_EXPECT(iframedoc_onreadystatechange); DEFINE_EXPECT(img_onload); DEFINE_EXPECT(img_onerror); +DEFINE_EXPECT(input_onload); DEFINE_EXPECT(link_onload); DEFINE_EXPECT(input_onfocus); DEFINE_EXPECT(input_onblur); @@ -146,6 +147,9 @@ static const char readystate_doc_ie9_str[] = static const char img_doc_str[] = "<html><body><img id=\"imgid\"></img></body></html>"; +static const char input_image_doc_str[] = + "<html><body><input type=\"image\" id=\"inputid\"></input></body></html>"; + static const char link_doc_str[] = "<html><body><link id=\"linkid\" rel=\"stylesheet\" type=\"text/css\"></link></body></html>"; @@ -1086,6 +1090,17 @@ static HRESULT WINAPI img_onload(IDispatchEx *iface, DISPID id, LCID lcid, WORD EVENT_HANDLER_FUNC_OBJ(img_onload); +static HRESULT WINAPI input_onload(IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, + VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller) +{ + CHECK_EXPECT(input_onload); + test_event_args(&DIID_DispHTMLInputElement, id, wFlags, pdp, pvarRes, pei, pspCaller); + test_event_src(L"INPUT"); + return S_OK; +} + +EVENT_HANDLER_FUNC_OBJ(input_onload); + static HRESULT WINAPI link_onload(IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller) { @@ -2349,6 +2364,48 @@ static void test_imgload(IHTMLDocument2 *doc) IHTMLImgElement_Release(img); } +static void test_inputload(IHTMLDocument2 *doc) +{ + IHTMLInputElement *input; + IHTMLElement *elem; + VARIANT v; + BSTR str; + HRESULT hres; + + elem = get_elem_id(doc, L"inputid"); + hres = IHTMLElement_QueryInterface(elem, &IID_IHTMLInputElement, (void**)&input); + IHTMLElement_Release(elem); + ok(hres == S_OK, "Could not get IHTMLInputElement iface: %08lx\n", hres); + + V_VT(&v) = VT_EMPTY; + hres = IHTMLInputElement_get_onload(input, &v); + ok(hres == S_OK, "get_onload failed: %08lx\n", hres); + ok(V_VT(&v) == VT_NULL, "V_VT(onload) = %d\n", V_VT(&v)); + + V_VT(&v) = VT_DISPATCH; + V_DISPATCH(&v) = (IDispatch*)&input_onload_obj; + hres = IHTMLInputElement_put_onload(input, v); + ok(hres == S_OK, "put_onload failed: %08lx\n", hres); + + V_VT(&v) = VT_EMPTY; + hres = IHTMLInputElement_get_onload(input, &v); + ok(hres == S_OK, "get_onload failed: %08lx\n", hres); + ok(V_VT(&v) == VT_DISPATCH, "V_VT(onload) = %d\n", V_VT(&v)); + ok(V_DISPATCH(&v) == (IDispatch*)&input_onload_obj, "V_DISPATCH(onload) != input_onload_obj\n"); + VariantClear(&v); + + str = SysAllocString(L"
http://test.winehq.org/tests/winehq_snapshot/index_files/winehq_logo_text.p…
"); + hres = IHTMLInputElement_put_src(input, str); + ok(hres == S_OK, "put_src failed: %08lx\n", hres); + SysFreeString(str); + + SET_EXPECT(input_onload); + pump_msgs(&called_input_onload); + CHECK_CALLED(input_onload); + + IHTMLInputElement_Release(input); +} + static void test_link_load(IHTMLDocument2 *doc) { IHTMLLinkElement *link; @@ -5776,6 +5833,7 @@ START_TEST(events) run_test(readystate_doc_str, test_onreadystatechange); run_test(readystate_doc_ie9_str, test_onreadystatechange); run_test(img_doc_str, test_imgload); + run_test(input_image_doc_str, test_inputload); run_test(link_doc_str, test_link_load); run_test(input_doc_str, test_focus); run_test(empty_doc_str, test_submit);
1
0
0
0
Gabriel Ivăncescu : mshtml: Implement location.reload().
by Alexandre Julliard
28 Nov '22
28 Nov '22
Module: wine Branch: master Commit: 2865a5f1137aa90e5ed30fa9f4d71f5ee8d7eb66 URL:
https://gitlab.winehq.org/wine/wine/-/commit/2865a5f1137aa90e5ed30fa9f4d71f…
Author: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Date: Fri Nov 25 19:10:03 2022 +0200 mshtml: Implement location.reload(). Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=53927
Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> --- dlls/mshtml/htmllocation.c | 17 +++++++++++++++-- dlls/mshtml/mshtml_private.h | 1 + dlls/mshtml/olecmd.c | 24 +++++++++++++++--------- dlls/mshtml/tests/htmldoc.c | 20 ++++++++++++++++++++ dlls/mshtml/tests/reload.js | 40 ++++++++++++++++++++++++++++++++++++++++ dlls/mshtml/tests/rsrc.rc | 3 +++ dlls/mshtml/tests/script.c | 1 + 7 files changed, 95 insertions(+), 11 deletions(-) diff --git a/dlls/mshtml/htmllocation.c b/dlls/mshtml/htmllocation.c index d0abb42f2b2..5376b3b8329 100644 --- a/dlls/mshtml/htmllocation.c +++ b/dlls/mshtml/htmllocation.c @@ -582,8 +582,21 @@ static HRESULT WINAPI HTMLLocation_get_hash(IHTMLLocation *iface, BSTR *p) static HRESULT WINAPI HTMLLocation_reload(IHTMLLocation *iface, VARIANT_BOOL flag) { HTMLLocation *This = impl_from_IHTMLLocation(iface); - FIXME("(%p)->(%x)\n", This, flag); - return E_NOTIMPL; + + TRACE("(%p)->(%x)\n", This, flag); + + if(!This->window) { + FIXME("No window available\n"); + return E_FAIL; + } + + /* reload is supposed to fail if called from a script with different origin, but IE doesn't care */ + if(!is_main_content_window(This->window->base.outer_window)) { + FIXME("Unsupported on iframe\n"); + return E_NOTIMPL; + } + + return reload_page(This->window->base.outer_window); } static HRESULT WINAPI HTMLLocation_replace(IHTMLLocation *iface, BSTR bstr) diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 804db0b1bdf..751e3ffbce5 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -1094,6 +1094,7 @@ HRESULT async_start_doc_binding(HTMLOuterWindow*,HTMLInnerWindow*) DECLSPEC_HIDD void abort_window_bindings(HTMLInnerWindow*) DECLSPEC_HIDDEN; void set_download_state(HTMLDocumentObj*,int) DECLSPEC_HIDDEN; void call_docview_84(HTMLDocumentObj*) DECLSPEC_HIDDEN; +HRESULT reload_page(HTMLOuterWindow*) DECLSPEC_HIDDEN; void set_ready_state(HTMLOuterWindow*,READYSTATE) DECLSPEC_HIDDEN; HRESULT get_readystate_string(READYSTATE,BSTR*) DECLSPEC_HIDDEN; diff --git a/dlls/mshtml/olecmd.c b/dlls/mshtml/olecmd.c index 40c36bceb0a..ac5a22ef16a 100644 --- a/dlls/mshtml/olecmd.c +++ b/dlls/mshtml/olecmd.c @@ -449,10 +449,23 @@ static void refresh_destr(task_t *_task) free(task); } +HRESULT reload_page(HTMLOuterWindow *window) +{ + refresh_task_t *task; + + task = malloc(sizeof(*task)); + if(!task) + return E_OUTOFMEMORY; + + IHTMLWindow2_AddRef(&window->base.IHTMLWindow2_iface); + task->window = window; + + return push_task(&task->header, refresh_proc, refresh_destr, window->task_magic); +} + static HRESULT exec_refresh(HTMLDocumentNode *doc, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut) { HTMLDocumentObj *doc_obj; - refresh_task_t *task; HRESULT hres; TRACE("(%p)->(%ld %s %p)\n", doc, nCmdexecopt, debugstr_variant(pvaIn), pvaOut); @@ -478,14 +491,7 @@ static HRESULT exec_refresh(HTMLDocumentNode *doc, DWORD nCmdexecopt, VARIANT *p if(!doc->outer_window) return E_UNEXPECTED; - task = malloc(sizeof(*task)); - if(!task) - return E_OUTOFMEMORY; - - IHTMLWindow2_AddRef(&doc->outer_window->base.IHTMLWindow2_iface); - task->window = doc->outer_window; - - return push_task(&task->header, refresh_proc, refresh_destr, doc->outer_window->task_magic); + return reload_page(doc->outer_window); } static HRESULT exec_stop(HTMLDocumentNode *doc, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut) diff --git a/dlls/mshtml/tests/htmldoc.c b/dlls/mshtml/tests/htmldoc.c index b496d562fb1..a4a2207d4d2 100644 --- a/dlls/mshtml/tests/htmldoc.c +++ b/dlls/mshtml/tests/htmldoc.c @@ -1142,6 +1142,7 @@ static HRESULT WINAPI PropertyNotifySink_OnChanged(IPropertyNotifySink *iface, D case 3000030: case 3000031: case 3000032: + case 3000033: /* TODO */ return S_OK; } @@ -6399,6 +6400,24 @@ static void test_refresh(IHTMLDocument2 *doc) test_download(DWL_VERBDONE|DWL_HTTP|DWL_ONREADY_LOADING|DWL_REFRESH|DWL_EX_GETHOSTINFO); } +static void test_reload(IHTMLDocument2 *doc) +{ + IHTMLLocation *location; + HRESULT hres; + + trace("Reload...\n"); + + location = NULL; + hres = IHTMLDocument2_get_location(doc, &location); + ok(hres == S_OK, "get_location failed: %08lx\n", hres); + ok(location != NULL, "location == NULL\n"); + + hres = IHTMLLocation_reload(location, VARIANT_FALSE); + IHTMLLocation_Release(location); + + test_download(DWL_VERBDONE|DWL_HTTP|DWL_ONREADY_LOADING|DWL_REFRESH|DWL_EX_GETHOSTINFO); +} + static void test_open_window(IHTMLDocument2 *doc, BOOL do_block) { IHTMLWindow2 *window, *new_window; @@ -8216,6 +8235,7 @@ static void test_HTMLDocument_http(BOOL with_wbapp) test_put_href(doc, FALSE, L"#test", L"
http://test.winehq.org/tests/winehq_snapshot/#test
", FALSE, TRUE, 0); test_travellog(doc); test_refresh(doc); + test_reload(doc); } test_put_href(doc, FALSE, NULL, L"javascript:external%20&&undefined", TRUE, FALSE, 0); test_put_href(doc, FALSE, NULL, L"about:blank", FALSE, FALSE, support_wbapp ? DWL_EXPECT_HISTUPDATE : 0); diff --git a/dlls/mshtml/tests/reload.js b/dlls/mshtml/tests/reload.js new file mode 100644 index 00000000000..04bdf9fcb90 --- /dev/null +++ b/dlls/mshtml/tests/reload.js @@ -0,0 +1,40 @@ +/* + * Copyright 2022 Gabriel Ivăncescu for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +var tests = []; + +async_test("reload", function() { + if(sessionStorage.getItem("skip reload test")) { + next_test(); + return; + } + + var script = document.createElement("script"); + script.src ="
http://winetest.different.org/jsstream.php?reload
"; + document.getElementsByTagName("head")[0].appendChild(script); + + external.writeStream("reload", + ' try {' + + ' window.location.reload();' + + ' sessionStorage.setItem("skip reload test", true);' + + ' }catch(e) {' + + ' ok(false, "reload with different origin threw " + e.number);' + + ' }' + + ' next_test()' + ); +}); diff --git a/dlls/mshtml/tests/rsrc.rc b/dlls/mshtml/tests/rsrc.rc index e60e37198de..10b92ab78cb 100644 --- a/dlls/mshtml/tests/rsrc.rc +++ b/dlls/mshtml/tests/rsrc.rc @@ -64,6 +64,9 @@ events.js HTML "events.js" /* @makedep: documentmode.js */ documentmode.js HTML "documentmode.js" +/* @makedep: reload.js */ +reload.js HTML "reload.js" + /* @makedep: blank.html */ blank.html HTML "blank.html" diff --git a/dlls/mshtml/tests/script.c b/dlls/mshtml/tests/script.c index d7d7e7361c3..b27b68b5bd1 100644 --- a/dlls/mshtml/tests/script.c +++ b/dlls/mshtml/tests/script.c @@ -4088,6 +4088,7 @@ static void run_js_tests(void) run_script_as_http_with_mode("documentmode.js", "11", "edge;123"); run_script_as_http_with_mode("asyncscriptload.js", NULL, "9"); + run_script_as_http_with_mode("reload.js", NULL, "11"); } static BOOL init_registry(BOOL init)
1
0
0
0
Gabriel Ivăncescu : mshtml: Implement print events.
by Alexandre Julliard
28 Nov '22
28 Nov '22
Module: wine Branch: master Commit: 0e71100e56165b0ebbd7bc1ed3bc3832aec13985 URL:
https://gitlab.winehq.org/wine/wine/-/commit/0e71100e56165b0ebbd7bc1ed3bc38…
Author: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Date: Fri Nov 25 19:10:03 2022 +0200 mshtml: Implement print events. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=53927
Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> --- dlls/mshtml/htmlevent.c | 4 ++++ dlls/mshtml/htmlevent.h | 2 ++ dlls/mshtml/htmlwindow.c | 16 ++++++++-------- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/dlls/mshtml/htmlevent.c b/dlls/mshtml/htmlevent.c index 3b6d7a43999..45db4719b10 100644 --- a/dlls/mshtml/htmlevent.c +++ b/dlls/mshtml/htmlevent.c @@ -120,12 +120,16 @@ static const event_info_t event_info[] = { EVENT_BUBBLES | EVENT_CANCELABLE}, {L"abort", EVENT_TYPE_EVENT, DISPID_EVMETH_ONABORT, EVENT_BIND_TO_TARGET}, + {L"afterprint", EVENT_TYPE_EVENT, DISPID_EVMETH_ONAFTERPRINT, + EVENT_DEFAULTLISTENER}, {L"animationend", EVENT_TYPE_EVENT, DISPID_EVPROP_ONANIMATIONEND, EVENT_DEFAULTLISTENER | EVENT_BUBBLES}, {L"animationstart", EVENT_TYPE_EVENT, DISPID_EVPROP_ONANIMATIONSTART, EVENT_DEFAULTLISTENER | EVENT_BUBBLES}, {L"beforeactivate", EVENT_TYPE_EVENT, DISPID_EVMETH_ONBEFOREACTIVATE, EVENT_FIXME | EVENT_BUBBLES | EVENT_CANCELABLE}, + {L"beforeprint", EVENT_TYPE_EVENT, DISPID_EVMETH_ONBEFOREPRINT, + EVENT_DEFAULTLISTENER}, {L"beforeunload", EVENT_TYPE_EVENT, DISPID_EVMETH_ONBEFOREUNLOAD, EVENT_DEFAULTLISTENER | EVENT_CANCELABLE }, {L"blur", EVENT_TYPE_FOCUS, DISPID_EVMETH_ONBLUR, diff --git a/dlls/mshtml/htmlevent.h b/dlls/mshtml/htmlevent.h index a6d1f734a40..104cb8554d2 100644 --- a/dlls/mshtml/htmlevent.h +++ b/dlls/mshtml/htmlevent.h @@ -19,9 +19,11 @@ typedef enum { EVENTID_DOMCONTENTLOADED, EVENTID_ABORT, + EVENTID_AFTERPRINT, EVENTID_ANIMATIONEND, EVENTID_ANIMATIONSTART, EVENTID_BEFOREACTIVATE, + EVENTID_BEFOREPRINT, EVENTID_BEFOREUNLOAD, EVENTID_BLUR, EVENTID_CHANGE, diff --git a/dlls/mshtml/htmlwindow.c b/dlls/mshtml/htmlwindow.c index 044d3bc8371..bc3908b8d4c 100644 --- a/dlls/mshtml/htmlwindow.c +++ b/dlls/mshtml/htmlwindow.c @@ -1806,29 +1806,29 @@ static HRESULT WINAPI HTMLWindow3_print(IHTMLWindow3 *iface) static HRESULT WINAPI HTMLWindow3_put_onbeforeprint(IHTMLWindow3 *iface, VARIANT v) { HTMLWindow *This = impl_from_IHTMLWindow3(iface); - FIXME("(%p)->(%s)\n", This, debugstr_variant(&v)); - return E_NOTIMPL; + TRACE("(%p)->(%s)\n", This, debugstr_variant(&v)); + return set_window_event(This, EVENTID_BEFOREPRINT, &v); } static HRESULT WINAPI HTMLWindow3_get_onbeforeprint(IHTMLWindow3 *iface, VARIANT *p) { HTMLWindow *This = impl_from_IHTMLWindow3(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + TRACE("(%p)->(%p)\n", This, p); + return get_window_event(This, EVENTID_BEFOREPRINT, p); } static HRESULT WINAPI HTMLWindow3_put_onafterprint(IHTMLWindow3 *iface, VARIANT v) { HTMLWindow *This = impl_from_IHTMLWindow3(iface); - FIXME("(%p)->(%s)\n", This, debugstr_variant(&v)); - return E_NOTIMPL; + TRACE("(%p)->(%s)\n", This, debugstr_variant(&v)); + return set_window_event(This, EVENTID_AFTERPRINT, &v); } static HRESULT WINAPI HTMLWindow3_get_onafterprint(IHTMLWindow3 *iface, VARIANT *p) { HTMLWindow *This = impl_from_IHTMLWindow3(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + TRACE("(%p)->(%p)\n", This, p); + return get_window_event(This, EVENTID_AFTERPRINT, p); } static HRESULT WINAPI HTMLWindow3_get_clipboardData(IHTMLWindow3 *iface, IHTMLDataTransfer **p)
1
0
0
0
Zhiyi Zhang : winex11.drv: Support _KDE_NET_WM_STATE_SKIP_SWITCHER.
by Alexandre Julliard
28 Nov '22
28 Nov '22
Module: wine Branch: master Commit: 5c64b505c2f27d6839dce56c038d445b905161db URL:
https://gitlab.winehq.org/wine/wine/-/commit/5c64b505c2f27d6839dce56c038d44…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Sun Nov 20 22:52:40 2022 +0800 winex11.drv: Support _KDE_NET_WM_STATE_SKIP_SWITCHER. KWin has a switcher that triggered by Alt+Tab that basically acts like a pager. And hiding items in the switcher is controlled by _KDE_NET_WM_STATE_SKIP_SWITCHER. --- dlls/winex11.drv/window.c | 3 ++- dlls/winex11.drv/x11drv.h | 2 ++ dlls/winex11.drv/x11drv_main.c | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index 6b082ecdbec..603314ff3bb 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -80,6 +80,7 @@ WINE_DECLARE_DEBUG_CHANNEL(systray); static const unsigned int net_wm_state_atoms[NB_NET_WM_STATES] = { + XATOM__KDE_NET_WM_STATE_SKIP_SWITCHER, XATOM__NET_WM_STATE_FULLSCREEN, XATOM__NET_WM_STATE_ABOVE, XATOM__NET_WM_STATE_MAXIMIZED_VERT, @@ -1040,7 +1041,7 @@ void update_net_wm_states( struct x11drv_win_data *data ) { if (data->skip_taskbar || (ex_style & WS_EX_NOACTIVATE) || (ex_style & WS_EX_TOOLWINDOW && !(ex_style & WS_EX_APPWINDOW))) - new_state |= (1 << NET_WM_STATE_SKIP_TASKBAR) | (1 << NET_WM_STATE_SKIP_PAGER); + new_state |= (1 << NET_WM_STATE_SKIP_TASKBAR) | (1 << NET_WM_STATE_SKIP_PAGER) | (1 << KDE_NET_WM_STATE_SKIP_SWITCHER); else if (!(ex_style & WS_EX_APPWINDOW) && NtUserGetWindowRelative( data->hwnd, GW_OWNER )) new_state |= (1 << NET_WM_STATE_SKIP_TASKBAR); } diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index 47a29c8eb98..b394795a326 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -482,6 +482,7 @@ enum x11drv_atoms XATOM_DndProtocol, XATOM_DndSelection, XATOM__ICC_PROFILE, + XATOM__KDE_NET_WM_STATE_SKIP_SWITCHER, XATOM__MOTIF_WM_HINTS, XATOM__NET_STARTUP_INFO_BEGIN, XATOM__NET_STARTUP_INFO, @@ -594,6 +595,7 @@ enum x11drv_window_messages /* _NET_WM_STATE properties that we keep track of */ enum x11drv_net_wm_state { + KDE_NET_WM_STATE_SKIP_SWITCHER, NET_WM_STATE_FULLSCREEN, NET_WM_STATE_ABOVE, NET_WM_STATE_MAXIMIZED, diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c index 561f25783b6..797e4f92d38 100644 --- a/dlls/winex11.drv/x11drv_main.c +++ b/dlls/winex11.drv/x11drv_main.c @@ -155,6 +155,7 @@ static const char * const atom_names[NB_XATOMS - FIRST_XATOM] = "DndProtocol", "DndSelection", "_ICC_PROFILE", + "_KDE_NET_WM_STATE_SKIP_SWITCHER", "_MOTIF_WM_HINTS", "_NET_STARTUP_INFO_BEGIN", "_NET_STARTUP_INFO",
1
0
0
0
Alexandre Julliard : wpcap: Use the Unix call helpers.
by Alexandre Julliard
28 Nov '22
28 Nov '22
Module: wine Branch: master Commit: 7eb08bd230fc624d35005f16a0fefc59b01083a0 URL:
https://gitlab.winehq.org/wine/wine/-/commit/7eb08bd230fc624d35005f16a0fefc…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Nov 28 11:41:57 2022 +0100 wpcap: Use the Unix call helpers. --- dlls/wpcap/wpcap.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/dlls/wpcap/wpcap.c b/dlls/wpcap/wpcap.c index df35954bfa7..c93c8540145 100644 --- a/dlls/wpcap/wpcap.c +++ b/dlls/wpcap/wpcap.c @@ -33,9 +33,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(wpcap); -static unixlib_handle_t pcap_handle; - -#define PCAP_CALL( func, params ) __wine_unix_call( pcap_handle, unix_ ## func, params ) +#define PCAP_CALL( func, params ) WINE_UNIX_CALL( unix_ ## func, params ) int CDECL pcap_activate( struct pcap *pcap ) { @@ -830,8 +828,7 @@ BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, void *reserved ) { case DLL_PROCESS_ATTACH: DisableThreadLibraryCalls( hinst ); - if (NtQueryVirtualMemory( GetCurrentProcess(), hinst, MemoryWineUnixFuncs, - &pcap_handle, sizeof(pcap_handle), NULL )) + if (__wine_init_unix_call()) ERR( "No pcap support, expect problems\n" ); break; case DLL_PROCESS_DETACH:
1
0
0
0
Alexandre Julliard : winspool.drv: Use the Unix call helpers.
by Alexandre Julliard
28 Nov '22
28 Nov '22
Module: wine Branch: master Commit: c37f91c78b467c366c0babb747e8655a14cd4d63 URL:
https://gitlab.winehq.org/wine/wine/-/commit/c37f91c78b467c366c0babb747e865…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Nov 28 11:41:44 2022 +0100 winspool.drv: Use the Unix call helpers. --- dlls/winspool.drv/wspool.c | 4 +--- dlls/winspool.drv/wspool.h | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/dlls/winspool.drv/wspool.c b/dlls/winspool.drv/wspool.c index ff0e4418719..1454cd18e2c 100644 --- a/dlls/winspool.drv/wspool.c +++ b/dlls/winspool.drv/wspool.c @@ -48,7 +48,6 @@ static CRITICAL_SECTION backend_cs = { &backend_cs_debug, -1, 0, 0, 0, 0 }; /* ############################### */ HINSTANCE WINSPOOL_hInstance = NULL; -unixlib_handle_t winspool_handle = 0; static HMODULE hlocalspl; static BOOL (WINAPI *pInitializePrintProvidor)(LPPRINTPROVIDOR, DWORD, LPWSTR); @@ -115,8 +114,7 @@ BOOL WINAPI DllMain( HINSTANCE instance, DWORD reason, void *reserved ) case DLL_PROCESS_ATTACH: WINSPOOL_hInstance = instance; DisableThreadLibraryCalls( instance ); - if (!NtQueryVirtualMemory( GetCurrentProcess(), instance, MemoryWineUnixFuncs, - &winspool_handle, sizeof(winspool_handle), NULL )) + if (!__wine_init_unix_call()) UNIX_CALL( process_attach, NULL ); WINSPOOL_LoadSystemPrinters(); break; diff --git a/dlls/winspool.drv/wspool.h b/dlls/winspool.drv/wspool.h index a464e2aaf12..63b8ccae466 100644 --- a/dlls/winspool.drv/wspool.h +++ b/dlls/winspool.drv/wspool.h @@ -72,9 +72,7 @@ struct schedule_job_params const WCHAR *wine_port; }; -extern unixlib_handle_t winspool_handle DECLSPEC_HIDDEN; - -#define UNIX_CALL( func, params ) __wine_unix_call( winspool_handle, unix_ ## func, params ) +#define UNIX_CALL( func, params ) WINE_UNIX_CALL( unix_ ## func, params ) enum cups_funcs {
1
0
0
0
Alexandre Julliard : sane.ds: Use the Unix call helpers.
by Alexandre Julliard
28 Nov '22
28 Nov '22
Module: wine Branch: master Commit: 3e5bf70341b8b155fe96b55490fef94d1bd7b073 URL:
https://gitlab.winehq.org/wine/wine/-/commit/3e5bf70341b8b155fe96b55490fef9…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Nov 28 11:41:28 2022 +0100 sane.ds: Use the Unix call helpers. --- dlls/sane.ds/sane_main.c | 4 +--- dlls/sane.ds/unixlib.h | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/dlls/sane.ds/sane_main.c b/dlls/sane.ds/sane_main.c index 832c333ae57..8f07ce6d52a 100644 --- a/dlls/sane.ds/sane_main.c +++ b/dlls/sane.ds/sane_main.c @@ -30,7 +30,6 @@ struct tagActiveDS activeDS; DSMENTRYPROC SANE_dsmentry; HINSTANCE SANE_instance; -unixlib_handle_t sane_handle = 0; BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { @@ -41,8 +40,7 @@ BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) case DLL_PROCESS_ATTACH: { SANE_instance = hinstDLL; DisableThreadLibraryCalls(hinstDLL); - if (NtQueryVirtualMemory( GetCurrentProcess(), hinstDLL, MemoryWineUnixFuncs, - &sane_handle, sizeof(sane_handle), NULL )) return FALSE; + if (__wine_init_unix_call()) return FALSE; SANE_CALL( process_attach, NULL ); break; } diff --git a/dlls/sane.ds/unixlib.h b/dlls/sane.ds/unixlib.h index 6e38936ae90..d3ffbf1878d 100644 --- a/dlls/sane.ds/unixlib.h +++ b/dlls/sane.ds/unixlib.h @@ -97,6 +97,4 @@ enum sane_funcs unix_option_find_descriptor, }; -extern unixlib_handle_t sane_handle DECLSPEC_HIDDEN; - -#define SANE_CALL( func, params ) __wine_unix_call( sane_handle, unix_ ## func, params ) +#define SANE_CALL( func, params ) WINE_UNIX_CALL( unix_ ## func, params )
1
0
0
0
Alexandre Julliard : qcap: Use the Unix call helpers.
by Alexandre Julliard
28 Nov '22
28 Nov '22
Module: wine Branch: master Commit: 15e044905b95040d46510bb27317a620aa8e90d6 URL:
https://gitlab.winehq.org/wine/wine/-/commit/15e044905b95040d46510bb27317a6…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Nov 28 11:41:13 2022 +0100 qcap: Use the Unix call helpers. --- dlls/qcap/qcap_main.c | 12 ------------ dlls/qcap/qcap_private.h | 2 -- dlls/qcap/vfwcapture.c | 9 +++------ 3 files changed, 3 insertions(+), 20 deletions(-) diff --git a/dlls/qcap/qcap_main.c b/dlls/qcap/qcap_main.c index 3a8c89fe077..cd4a6ebc0ab 100644 --- a/dlls/qcap/qcap_main.c +++ b/dlls/qcap/qcap_main.c @@ -27,8 +27,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(quartz); -HINSTANCE qcap_instance; - struct class_factory { IClassFactory IClassFactory_iface; @@ -109,16 +107,6 @@ static struct class_factory file_writer_cf = {{&class_factory_vtbl}, file_writer static struct class_factory smart_tee_cf = {{&class_factory_vtbl}, smart_tee_create}; static struct class_factory vfw_capture_cf = {{&class_factory_vtbl}, vfw_capture_create}; -BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved) -{ - if (reason == DLL_PROCESS_ATTACH) - { - qcap_instance = instance; - DisableThreadLibraryCalls(instance); - } - return TRUE; -} - HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID iid, void **out) { struct class_factory *factory; diff --git a/dlls/qcap/qcap_private.h b/dlls/qcap/qcap_private.h index e22815ff5cf..140e56539b5 100644 --- a/dlls/qcap/qcap_private.h +++ b/dlls/qcap/qcap_private.h @@ -30,8 +30,6 @@ #include "wine/debug.h" #include "wine/strmbase.h" -extern HINSTANCE qcap_instance DECLSPEC_HIDDEN; - HRESULT audio_record_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN; HRESULT avi_compressor_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN; HRESULT avi_mux_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN; diff --git a/dlls/qcap/vfwcapture.c b/dlls/qcap/vfwcapture.c index d842117e9a5..a51b39c0a11 100644 --- a/dlls/qcap/vfwcapture.c +++ b/dlls/qcap/vfwcapture.c @@ -23,9 +23,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(quartz); -static unixlib_handle_t v4l_handle; - -#define V4L_CALL( func, params ) __wine_unix_call( v4l_handle, unix_ ## func, params ) +#define V4L_CALL( func, params ) WINE_UNIX_CALL( unix_ ## func, params ) struct vfw_capture { @@ -876,8 +874,7 @@ static const IAMVideoControlVtbl IAMVideoControl_VTable = static BOOL WINAPI load_capture_funcs(INIT_ONCE *once, void *param, void **context) { - NtQueryVirtualMemory( GetCurrentProcess(), qcap_instance, MemoryWineUnixFuncs, - &v4l_handle, sizeof(v4l_handle), NULL ); + __wine_init_unix_call(); return TRUE; } @@ -887,7 +884,7 @@ HRESULT vfw_capture_create(IUnknown *outer, IUnknown **out) { struct vfw_capture *object; - if (!InitOnceExecuteOnce(&init_once, load_capture_funcs, NULL, NULL) || !v4l_handle) + if (!InitOnceExecuteOnce(&init_once, load_capture_funcs, NULL, NULL) || !__wine_unixlib_handle) return E_FAIL; if (!(object = calloc(1, sizeof(*object))))
1
0
0
0
Alexandre Julliard : netapi32: Use the Unix call helpers.
by Alexandre Julliard
28 Nov '22
28 Nov '22
Module: wine Branch: master Commit: c46d25b1356623424f0c48d82106d2f16ae70a64 URL:
https://gitlab.winehq.org/wine/wine/-/commit/c46d25b1356623424f0c48d82106d2…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Nov 28 11:40:53 2022 +0100 netapi32: Use the Unix call helpers. --- dlls/netapi32/netapi32.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/dlls/netapi32/netapi32.c b/dlls/netapi32/netapi32.c index e1c465c2243..d9694cc38e3 100644 --- a/dlls/netapi32/netapi32.c +++ b/dlls/netapi32/netapi32.c @@ -55,9 +55,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(netapi32); DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0); -static unixlib_handle_t samba_handle; - -#define SAMBA_CALL(func, args) __wine_unix_call( samba_handle, unix_ ## func, args ) +#define SAMBA_CALL(func, args) WINE_UNIX_CALL( unix_ ## func, args ) static INIT_ONCE init_once = INIT_ONCE_STATIC_INIT; @@ -69,7 +67,7 @@ static BOOL WINAPI load_samba( INIT_ONCE *once, void *param, void **context ) static BOOL samba_init(void) { - return samba_handle && InitOnceExecuteOnce( &init_once, load_samba, NULL, NULL ); + return __wine_unixlib_handle && InitOnceExecuteOnce( &init_once, load_samba, NULL, NULL ); } /************************************************************ @@ -96,8 +94,7 @@ BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) switch (fdwReason) { case DLL_PROCESS_ATTACH: - NtQueryVirtualMemory( GetCurrentProcess(), hinstDLL, MemoryWineUnixFuncs, - &samba_handle, sizeof(samba_handle), NULL ); + __wine_init_unix_call(); DisableThreadLibraryCalls(hinstDLL); NetBIOSInit(); NetBTInit();
1
0
0
0
Alexandre Julliard : msv1_0: Use the Unix call helpers.
by Alexandre Julliard
28 Nov '22
28 Nov '22
Module: wine Branch: master Commit: 6674e6d713634a8ccf5d622381ca3a43aa375ae1 URL:
https://gitlab.winehq.org/wine/wine/-/commit/6674e6d713634a8ccf5d622381ca3a…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Nov 28 11:40:36 2022 +0100 msv1_0: Use the Unix call helpers. --- dlls/msv1_0/main.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/dlls/msv1_0/main.c b/dlls/msv1_0/main.c index 8785754cd51..d416da13465 100644 --- a/dlls/msv1_0/main.c +++ b/dlls/msv1_0/main.c @@ -43,30 +43,28 @@ WINE_DEFAULT_DEBUG_CHANNEL(ntlm); static ULONG ntlm_package_id; static LSA_DISPATCH_TABLE lsa_dispatch; -static unixlib_handle_t ntlm_handle; - static NTSTATUS ntlm_check_version(void) { - return __wine_unix_call( ntlm_handle, unix_check_version, NULL ); + return WINE_UNIX_CALL( unix_check_version, NULL ); } static void ntlm_cleanup( struct ntlm_ctx *ctx ) { - __wine_unix_call( ntlm_handle, unix_cleanup, ctx ); + WINE_UNIX_CALL( unix_cleanup, ctx ); } static NTSTATUS ntlm_chat( struct ntlm_ctx *ctx, char *buf, unsigned int buflen, unsigned int *retlen ) { struct chat_params params = { ctx, buf, buflen, retlen }; - return __wine_unix_call( ntlm_handle, unix_chat, ¶ms ); + return WINE_UNIX_CALL( unix_chat, ¶ms ); } static NTSTATUS ntlm_fork( struct ntlm_ctx *ctx, char **argv ) { struct fork_params params = { ctx, argv }; - return __wine_unix_call( ntlm_handle, unix_fork, ¶ms ); + return WINE_UNIX_CALL( unix_fork, ¶ms ); } #define NTLM_CAPS \ @@ -1608,8 +1606,7 @@ BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, void *reserved ) switch (reason) { case DLL_PROCESS_ATTACH: - if (NtQueryVirtualMemory( GetCurrentProcess(), hinst, MemoryWineUnixFuncs, - &ntlm_handle, sizeof(ntlm_handle), NULL )) + if (__wine_init_unix_call()) return FALSE; DisableThreadLibraryCalls( hinst ); break;
1
0
0
0
← Newer
1
...
12
13
14
15
16
17
18
...
118
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
Results per page:
10
25
50
100
200