[PATCH 0/2] MR11016: msxml3: Don't indent endElement node since it changes text node content.
From: Piotr Caban <piotr@codeweavers.com> --- dlls/msxml3/mxwriter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/msxml3/mxwriter.c b/dlls/msxml3/mxwriter.c index 6b1cd4706cb..22841b791d1 100644 --- a/dlls/msxml3/mxwriter.c +++ b/dlls/msxml3/mxwriter.c @@ -2618,7 +2618,7 @@ HRESULT MXWriter_create(MSXML_VERSION version, void **ppObj) This->cdata = FALSE; This->indent = 0; This->text = FALSE; - This->newline = FALSE; + This->newline = TRUE; This->dest = NULL; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/11016
From: Piotr Caban <piotr@codeweavers.com> --- dlls/msxml3/mxwriter.c | 3 --- dlls/msxml3/tests/saxreader.c | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/msxml3/mxwriter.c b/dlls/msxml3/mxwriter.c index 22841b791d1..d8d60e863b6 100644 --- a/dlls/msxml3/mxwriter.c +++ b/dlls/msxml3/mxwriter.c @@ -672,9 +672,6 @@ static inline void writer_inc_indent(mxwriter *This) static inline void writer_dec_indent(mxwriter *This) { if (This->indent) This->indent--; - /* depth is decreased only when element is closed, meaning it's not a text node - at this point */ - This->text = FALSE; } static void set_element_name(mxwriter *This, const WCHAR *name, int len) diff --git a/dlls/msxml3/tests/saxreader.c b/dlls/msxml3/tests/saxreader.c index 8a3d87401cb..6dbbf15234a 100644 --- a/dlls/msxml3/tests/saxreader.c +++ b/dlls/msxml3/tests/saxreader.c @@ -4624,6 +4624,9 @@ static void test_mxwriter_characters(void) &IID_IMXWriter, (void**)&writer); ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + hr = IMXWriter_put_indent(writer, VARIANT_TRUE); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + hr = IMXWriter_QueryInterface(writer, &IID_ISAXContentHandler, (void**)&content); ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/11016
This needs tests for produced output. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/11016#note_141528
On Thu May 28 17:13:35 2026 +0000, Nikolay Sivov wrote:
This needs tests for produced output. The test is in second patch - output comparison is in tests/saxreader.c:4652.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/11016#note_141529
On Thu May 28 17:13:35 2026 +0000, Piotr Caban wrote:
The test is in second patch - output comparison is in tests/saxreader.c:4652. Test changes there switch indent mode, meaning we are not running in previous test conditions after this commit.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/11016#note_141530
On Thu May 28 17:16:01 2026 +0000, Nikolay Sivov wrote:
Test changes there switch indent mode, meaning we are not running in previous test conditions after this commit. Yes, but do you think there's a value in duplicating the test both with indentation enabled and disabled? I think it makes sense to change existing test so it both tests what it was originally written for and also shows an error in indentation handling.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/11016#note_141532
participants (3)
-
Nikolay Sivov (@nsivov) -
Piotr Caban -
Piotr Caban (@piotr)