mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-04-13 14:42:51 -07:00
Added msxml3-whitespace patchset
This commit is contained in:
parent
4914f150c5
commit
d9670d89d1
@ -0,0 +1,69 @@
|
||||
From f9e8c57e69b4edeefca2894fa2b48e07291dce80 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Wed, 5 Mar 2025 11:59:15 +1100
|
||||
Subject: [PATCH] msxml3: IXMLDOMDocument3::preserveWhiteSpace fix for a non
|
||||
VARIANT_BOOL value.
|
||||
|
||||
0024:trace:msxml:domdoc_put_preserveWhiteSpace (068F0520)->(1)
|
||||
|
||||
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=21940
|
||||
---
|
||||
dlls/msxml3/domdoc.c | 2 +-
|
||||
dlls/msxml3/tests/domdoc.c | 21 +++++++++++++++++++++
|
||||
2 files changed, 22 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/msxml3/domdoc.c b/dlls/msxml3/domdoc.c
|
||||
index 8407f914c4f..e1e8e6c803f 100644
|
||||
--- a/dlls/msxml3/domdoc.c
|
||||
+++ b/dlls/msxml3/domdoc.c
|
||||
@@ -2746,7 +2746,7 @@ static HRESULT WINAPI domdoc_put_preserveWhiteSpace(
|
||||
{
|
||||
domdoc *This = impl_from_IXMLDOMDocument3( iface );
|
||||
TRACE("(%p)->(%d)\n", This, isPreserving);
|
||||
- This->properties->preserving = isPreserving;
|
||||
+ This->properties->preserving = isPreserving == VARIANT_TRUE ? VARIANT_TRUE : VARIANT_FALSE;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
diff --git a/dlls/msxml3/tests/domdoc.c b/dlls/msxml3/tests/domdoc.c
|
||||
index 76f0c827c2a..dcb83f781ba 100644
|
||||
--- a/dlls/msxml3/tests/domdoc.c
|
||||
+++ b/dlls/msxml3/tests/domdoc.c
|
||||
@@ -4859,6 +4859,16 @@ static void test_whitespace(void)
|
||||
check_ws_ignored(class_ptr->name, doc3, NULL);
|
||||
check_ws_preserved(class_ptr->name, doc4, NULL);
|
||||
|
||||
+ hr = IXMLDOMDocument2_put_preserveWhiteSpace(doc4, 1);
|
||||
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
|
||||
+ hr = IXMLDOMDocument2_get_preserveWhiteSpace(doc4, &b);
|
||||
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
|
||||
+ ok(b == VARIANT_FALSE, "expected true\n");
|
||||
+ check_ws_ignored(class_ptr->name, doc4, NULL);
|
||||
+
|
||||
+ hr = IXMLDOMDocument2_put_preserveWhiteSpace(doc4, VARIANT_TRUE);
|
||||
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
|
||||
+
|
||||
/* setting after loading xml affects trimming of leading/trailing ws only */
|
||||
hr = IXMLDOMDocument2_put_preserveWhiteSpace(doc1, VARIANT_TRUE);
|
||||
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
|
||||
@@ -4925,6 +4935,17 @@ static void test_whitespace(void)
|
||||
IXMLDOMNodeList_Release(list);
|
||||
IXMLDOMElement_Release(root);
|
||||
|
||||
+ hr = IXMLDOMDocument2_put_preserveWhiteSpace(doc1, VARIANT_TRUE);
|
||||
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
|
||||
+ hr = IXMLDOMDocument2_get_preserveWhiteSpace(doc1, &b);
|
||||
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
|
||||
+ ok(b == VARIANT_TRUE, "expected true %d\n", b);
|
||||
+ hr = IXMLDOMDocument2_put_preserveWhiteSpace(doc1, 1);
|
||||
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
|
||||
+ hr = IXMLDOMDocument2_get_preserveWhiteSpace(doc1, &b);
|
||||
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
|
||||
+ ok(b == VARIANT_FALSE, "expected true %d\n", b);
|
||||
+
|
||||
IXMLDOMDocument2_Release(doc1);
|
||||
|
||||
free_bstrs();
|
||||
--
|
||||
2.47.2
|
||||
|
8
patches/msxml3-whitespace/definition
Normal file
8
patches/msxml3-whitespace/definition
Normal file
@ -0,0 +1,8 @@
|
||||
Fixes: [21940] msxml: Improve support for the whitespace value.
|
||||
|
||||
|
||||
# PR https://gitlab.winehq.org/wine/wine/-/merge_requests/7494
|
||||
#
|
||||
# NOTES:
|
||||
# Current tests fail when 1 is passed as a WhiteSpace value.
|
||||
|
Loading…
x
Reference in New Issue
Block a user