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
April 2021
----- 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
2 participants
865 discussions
Start a n
N
ew thread
Jacek Caban : mshtml: Reimplement IHTMLElement3::disabled property on top of Gecko attributes.
by Alexandre Julliard
23 Apr '21
23 Apr '21
Module: wine Branch: master Commit: 7eb05c759049ae71a8002e03381d16445acc7c4c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7eb05c759049ae71a8002e03…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Apr 23 19:40:08 2021 +0200 mshtml: Reimplement IHTMLElement3::disabled property on top of Gecko attributes. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mshtml/htmlelem.c | 45 +++++++++++++++++++-------------------------- dlls/mshtml/tests/dom.js | 28 ++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 26 deletions(-) diff --git a/dlls/mshtml/htmlelem.c b/dlls/mshtml/htmlelem.c index ea6f7cd64c6..011a06298c2 100644 --- a/dlls/mshtml/htmlelem.c +++ b/dlls/mshtml/htmlelem.c @@ -218,6 +218,22 @@ static VARIANT_BOOL element_has_attribute(HTMLElement *element, const WCHAR *nam return variant_bool(NS_SUCCEEDED(nsres) && r); } +static HRESULT element_remove_attribute(HTMLElement *element, const WCHAR *name) +{ + nsAString name_str; + nsresult nsres; + + if(!element->dom_element) { + WARN("no DOM element\n"); + return S_OK; + } + + nsAString_InitDepend(&name_str, name); + nsres = nsIDOMElement_RemoveAttribute(element->dom_element, &name_str); + nsAString_Finish(&name_str); + return map_nsresult(nsres); +} + HRESULT get_readystate_string(READYSTATE readystate, BSTR *p) { static const LPCWSTR readystate_strs[] = { @@ -3775,49 +3791,26 @@ static HRESULT WINAPI HTMLElement3_get_hideFocus(IHTMLElement3 *iface, VARIANT_B static HRESULT WINAPI HTMLElement3_put_disabled(IHTMLElement3 *iface, VARIANT_BOOL v) { HTMLElement *This = impl_from_IHTMLElement3(iface); - VARIANT *var; - HRESULT hres; TRACE("(%p)->(%x)\n", This, v); if(This->node.vtbl->put_disabled) return This->node.vtbl->put_disabled(&This->node, v); - hres = dispex_get_dprop_ref(&This->node.event_target.dispex, L"disabled", TRUE, &var); - if(FAILED(hres)) - return hres; - - VariantClear(var); - V_VT(var) = VT_BOOL; - V_BOOL(var) = v; - return S_OK; + if(!v) return element_remove_attribute(This, L"disabled"); + return elem_string_attr_setter(This, L"disabled", L""); } static HRESULT WINAPI HTMLElement3_get_disabled(IHTMLElement3 *iface, VARIANT_BOOL *p) { HTMLElement *This = impl_from_IHTMLElement3(iface); - VARIANT *var; - HRESULT hres; TRACE("(%p)->(%p)\n", This, p); if(This->node.vtbl->get_disabled) return This->node.vtbl->get_disabled(&This->node, p); - hres = dispex_get_dprop_ref(&This->node.event_target.dispex, L"disabled", FALSE, &var); - if(hres == DISP_E_UNKNOWNNAME) { - *p = VARIANT_FALSE; - return S_OK; - } - if(FAILED(hres)) - return hres; - - if(V_VT(var) != VT_BOOL) { - FIXME("value is %s\n", debugstr_variant(var)); - return E_NOTIMPL; - } - - *p = V_BOOL(var); + *p = variant_bool(element_has_attribute(This, L"disabled")); return S_OK; } diff --git a/dlls/mshtml/tests/dom.js b/dlls/mshtml/tests/dom.js index 9edaf9befbc..6a84dd3a032 100644 --- a/dlls/mshtml/tests/dom.js +++ b/dlls/mshtml/tests/dom.js @@ -469,6 +469,34 @@ sync_test("title", function() { ok(elem.getAttribute("title") === "test", "title attribute = " + elem.getAttribute("title")); }); +sync_test("disabled", function() { + var elem = document.createElement("div"); + document.body.appendChild(elem); + ok(elem.disabled === false, "div.disabled = " + elem.disabled); + todo_wine. + ok(elem.getAttribute("disabled") === null, "disabled attribute = " + elem.getAttribute("disabled") + " expected null"); + + elem.disabled = true; + ok(elem.disabled === true, "div.disabled = " + elem.disabled); + todo_wine. + ok(elem.getAttribute("disabled") === "", "disabled attribute = " + elem.getAttribute("disabled") + " expected \"\""); + + elem.disabled = false; + ok(elem.disabled === false, "div.disabled = " + elem.disabled); + todo_wine. + ok(elem.getAttribute("disabled") === null, "disabled attribute = " + elem.getAttribute("disabled") + " expected null"); + + elem.setAttribute("disabled", "false"); + ok(elem.disabled === true, "div.disabled = " + elem.disabled); + todo_wine. + ok(elem.getAttribute("disabled") === "false", "disabled attribute = " + elem.getAttribute("disabled")); + + elem.removeAttribute("disabled"); + ok(elem.disabled === false, "div.disabled = " + elem.disabled); + todo_wine. + ok(elem.getAttribute("disabled") === null, "disabled attribute = " + elem.getAttribute("disabled") + " expected null"); +}); + sync_test("hasAttribute", function() { document.body.innerHTML = '<div attr="test"></div>'; var elem = document.body.firstChild, r;
1
0
0
0
Jacek Caban : mshtml: Add IHTMLElement6::hasAttribute implementation.
by Alexandre Julliard
23 Apr '21
23 Apr '21
Module: wine Branch: master Commit: 696e8faaa914e2de645de8e9c79e025471f9f62a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=696e8faaa914e2de645de8e9…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Apr 23 19:40:03 2021 +0200 mshtml: Add IHTMLElement6::hasAttribute implementation. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mshtml/htmlelem.c | 25 ++++++++++++++++++++++--- dlls/mshtml/tests/dom.js | 20 ++++++++++++++++++++ 2 files changed, 42 insertions(+), 3 deletions(-) diff --git a/dlls/mshtml/htmlelem.c b/dlls/mshtml/htmlelem.c index b71d7ed3fa5..ea6f7cd64c6 100644 --- a/dlls/mshtml/htmlelem.c +++ b/dlls/mshtml/htmlelem.c @@ -202,6 +202,22 @@ HRESULT elem_string_attr_setter(HTMLElement *elem, const WCHAR *name, const WCHA return S_OK; } +static VARIANT_BOOL element_has_attribute(HTMLElement *element, const WCHAR *name) +{ + nsAString name_str; + cpp_bool r; + nsresult nsres; + + if(!element->dom_element) { + WARN("no DOM element\n"); + return VARIANT_FALSE; + } + + nsAString_InitDepend(&name_str, name); + nsres = nsIDOMElement_HasAttribute(element->dom_element, &name_str, &r); + return variant_bool(NS_SUCCEEDED(nsres) && r); +} + HRESULT get_readystate_string(READYSTATE readystate, BSTR *p) { static const LPCWSTR readystate_strs[] = { @@ -4453,11 +4469,14 @@ static HRESULT WINAPI HTMLElement6_removeAttributeNode(IHTMLElement6 *iface, IHT return E_NOTIMPL; } -static HRESULT WINAPI HTMLElement6_hasAttribute(IHTMLElement6 *iface, BSTR name, VARIANT_BOOL *pfHasAttribute) +static HRESULT WINAPI HTMLElement6_hasAttribute(IHTMLElement6 *iface, BSTR name, VARIANT_BOOL *p) { HTMLElement *This = impl_from_IHTMLElement6(iface); - FIXME("(%p)->(%s %p)\n", This, debugstr_w(name), pfHasAttribute); - return E_NOTIMPL; + + TRACE("(%p)->(%s %p)\n", This, debugstr_w(name), p); + + *p = element_has_attribute(This, name); + return S_OK; } static HRESULT WINAPI HTMLElement6_getElementsByTagNameNS(IHTMLElement6 *iface, VARIANT *varNS, BSTR bstrLocalName, IHTMLElementCollection **pelColl) diff --git a/dlls/mshtml/tests/dom.js b/dlls/mshtml/tests/dom.js index f9d0873bb89..9edaf9befbc 100644 --- a/dlls/mshtml/tests/dom.js +++ b/dlls/mshtml/tests/dom.js @@ -468,3 +468,23 @@ sync_test("title", function() { ok(elem.title === "test", "div.title = " + elem.title); ok(elem.getAttribute("title") === "test", "title attribute = " + elem.getAttribute("title")); }); + +sync_test("hasAttribute", function() { + document.body.innerHTML = '<div attr="test"></div>'; + var elem = document.body.firstChild, r; + + r = elem.hasAttribute("attr"); + ok(r === true, "hasAttribute(attr) returned " + r); + r = elem.hasAttribute("attr2"); + ok(r === false, "hasAttribute(attr2) returned " + r); + + elem.setAttribute("attr2", "abc"); + r = elem.hasAttribute("attr2"); + todo_wine. + ok(r === true, "hasAttribute(attr2) returned " + r); + + elem.removeAttribute("attr"); + r = elem.hasAttribute("attr"); + todo_wine. + ok(r === false, "hasAttribute(attr) returned " + r); +});
1
0
0
0
Jacek Caban : mshtml: Use Gecko attributes for non-HTML elements IHTMLElement::title implementation.
by Alexandre Julliard
23 Apr '21
23 Apr '21
Module: wine Branch: master Commit: 83fc6f0ee3041e39cda7aa948e9f6b85e9f9fbb2 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=83fc6f0ee3041e39cda7aa94…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Apr 23 19:39:58 2021 +0200 mshtml: Use Gecko attributes for non-HTML elements IHTMLElement::title implementation. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mshtml/htmlelem.c | 10 ++++++++-- dlls/mshtml/tests/documentmode.js | 1 + dlls/mshtml/tests/dom.js | 10 ++++++++++ 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/htmlelem.c b/dlls/mshtml/htmlelem.c index 930568ab2c0..b71d7ed3fa5 100644 --- a/dlls/mshtml/htmlelem.c +++ b/dlls/mshtml/htmlelem.c @@ -1318,7 +1318,7 @@ static HRESULT WINAPI HTMLElement_put_title(IHTMLElement *iface, BSTR v) TRACE("(%p)->(%s)\n", This, debugstr_w(v)); - if(!This->html_element) { + if(!This->dom_element) { VARIANT *var; HRESULT hres; @@ -1332,6 +1332,9 @@ static HRESULT WINAPI HTMLElement_put_title(IHTMLElement *iface, BSTR v) return S_OK; } + if(!This->html_element) + return elem_string_attr_setter(This, L"title", v); + nsAString_InitDepend(&title_str, v); nsres = nsIDOMHTMLElement_SetTitle(This->html_element, &title_str); nsAString_Finish(&title_str); @@ -1349,7 +1352,7 @@ static HRESULT WINAPI HTMLElement_get_title(IHTMLElement *iface, BSTR *p) TRACE("(%p)->(%p)\n", This, p); - if(!This->html_element) { + if(!This->dom_element) { VARIANT *var; HRESULT hres; @@ -1366,6 +1369,9 @@ static HRESULT WINAPI HTMLElement_get_title(IHTMLElement *iface, BSTR *p) return S_OK; } + if(!This->html_element) + return elem_string_attr_getter(This, L"title", FALSE, p); + nsAString_Init(&title_str, NULL); nsres = nsIDOMHTMLElement_GetTitle(This->html_element, &title_str); return return_nsstr(nsres, &title_str, p); diff --git a/dlls/mshtml/tests/documentmode.js b/dlls/mshtml/tests/documentmode.js index 7074b1f62f2..9cb9c6058a0 100644 --- a/dlls/mshtml/tests/documentmode.js +++ b/dlls/mshtml/tests/documentmode.js @@ -34,6 +34,7 @@ sync_test("elem_props", function() { test_exposed("doScroll", v < 11); test_exposed("readyState", v < 11); test_exposed("clientTop", true); + test_exposed("title", true); test_exposed("querySelectorAll", v >= 8); test_exposed("textContent", v >= 9); test_exposed("prefix", v >= 9); diff --git a/dlls/mshtml/tests/dom.js b/dlls/mshtml/tests/dom.js index b30d1a8fbed..f9d0873bb89 100644 --- a/dlls/mshtml/tests/dom.js +++ b/dlls/mshtml/tests/dom.js @@ -458,3 +458,13 @@ async_test("animation_frame", function() { }); ok(typeof(id) === "number", "id = " + id); }); + +sync_test("title", function() { + var elem = document.createElement("div"); + ok(elem.title === "", "div.title = " + elem.title); + todo_wine. + ok(elem.getAttribute("title") === null, "title attribute = " + elem.getAttribute("title")); + elem.title = "test"; + ok(elem.title === "test", "div.title = " + elem.title); + ok(elem.getAttribute("title") === "test", "title attribute = " + elem.getAttribute("title")); +});
1
0
0
0
Gabriel Ivăncescu : ntdll/tests: Test hard linking a file to a different casing of itself or existing target.
by Alexandre Julliard
23 Apr '21
23 Apr '21
Module: wine Branch: master Commit: ec20f767fb0b5012fe1c3d241af2175a1c5828df URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ec20f767fb0b5012fe1c3d24…
Author: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Date: Fri Apr 23 18:52:28 2021 +0300 ntdll/tests: Test hard linking a file to a different casing of itself or existing target. Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/tests/file.c | 81 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c index 839046a7488..d469b449a74 100644 --- a/dlls/ntdll/tests/file.c +++ b/dlls/ntdll/tests/file.c @@ -2176,6 +2176,7 @@ static void test_file_link_information(void) WCHAR tmp_path[MAX_PATH], oldpath[MAX_PATH + 16], newpath[MAX_PATH + 16], *filename, *p; FILE_LINK_INFORMATION *fli; FILE_NAME_INFORMATION *fni; + WIN32_FIND_DATAW find_data; BOOL success, fileDeleted; UNICODE_STRING name_str; HANDLE handle, handle2; @@ -2283,6 +2284,46 @@ static void test_file_link_information(void) delete_object( oldpath ); delete_object( newpath ); + /* oldpath is a file, newpath is a file, ReplaceIfExists = TRUE, different casing on link */ + res = GetTempFileNameW( tmp_path, fooW, 0, oldpath ); + ok( res != 0, "failed to create temp file\n" ); + handle = CreateFileW( oldpath, GENERIC_WRITE | DELETE, 0, NULL, CREATE_ALWAYS, 0, 0 ); + ok( handle != INVALID_HANDLE_VALUE, "CreateFileW failed\n" ); + + res = GetTempFileNameW( tmp_path, fooW, 0, newpath ); + ok( res != 0, "failed to create temp file\n" ); + wcsrchr( newpath, '\\' )[1] = 'F'; + pRtlDosPathNameToNtPathName_U( newpath, &name_str, NULL, NULL ); + fli = HeapAlloc( GetProcessHeap(), 0, sizeof(FILE_LINK_INFORMATION) + name_str.Length ); + fli->ReplaceIfExists = TRUE; + fli->RootDirectory = NULL; + fli->FileNameLength = name_str.Length; + memcpy( fli->FileName, name_str.Buffer, name_str.Length ); + pRtlFreeUnicodeString( &name_str ); + + U(io).Status = 0xdeadbeef; + res = pNtSetInformationFile( handle, &io, fli, sizeof(FILE_LINK_INFORMATION) + fli->FileNameLength, FileLinkInformation ); + ok( U(io).Status == STATUS_SUCCESS, "io.Status expected STATUS_SUCCESS, got %x\n", U(io).Status ); + ok( res == STATUS_SUCCESS, "res expected STATUS_SUCCESS, got %x\n", res ); + fileDeleted = GetFileAttributesW( oldpath ) == INVALID_FILE_ATTRIBUTES && GetLastError() == ERROR_FILE_NOT_FOUND; + ok( !fileDeleted, "file should exist\n" ); + fileDeleted = GetFileAttributesW( newpath ) == INVALID_FILE_ATTRIBUTES && GetLastError() == ERROR_FILE_NOT_FOUND; + ok( !fileDeleted, "file should exist\n" ); + + CloseHandle( handle ); + handle = FindFirstFileW( newpath, &find_data ); + ok(handle != INVALID_HANDLE_VALUE, "FindFirstFileW: failed, error %d\n", GetLastError()); + if (handle != INVALID_HANDLE_VALUE) + { + todo_wine ok(!lstrcmpW(wcsrchr(newpath, '\\') + 1, find_data.cFileName), + "Link did not change casing on existing target file: got %s\n", wine_dbgstr_w(find_data.cFileName)); + } + + CloseHandle( handle ); + HeapFree( GetProcessHeap(), 0, fli ); + delete_object( oldpath ); + delete_object( newpath ); + /* oldpath is a file, newpath is a file, ReplaceIfExists = FALSE, target file opened */ res = GetTempFileNameW( tmp_path, fooW, 0, oldpath ); ok( res != 0, "failed to create temp file\n" ); @@ -2826,6 +2867,46 @@ static void test_file_link_information(void) CloseHandle( handle ); HeapFree( GetProcessHeap(), 0, fli ); delete_object( oldpath ); + + /* oldpath == newpath, different casing on link */ + res = GetTempFileNameW( tmp_path, fooW, 0, oldpath ); + ok( res != 0, "failed to create temp file\n" ); + handle = CreateFileW( oldpath, GENERIC_WRITE | DELETE, 0, NULL, CREATE_ALWAYS, 0, 0 ); + ok( handle != INVALID_HANDLE_VALUE, "CreateFileW failed\n" ); + + wcsrchr( oldpath, '\\' )[1] = 'F'; + pRtlDosPathNameToNtPathName_U( oldpath, &name_str, NULL, NULL ); + fli = HeapAlloc( GetProcessHeap(), 0, sizeof(FILE_RENAME_INFORMATION) + name_str.Length ); + fli->ReplaceIfExists = FALSE; + fli->RootDirectory = NULL; + fli->FileNameLength = name_str.Length; + memcpy( fli->FileName, name_str.Buffer, name_str.Length ); + pRtlFreeUnicodeString( &name_str ); + + U(io).Status = 0xdeadbeef; + res = pNtSetInformationFile( handle, &io, fli, sizeof(FILE_LINK_INFORMATION) + fli->FileNameLength, FileLinkInformation ); + todo_wine ok( U(io).Status == 0xdeadbeef, "got io status %#x\n", U(io).Status ); + ok( res == STATUS_OBJECT_NAME_COLLISION, "got status %x\n", res ); + + fli->ReplaceIfExists = TRUE; + U(io).Status = 0xdeadbeef; + res = pNtSetInformationFile( handle, &io, fli, sizeof(FILE_LINK_INFORMATION) + fli->FileNameLength, FileLinkInformation ); + ok( U(io).Status == STATUS_SUCCESS, "got io status %#x\n", U(io).Status ); + ok( res == STATUS_SUCCESS, "got status %x\n", res ); + ok( GetFileAttributesW( oldpath ) != INVALID_FILE_ATTRIBUTES, "file should exist\n" ); + + CloseHandle( handle ); + handle = FindFirstFileW( oldpath, &find_data ); + ok(handle != INVALID_HANDLE_VALUE, "FindFirstFileW: failed, error %d\n", GetLastError()); + if (handle != INVALID_HANDLE_VALUE) + { + todo_wine ok(!lstrcmpW(wcsrchr(oldpath, '\\') + 1, find_data.cFileName), + "Link did not change casing on same file: got %s\n", wine_dbgstr_w(find_data.cFileName)); + } + + CloseHandle( handle ); + HeapFree( GetProcessHeap(), 0, fli ); + delete_object( oldpath ); } static void test_file_both_information(void)
1
0
0
0
Gabriel Ivăncescu : kernel32/tests: Test hard linking a file to a different casing of itself.
by Alexandre Julliard
23 Apr '21
23 Apr '21
Module: wine Branch: master Commit: 01283ec6a6de80babce6bb395e0c675c55a61b72 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=01283ec6a6de80babce6bb39…
Author: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Date: Fri Apr 23 18:52:27 2021 +0300 kernel32/tests: Test hard linking a file to a different casing of itself. Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/tests/file.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dlls/kernel32/tests/file.c b/dlls/kernel32/tests/file.c index bb05188b4c7..8560524683d 100644 --- a/dlls/kernel32/tests/file.c +++ b/dlls/kernel32/tests/file.c @@ -5790,6 +5790,11 @@ static void test_hard_link(void) ok(!ret, "expected failure\n"); ok(GetLastError() == ERROR_ALREADY_EXISTS, "got error %u\n", GetLastError()); + SetLastError(0xdeadbeef); + ret = CreateHardLinkA( "WineTest_File1", "winetest_file1", NULL ); + ok(!ret, "expected failure\n"); + ok(GetLastError() == ERROR_ALREADY_EXISTS, "got error %u\n", GetLastError()); + SetLastError(0xdeadbeef); ret = CreateHardLinkA( "winetest_file3", "winetest_dir1", NULL ); ok(!ret, "expected failure\n");
1
0
0
0
Gabriel Ivăncescu : kernel32/tests: Test renaming a file/directory to a different casing of itself or existing target.
by Alexandre Julliard
23 Apr '21
23 Apr '21
Module: wine Branch: master Commit: b3553f0e5ae34e3c9a0cecbc86dd98586dffd91c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b3553f0e5ae34e3c9a0cecbc…
Author: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Date: Fri Apr 23 18:52:26 2021 +0300 kernel32/tests: Test renaming a file/directory to a different casing of itself or existing target. Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/tests/file.c | 64 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/dlls/kernel32/tests/file.c b/dlls/kernel32/tests/file.c index 5deed96abf3..bb05188b4c7 100644 --- a/dlls/kernel32/tests/file.c +++ b/dlls/kernel32/tests/file.c @@ -1954,6 +1954,7 @@ static void test_MoveFileA(void) char tempdir[MAX_PATH]; char source[MAX_PATH], dest[MAX_PATH]; static const char prefix[] = "pfx"; + WIN32_FIND_DATAA find_data; HANDLE hfile; HANDLE hmapfile; DWORD ret; @@ -2023,9 +2024,72 @@ static void test_MoveFileA(void) ok(ret, "MoveFileA: failed, error %d\n", GetLastError()); lstrcatA(tempdir, "Remove Me"); + + /* test renaming a file "Remove Me" to itself but in lowercase "me" */ + lstrcpyA(source, tempdir); + tempdir[lstrlenA(tempdir) - 2] = 'm'; + + hfile = CreateFileA(source, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, CREATE_ALWAYS, 0, 0); + ok(hfile != INVALID_HANDLE_VALUE, "failed to create %s\n", source); + CloseHandle(hfile); + + ret = MoveFileA(source, tempdir); + ok(ret, "MoveFileA: failed, error %d\n", GetLastError()); + + hfile = FindFirstFileA(tempdir, &find_data); + ok(hfile != INVALID_HANDLE_VALUE, "FindFirstFileA: failed, error %d\n", GetLastError()); + if (hfile != INVALID_HANDLE_VALUE) + { + todo_wine ok(!lstrcmpA(strrchr(tempdir, '\\') + 1, find_data.cFileName), + "MoveFile failed to change casing on same file: got %s\n", find_data.cFileName); + } + CloseHandle(hfile); + + /* test renaming another file "Remove Be" to "Remove Me", which replaces the existing "Remove me" */ + tempdir[lstrlenA(tempdir) - 2] = 'B'; + + hfile = CreateFileA(tempdir, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, CREATE_ALWAYS, 0, 0); + ok(hfile != INVALID_HANDLE_VALUE, "failed to create %s\n", tempdir); + CloseHandle(hfile); + + ret = MoveFileA(tempdir, source); + ok(!ret, "MoveFileA: expected failure\n"); + ok(GetLastError() == ERROR_ALREADY_EXISTS, "MoveFileA: expected ERROR_ALREADY_EXISTS, got %d\n", GetLastError()); + ret = MoveFileExA(tempdir, source, MOVEFILE_REPLACE_EXISTING); + ok(ret, "MoveFileExA: failed, error %d\n", GetLastError()); + + tempdir[lstrlenA(tempdir) - 2] = 'm'; + + hfile = FindFirstFileA(tempdir, &find_data); + ok(hfile != INVALID_HANDLE_VALUE, "FindFirstFileA: failed, error %d\n", GetLastError()); + if (hfile != INVALID_HANDLE_VALUE) + { + ok(!lstrcmpA(strrchr(source, '\\') + 1, find_data.cFileName), + "MoveFile failed to change casing on existing target file: got %s\n", find_data.cFileName); + } + CloseHandle(hfile); + + ret = DeleteFileA(tempdir); + ok(ret, "DeleteFileA: error %d\n", GetLastError()); + + /* now test a directory from "Remove me" to uppercase "Me" */ ret = CreateDirectoryA(tempdir, NULL); ok(ret == TRUE, "CreateDirectoryA failed\n"); + lstrcpyA(source, tempdir); + tempdir[lstrlenA(tempdir) - 2] = 'M'; + ret = MoveFileA(source, tempdir); + ok(ret, "MoveFileA: failed, error %d\n", GetLastError()); + + hfile = FindFirstFileA(tempdir, &find_data); + ok(hfile != INVALID_HANDLE_VALUE, "FindFirstFileA: failed, error %d\n", GetLastError()); + if (hfile != INVALID_HANDLE_VALUE) + { + todo_wine ok(!lstrcmpA(strrchr(tempdir, '\\') + 1, find_data.cFileName), + "MoveFile failed to change casing on same directory: got %s\n", find_data.cFileName); + } + CloseHandle(hfile); + lstrcpyA(source, dest); lstrcpyA(dest, tempdir); lstrcatA(dest, "\\wild?.*");
1
0
0
0
Damjan Jovanovic : comctl32: Send DTN_DATETIMECHANGE when the checkbox changes too.
by Alexandre Julliard
23 Apr '21
23 Apr '21
Module: wine Branch: master Commit: 9b61a646012afe7e1b63fc8970a473d2a12ea111 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9b61a646012afe7e1b63fc89…
Author: Damjan Jovanovic <damjan.jov(a)gmail.com> Date: Fri Apr 23 15:41:20 2021 +0200 comctl32: Send DTN_DATETIMECHANGE when the checkbox changes too. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=19756
Signed-off-by: Damjan Jovanovic <damjan.jov(a)gmail.com> Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/datetime.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/comctl32/datetime.c b/dlls/comctl32/datetime.c index f44b52c3b65..93bca8c2f5c 100644 --- a/dlls/comctl32/datetime.c +++ b/dlls/comctl32/datetime.c @@ -1060,6 +1060,7 @@ DATETIME_Button_Command (DATETIME_INFO *infoPtr, WPARAM wParam, LPARAM lParam) DWORD state = SendMessageW((HWND)lParam, BM_GETCHECK, 0, 0); infoPtr->dateValid = (state == BST_CHECKED); InvalidateRect(infoPtr->hwndSelf, NULL, TRUE); + DATETIME_SendDateTimeChangeNotify(infoPtr); } return 0; }
1
0
0
0
Francois Gouget : mfplat/tests: Fix an event queue refcounting test on Vista.
by Alexandre Julliard
23 Apr '21
23 Apr '21
Module: wine Branch: master Commit: 730b30aacfc170850acd8f4acb8d9d552f10cf7d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=730b30aacfc170850acd8f4a…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Wed Apr 21 20:20:48 2021 +0200 mfplat/tests: Fix an event queue refcounting test on Vista. Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com> Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mfplat/tests/mfplat.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dlls/mfplat/tests/mfplat.c b/dlls/mfplat/tests/mfplat.c index b6468b5da9b..89547be0a4f 100644 --- a/dlls/mfplat/tests/mfplat.c +++ b/dlls/mfplat/tests/mfplat.c @@ -3129,7 +3129,9 @@ static void test_event_queue(void) EXPECT_REF(&callback.IMFAsyncCallback_iface, 2); IMFMediaEventQueue_Release(queue); - EXPECT_REF(&callback.IMFAsyncCallback_iface, 1); + ret = get_refcount(&callback.IMFAsyncCallback_iface); + ok(ret == 1 || broken(ret == 2) /* Vista */, + "Unexpected refcount %d, expected 1.\n", ret); hr = MFShutdown(); ok(hr == S_OK, "Failed to shut down, hr %#x.\n", hr);
1
0
0
0
Andrey Gusev : iphlpapi: Fix misplaced parentheses.
by Alexandre Julliard
23 Apr '21
23 Apr '21
Module: wine Branch: master Commit: 771abe5a0362b4f79a3cffc1726d05380773f447 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=771abe5a0362b4f79a3cffc1…
Author: Andrey Gusev <andrey.goosev(a)gmail.com> Date: Fri Apr 23 16:26:42 2021 +0300 iphlpapi: Fix misplaced parentheses. Signed-off-by: Andrey Gusev <andrey.goosev(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/iphlpapi/ipstats.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dlls/iphlpapi/ipstats.c b/dlls/iphlpapi/ipstats.c index a15a0abad22..3cf0e811437 100644 --- a/dlls/iphlpapi/ipstats.c +++ b/dlls/iphlpapi/ipstats.c @@ -2620,10 +2620,10 @@ static int compare_tcp6_basic_rows(const void *a, const void *b) const MIB_TCP6ROW *rowB = b; int ret; - if ((ret = memcmp(&rowA->LocalAddr, &rowB->LocalAddr, sizeof(rowA->LocalAddr)) != 0)) return ret; + if ((ret = memcmp(&rowA->LocalAddr, &rowB->LocalAddr, sizeof(rowA->LocalAddr))) != 0) return ret; if ((ret = rowA->dwLocalScopeId - rowB->dwLocalScopeId) != 0) return ret; if ((ret = rowA->dwLocalPort - rowB->dwLocalPort) != 0) return ret; - if ((ret = memcmp(&rowA->RemoteAddr, &rowB->RemoteAddr, sizeof(rowA->RemoteAddr)) != 0)) return ret; + if ((ret = memcmp(&rowA->RemoteAddr, &rowB->RemoteAddr, sizeof(rowA->RemoteAddr))) != 0) return ret; if ((ret = rowA->dwRemoteScopeId - rowB->dwRemoteScopeId) != 0) return ret; return rowA->dwRemotePort - rowB->dwRemotePort; } @@ -2634,10 +2634,10 @@ static int compare_tcp6_owner_rows(const void *a, const void *b) const MIB_TCP6ROW_OWNER_PID *rowB = b; int ret; - if ((ret = memcmp(&rowA->ucLocalAddr, &rowB->ucLocalAddr, sizeof(rowA->ucLocalAddr)) != 0)) return ret; + if ((ret = memcmp(&rowA->ucLocalAddr, &rowB->ucLocalAddr, sizeof(rowA->ucLocalAddr))) != 0) return ret; if ((ret = rowA->dwLocalScopeId - rowB->dwLocalScopeId) != 0) return ret; if ((ret = rowA->dwLocalPort - rowB->dwLocalPort) != 0) return ret; - if ((ret = memcmp(&rowA->ucRemoteAddr, &rowB->ucRemoteAddr, sizeof(rowA->ucRemoteAddr)) != 0)) return ret; + if ((ret = memcmp(&rowA->ucRemoteAddr, &rowB->ucRemoteAddr, sizeof(rowA->ucRemoteAddr))) != 0) return ret; if ((ret = rowA->dwRemoteScopeId - rowB->dwRemoteScopeId) != 0) return ret; return rowA->dwRemotePort - rowB->dwRemotePort; } @@ -2679,7 +2679,7 @@ static int compare_udp6_rows(const void *a, const void *b) const MIB_UDP6ROW *rowB = b; int ret; - if ((ret = memcmp(&rowA->dwLocalAddr, &rowB->dwLocalAddr, sizeof(rowA->dwLocalAddr)) != 0)) return ret; + if ((ret = memcmp(&rowA->dwLocalAddr, &rowB->dwLocalAddr, sizeof(rowA->dwLocalAddr))) != 0) return ret; if ((ret = rowA->dwLocalScopeId - rowB->dwLocalScopeId) != 0) return ret; return rowA->dwLocalPort - rowB->dwLocalPort; }
1
0
0
0
Dmitry Timoshkov : msxml3: Don't unlink the XML declaration when saving document.
by Alexandre Julliard
23 Apr '21
23 Apr '21
Module: wine Branch: master Commit: b896230547bc4c6103797336aad3a6cd83aa0e58 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b896230547bc4c6103797336…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Fri Apr 16 13:55:46 2021 +0300 msxml3: Don't unlink the XML declaration when saving document. Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msxml3/domdoc.c | 11 ++-------- dlls/msxml3/tests/domdoc.c | 53 ++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 53 insertions(+), 11 deletions(-) diff --git a/dlls/msxml3/domdoc.c b/dlls/msxml3/domdoc.c index 80c32e9ba99..cf4f0433218 100644 --- a/dlls/msxml3/domdoc.c +++ b/dlls/msxml3/domdoc.c @@ -2534,7 +2534,6 @@ static HRESULT WINAPI domdoc_save( { domdoc *This = impl_from_IXMLDOMDocument3( iface ); xmlSaveCtxtPtr ctx = NULL; - xmlNodePtr xmldecl; HRESULT ret = S_OK; TRACE("(%p)->(%s)\n", This, debugstr_variant(&destination)); @@ -2567,9 +2566,8 @@ static HRESULT WINAPI domdoc_save( ret = IUnknown_QueryInterface(pUnk, &IID_IStream, (void**)&stream); if(ret == S_OK) { - int options = get_doc(This)->standalone == -1 ? XML_SAVE_NO_DECL : 0; ctx = xmlSaveToIO(domdoc_stream_save_writecallback, - domdoc_stream_save_closecallback, stream, NULL, options); + domdoc_stream_save_closecallback, stream, NULL, XML_SAVE_NO_DECL); if(!ctx) { @@ -2583,8 +2581,6 @@ static HRESULT WINAPI domdoc_save( case VT_BSTR: case VT_BSTR | VT_BYREF: { - int options = get_doc(This)->standalone == -1 ? XML_SAVE_NO_DECL : 0; - /* save with file path */ HANDLE handle = CreateFileW( (V_VT(&destination) & VT_BYREF)? *V_BSTRREF(&destination) : V_BSTR(&destination), GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL ); @@ -2594,9 +2590,8 @@ static HRESULT WINAPI domdoc_save( return E_FAIL; } - /* disable top XML declaration */ ctx = xmlSaveToIO(domdoc_save_writecallback, domdoc_save_closecallback, - handle, NULL, options); + handle, NULL, XML_SAVE_NO_DECL); if (!ctx) { CloseHandle(handle); @@ -2610,9 +2605,7 @@ static HRESULT WINAPI domdoc_save( return S_FALSE; } - xmldecl = xmldoc_unlink_xmldecl(get_doc(This)); if (xmlSaveDoc(ctx, get_doc(This)) == -1) ret = S_FALSE; - xmldoc_link_xmldecl(get_doc(This), xmldecl); /* will release resources through close callback */ xmlSaveClose(ctx); diff --git a/dlls/msxml3/tests/domdoc.c b/dlls/msxml3/tests/domdoc.c index 5bc2fe1d5c3..6f8e2b44ed3 100644 --- a/dlls/msxml3/tests/domdoc.c +++ b/dlls/msxml3/tests/domdoc.c @@ -8524,6 +8524,9 @@ static void test_createProcessingInstruction(void) { static const WCHAR xml1[] = L"<?xml version=\"1.0\"?>\r\n<test/>\r\n"; static const char xml2[] = "<?xml version=\"1.0\" encoding=\"windows-1252\"?>\r\n<test/>\r\n"; + static const char xml2_wine[] = "<?xml version=\"1.0\" encoding=\"windows-1252\"?>\n<test/>\n"; + static const char xml3[] = "<?xml version=\"1.0\" standalone=\"yes\"?>\r\n<test/>\r\n"; + static const char xml3_wine[] = "<?xml version=\"1.0\" standalone=\"yes\"?>\n<test/>\n"; IXMLDOMProcessingInstruction *pi; IXMLDOMDocument *doc; IXMLDOMNode *node; @@ -8533,6 +8536,8 @@ static void test_createProcessingInstruction(void) VARIANT var; HRESULT hr; IStream *stream; + LARGE_INTEGER off; + VARIANT_BOOL b; HGLOBAL global; char *p; @@ -8582,11 +8587,55 @@ todo_wine ok(hr == S_OK, "got 0x%08x\n", hr); p = GlobalLock(global); p[GlobalSize(global)] = 0; -todo_wine - ok(!strcmp(p, xml2), "got %s\n", wine_dbgstr_a(p)); + ok(!strcmp(p, xml2) || !strcmp(p, xml2_wine), "got %s\n", wine_dbgstr_a(p)); + GlobalUnlock(global); + + /* Verify the result after load+save */ + off.QuadPart = 0; + hr = IStream_Seek(stream, off, STREAM_SEEK_SET, NULL); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = IXMLDOMDocument_load(doc, var, &b); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(b == VARIANT_TRUE, "got %d\n", b); + + off.QuadPart = 0; + hr = IStream_Seek(stream, off, STREAM_SEEK_SET, NULL); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = IXMLDOMDocument_save(doc, var); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = GetHGlobalFromStream(stream, &global); + ok(hr == S_OK, "got 0x%08x\n", hr); + p = GlobalLock(global); + p[GlobalSize(global)] = 0; + ok(!strcmp(p, xml2) || !strcmp(p, xml2_wine), "got %s\n", wine_dbgstr_a(p)); GlobalUnlock(global); + IStream_Release(stream); + hr = IXMLDOMDocument_loadXML(doc, _bstr_("<?xml version=\"1.0\" standalone=\"yes\"?>\r\n<test/>\r\n"), &b); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(b == VARIANT_TRUE, "got %d\n", b); + + hr = CreateStreamOnHGlobal(NULL, TRUE, &stream); + ok(hr == S_OK, "got 0x%08x\n", hr); + + V_VT(&var) = VT_UNKNOWN; + V_UNKNOWN(&var) = (IUnknown*)stream; + hr = IXMLDOMDocument_save(doc, var); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = GetHGlobalFromStream(stream, &global); + ok(hr == S_OK, "got 0x%08x\n", hr); + + p = GlobalLock(global); + p[GlobalSize(global)] = 0; + ok(!strcmp(p, xml3) || !strcmp(p, xml3_wine), "got %s\n", wine_dbgstr_a(p)); + GlobalUnlock(global); + + IStream_Release(stream); IXMLDOMDocument_Release(doc); }
1
0
0
0
← Newer
1
...
17
18
19
20
21
22
23
...
87
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
Results per page:
10
25
50
100
200