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
Zebediah Figura : ntoskrnl/tests: Retrieve test global variables from a memory section.
by Alexandre Julliard
07 Apr '21
07 Apr '21
Module: wine Branch: master Commit: 55a166d17e5a4392c281e3c0fe8ba720cf8944bf URL:
https://source.winehq.org/git/wine.git/?a=commit;h=55a166d17e5a4392c281e3c0…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Tue Apr 6 22:42:21 2021 -0500 ntoskrnl/tests: Retrieve test global variables from a memory section. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntoskrnl.exe/ntoskrnl.exe.spec | 6 +++--- dlls/ntoskrnl.exe/tests/driver.c | 10 +++------- dlls/ntoskrnl.exe/tests/driver.h | 6 +++++- dlls/ntoskrnl.exe/tests/driver_netio.c | 5 ----- dlls/ntoskrnl.exe/tests/ntoskrnl.c | 27 +++++++++++++++++---------- dlls/ntoskrnl.exe/tests/utils.h | 26 +++++++++++++++++++++++++- 6 files changed, 53 insertions(+), 27 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=55a166d17e5a4392c281…
1
0
0
0
Zebediah Figura : ntoskrnl/tests: Factor out winetest_init() and winetest_cleanup().
by Alexandre Julliard
07 Apr '21
07 Apr '21
Module: wine Branch: master Commit: 801d116733a2b36b814900321b592a804afc9e8f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=801d116733a2b36b81490032…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Tue Apr 6 22:42:20 2021 -0500 ntoskrnl/tests: Factor out winetest_init() and winetest_cleanup(). Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntoskrnl.exe/tests/driver.c | 23 +++++------------------ dlls/ntoskrnl.exe/tests/driver_netio.c | 22 +++++----------------- dlls/ntoskrnl.exe/tests/utils.h | 25 +++++++++++++++++++++++++ 3 files changed, 35 insertions(+), 35 deletions(-) diff --git a/dlls/ntoskrnl.exe/tests/driver.c b/dlls/ntoskrnl.exe/tests/driver.c index 179d2d5e02d..1d78f576ecf 100644 --- a/dlls/ntoskrnl.exe/tests/driver.c +++ b/dlls/ntoskrnl.exe/tests/driver.c @@ -1782,15 +1782,7 @@ static void WINAPI main_test_task(DEVICE_OBJECT *device, void *context) test_stack_limits(); test_completion(); - /* print process report */ - if (winetest_debug) - { - kprintf("%04x:ntoskrnl: %d tests executed (%d marked as todo, %d %s), %d skipped.\n", - PsGetCurrentProcessId(), successes + failures + todo_successes + todo_failures, - todo_successes, failures + todo_failures, - (failures + todo_failures != 1) ? "failures" : "failure", skipped ); - } - ZwClose(okfile); + winetest_cleanup(); *((LONG *)buffer) = failures; irp->IoStatus.Status = STATUS_SUCCESS; @@ -2116,24 +2108,19 @@ static NTSTATUS main_test(DEVICE_OBJECT *device, IRP *irp, IO_STACK_LOCATION *st ULONG length = stack->Parameters.DeviceIoControl.OutputBufferLength; void *buffer = irp->AssociatedIrp.SystemBuffer; struct test_input *test_input = (struct test_input *)buffer; - OBJECT_ATTRIBUTES attr = {0}; - UNICODE_STRING pathU; - IO_STATUS_BLOCK io; + NTSTATUS status; if (!buffer) return STATUS_ACCESS_VIOLATION; if (length < sizeof(failures)) return STATUS_BUFFER_TOO_SMALL; - attr.Length = sizeof(attr); - RtlInitUnicodeString(&pathU, L"\\??\\C:\\windows\\winetest_ntoskrnl_okfile"); running_under_wine = test_input->running_under_wine; winetest_debug = test_input->winetest_debug; winetest_report_success = test_input->winetest_report_success; - attr.ObjectName = &pathU; - attr.Attributes = OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE; /* needed to be accessible from system threads */ - ZwOpenFile(&okfile, FILE_APPEND_DATA | SYNCHRONIZE, &attr, &io, - FILE_SHARE_READ | FILE_SHARE_WRITE, FILE_SYNCHRONOUS_IO_NONALERT); + + if ((status = winetest_init())) + return status; pExEventObjectType = get_proc_address("ExEventObjectType"); ok(!!pExEventObjectType, "ExEventObjectType not found\n"); diff --git a/dlls/ntoskrnl.exe/tests/driver_netio.c b/dlls/ntoskrnl.exe/tests/driver_netio.c index 3d783dbef0d..98392c9c7fd 100644 --- a/dlls/ntoskrnl.exe/tests/driver_netio.c +++ b/dlls/ntoskrnl.exe/tests/driver_netio.c @@ -468,38 +468,26 @@ static NTSTATUS main_test(DEVICE_OBJECT *device, IRP *irp, IO_STACK_LOCATION *st ULONG length = stack->Parameters.DeviceIoControl.OutputBufferLength; void *buffer = irp->AssociatedIrp.SystemBuffer; struct test_input *test_input = buffer; - OBJECT_ATTRIBUTES attr = {0}; - UNICODE_STRING pathU; - IO_STATUS_BLOCK io; + NTSTATUS status; if (!buffer) return STATUS_ACCESS_VIOLATION; if (length < sizeof(failures)) return STATUS_BUFFER_TOO_SMALL; - attr.Length = sizeof(attr); - RtlInitUnicodeString(&pathU, L"\\??\\C:\\winetest_ntoskrnl_okfile"); running_under_wine = test_input->running_under_wine; winetest_debug = test_input->winetest_debug; winetest_report_success = test_input->winetest_report_success; - attr.ObjectName = &pathU; - attr.Attributes = OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE; /* needed to be accessible from system threads */ - ZwOpenFile(&okfile, FILE_APPEND_DATA | SYNCHRONIZE, &attr, &io, - FILE_SHARE_READ | FILE_SHARE_WRITE, FILE_SYNCHRONOUS_IO_NONALERT); + + if ((status = winetest_init())) + return status; netio_init(); test_wsk_get_address_info(); test_wsk_listen_socket(); test_wsk_connect_socket(); - if (winetest_debug) - { - kprintf("%04x:ntoskrnl: %d tests executed (%d marked as todo, %d %s), %d skipped.\n", - PsGetCurrentProcessId(), successes + failures + todo_successes + todo_failures, - todo_successes, failures + todo_failures, - (failures + todo_failures != 1) ? "failures" : "failure", skipped ); - } - ZwClose(okfile); + winetest_cleanup(); *((LONG *)buffer) = failures; irp->IoStatus.Information = sizeof(failures); diff --git a/dlls/ntoskrnl.exe/tests/utils.h b/dlls/ntoskrnl.exe/tests/utils.h index be0f58f837c..508346ef9bf 100644 --- a/dlls/ntoskrnl.exe/tests/utils.h +++ b/dlls/ntoskrnl.exe/tests/utils.h @@ -49,6 +49,31 @@ static inline void WINAPIV kprintf(const char *format, ...) __ms_va_end(valist); } +static inline NTSTATUS winetest_init(void) +{ + OBJECT_ATTRIBUTES attr; + UNICODE_STRING string; + IO_STATUS_BLOCK io; + + RtlInitUnicodeString(&string, L"\\??\\C:\\windows\\winetest_ntoskrnl_okfile"); + /* OBJ_KERNEL_HANDLE is necessary for the file to be accessible from system threads */ + InitializeObjectAttributes(&attr, &string, OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE, 0, NULL); + return ZwOpenFile(&okfile, FILE_APPEND_DATA | SYNCHRONIZE, &attr, &io, + FILE_SHARE_READ | FILE_SHARE_WRITE, FILE_SYNCHRONOUS_IO_NONALERT); +} + +static inline void winetest_cleanup(void) +{ + if (winetest_debug) + { + kprintf("%04x:ntoskrnl: %d tests executed (%d marked as todo, %d %s), %d skipped.\n", + PsGetCurrentProcessId(), successes + failures + todo_successes + todo_failures, + todo_successes, failures + todo_failures, + (failures + todo_failures != 1) ? "failures" : "failure", skipped ); + } + ZwClose(okfile); +} + static inline void WINAPIV vok_(const char *file, int line, int condition, const char *msg, __ms_va_list args) { const char *current_file;
1
0
0
0
Zebediah Figura : wined3d: Pass a wined3d_device_context to wined3d_device_resolve_sub_resource().
by Alexandre Julliard
07 Apr '21
07 Apr '21
Module: wine Branch: master Commit: 5c7057d229ef40132843dc6aa89d3b1bb033160a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=5c7057d229ef40132843dc6a…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Tue Apr 6 20:56:45 2021 -0500 wined3d: Pass a wined3d_device_context to wined3d_device_resolve_sub_resource(). Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3d11/device.c | 6 +++--- dlls/d3d8/device.c | 2 +- dlls/d3d9/device.c | 2 +- dlls/wined3d/device.c | 10 +++++----- dlls/wined3d/wined3d.spec | 2 +- include/wine/wined3d.h | 7 +++---- 6 files changed, 14 insertions(+), 15 deletions(-) diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c index ef15dc71af7..ada668e3164 100644 --- a/dlls/d3d11/device.c +++ b/dlls/d3d11/device.c @@ -1387,7 +1387,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_ResolveSubresource(ID3D11D ID3D11Resource *src_resource, UINT src_subresource_idx, DXGI_FORMAT format) { - struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface); + struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext1(iface); struct wined3d_resource *wined3d_dst_resource, *wined3d_src_resource; enum wined3d_format_id wined3d_format; @@ -1400,7 +1400,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_ResolveSubresource(ID3D11D wined3d_src_resource = wined3d_resource_from_d3d11_resource(src_resource); wined3d_format = wined3dformat_from_dxgi_format(format); wined3d_mutex_lock(); - wined3d_device_resolve_sub_resource(device->wined3d_device, + wined3d_device_context_resolve_sub_resource(context->wined3d_context, wined3d_dst_resource, dst_subresource_idx, wined3d_src_resource, src_subresource_idx, wined3d_format); wined3d_mutex_unlock(); @@ -4991,7 +4991,7 @@ static void STDMETHODCALLTYPE d3d10_device_ResolveSubresource(ID3D10Device1 *ifa wined3d_src_resource = wined3d_resource_from_d3d10_resource(src_resource); wined3d_format = wined3dformat_from_dxgi_format(format); wined3d_mutex_lock(); - wined3d_device_resolve_sub_resource(device->wined3d_device, + wined3d_device_context_resolve_sub_resource(device->immediate_context.wined3d_context, wined3d_dst_resource, dst_subresource_idx, wined3d_src_resource, src_subresource_idx, wined3d_format); wined3d_mutex_unlock(); diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index f69b56acc37..b07c20f71a0 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -1932,7 +1932,7 @@ static void resolve_depth_buffer(struct d3d8_device *device) return; d3d8_dsv = wined3d_rendertarget_view_get_sub_resource_parent(wined3d_dsv); - wined3d_device_resolve_sub_resource(device->wined3d_device, dst_resource, 0, + wined3d_device_context_resolve_sub_resource(device->immediate_context, dst_resource, 0, wined3d_rendertarget_view_get_resource(wined3d_dsv), d3d8_dsv->sub_resource_idx, desc.format); } diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index 2b63f458a5d..6492eecc7b9 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -2429,7 +2429,7 @@ static void resolve_depth_buffer(struct d3d9_device *device) return; d3d9_dsv = wined3d_rendertarget_view_get_sub_resource_parent(wined3d_dsv); - wined3d_device_resolve_sub_resource(device->wined3d_device, dst_resource, 0, + wined3d_device_context_resolve_sub_resource(device->immediate_context, dst_resource, 0, wined3d_rendertarget_view_get_resource(wined3d_dsv), d3d9_dsv->sub_resource_idx, desc.format); } diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 78fbe668857..e21e22a46f7 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -1590,7 +1590,7 @@ static void resolve_depth_buffer(struct wined3d_device *device) if (!(src_view = state->fb.depth_stencil)) return; - wined3d_device_resolve_sub_resource(device, dst_resource, 0, + wined3d_device_context_resolve_sub_resource(&device->cs->c, dst_resource, 0, src_view->resource, src_view->sub_resource_idx, dst_resource->format->id); } @@ -5152,7 +5152,7 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str wined3d_cs_emit_update_sub_resource(device->cs, resource, sub_resource_idx, box, data, row_pitch, depth_pitch); } -void CDECL wined3d_device_resolve_sub_resource(struct wined3d_device *device, +void CDECL wined3d_device_context_resolve_sub_resource(struct wined3d_device_context *context, struct wined3d_resource *dst_resource, unsigned int dst_sub_resource_idx, struct wined3d_resource *src_resource, unsigned int src_sub_resource_idx, enum wined3d_format_id format_id) @@ -5162,9 +5162,9 @@ void CDECL wined3d_device_resolve_sub_resource(struct wined3d_device *device, struct wined3d_blt_fx fx = {0}; RECT dst_rect, src_rect; - TRACE("device %p, dst_resource %p, dst_sub_resource_idx %u, " + TRACE("context %p, dst_resource %p, dst_sub_resource_idx %u, " "src_resource %p, src_sub_resource_idx %u, format %s.\n", - device, dst_resource, dst_sub_resource_idx, + context, dst_resource, dst_sub_resource_idx, src_resource, src_sub_resource_idx, debug_d3dformat(format_id)); if (wined3d_format_is_typeless(dst_resource->format) @@ -5197,7 +5197,7 @@ void CDECL wined3d_device_resolve_sub_resource(struct wined3d_device *device, src_level = src_sub_resource_idx % src_texture->level_count; SetRect(&src_rect, 0, 0, wined3d_texture_get_level_width(src_texture, src_level), wined3d_texture_get_level_height(src_texture, src_level)); - wined3d_device_context_blt(&device->cs->c, dst_texture, dst_sub_resource_idx, &dst_rect, + wined3d_device_context_blt(context, dst_texture, dst_sub_resource_idx, &dst_rect, src_texture, src_sub_resource_idx, &src_rect, 0, &fx, WINED3D_TEXF_POINT); } diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec index d15b56b89d4..34eca80a94e 100644 --- a/dlls/wined3d/wined3d.spec +++ b/dlls/wined3d/wined3d.spec @@ -111,7 +111,6 @@ @ cdecl wined3d_device_process_vertices(ptr long long long ptr ptr long long) @ cdecl wined3d_device_release_focus_window(ptr) @ cdecl wined3d_device_reset(ptr ptr ptr ptr long) -@ cdecl wined3d_device_resolve_sub_resource(ptr ptr long ptr long long) @ cdecl wined3d_device_set_base_vertex_index(ptr long) @ cdecl wined3d_device_set_blend_state(ptr ptr ptr) @ cdecl wined3d_device_set_clip_status(ptr ptr) @@ -172,6 +171,7 @@ @ cdecl wined3d_device_context_draw_indirect(ptr ptr long long) @ cdecl wined3d_device_context_dispatch(ptr long long long) @ cdecl wined3d_device_context_dispatch_indirect(ptr ptr long) +@ cdecl wined3d_device_context_resolve_sub_resource(ptr ptr long ptr long long) @ cdecl wined3d_device_context_set_blend_state(ptr ptr ptr long) @ cdecl wined3d_device_context_set_constant_buffer(ptr long long ptr) @ cdecl wined3d_device_context_set_depth_stencil_state(ptr ptr long) diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index e3667cd3f60..0e356aa7ecb 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2461,10 +2461,6 @@ void __cdecl wined3d_device_release_focus_window(struct wined3d_device *device); HRESULT __cdecl wined3d_device_reset(struct wined3d_device *device, const struct wined3d_swapchain_desc *swapchain_desc, const struct wined3d_display_mode *mode, wined3d_device_reset_cb callback, BOOL reset_state); -void __cdecl wined3d_device_resolve_sub_resource(struct wined3d_device *device, - struct wined3d_resource *dst_resource, unsigned int dst_sub_resource_idx, - struct wined3d_resource *src_resource, unsigned int src_sub_resource_idx, - enum wined3d_format_id format_id); void __cdecl wined3d_device_set_base_vertex_index(struct wined3d_device *device, INT base_index); void __cdecl wined3d_device_set_blend_state(struct wined3d_device *device, struct wined3d_blend_state *blend_state, const struct wined3d_color *blend_factor, unsigned int sample_mask); @@ -2571,6 +2567,9 @@ void __cdecl wined3d_device_context_draw_indexed(struct wined3d_device_context * unsigned int start_index, unsigned int index_count, unsigned int start_instance, unsigned int instance_count); void __cdecl wined3d_device_context_draw_indirect(struct wined3d_device_context *context, struct wined3d_buffer *buffer, unsigned int offset, bool indexed); +void __cdecl wined3d_device_context_resolve_sub_resource(struct wined3d_device_context *context, + struct wined3d_resource *dst_resource, unsigned int dst_sub_resource_idx, + struct wined3d_resource *src_resource, unsigned int src_sub_resource_idx, enum wined3d_format_id format_id); void __cdecl wined3d_device_context_set_blend_state(struct wined3d_device_context *context, struct wined3d_blend_state *state, const struct wined3d_color *blend_factor, unsigned int sample_mask); void __cdecl wined3d_device_context_set_constant_buffer(struct wined3d_device_context *context,
1
0
0
0
Zebediah Figura : wined3d: Pass a wined3d_device_context to wined3d_texture_blt().
by Alexandre Julliard
07 Apr '21
07 Apr '21
Module: wine Branch: master Commit: 86dcbadffb464a1b8bef7ab28b8345b9051ffda4 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=86dcbadffb464a1b8bef7ab2…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Tue Apr 6 20:56:44 2021 -0500 wined3d: Pass a wined3d_device_context to wined3d_texture_blt(). Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3d8/device.c | 9 ++++++--- dlls/d3d9/device.c | 9 ++++++--- dlls/ddraw/device.c | 4 ++-- dlls/ddraw/surface.c | 16 +++++++++------- dlls/wined3d/cs.c | 4 ++-- dlls/wined3d/device.c | 2 +- dlls/wined3d/swapchain.c | 2 +- dlls/wined3d/texture.c | 11 ++++++----- dlls/wined3d/wined3d.spec | 2 +- include/wine/wined3d.h | 7 ++++--- 10 files changed, 38 insertions(+), 28 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=86dcbadffb464a1b8bef…
1
0
0
0
Zebediah Figura : wined3d: Pass a wined3d_device_context to wined3d_device_copy_sub_resource_region().
by Alexandre Julliard
07 Apr '21
07 Apr '21
Module: wine Branch: master Commit: 8c4061a7786bc55478495baeaf21ea3278e7adb0 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=8c4061a7786bc55478495bae…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Tue Apr 6 20:56:43 2021 -0500 wined3d: Pass a wined3d_device_context to wined3d_device_copy_sub_resource_region(). Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3d11/device.c | 13 +++++++------ dlls/d3d8/device.c | 4 ++-- dlls/d3d9/device.c | 6 +++--- dlls/ddraw/ddraw_private.h | 4 ++-- dlls/ddraw/executebuffer.c | 2 +- dlls/wined3d/device.c | 8 ++++---- dlls/wined3d/wined3d.spec | 2 +- include/wine/wined3d.h | 8 ++++---- 8 files changed, 24 insertions(+), 23 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=8c4061a7786bc5547849…
1
0
0
0
Zebediah Figura : wined3d: Pass a wined3d_device_context to wined3d_device_copy_resource().
by Alexandre Julliard
07 Apr '21
07 Apr '21
Module: wine Branch: master Commit: f65fafe35b8d5c6bd16758da113b056e78c2861d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f65fafe35b8d5c6bd16758da…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Tue Apr 6 20:56:42 2021 -0500 wined3d: Pass a wined3d_device_context to wined3d_device_copy_resource(). Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3d11/device.c | 7 ++++--- dlls/wined3d/device.c | 8 ++++---- dlls/wined3d/wined3d.spec | 2 +- include/wine/wined3d.h | 4 ++-- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c index e84f88ff5f2..dfe3b60c369 100644 --- a/dlls/d3d11/device.c +++ b/dlls/d3d11/device.c @@ -1237,7 +1237,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_CopySubresourceRegion(ID3D static void STDMETHODCALLTYPE d3d11_immediate_context_CopyResource(ID3D11DeviceContext1 *iface, ID3D11Resource *dst_resource, ID3D11Resource *src_resource) { - struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface); + struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext1(iface); struct wined3d_resource *wined3d_dst_resource, *wined3d_src_resource; TRACE("iface %p, dst_resource %p, src_resource %p.\n", iface, dst_resource, src_resource); @@ -1245,7 +1245,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_CopyResource(ID3D11DeviceC wined3d_dst_resource = wined3d_resource_from_d3d11_resource(dst_resource); wined3d_src_resource = wined3d_resource_from_d3d11_resource(src_resource); wined3d_mutex_lock(); - wined3d_device_copy_resource(device->wined3d_device, wined3d_dst_resource, wined3d_src_resource); + wined3d_device_context_copy_resource(context->wined3d_context, wined3d_dst_resource, wined3d_src_resource); wined3d_mutex_unlock(); } @@ -4896,7 +4896,8 @@ static void STDMETHODCALLTYPE d3d10_device_CopyResource(ID3D10Device1 *iface, wined3d_dst_resource = wined3d_resource_from_d3d10_resource(dst_resource); wined3d_src_resource = wined3d_resource_from_d3d10_resource(src_resource); wined3d_mutex_lock(); - wined3d_device_copy_resource(device->wined3d_device, wined3d_dst_resource, wined3d_src_resource); + wined3d_device_context_copy_resource(device->immediate_context.wined3d_context, + wined3d_dst_resource, wined3d_src_resource); wined3d_mutex_unlock(); } diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 004d3ec8d2a..18f5d5e89a2 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -4839,7 +4839,7 @@ static bool resources_format_compatible(const struct wined3d_resource *src_resou return false; } -void CDECL wined3d_device_copy_resource(struct wined3d_device *device, +void CDECL wined3d_device_context_copy_resource(struct wined3d_device_context *context, struct wined3d_resource *dst_resource, struct wined3d_resource *src_resource) { unsigned int src_row_block_count, dst_row_block_count; @@ -4848,7 +4848,7 @@ void CDECL wined3d_device_copy_resource(struct wined3d_device *device, struct wined3d_box src_box, dst_box; unsigned int i, j; - TRACE("device %p, dst_resource %p, src_resource %p.\n", device, dst_resource, src_resource); + TRACE("context %p, dst_resource %p, src_resource %p.\n", context, dst_resource, src_resource); if (src_resource == dst_resource) { @@ -4893,7 +4893,7 @@ void CDECL wined3d_device_copy_resource(struct wined3d_device *device, if (dst_resource->type == WINED3D_RTYPE_BUFFER) { wined3d_box_set(&src_box, 0, 0, src_resource->size, 1, 0, 1); - wined3d_device_context_emit_blt_sub_resource(&device->cs->c, dst_resource, 0, &src_box, + wined3d_device_context_emit_blt_sub_resource(context, dst_resource, 0, &src_box, src_resource, 0, &src_box, WINED3D_BLT_RAW, NULL, WINED3D_TEXF_POINT); return; } @@ -4918,7 +4918,7 @@ void CDECL wined3d_device_copy_resource(struct wined3d_device *device, { unsigned int idx = j * dst_texture->level_count + i; - wined3d_device_context_emit_blt_sub_resource(&device->cs->c, dst_resource, idx, &dst_box, + wined3d_device_context_emit_blt_sub_resource(context, dst_resource, idx, &dst_box, src_resource, idx, &src_box, WINED3D_BLT_RAW, NULL, WINED3D_TEXF_POINT); } } diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec index 3ea90e0c925..79170de8032 100644 --- a/dlls/wined3d/wined3d.spec +++ b/dlls/wined3d/wined3d.spec @@ -44,7 +44,6 @@ @ cdecl wined3d_device_clear(ptr long ptr long ptr float long) @ cdecl wined3d_device_clear_rendertarget_view(ptr ptr ptr long ptr float long) @ cdecl wined3d_device_clear_unordered_access_view_uint(ptr ptr ptr) -@ cdecl wined3d_device_copy_resource(ptr ptr ptr) @ cdecl wined3d_device_copy_sub_resource_region(ptr ptr long long long long ptr long ptr long) @ cdecl wined3d_device_create(ptr ptr long ptr long long ptr long ptr ptr) @ cdecl wined3d_device_decref(ptr) @@ -165,6 +164,7 @@ @ cdecl wined3d_device_update_texture(ptr ptr ptr) @ cdecl wined3d_device_validate_device(ptr ptr) +@ cdecl wined3d_device_context_copy_resource(ptr ptr ptr) @ cdecl wined3d_device_context_copy_uav_counter(ptr ptr long ptr) @ cdecl wined3d_device_context_draw(ptr long long long long) @ cdecl wined3d_device_context_draw_indexed(ptr long long long long long) diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index bff77b2b949..9540c3a631f 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2357,8 +2357,6 @@ HRESULT __cdecl wined3d_device_clear_rendertarget_view(struct wined3d_device *de const struct wined3d_color *color, float depth, DWORD stencil); void __cdecl wined3d_device_clear_unordered_access_view_uint(struct wined3d_device *device, struct wined3d_unordered_access_view *view, const struct wined3d_uvec4 *clear_value); -void __cdecl wined3d_device_copy_resource(struct wined3d_device *device, - struct wined3d_resource *dst_resource, struct wined3d_resource *src_resource); HRESULT __cdecl wined3d_device_copy_sub_resource_region(struct wined3d_device *device, struct wined3d_resource *dst_resource, unsigned int dst_sub_resource_idx, unsigned int dst_x, unsigned int dst_y, unsigned int dst_z, struct wined3d_resource *src_resource, @@ -2555,6 +2553,8 @@ HRESULT __cdecl wined3d_device_update_texture(struct wined3d_device *device, struct wined3d_texture *src_texture, struct wined3d_texture *dst_texture); HRESULT __cdecl wined3d_device_validate_device(const struct wined3d_device *device, DWORD *num_passes); +void __cdecl wined3d_device_context_copy_resource(struct wined3d_device_context *context, + struct wined3d_resource *dst_resource, struct wined3d_resource *src_resource); void __cdecl wined3d_device_context_copy_uav_counter(struct wined3d_device_context *context, struct wined3d_buffer *dst_buffer, unsigned int offset, struct wined3d_unordered_access_view *uav); void __cdecl wined3d_device_context_dispatch(struct wined3d_device_context *context,
1
0
0
0
Zebediah Figura : wined3d: Pass a wined3d_device_context to wined3d_cs_emit_blt_sub_resource().
by Alexandre Julliard
07 Apr '21
07 Apr '21
Module: wine Branch: master Commit: 9b3504543aaddf8e208f358d6dcedb713525bf61 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9b3504543aaddf8e208f358d…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Tue Apr 6 20:56:41 2021 -0500 wined3d: Pass a wined3d_device_context to wined3d_cs_emit_blt_sub_resource(). Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/cs.c | 20 +++++++++++++------- dlls/wined3d/device.c | 10 +++++----- dlls/wined3d/texture.c | 4 ++-- dlls/wined3d/wined3d_private.h | 8 ++++---- 4 files changed, 24 insertions(+), 18 deletions(-) diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c index 462e6d8a93b..f7b947616dd 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c @@ -474,6 +474,12 @@ static inline void wined3d_device_context_submit(struct wined3d_device_context * context->ops->submit(context, queue_id); } +static inline void wined3d_device_context_finish(struct wined3d_device_context *context, + enum wined3d_cs_queue_id queue_id) +{ + context->ops->finish(context, queue_id); +} + static const char *debug_cs_op(enum wined3d_cs_op op) { switch (op) @@ -2425,14 +2431,14 @@ error: wined3d_resource_release(op->dst_resource); } -void wined3d_cs_emit_blt_sub_resource(struct wined3d_cs *cs, struct wined3d_resource *dst_resource, - unsigned int dst_sub_resource_idx, const struct wined3d_box *dst_box, struct wined3d_resource *src_resource, - unsigned int src_sub_resource_idx, const struct wined3d_box *src_box, DWORD flags, - const struct wined3d_blt_fx *fx, enum wined3d_texture_filter_type filter) +void wined3d_device_context_emit_blt_sub_resource(struct wined3d_device_context *context, + struct wined3d_resource *dst_resource, unsigned int dst_sub_resource_idx, const struct wined3d_box *dst_box, + struct wined3d_resource *src_resource, unsigned int src_sub_resource_idx, const struct wined3d_box *src_box, + unsigned int flags, const struct wined3d_blt_fx *fx, enum wined3d_texture_filter_type filter) { struct wined3d_cs_blt_sub_resource *op; - op = wined3d_device_context_require_space(&cs->c, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT); + op = wined3d_device_context_require_space(context, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT); op->opcode = WINED3D_CS_OP_BLT_SUB_RESOURCE; op->dst_resource = dst_resource; op->dst_sub_resource_idx = dst_sub_resource_idx; @@ -2451,9 +2457,9 @@ void wined3d_cs_emit_blt_sub_resource(struct wined3d_cs *cs, struct wined3d_reso if (src_resource) wined3d_resource_acquire(src_resource); - wined3d_device_context_submit(&cs->c, WINED3D_CS_QUEUE_DEFAULT); + wined3d_device_context_submit(context, WINED3D_CS_QUEUE_DEFAULT); if (flags & WINED3D_BLT_SYNCHRONOUS) - wined3d_cs_finish(cs, WINED3D_CS_QUEUE_DEFAULT); + wined3d_device_context_finish(context, WINED3D_CS_QUEUE_DEFAULT); } static void wined3d_cs_exec_update_sub_resource(struct wined3d_cs *cs, const void *data) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index c03621c706a..004d3ec8d2a 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -4613,7 +4613,7 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device, wined3d_texture_get_level_box(dst_texture, i, &box); for (j = 0; j < layer_count; ++j) { - wined3d_cs_emit_blt_sub_resource(device->cs, + wined3d_device_context_emit_blt_sub_resource(&device->cs->c, &dst_texture->resource, j * dst_level_count + i, &box, &src_texture->resource, j * src_level_count + i + src_skip_levels, &box, 0, NULL, WINED3D_TEXF_POINT); @@ -4659,7 +4659,7 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device, wined3d_texture_get_level_depth(src_texture, src_level)); } - wined3d_cs_emit_blt_sub_resource(device->cs, + wined3d_device_context_emit_blt_sub_resource(&device->cs->c, &dst_texture->resource, i * dst_level_count + j, &box, &src_texture->resource, i * src_level_count + src_level, &box, 0, NULL, WINED3D_TEXF_POINT); @@ -4893,7 +4893,7 @@ void CDECL wined3d_device_copy_resource(struct wined3d_device *device, if (dst_resource->type == WINED3D_RTYPE_BUFFER) { wined3d_box_set(&src_box, 0, 0, src_resource->size, 1, 0, 1); - wined3d_cs_emit_blt_sub_resource(device->cs, dst_resource, 0, &src_box, + wined3d_device_context_emit_blt_sub_resource(&device->cs->c, dst_resource, 0, &src_box, src_resource, 0, &src_box, WINED3D_BLT_RAW, NULL, WINED3D_TEXF_POINT); return; } @@ -4918,7 +4918,7 @@ void CDECL wined3d_device_copy_resource(struct wined3d_device *device, { unsigned int idx = j * dst_texture->level_count + i; - wined3d_cs_emit_blt_sub_resource(device->cs, dst_resource, idx, &dst_box, + wined3d_device_context_emit_blt_sub_resource(&device->cs->c, dst_resource, idx, &dst_box, src_resource, idx, &src_box, WINED3D_BLT_RAW, NULL, WINED3D_TEXF_POINT); } } @@ -5079,7 +5079,7 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev } } - wined3d_cs_emit_blt_sub_resource(device->cs, dst_resource, dst_sub_resource_idx, &dst_box, + wined3d_device_context_emit_blt_sub_resource(&device->cs->c, dst_resource, dst_sub_resource_idx, &dst_box, src_resource, src_sub_resource_idx, src_box, WINED3D_BLT_RAW, NULL, WINED3D_TEXF_POINT); return WINED3D_OK; diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c index 0736f612f12..363f4641b3f 100644 --- a/dlls/wined3d/texture.c +++ b/dlls/wined3d/texture.c @@ -3911,8 +3911,8 @@ HRESULT CDECL wined3d_texture_blt(struct wined3d_texture *dst_texture, unsigned return E_NOTIMPL; } - wined3d_cs_emit_blt_sub_resource(dst_texture->resource.device->cs, &dst_texture->resource, dst_sub_resource_idx, - &dst_box, &src_texture->resource, src_sub_resource_idx, &src_box, flags, fx, filter); + wined3d_device_context_emit_blt_sub_resource(&dst_texture->resource.device->cs->c, &dst_texture->resource, + dst_sub_resource_idx, &dst_box, &src_texture->resource, src_sub_resource_idx, &src_box, flags, fx, filter); return WINED3D_OK; } diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 957290c7ece..38f19b21fbf 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -4723,10 +4723,6 @@ void wined3d_cs_destroy_object(struct wined3d_cs *cs, void (*callback)(void *object), void *object) DECLSPEC_HIDDEN; void wined3d_cs_emit_add_dirty_texture_region(struct wined3d_cs *cs, struct wined3d_texture *texture, unsigned int layer) DECLSPEC_HIDDEN; -void wined3d_cs_emit_blt_sub_resource(struct wined3d_cs *cs, struct wined3d_resource *dst_resource, - unsigned int dst_sub_resource_idx, const struct wined3d_box *dst_box, struct wined3d_resource *src_resource, - unsigned int src_sub_resource_idx, const struct wined3d_box *src_box, DWORD flags, - const struct wined3d_blt_fx *fx, enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN; void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *rects, DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil) DECLSPEC_HIDDEN; void wined3d_cs_emit_clear_rendertarget_view(struct wined3d_cs *cs, struct wined3d_rendertarget_view *view, @@ -4781,6 +4777,10 @@ static inline void wined3d_cs_push_constants(struct wined3d_cs *cs, enum wined3d cs->c.ops->push_constants(&cs->c, p, start_idx, count, constants); } +void wined3d_device_context_emit_blt_sub_resource(struct wined3d_device_context *context, + struct wined3d_resource *dst_resource, unsigned int dst_sub_resource_idx, const struct wined3d_box *dst_box, + struct wined3d_resource *src_resource, unsigned int src_sub_resource_idx, const struct wined3d_box *src_box, + unsigned int flags, const struct wined3d_blt_fx *fx, enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN; void wined3d_device_context_emit_copy_uav_counter(struct wined3d_device_context *context, struct wined3d_buffer *dst_buffer, unsigned int offset, struct wined3d_unordered_access_view *uav) DECLSPEC_HIDDEN;
1
0
0
0
Jacek Caban : mshtml: Expose IHTMLStyleSheet4 to scripts.
by Alexandre Julliard
07 Apr '21
07 Apr '21
Module: wine Branch: master Commit: 1afbe2e1ea2ca1dc8a4e3c5bb71bdbd22f20b2b7 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=1afbe2e1ea2ca1dc8a4e3c5b…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Apr 7 00:24:30 2021 +0200 mshtml: Expose IHTMLStyleSheet4 to scripts. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mshtml/htmlstylesheet.c | 9 ++++++++- dlls/mshtml/tests/documentmode.js | 36 ++++++++++++++++++++++++++++++++++++ dlls/mshtml/tests/dom.js | 12 ++++++++++++ 3 files changed, 56 insertions(+), 1 deletion(-) diff --git a/dlls/mshtml/htmlstylesheet.c b/dlls/mshtml/htmlstylesheet.c index da9a1a0894a..243aea2e618 100644 --- a/dlls/mshtml/htmlstylesheet.c +++ b/dlls/mshtml/htmlstylesheet.c @@ -1102,6 +1102,12 @@ static const IHTMLStyleSheet4Vtbl HTMLStyleSheet4Vtbl = { HTMLStyleSheet4_deleteRule, }; +static void HTMLStyleSheet_init_dispex_info(dispex_data_t *info, compat_mode_t mode) +{ + if(mode >= COMPAT_MODE_IE9) + dispex_info_add_interface(info, IHTMLStyleSheet4_tid, NULL); +} + static const tid_t HTMLStyleSheet_iface_tids[] = { IHTMLStyleSheet_tid, 0 @@ -1109,7 +1115,8 @@ static const tid_t HTMLStyleSheet_iface_tids[] = { static dispex_static_data_t HTMLStyleSheet_dispex = { NULL, DispHTMLStyleSheet_tid, - HTMLStyleSheet_iface_tids + HTMLStyleSheet_iface_tids, + HTMLStyleSheet_init_dispex_info }; HRESULT create_style_sheet(nsIDOMStyleSheet *nsstylesheet, compat_mode_t compat_mode, IHTMLStyleSheet **ret) diff --git a/dlls/mshtml/tests/documentmode.js b/dlls/mshtml/tests/documentmode.js index a8bcc611083..75a132e83a7 100644 --- a/dlls/mshtml/tests/documentmode.js +++ b/dlls/mshtml/tests/documentmode.js @@ -134,6 +134,42 @@ sync_test("xhr_props", function() { test_exposed("dispatchEvent", v >= 9); }); +sync_test("stylesheet_props", function() { + var v = document.documentMode; + var elem = document.createElement("style"); + document.body.appendChild(elem); + var sheet = v >= 9 ? elem.sheet : elem.styleSheet; + + function test_exposed(prop, expect) { + if(expect) + ok(prop in sheet, prop + " not found in style sheet."); + else + ok(!(prop in sheet), prop + " found in style sheet."); + } + + test_exposed("href", true); + test_exposed("title", true); + test_exposed("type", true); + test_exposed("media", true); + test_exposed("ownerNode", v >= 9); + test_exposed("ownerRule", v >= 9); + test_exposed("cssRules", v >= 9); + test_exposed("insertRule", v >= 9); + test_exposed("deleteRule", v >= 9); + test_exposed("disabled", true); + test_exposed("parentStyleSheet", true); + test_exposed("owningElement", true); + test_exposed("readOnly", true); + test_exposed("imports", true); + test_exposed("id", true); + test_exposed("addImport", true); + test_exposed("addRule", true); + test_exposed("removeImport", true); + test_exposed("removeRule", true); + test_exposed("cssText", true); + test_exposed("rules", true); +}); + sync_test("xhr open", function() { var e = false; try { diff --git a/dlls/mshtml/tests/dom.js b/dlls/mshtml/tests/dom.js index 4db743241a0..564ca87821a 100644 --- a/dlls/mshtml/tests/dom.js +++ b/dlls/mshtml/tests/dom.js @@ -381,6 +381,7 @@ sync_test("style_properties", function() { sync_test("stylesheets", function() { document.body.innerHTML = '<style>.div { margin-right: 1px; }</style>'; + var elem = document.body.firstChild; ok(document.styleSheets.length === 1, "document.styleSheets.length = " + document.styleSheets.length); @@ -393,6 +394,17 @@ sync_test("stylesheets", function() { stylesheet.rules.item(1); ok(false, "expected exception"); }catch(e) {} + + ok(stylesheet.href === null, "stylesheet.href = " + stylesheet.href); + + var id = stylesheet.insertRule(".input { margin-left: 1px; }", 0); + ok(id === 0, "id = " + id); + ok(document.styleSheets.length === 1, "document.styleSheets.length = " + document.styleSheets.length); + + try { + stylesheet.insertRule(".input { margin-left: 1px; }", 3); + ok(false, "expected exception"); + }catch(e) {} }); sync_test("storage", function() {
1
0
0
0
Jacek Caban : mshtml: Add IHTMLStyleSheet4::insertRule implementation.
by Alexandre Julliard
07 Apr '21
07 Apr '21
Module: wine Branch: master Commit: 9756574f884dbbc556f156f71c406e465cf9808c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9756574f884dbbc556f156f7…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Apr 7 00:24:23 2021 +0200 mshtml: Add IHTMLStyleSheet4::insertRule implementation. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mshtml/htmlstylesheet.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/dlls/mshtml/htmlstylesheet.c b/dlls/mshtml/htmlstylesheet.c index 321c1ae94a5..da9a1a0894a 100644 --- a/dlls/mshtml/htmlstylesheet.c +++ b/dlls/mshtml/htmlstylesheet.c @@ -1059,11 +1059,21 @@ static HRESULT WINAPI HTMLStyleSheet4_get_media(IHTMLStyleSheet4 *iface, VARIANT return E_NOTIMPL; } -static HRESULT WINAPI HTMLStyleSheet4_insertRule(IHTMLStyleSheet4 *iface, BSTR rule, LONG index, LONG *new_index) +static HRESULT WINAPI HTMLStyleSheet4_insertRule(IHTMLStyleSheet4 *iface, BSTR rule, LONG index, LONG *p) { HTMLStyleSheet *This = impl_from_IHTMLStyleSheet4(iface); - FIXME("(%p)->(%s %d %p)\n", This, debugstr_w(rule), index, new_index); - return E_NOTIMPL; + UINT32 new_index = 0; + nsAString nsstr; + nsresult nsres; + + TRACE("(%p)->(%s %d %p)\n", This, debugstr_w(rule), index, p); + + nsAString_InitDepend(&nsstr, rule); + nsres = nsIDOMCSSStyleSheet_InsertRule(This->nsstylesheet, &nsstr, index, &new_index); + if(NS_FAILED(nsres)) WARN("failed: %08x\n", nsres); + nsAString_Finish(&nsstr); + *p = new_index; + return map_nsresult(nsres); } static HRESULT WINAPI HTMLStyleSheet4_deleteRule(IHTMLStyleSheet4 *iface, LONG index)
1
0
0
0
Jacek Caban : mshtml: Add IHTMLStyleSheet4 stub implementation.
by Alexandre Julliard
07 Apr '21
07 Apr '21
Module: wine Branch: master Commit: 171f8ada6ef124b579356691ebc6805432b09ed1 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=171f8ada6ef124b579356691…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Apr 7 00:24:13 2021 +0200 mshtml: Add IHTMLStyleSheet4 stub implementation. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mshtml/htmlstylesheet.c | 146 +++++++++++++++++++++++++++++++++++++++++++ dlls/mshtml/mshtml_private.h | 1 + 2 files changed, 147 insertions(+) diff --git a/dlls/mshtml/htmlstylesheet.c b/dlls/mshtml/htmlstylesheet.c index 81cb0002e61..321c1ae94a5 100644 --- a/dlls/mshtml/htmlstylesheet.c +++ b/dlls/mshtml/htmlstylesheet.c @@ -35,6 +35,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(mshtml); struct HTMLStyleSheet { DispatchEx dispex; IHTMLStyleSheet IHTMLStyleSheet_iface; + IHTMLStyleSheet4 IHTMLStyleSheet4_iface; LONG ref; @@ -619,6 +620,8 @@ static HRESULT WINAPI HTMLStyleSheet_QueryInterface(IHTMLStyleSheet *iface, REFI *ppv = &This->IHTMLStyleSheet_iface; }else if(IsEqualGUID(&IID_IHTMLStyleSheet, riid)) { *ppv = &This->IHTMLStyleSheet_iface; + }else if(IsEqualGUID(&IID_IHTMLStyleSheet4, riid)) { + *ppv = &This->IHTMLStyleSheet4_iface; }else if(dispex_query_interface(&This->dispex, riid, ppv)) { return *ppv ? S_OK : E_NOINTERFACE; }else { @@ -947,6 +950,148 @@ static const IHTMLStyleSheetVtbl HTMLStyleSheetVtbl = { HTMLStyleSheet_get_rules }; +static inline HTMLStyleSheet *impl_from_IHTMLStyleSheet4(IHTMLStyleSheet4 *iface) +{ + return CONTAINING_RECORD(iface, HTMLStyleSheet, IHTMLStyleSheet4_iface); +} + +static HRESULT WINAPI HTMLStyleSheet4_QueryInterface(IHTMLStyleSheet4 *iface, REFIID riid, void **ppv) +{ + HTMLStyleSheet *This = impl_from_IHTMLStyleSheet4(iface); + return IHTMLStyleSheet_QueryInterface(&This->IHTMLStyleSheet_iface, riid, ppv); +} + +static ULONG WINAPI HTMLStyleSheet4_AddRef(IHTMLStyleSheet4 *iface) +{ + HTMLStyleSheet *This = impl_from_IHTMLStyleSheet4(iface); + return IHTMLStyleSheet_AddRef(&This->IHTMLStyleSheet_iface); +} + +static ULONG WINAPI HTMLStyleSheet4_Release(IHTMLStyleSheet4 *iface) +{ + HTMLStyleSheet *This = impl_from_IHTMLStyleSheet4(iface); + return IHTMLStyleSheet_Release(&This->IHTMLStyleSheet_iface); +} + +static HRESULT WINAPI HTMLStyleSheet4_GetTypeInfoCount(IHTMLStyleSheet4 *iface, UINT *pctinfo) +{ + HTMLStyleSheet *This = impl_from_IHTMLStyleSheet4(iface); + TRACE("(%p)->(%p)\n", This, pctinfo); + return IDispatchEx_GetTypeInfoCount(&This->dispex.IDispatchEx_iface, pctinfo); +} + +static HRESULT WINAPI HTMLStyleSheet4_GetTypeInfo(IHTMLStyleSheet4 *iface, UINT iTInfo, + LCID lcid, ITypeInfo **ppTInfo) +{ + HTMLStyleSheet *This = impl_from_IHTMLStyleSheet4(iface); + return IDispatchEx_GetTypeInfo(&This->dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo); +} + +static HRESULT WINAPI HTMLStyleSheet4_GetIDsOfNames(IHTMLStyleSheet4 *iface, REFIID riid, + LPOLESTR *rgszNames, UINT cNames, + LCID lcid, DISPID *rgDispId) +{ + HTMLStyleSheet *This = impl_from_IHTMLStyleSheet4(iface); + return IDispatchEx_GetIDsOfNames(&This->dispex.IDispatchEx_iface, riid, rgszNames, cNames, lcid, rgDispId); +} + +static HRESULT WINAPI HTMLStyleSheet4_Invoke(IHTMLStyleSheet4 *iface, DISPID dispIdMember, + REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, + VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) +{ + HTMLStyleSheet *This = impl_from_IHTMLStyleSheet4(iface); + return IDispatchEx_Invoke(&This->dispex.IDispatchEx_iface, dispIdMember, riid, lcid, wFlags, pDispParams, + pVarResult, pExcepInfo, puArgErr); +} + +static HRESULT WINAPI HTMLStyleSheet4_get_type(IHTMLStyleSheet4 *iface, BSTR *p) +{ + HTMLStyleSheet *This = impl_from_IHTMLStyleSheet4(iface); + TRACE("(%p)->(%p)\n", This, p); + return IHTMLStyleSheet_get_type(&This->IHTMLStyleSheet_iface, p); +} + +static HRESULT WINAPI HTMLStyleSheet4_get_href(IHTMLStyleSheet4 *iface, VARIANT *p) +{ + HTMLStyleSheet *This = impl_from_IHTMLStyleSheet4(iface); + nsAString href_str; + nsresult nsres; + + TRACE("(%p)->(%p)\n", This, p); + + nsAString_Init(&href_str, NULL); + nsres = nsIDOMCSSStyleSheet_GetHref(This->nsstylesheet, &href_str); + return return_nsstr_variant(nsres, &href_str, 0, p); +} + +static HRESULT WINAPI HTMLStyleSheet4_get_title(IHTMLStyleSheet4 *iface, BSTR *p) +{ + HTMLStyleSheet *This = impl_from_IHTMLStyleSheet4(iface); + FIXME("(%p)->(%p)\n", This, p); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLStyleSheet4_get_ownerNode(IHTMLStyleSheet4 *iface, IHTMLElement **p) +{ + HTMLStyleSheet *This = impl_from_IHTMLStyleSheet4(iface); + FIXME("(%p)->(%p)\n", This, p); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLStyleSheet4_get_ownerRule(IHTMLStyleSheet4 *iface, IHTMLCSSRule **p) +{ + HTMLStyleSheet *This = impl_from_IHTMLStyleSheet4(iface); + FIXME("(%p)->(%p)\n", This, p); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLStyleSheet4_get_cssRules(IHTMLStyleSheet4 *iface, IHTMLStyleSheetRulesCollection **p) +{ + HTMLStyleSheet *This = impl_from_IHTMLStyleSheet4(iface); + TRACE("(%p)->(%p)\n", This, p); + return IHTMLStyleSheet_get_rules(&This->IHTMLStyleSheet_iface, p); +} + +static HRESULT WINAPI HTMLStyleSheet4_get_media(IHTMLStyleSheet4 *iface, VARIANT *p) +{ + HTMLStyleSheet *This = impl_from_IHTMLStyleSheet4(iface); + FIXME("(%p)->(%p)\n", This, p); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLStyleSheet4_insertRule(IHTMLStyleSheet4 *iface, BSTR rule, LONG index, LONG *new_index) +{ + HTMLStyleSheet *This = impl_from_IHTMLStyleSheet4(iface); + FIXME("(%p)->(%s %d %p)\n", This, debugstr_w(rule), index, new_index); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLStyleSheet4_deleteRule(IHTMLStyleSheet4 *iface, LONG index) +{ + HTMLStyleSheet *This = impl_from_IHTMLStyleSheet4(iface); + FIXME("(%p)->(%d)\n", This, index); + return E_NOTIMPL; +} + +static const IHTMLStyleSheet4Vtbl HTMLStyleSheet4Vtbl = { + HTMLStyleSheet4_QueryInterface, + HTMLStyleSheet4_AddRef, + HTMLStyleSheet4_Release, + HTMLStyleSheet4_GetTypeInfoCount, + HTMLStyleSheet4_GetTypeInfo, + HTMLStyleSheet4_GetIDsOfNames, + HTMLStyleSheet4_Invoke, + HTMLStyleSheet4_get_type, + HTMLStyleSheet4_get_href, + HTMLStyleSheet4_get_title, + HTMLStyleSheet4_get_ownerNode, + HTMLStyleSheet4_get_ownerRule, + HTMLStyleSheet4_get_cssRules, + HTMLStyleSheet4_get_media, + HTMLStyleSheet4_insertRule, + HTMLStyleSheet4_deleteRule, +}; + static const tid_t HTMLStyleSheet_iface_tids[] = { IHTMLStyleSheet_tid, 0 @@ -966,6 +1111,7 @@ HRESULT create_style_sheet(nsIDOMStyleSheet *nsstylesheet, compat_mode_t compat_ return E_OUTOFMEMORY; style_sheet->IHTMLStyleSheet_iface.lpVtbl = &HTMLStyleSheetVtbl; + style_sheet->IHTMLStyleSheet4_iface.lpVtbl = &HTMLStyleSheet4Vtbl; style_sheet->ref = 1; style_sheet->nsstylesheet = NULL; diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index d6b71b0521b..adb71014acb 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -238,6 +238,7 @@ typedef struct EventTarget EventTarget; XIID(IHTMLStyleElement) \ XIID(IHTMLStyleElement2) \ XIID(IHTMLStyleSheet) \ + XIID(IHTMLStyleSheet4) \ XIID(IHTMLStyleSheetRule) \ XIID(IHTMLStyleSheetRulesCollection) \ XIID(IHTMLStyleSheetsCollection) \
1
0
0
0
← Newer
1
...
70
71
72
73
74
75
76
...
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