Wine-devel
Threads by month
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- 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
October 2020
- 82 participants
- 799 discussions
"This profile is made available by the International Color Consortium,
and may be copied, distributed, embedded, made, used, and sold without
restriction. Altered versions of this profile shall have the original
identification and copyright information removed and shall not be
misrepresented as the original profile."
See http://www.color.org/srgbprofiles.xalter
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=37396
Signed-off-by: Alex Henrie <alexhenrie24(a)gmail.com>
---
.../winspool.drv/sRGB_Color_Space_Profile.icm | Bin 0 -> 3024 bytes
dlls/winspool.drv/winspool.rc | 3 ++
dlls/winspool.drv/wspool.c | 38 ++++++++++++++++++
dlls/winspool.drv/wspool.h | 2 +
4 files changed, 43 insertions(+)
create mode 100644 dlls/winspool.drv/sRGB_Color_Space_Profile.icm
diff --git a/dlls/winspool.drv/sRGB_Color_Space_Profile.icm b/dlls/winspool.drv/sRGB_Color_Space_Profile.icm
new file mode 100644
index 0000000000000000000000000000000000000000..49afbfef10f22a1832590b68369d2f248ea553b9
GIT binary patch
literal 3024
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
literal 0
HcmV?d00001
diff --git a/dlls/winspool.drv/winspool.rc b/dlls/winspool.drv/winspool.rc
index 50772ce60bb..1b573be096e 100644
--- a/dlls/winspool.drv/winspool.rc
+++ b/dlls/winspool.drv/winspool.rc
@@ -47,6 +47,9 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
/* @makedep: generic.ppd */
1 PPDFILE generic.ppd
+/* @makedep: sRGB_Color_Space_Profile.icm */
+IDR_SRGB_ICM RCDATA sRGB_Color_Space_Profile.icm
+
#define WINE_FILENAME_STR "winspool.drv"
#define WINE_FILEDESCRIPTION_STR "Wine core printer driver"
diff --git a/dlls/winspool.drv/wspool.c b/dlls/winspool.drv/wspool.c
index bbfb0fb0f42..baa7bfdb455 100644
--- a/dlls/winspool.drv/wspool.c
+++ b/dlls/winspool.drv/wspool.c
@@ -104,6 +104,43 @@ BOOL load_backend(void)
return FALSE;
}
+static void create_color_profiles(void)
+{
+ static const WCHAR color_dir[] = {'\\','s','p','o','o','l',
+ '\\','d','r','i','v','e','r','s',
+ '\\','c','o','l','o','r','\\',0};
+ static const WCHAR srgb_icm[] = {'s','R','G','B',' ',
+ 'C','o','l','o','r',' ',
+ 'S','p','a','c','e',' ',
+ 'P','r','o','f','i','l','e','.','i','c','m',0};
+ WCHAR profile_path[MAX_PATH];
+ HANDLE file;
+ HRSRC res;
+ DWORD size, written;
+ char *data;
+ BOOL ret;
+
+ GetSystemDirectoryW(profile_path, ARRAY_SIZE(profile_path));
+ lstrcatW(profile_path, color_dir);
+ lstrcatW(profile_path, srgb_icm);
+
+ file = CreateFileW(profile_path, GENERIC_WRITE, 0, NULL, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, NULL);
+ if (file == INVALID_HANDLE_VALUE)
+ return;
+
+ ret = ((res = FindResourceA(WINSPOOL_hInstance, MAKEINTRESOURCEA(IDR_SRGB_ICM), (const char *)RT_RCDATA)) &&
+ (size = SizeofResource(WINSPOOL_hInstance, res)) &&
+ (data = LoadResource(WINSPOOL_hInstance, res)) &&
+ WriteFile(file, data, size, &written, NULL) &&
+ written == size);
+ CloseHandle(file);
+ if (!ret)
+ {
+ ERR("Failed to create %s\n", wine_dbgstr_w(profile_path));
+ DeleteFileW(profile_path);
+ }
+}
+
/******************************************************************************
* DllMain
*
@@ -118,6 +155,7 @@ BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD reason, LPVOID lpReserved)
WINSPOOL_hInstance = hInstance;
DisableThreadLibraryCalls(hInstance);
WINSPOOL_LoadSystemPrinters();
+ create_color_profiles();
break;
}
case DLL_PROCESS_DETACH:
diff --git a/dlls/winspool.drv/wspool.h b/dlls/winspool.drv/wspool.h
index 06c28231330..a229b1ffe88 100644
--- a/dlls/winspool.drv/wspool.h
+++ b/dlls/winspool.drv/wspool.h
@@ -33,5 +33,7 @@ extern void WINSPOOL_LoadSystemPrinters(void) DECLSPEC_HIDDEN;
#define IDS_FILE_EXISTS 11
#define IDS_CANNOT_OPEN 12
+#define IDR_SRGB_ICM 2
+
#define FILENAME_DIALOG 100
#define EDITBOX 201
--
2.29.1
2
1
[PATCH v3 1/6] amstream: Wait for the state transition to complete in AMMultiMediaStream::SetState.
by Anton Baskanov 05 Nov '20
by Anton Baskanov 05 Nov '20
05 Nov '20
Signed-off-by: Anton Baskanov <baskanov(a)gmail.com>
---
dlls/amstream/multimedia.c | 4 ++
dlls/amstream/tests/amstream.c | 76 ++++++++++++++++++++++++++++++++++
2 files changed, 80 insertions(+)
diff --git a/dlls/amstream/multimedia.c b/dlls/amstream/multimedia.c
index 82ef4822344..967baacb747 100644
--- a/dlls/amstream/multimedia.c
+++ b/dlls/amstream/multimedia.c
@@ -156,7 +156,11 @@ static HRESULT WINAPI multimedia_stream_SetState(IAMMultiMediaStream *iface, STR
{
hr = IMediaControl_Run(This->media_control);
if (SUCCEEDED(hr))
+ {
+ FILTER_STATE state;
+ IMediaControl_GetState(This->media_control, INFINITE, (OAFilterState *)&state);
hr = S_OK;
+ }
}
else if (new_state == STREAMSTATE_STOP)
hr = IMediaControl_Stop(This->media_control);
diff --git a/dlls/amstream/tests/amstream.c b/dlls/amstream/tests/amstream.c
index b436840e407..bd4f94f7327 100644
--- a/dlls/amstream/tests/amstream.c
+++ b/dlls/amstream/tests/amstream.c
@@ -924,11 +924,13 @@ struct testfilter
LONGLONG current_position;
LONGLONG stop_position;
const AM_MEDIA_TYPE *preferred_mt;
+ HANDLE wait_state_event;
HRESULT get_duration_hr;
HRESULT get_stop_position_hr;
HRESULT set_positions_hr;
HRESULT init_stream_hr;
HRESULT cleanup_stream_hr;
+ HRESULT wait_state_hr;
};
static inline struct testfilter *impl_from_BaseFilter(struct strmbase_filter *iface)
@@ -947,6 +949,7 @@ static struct strmbase_pin *testfilter_get_pin(struct strmbase_filter *iface, un
static void testfilter_destroy(struct strmbase_filter *iface)
{
struct testfilter *filter = impl_from_BaseFilter(iface);
+ CloseHandle(filter->wait_state_event);
strmbase_source_cleanup(&filter->source);
strmbase_filter_cleanup(&filter->filter);
}
@@ -971,12 +974,27 @@ static HRESULT testfilter_cleanup_stream(struct strmbase_filter *iface)
return filter->cleanup_stream_hr;
}
+static HRESULT testfilter_wait_state(struct strmbase_filter *iface, DWORD timeout)
+{
+ struct testfilter *filter = impl_from_BaseFilter(iface);
+ HRESULT hr;
+
+ LeaveCriticalSection(&filter->filter.csFilter);
+ WaitForSingleObject(filter->wait_state_event, timeout);
+ EnterCriticalSection(&filter->filter.csFilter);
+
+ hr = filter->wait_state_hr;
+
+ return hr;
+}
+
static const struct strmbase_filter_ops testfilter_ops =
{
.filter_get_pin = testfilter_get_pin,
.filter_destroy = testfilter_destroy,
.filter_init_stream = testfilter_init_stream,
.filter_cleanup_stream = testfilter_cleanup_stream,
+ .filter_wait_state = testfilter_wait_state,
};
static inline struct testfilter *impl_from_base_pin(struct strmbase_pin *iface)
@@ -1060,6 +1078,7 @@ static void testfilter_init(struct testfilter *filter)
strmbase_filter_init(&filter->filter, NULL, &clsid, &testfilter_ops);
strmbase_source_init(&filter->source, &filter->filter, L"", &testsource_ops);
filter->stop_position = 0x8000000000000000ULL;
+ filter->wait_state_event = CreateEventW(NULL, TRUE, TRUE, NULL);
}
static inline struct testfilter *impl_from_IMediaSeeking(IMediaSeeking *iface)
@@ -2319,11 +2338,25 @@ static void test_initialize(void)
IUnknown_Release(graph_inner_unk);
}
+static IAMMultiMediaStream *mmstream_mmstream;
+static STREAM_STATE mmstream_state;
+
+static DWORD CALLBACK mmstream_set_state(void *param)
+{
+ HRESULT hr;
+
+ hr = IAMMultiMediaStream_SetState(mmstream_mmstream, mmstream_state);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
+
+ return 0;
+}
+
static void test_set_state(void)
{
IAMMultiMediaStream *mmstream = create_ammultimediastream();
struct testfilter source;
IGraphBuilder *graph;
+ HANDLE thread;
HRESULT hr;
ULONG ref;
@@ -2353,6 +2386,42 @@ static void test_set_state(void)
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP);
ok(hr == S_OK, "Got hr %#x.\n", hr);
+ source.wait_state_hr = E_FAIL;
+ hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
+ source.wait_state_hr = S_OK;
+ hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
+
+ source.wait_state_hr = VFW_S_STATE_INTERMEDIATE;
+ ResetEvent(source.wait_state_event);
+
+ mmstream_mmstream = mmstream;
+ mmstream_state = STREAMSTATE_RUN;
+ thread = CreateThread(NULL, 0, mmstream_set_state, NULL, 0, NULL);
+
+ ok(WaitForSingleObject(thread, 100) == WAIT_TIMEOUT, "SetState returned prematurely.\n");
+
+ EnterCriticalSection(&source.filter.csFilter);
+ source.wait_state_hr = S_OK;
+ SetEvent(source.wait_state_event);
+ LeaveCriticalSection(&source.filter.csFilter);
+
+ ok(!WaitForSingleObject(thread, 2000), "Wait timed out.\n");
+ CloseHandle(thread);
+
+ hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
+
+ source.init_stream_hr = E_FAIL;
+ source.wait_state_hr = VFW_S_STATE_INTERMEDIATE;
+ hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN);
+ ok(hr == E_FAIL, "Got hr %#x.\n", hr);
+ source.init_stream_hr = S_OK;
+ source.wait_state_hr = S_OK;
+ hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
+
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN);
ok(hr == S_OK, "Got hr %#x.\n", hr);
source.cleanup_stream_hr = E_FAIL;
@@ -2369,6 +2438,13 @@ static void test_set_state(void)
ok(hr == S_FALSE, "Got hr %#x.\n", hr);
source.cleanup_stream_hr = S_OK;
+ hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
+ source.wait_state_hr = VFW_S_STATE_INTERMEDIATE;
+ hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
+ source.wait_state_hr = S_OK;
+
ref = IAMMultiMediaStream_Release(mmstream);
ok(!ref, "Got outstanding refcount %d.\n", ref);
ref = IGraphBuilder_Release(graph);
--
2.17.1
2
11
[PATCH] winecoreaudio.drv: Only read 'length' bytes from received MIDIPackets.
by Brendan Shanks 05 Nov '20
by Brendan Shanks 05 Nov '20
05 Nov '20
The Core MIDI MIDIPacket struct is declared with a 256-byte data array,
but this is just for convenience. There may be only one accessible byte,
or there may be more than 256.
Only read 'length' bytes from the packet, and correctly handle a
length > 256.
Signed-off-by: Brendan Shanks <bshanks(a)codeweavers.com>
---
The previous code was also passing a 260 byte struct by value, and
copying around 256 bytes even though most MIDI messages are only a few
bytes.
dlls/winecoreaudio.drv/coremidi.c | 7 ++-----
dlls/winecoreaudio.drv/coremidi.h | 8 +-------
dlls/winecoreaudio.drv/midi.c | 18 +++++++++++++++---
3 files changed, 18 insertions(+), 15 deletions(-)
diff --git a/dlls/winecoreaudio.drv/coremidi.c b/dlls/winecoreaudio.drv/coremidi.c
index 5ec564603a9..94761b05c4f 100644
--- a/dlls/winecoreaudio.drv/coremidi.c
+++ b/dlls/winecoreaudio.drv/coremidi.c
@@ -57,15 +57,12 @@ void CoreMIDI_GetObjectName(MIDIObjectRef obj, char *name, int size)
void MIDIIn_ReadProc(const MIDIPacketList *pktlist, void *refCon, void *connRefCon)
{
unsigned int i;
- MIDIMessage msg;
MIDIPacket *packet = (MIDIPacket *)pktlist->packet;
for (i = 0; i < pktlist->numPackets; ++i) {
- msg.devID = *((UInt16 *)connRefCon);
- msg.length = packet->length;
- memcpy(msg.data, packet->data, sizeof(packet->data));
+ UInt16 devID = *((UInt16 *)connRefCon);
- MIDIIn_SendMessage(msg);
+ MIDIIn_SendMessage(devID, packet->data, packet->length);
packet = MIDIPacketNext(packet);
}
diff --git a/dlls/winecoreaudio.drv/coremidi.h b/dlls/winecoreaudio.drv/coremidi.h
index c93edc6c31d..3433a1d4342 100644
--- a/dlls/winecoreaudio.drv/coremidi.h
+++ b/dlls/winecoreaudio.drv/coremidi.h
@@ -65,12 +65,6 @@ extern int AudioUnit_SetVolume(AudioUnit au, float left, float right);
extern int AudioUnit_GetVolume(AudioUnit au, float *left, float *right);
#endif
-typedef struct {
- UInt16 devID;
- UInt16 length;
- Byte data[256];
-} MIDIMessage;
-
/* coremidi.c */
extern MIDIClientRef CoreMIDI_CreateClient(CFStringRef name);
extern void CoreMIDI_GetObjectName(MIDIObjectRef obj, char *name, int size);
@@ -79,6 +73,6 @@ extern void MIDIIn_ReadProc(const MIDIPacketList *pktlist, void *refCon, void *c
extern void MIDIOut_Send(MIDIPortRef port, MIDIEndpointRef dest, UInt8 *buffer, unsigned length);
/* midi.c */
-void MIDIIn_SendMessage(MIDIMessage msg);
+void MIDIIn_SendMessage(UInt16 devID, const void *buffer, UInt16 length);
#endif
diff --git a/dlls/winecoreaudio.drv/midi.c b/dlls/winecoreaudio.drv/midi.c
index edaf1283124..c299d116f12 100644
--- a/dlls/winecoreaudio.drv/midi.c
+++ b/dlls/winecoreaudio.drv/midi.c
@@ -78,6 +78,12 @@ typedef struct tagMIDISource {
DWORD startTime;
} MIDISource;
+typedef struct {
+ UInt16 devID;
+ UInt16 length;
+ Byte data[];
+} MIDIMessage;
+
static CRITICAL_SECTION midiInLock; /* Critical section for MIDI In */
static CFStringRef MIDIInThreadPortName = NULL;
@@ -797,16 +803,22 @@ static DWORD MIDIIn_Reset(WORD wDevID)
* Call from CoreMIDI IO threaded callback,
* we can't call Wine debug channels, critical section or anything using NtCurrentTeb here.
*/
-void MIDIIn_SendMessage(MIDIMessage msg)
+void MIDIIn_SendMessage(UInt16 devID, const void *buffer, UInt16 length)
{
- CFDataRef data;
+ MIDIMessage msg;
+ CFMutableDataRef data;
CFMessagePortRef messagePort;
messagePort = CFMessagePortCreateRemote(kCFAllocatorDefault, MIDIInThreadPortName);
- data = CFDataCreate(kCFAllocatorDefault, (UInt8 *) &msg, sizeof(msg));
+ msg.devID = devID;
+ msg.length = length;
+
+ data = CFDataCreateMutable(kCFAllocatorDefault, sizeof(msg) + length);
if (data)
{
+ CFDataAppendBytes(data, (UInt8 *) &msg, sizeof(msg));
+ CFDataAppendBytes(data, buffer, length);
CFMessagePortSendRequest(messagePort, 0, data, 0.0, 0.0, NULL, NULL);
CFRelease(data);
}
--
2.26.2
2
1
05 Nov '20
Signed-off-by: Robert Wilhelm <robert.wilhelm(a)gmx.net>
---
dlls/vbscript/lex.c | 10 +++++++++-
dlls/vbscript/tests/lang.vbs | 22 ++++++++++++++++++++++
2 files changed, 31 insertions(+), 1 deletion(-)
diff --git a/dlls/vbscript/lex.c b/dlls/vbscript/lex.c
index 251374d90e6..78fca8271cc 100644
--- a/dlls/vbscript/lex.c
+++ b/dlls/vbscript/lex.c
@@ -99,6 +99,14 @@ static inline BOOL is_identifier_char(WCHAR c)
return iswalnum(c) || c == '_';
}
+static BOOL is_identifier( int token)
+{
+ if (token == tIdentifier || token == tDEFAULT || token == tERROR ||
+ token == tEXPLICIT || token == tPROPERTY || token == tSTEP)
+ return TRUE;
+ return FALSE;
+}
+
static int check_keyword(parser_ctx_t *ctx, const WCHAR *word, const WCHAR **lval)
{
const WCHAR *p1 = ctx->ptr;
@@ -425,7 +433,7 @@ static int parse_next_token(void *lval, unsigned *loc, parser_ctx_t *ctx)
* Parser can't predict if bracket is part of argument expression or an argument
* in call expression. We predict it here instead.
*/
- if(ctx->last_token == tIdentifier || ctx->last_token == ')')
+ if(is_identifier(ctx->last_token) || ctx->last_token == ')')
return '(';
return tEXPRLBRACKET;
case '"':
diff --git a/dlls/vbscript/tests/lang.vbs b/dlls/vbscript/tests/lang.vbs
index 65f8a458cd7..570bb7fbcb3 100644
--- a/dlls/vbscript/tests/lang.vbs
+++ b/dlls/vbscript/tests/lang.vbs
@@ -1631,9 +1631,31 @@ sub test_identifiers
Dim step
step = "xx"
Call ok(step = "xx", "step = " & step & " expected ""xx""")
+
+ Dim property
+ property = "xx"
+ Call ok(property = "xx", "property = " & property & " expected ""xx""")
end sub
call test_identifiers()
+Class class_test_identifiers_as_function_name
+ Sub Property ( par )
+ End Sub
+
+ Function Error( par )
+ End Function
+
+ Sub Default ()
+ End Sub
+
+ Function Explicit (par)
+ Explicit = par
+ End Function
+
+ Sub Step ( default )
+ End Sub
+End Class
+
sub test_dotIdentifiers
' test keywords that can also be an identifier after a dot
Call ok(testObj.rem = 10, "testObj.rem = " & testObj.rem & " expected 10")
--
2.26.2
2
1
[PATCH 1/4] ntdll: Introduce ldr_data_section CS and lock it for loader structures modifications.
by Paul Gofman 04 Nov '20
by Paul Gofman 04 Nov '20
04 Nov '20
Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com>
---
Looks like the loader functions which do not involve actual loading or unloading DLL
are not taking loader lock since Windows 8. That is the case even for LdrAddRefDll
and LdrUnloadDll (at least if the latter does not result in actual dll unload).
dlls/ntdll/loader.c | 56 +++++++++++++++++++++++++++++++++++++--------
1 file changed, 47 insertions(+), 9 deletions(-)
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index 368448c9f8d..15690524b63 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -147,6 +147,23 @@ static RTL_CRITICAL_SECTION_DEBUG critsect_debug =
};
static RTL_CRITICAL_SECTION loader_section = { &critsect_debug, -1, 0, 0, 0, 0 };
+/* ldr_data_section allows for read only access to module linked lists in PEB and
+ * the underlying structures without taking loader lock. The relations between
+ * ldr_data_section and loader_sections are:
+ * - modification to the module linked lists is done with both sections locked
+ * (loader section to be always locked first);
+ * - read only access is allowed with either section locked;
+ * - in case of taking one section only for the read access the lock scope should
+ * include the access to the underlying structures. */
+static CRITICAL_SECTION ldr_data_section;
+static CRITICAL_SECTION_DEBUG ldr_data_section_debug =
+{
+ 0, 0, &ldr_data_section,
+ { &ldr_data_section_debug.ProcessLocksList, &ldr_data_section_debug.ProcessLocksList },
+ 0, 0, { (DWORD_PTR)(__FILE__ ": ldr_data_section") }
+};
+static CRITICAL_SECTION ldr_data_section = { &ldr_data_section_debug, -1, 0, 0, 0, 0 };
+
static CRITICAL_SECTION dlldir_section;
static CRITICAL_SECTION_DEBUG dlldir_critsect_debug =
{
@@ -181,6 +198,16 @@ static FARPROC find_ordinal_export( HMODULE module, const IMAGE_EXPORT_DIRECTORY
static FARPROC find_named_export( HMODULE module, const IMAGE_EXPORT_DIRECTORY *exports,
DWORD exp_size, const char *name, int hint, LPCWSTR load_path );
+static inline void lock_ldr_data(void)
+{
+ RtlEnterCriticalSection( &ldr_data_section );
+}
+
+static inline void unlock_ldr_data(void)
+{
+ RtlLeaveCriticalSection( &ldr_data_section );
+}
+
/* convert PE image VirtualAddress to Real Address */
static inline void *get_rva( HMODULE module, DWORD va )
{
@@ -466,7 +493,7 @@ static void call_ldr_notifications( ULONG reason, LDR_DATA_TABLE_ENTRY *module )
* get_modref
*
* Looks for the referenced HMODULE in the current process
- * The loader_section must be locked while calling this function.
+ * The ldr_data_section or loader_section must be locked while calling this function.
*/
static WINE_MODREF *get_modref( HMODULE hmod )
{
@@ -490,7 +517,7 @@ static WINE_MODREF *get_modref( HMODULE hmod )
* find_basename_module
*
* Find a module from its base name.
- * The loader_section must be locked while calling this function
+ * The ldr_data_section or loader_section must be locked while calling this function
*/
static WINE_MODREF *find_basename_module( LPCWSTR name )
{
@@ -520,7 +547,7 @@ static WINE_MODREF *find_basename_module( LPCWSTR name )
* find_fullname_module
*
* Find a module from its full path name.
- * The loader_section must be locked while calling this function
+ * The ldr_data_section or loader_section must be locked while calling this function
*/
static WINE_MODREF *find_fullname_module( const UNICODE_STRING *nt_name )
{
@@ -552,7 +579,7 @@ static WINE_MODREF *find_fullname_module( const UNICODE_STRING *nt_name )
* find_fileid_module
*
* Find a module from its file id.
- * The loader_section must be locked while calling this function
+ * The ldr_data_section or loader_section must be locked while calling this function
*/
static WINE_MODREF *find_fileid_module( const struct file_id *id )
{
@@ -601,7 +628,7 @@ static WINE_MODREF **grow_module_deps( WINE_MODREF *wm, int count )
* find_forwarded_export
*
* Find the final function pointer for a forwarded function.
- * The loader_section must be locked while calling this function.
+ * The ldr_data_section or loader_section must be locked while calling this function.
*/
static FARPROC find_forwarded_export( HMODULE module, const char *forward, LPCWSTR load_path )
{
@@ -673,7 +700,7 @@ static FARPROC find_forwarded_export( HMODULE module, const char *forward, LPCWS
*
* Find an exported function by ordinal.
* The exports base must have been subtracted from the ordinal already.
- * The loader_section must be locked while calling this function.
+ * The ldr_data_section or loader_section must be locked while calling this function.
*/
static FARPROC find_ordinal_export( HMODULE module, const IMAGE_EXPORT_DIRECTORY *exports,
DWORD exp_size, DWORD ordinal, LPCWSTR load_path )
@@ -713,7 +740,7 @@ static FARPROC find_ordinal_export( HMODULE module, const IMAGE_EXPORT_DIRECTORY
* find_named_export
*
* Find an exported function by name.
- * The loader_section must be locked while calling this function.
+ * The ldr_data_section or loader_section must be locked while calling this function.
*/
static FARPROC find_named_export( HMODULE module, const IMAGE_EXPORT_DIRECTORY *exports,
DWORD exp_size, const char *name, int hint, LPCWSTR load_path )
@@ -1199,11 +1226,13 @@ static WINE_MODREF *alloc_module( HMODULE hModule, const UNICODE_STRING *nt_name
wm->ldr.EntryPoint = (char *)hModule + nt->OptionalHeader.AddressOfEntryPoint;
}
+ lock_ldr_data();
InsertTailList(&NtCurrentTeb()->Peb->LdrData->InLoadOrderModuleList,
&wm->ldr.InLoadOrderLinks);
InsertTailList(&NtCurrentTeb()->Peb->LdrData->InMemoryOrderModuleList,
&wm->ldr.InMemoryOrderLinks);
/* wait until init is called for inserting into InInitializationOrderModuleList */
+ unlock_ldr_data();
if (!(nt->OptionalHeader.DllCharacteristics & IMAGE_DLLCHARACTERISTICS_NX_COMPAT))
{
@@ -1410,8 +1439,12 @@ static NTSTATUS process_attach( WINE_MODREF *wm, LPVOID lpReserved )
}
if (!wm->ldr.InInitializationOrderLinks.Flink)
+ {
+ lock_ldr_data();
InsertTailList(&NtCurrentTeb()->Peb->LdrData->InInitializationOrderModuleList,
&wm->ldr.InInitializationOrderLinks);
+ unlock_ldr_data();
+ }
/* Call DLL entry point */
if (status == STATUS_SUCCESS)
@@ -1908,8 +1941,10 @@ static NTSTATUS build_module( LPCWSTR load_path, const UNICODE_STRING *nt_name,
if (status != STATUS_SUCCESS)
{
/* the module has only be inserted in the load & memory order lists */
+ lock_ldr_data();
RemoveEntryList(&wm->ldr.InLoadOrderLinks);
RemoveEntryList(&wm->ldr.InMemoryOrderLinks);
+ unlock_ldr_data();
/* FIXME: there are several more dangling references
* left. Including dlls loaded by this dll before the
@@ -3276,10 +3311,13 @@ void WINAPI LdrShutdownThread(void)
*/
static void free_modref( WINE_MODREF *wm )
{
+ lock_ldr_data();
RemoveEntryList(&wm->ldr.InLoadOrderLinks);
RemoveEntryList(&wm->ldr.InMemoryOrderLinks);
if (wm->ldr.InInitializationOrderLinks.Flink)
RemoveEntryList(&wm->ldr.InInitializationOrderLinks);
+ if (cached_modref == wm) cached_modref = NULL;
+ unlock_ldr_data();
TRACE(" unloading %s\n", debugstr_w(wm->ldr.FullDllName.Buffer));
if (!TRACE_ON(module))
@@ -3298,7 +3336,6 @@ static void free_modref( WINE_MODREF *wm )
RtlReleaseActivationContext( wm->ldr.ActivationContext );
unix_funcs->unload_builtin_dll( wm->ldr.DllBase );
NtUnmapViewOfSection( NtCurrentProcess(), wm->ldr.DllBase );
- if (cached_modref == wm) cached_modref = NULL;
RtlFreeUnicodeString( &wm->ldr.FullDllName );
RtlFreeHeap( GetProcessHeap(), 0, wm->deps );
RtlFreeHeap( GetProcessHeap(), 0, wm );
@@ -4125,7 +4162,8 @@ static NTSTATUS process_init(void)
}
#endif
- /* the main exe needs to be the first in the load order list */
+ /* the main exe needs to be the first in the load order list.
+ * ldr_data_section locking is redundant here. */
RemoveEntryList( &wm->ldr.InLoadOrderLinks );
InsertHeadList( &peb->LdrData->InLoadOrderModuleList, &wm->ldr.InLoadOrderLinks );
RemoveEntryList( &wm->ldr.InMemoryOrderLinks );
--
2.28.0
3
9
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com>
---
dlls/jscript/function.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/jscript/function.c b/dlls/jscript/function.c
index e43d19464bb..6361eefc677 100644
--- a/dlls/jscript/function.c
+++ b/dlls/jscript/function.c
@@ -836,7 +836,7 @@ static HRESULT BindFunction_call(script_ctx_t *ctx, FunctionInstance *func, IDis
call_argc = function->argc + argc;
if(call_argc) {
- call_args = heap_alloc(function->argc * sizeof(*function->args));
+ call_args = heap_alloc(call_argc * sizeof(*call_args));
if(!call_args)
return E_OUTOFMEMORY;
--
2.28.0
2
1
[PATCH] mshtml: Use wide-char string literals in struct initialization.
by Michael Stefaniuc 03 Nov '20
by Michael Stefaniuc 03 Nov '20
03 Nov '20
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/mshtml/htmlbody.c | 49 ++---
dlls/mshtml/htmldoc.c | 41 +---
dlls/mshtml/htmlelem.c | 92 +++-----
dlls/mshtml/htmlevent.c | 136 ++++--------
dlls/mshtml/htmlstyle.c | 463 +++++++++++-----------------------------
5 files changed, 231 insertions(+), 550 deletions(-)
diff --git a/dlls/mshtml/htmlbody.c b/dlls/mshtml/htmlbody.c
index a49f8162c08..fddc4c6da0e 100644
--- a/dlls/mshtml/htmlbody.c
+++ b/dlls/mshtml/htmlbody.c
@@ -45,43 +45,26 @@ typedef struct {
nsIDOMHTMLBodyElement *nsbody;
} HTMLBodyElement;
-static const WCHAR aquaW[] = {'a','q','u','a',0};
-static const WCHAR blackW[] = {'b','l','a','c','k',0};
-static const WCHAR blueW[] = {'b','l','u','e',0};
-static const WCHAR fuchsiaW[] = {'f','u','s','h','s','i','a',0};
-static const WCHAR grayW[] = {'g','r','a','y',0};
-static const WCHAR greenW[] = {'g','r','e','e','n',0};
-static const WCHAR limeW[] = {'l','i','m','e',0};
-static const WCHAR maroonW[] = {'m','a','r','o','o','n',0};
-static const WCHAR navyW[] = {'n','a','v','y',0};
-static const WCHAR oliveW[] = {'o','l','i','v','e',0};
-static const WCHAR purpleW[] = {'p','u','r','p','l','e',0};
-static const WCHAR redW[] = {'r','e','d',0};
-static const WCHAR silverW[] = {'s','i','l','v','e','r',0};
-static const WCHAR tealW[] = {'t','e','a','l',0};
-static const WCHAR whiteW[] = {'w','h','i','t','e',0};
-static const WCHAR yellowW[] = {'y','e','l','l','o','w',0};
-
static const struct {
LPCWSTR keyword;
DWORD rgb;
} keyword_table[] = {
- {aquaW, 0x00ffff},
- {blackW, 0x000000},
- {blueW, 0x0000ff},
- {fuchsiaW, 0xff00ff},
- {grayW, 0x808080},
- {greenW, 0x008000},
- {limeW, 0x00ff00},
- {maroonW, 0x800000},
- {navyW, 0x000080},
- {oliveW, 0x808000},
- {purpleW, 0x800080},
- {redW, 0xff0000},
- {silverW, 0xc0c0c0},
- {tealW, 0x008080},
- {whiteW, 0xffffff},
- {yellowW, 0xffff00}
+ {L"aqua", 0x00ffff},
+ {L"black", 0x000000},
+ {L"blue", 0x0000ff},
+ {L"fushsia", 0xff00ff},
+ {L"gray", 0x808080},
+ {L"green", 0x008000},
+ {L"lime", 0x00ff00},
+ {L"maroon", 0x800000},
+ {L"navy", 0x000080},
+ {L"olive", 0x808000},
+ {L"purple", 0x800080},
+ {L"red", 0xff0000},
+ {L"silver", 0xc0c0c0},
+ {L"teal", 0x008080},
+ {L"white", 0xffffff},
+ {L"yellow", 0xffff00}
};
static int comp_value(const WCHAR *ptr, int dpc)
diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c
index 0fd039bfa60..5644d92dbe5 100644
--- a/dlls/mshtml/htmldoc.c
+++ b/dlls/mshtml/htmldoc.c
@@ -1185,41 +1185,20 @@ static HRESULT WINAPI HTMLDocument_clear(IHTMLDocument2 *iface)
return S_OK;
}
-static const WCHAR copyW[] =
- {'c','o','p','y',0};
-static const WCHAR cutW[] =
- {'c','u','t',0};
-static const WCHAR fontnameW[] =
- {'f','o','n','t','n','a','m','e',0};
-static const WCHAR fontsizeW[] =
- {'f','o','n','t','s','i','z','e',0};
-static const WCHAR indentW[] =
- {'i','n','d','e','n','t',0};
-static const WCHAR insertorderedlistW[] =
- {'i','n','s','e','r','t','o','r','d','e','r','e','d','l','i','s','t',0};
-static const WCHAR insertunorderedlistW[] =
- {'i','n','s','e','r','t','u','n','o','r','d','e','r','e','d','l','i','s','t',0};
-static const WCHAR outdentW[] =
- {'o','u','t','d','e','n','t',0};
-static const WCHAR pasteW[] =
- {'p','a','s','t','e',0};
-static const WCHAR respectvisibilityindesignW[] =
- {'r','e','s','p','e','c','t','v','i','s','i','b','i','l','i','t','y','i','n','d','e','s','i','g','n',0};
-
static const struct {
const WCHAR *name;
OLECMDID id;
}command_names[] = {
- {copyW, IDM_COPY},
- {cutW, IDM_CUT},
- {fontnameW, IDM_FONTNAME},
- {fontsizeW, IDM_FONTSIZE},
- {indentW, IDM_INDENT},
- {insertorderedlistW, IDM_ORDERLIST},
- {insertunorderedlistW, IDM_UNORDERLIST},
- {outdentW, IDM_OUTDENT},
- {pasteW, IDM_PASTE},
- {respectvisibilityindesignW, IDM_RESPECTVISIBILITY_INDESIGN}
+ {L"copy", IDM_COPY},
+ {L"cut", IDM_CUT},
+ {L"fontname", IDM_FONTNAME},
+ {L"fontsize", IDM_FONTSIZE},
+ {L"indent", IDM_INDENT},
+ {L"insertorderedlist", IDM_ORDERLIST},
+ {L"insertunorderedlist", IDM_UNORDERLIST},
+ {L"outdent", IDM_OUTDENT},
+ {L"paste", IDM_PASTE},
+ {L"respectvisibilityindesign", IDM_RESPECTVISIBILITY_INDESIGN}
};
static BOOL cmdid_from_string(const WCHAR *str, OLECMDID *cmdid)
diff --git a/dlls/mshtml/htmlelem.c b/dlls/mshtml/htmlelem.c
index 6578ee75109..1dcddbaa672 100644
--- a/dlls/mshtml/htmlelem.c
+++ b/dlls/mshtml/htmlelem.c
@@ -38,32 +38,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
-static const WCHAR aW[] = {'A',0};
-static const WCHAR areaW[] = {'A','R','E','A',0};
-static const WCHAR bodyW[] = {'B','O','D','Y',0};
-static const WCHAR buttonW[] = {'B','U','T','T','O','N',0};
-static const WCHAR embedW[] = {'E','M','B','E','D',0};
-static const WCHAR formW[] = {'F','O','R','M',0};
-static const WCHAR frameW[] = {'F','R','A','M','E',0};
-static const WCHAR headW[] = {'H','E','A','D',0};
-static const WCHAR htmlW[] = {'H','T','M','L',0};
-static const WCHAR iframeW[] = {'I','F','R','A','M','E',0};
-static const WCHAR imgW[] = {'I','M','G',0};
-static const WCHAR inputW[] = {'I','N','P','U','T',0};
-static const WCHAR labelW[] = {'L','A','B','E','L',0};
-static const WCHAR linkW[] = {'L','I','N','K',0};
-static const WCHAR metaW[] = {'M','E','T','A',0};
-static const WCHAR objectW[] = {'O','B','J','E','C','T',0};
-static const WCHAR optionW[] = {'O','P','T','I','O','N',0};
-static const WCHAR scriptW[] = {'S','C','R','I','P','T',0};
-static const WCHAR selectW[] = {'S','E','L','E','C','T',0};
-static const WCHAR styleW[] = {'S','T','Y','L','E',0};
-static const WCHAR tableW[] = {'T','A','B','L','E',0};
-static const WCHAR tdW[] = {'T','D',0};
-static const WCHAR textareaW[] = {'T','E','X','T','A','R','E','A',0};
-static const WCHAR title_tagW[]= {'T','I','T','L','E',0};
-static const WCHAR trW[] = {'T','R',0};
-
#define ATTRFLAG_CASESENSITIVE 0x0001
#define ATTRFLAG_ASSTRING 0x0002
#define ATTRFLAG_EXPANDURL 0x0004
@@ -74,31 +48,31 @@ typedef struct {
} tag_desc_t;
static const tag_desc_t tag_descs[] = {
- {aW, HTMLAnchorElement_Create},
- {areaW, HTMLAreaElement_Create},
- {bodyW, HTMLBodyElement_Create},
- {buttonW, HTMLButtonElement_Create},
- {embedW, HTMLEmbedElement_Create},
- {formW, HTMLFormElement_Create},
- {frameW, HTMLFrameElement_Create},
- {headW, HTMLHeadElement_Create},
- {htmlW, HTMLHtmlElement_Create},
- {iframeW, HTMLIFrame_Create},
- {imgW, HTMLImgElement_Create},
- {inputW, HTMLInputElement_Create},
- {labelW, HTMLLabelElement_Create},
- {linkW, HTMLLinkElement_Create},
- {metaW, HTMLMetaElement_Create},
- {objectW, HTMLObjectElement_Create},
- {optionW, HTMLOptionElement_Create},
- {scriptW, HTMLScriptElement_Create},
- {selectW, HTMLSelectElement_Create},
- {styleW, HTMLStyleElement_Create},
- {tableW, HTMLTable_Create},
- {tdW, HTMLTableCell_Create},
- {textareaW, HTMLTextAreaElement_Create},
- {title_tagW, HTMLTitleElement_Create},
- {trW, HTMLTableRow_Create}
+ {L"A", HTMLAnchorElement_Create},
+ {L"AREA", HTMLAreaElement_Create},
+ {L"BODY", HTMLBodyElement_Create},
+ {L"BUTTON", HTMLButtonElement_Create},
+ {L"EMBED", HTMLEmbedElement_Create},
+ {L"FORM", HTMLFormElement_Create},
+ {L"FRAME", HTMLFrameElement_Create},
+ {L"HEAD", HTMLHeadElement_Create},
+ {L"HTML", HTMLHtmlElement_Create},
+ {L"IFRAME", HTMLIFrame_Create},
+ {L"IMG", HTMLImgElement_Create},
+ {L"INPUT", HTMLInputElement_Create},
+ {L"LABEL", HTMLLabelElement_Create},
+ {L"LINK", HTMLLinkElement_Create},
+ {L"META", HTMLMetaElement_Create},
+ {L"OBJECT", HTMLObjectElement_Create},
+ {L"OPTION", HTMLOptionElement_Create},
+ {L"SCRIPT", HTMLScriptElement_Create},
+ {L"SELECT", HTMLSelectElement_Create},
+ {L"STYLE", HTMLStyleElement_Create},
+ {L"TABLE", HTMLTable_Create},
+ {L"TD", HTMLTableCell_Create},
+ {L"TEXTAREA", HTMLTextAreaElement_Create},
+ {L"TITLE", HTMLTitleElement_Create},
+ {L"TR", HTMLTableRow_Create}
};
static const tag_desc_t *get_tag_desc(const WCHAR *tag_name)
@@ -230,18 +204,12 @@ HRESULT elem_string_attr_setter(HTMLElement *elem, const WCHAR *name, const WCHA
HRESULT get_readystate_string(READYSTATE readystate, BSTR *p)
{
- static const WCHAR uninitializedW[] = {'u','n','i','n','i','t','i','a','l','i','z','e','d',0};
- static const WCHAR loadingW[] = {'l','o','a','d','i','n','g',0};
- static const WCHAR loadedW[] = {'l','o','a','d','e','d',0};
- static const WCHAR interactiveW[] = {'i','n','t','e','r','a','c','t','i','v','e',0};
- static const WCHAR completeW[] = {'c','o','m','p','l','e','t','e',0};
-
static const LPCWSTR readystate_strs[] = {
- uninitializedW,
- loadingW,
- loadedW,
- interactiveW,
- completeW
+ L"uninitialized",
+ L"loading",
+ L"loaded",
+ L"interactive",
+ L"complete"
};
assert(readystate <= READYSTATE_COMPLETE);
diff --git a/dlls/mshtml/htmlevent.c b/dlls/mshtml/htmlevent.c
index 4cf994587fc..0f041cbae6c 100644
--- a/dlls/mshtml/htmlevent.c
+++ b/dlls/mshtml/htmlevent.c
@@ -60,50 +60,6 @@ typedef enum {
DISPATCH_LEGACY
} dispatch_mode_t;
-static const WCHAR abortW[] = {'a','b','o','r','t',0};
-static const WCHAR beforeactivateW[] = {'b','e','f','o','r','e','a','c','t','i','v','a','t','e',0};
-static const WCHAR beforeunloadW[] = {'b','e','f','o','r','e','u','n','l','o','a','d',0};
-static const WCHAR blurW[] = {'b','l','u','r',0};
-static const WCHAR changeW[] = {'c','h','a','n','g','e',0};
-static const WCHAR clickW[] = {'c','l','i','c','k',0};
-static const WCHAR contextmenuW[] = {'c','o','n','t','e','x','t','m','e','n','u',0};
-static const WCHAR dataavailableW[] = {'d','a','t','a','a','v','a','i','l','a','b','l','e',0};
-static const WCHAR dblclickW[] = {'d','b','l','c','l','i','c','k',0};
-static const WCHAR dragW[] = {'d','r','a','g',0};
-static const WCHAR dragstartW[] = {'d','r','a','g','s','t','a','r','t',0};
-static const WCHAR errorW[] = {'e','r','r','o','r',0};
-static const WCHAR focusW[] = {'f','o','c','u','s',0};
-static const WCHAR focusinW[] = {'f','o','c','u','s','i','n',0};
-static const WCHAR focusoutW[] = {'f','o','c','u','s','o','u','t',0};
-static const WCHAR helpW[] = {'h','e','l','p',0};
-static const WCHAR inputW[] = {'i','n','p','u','t',0};
-static const WCHAR keydownW[] = {'k','e','y','d','o','w','n',0};
-static const WCHAR keypressW[] = {'k','e','y','p','r','e','s','s',0};
-static const WCHAR keyupW[] = {'k','e','y','u','p',0};
-static const WCHAR loadW[] = {'l','o','a','d',0};
-static const WCHAR messageW[] = {'m','e','s','s','a','g','e',0};
-static const WCHAR mousedownW[] = {'m','o','u','s','e','d','o','w','n',0};
-static const WCHAR mousemoveW[] = {'m','o','u','s','e','m','o','v','e',0};
-static const WCHAR mouseoutW[] = {'m','o','u','s','e','o','u','t',0};
-static const WCHAR mouseoverW[] = {'m','o','u','s','e','o','v','e','r',0};
-static const WCHAR mouseupW[] = {'m','o','u','s','e','u','p',0};
-static const WCHAR mousewheelW[] = {'m','o','u','s','e','w','h','e','e','l',0};
-static const WCHAR msthumbnailclickW[] = {'m','s','t','h','u','m','b','n','a','i','l','c','l','i','c','k',0};
-static const WCHAR pasteW[] = {'p','a','s','t','e',0};
-static const WCHAR readystatechangeW[] = {'r','e','a','d','y','s','t','a','t','e','c','h','a','n','g','e',0};
-static const WCHAR resizeW[] = {'r','e','s','i','z','e',0};
-static const WCHAR scrollW[] = {'s','c','r','o','l','l',0};
-static const WCHAR selectstartW[] = {'s','e','l','e','c','t','s','t','a','r','t',0};
-static const WCHAR selectionchangeW[] = {'s','e','l','e','c','t','i','o','n','c','h','a','n','g','e',0};
-static const WCHAR submitW[] = {'s','u','b','m','i','t',0};
-static const WCHAR unloadW[] = {'u','n','l','o','a','d',0};
-static const WCHAR DOMContentLoadedW[] = {'D','O','M','C','o','n','t','e','n','t','L','o','a','d','e','d',0};
-
-static const WCHAR EventW[] = {'E','v','e','n','t',0};
-static const WCHAR UIEventW[] = {'U','I','E','v','e','n','t',0};
-static const WCHAR KeyboardEventW[] = {'K','e','y','b','o','a','r','d','E','v','e','n','t',0};
-static const WCHAR MouseEventW[] = {'M','o','u','s','e','E','v','e','n','t',0};
-
typedef enum {
EVENT_TYPE_EVENT,
EVENT_TYPE_UIEVENT,
@@ -116,14 +72,14 @@ typedef enum {
} event_type_t;
static const WCHAR *event_types[] = {
- EventW,
- UIEventW,
- KeyboardEventW,
- MouseEventW,
- EventW, /* FIXME */
- EventW, /* FIXME */
- EventW, /* FIXME */
- EventW /* FIXME */
+ L"Event",
+ L"UIEvent",
+ L"KeyboardEvent",
+ L"MouseEvent",
+ L"Event", /* FIXME */
+ L"Event", /* FIXME */
+ L"Event", /* FIXME */
+ L"Event" /* FIXME */
};
typedef struct {
@@ -151,81 +107,81 @@ typedef struct {
#define EVENT_MOUSE_FROM_RELATED 0x0200
static const event_info_t event_info[] = {
- {abortW, EVENT_TYPE_EVENT, DISPID_EVMETH_ONABORT,
+ {L"abort", EVENT_TYPE_EVENT, DISPID_EVMETH_ONABORT,
EVENT_BIND_TO_TARGET},
- {beforeactivateW, EVENT_TYPE_EVENT, DISPID_EVMETH_ONBEFOREACTIVATE,
+ {L"beforeactivate", EVENT_TYPE_EVENT, DISPID_EVMETH_ONBEFOREACTIVATE,
EVENT_FIXME | EVENT_BUBBLES | EVENT_CANCELABLE},
- {beforeunloadW, EVENT_TYPE_EVENT, DISPID_EVMETH_ONBEFOREUNLOAD,
+ {L"beforeunload", EVENT_TYPE_EVENT, DISPID_EVMETH_ONBEFOREUNLOAD,
EVENT_DEFAULTLISTENER | EVENT_CANCELABLE },
- {blurW, EVENT_TYPE_FOCUS, DISPID_EVMETH_ONBLUR,
+ {L"blur", EVENT_TYPE_FOCUS, DISPID_EVMETH_ONBLUR,
EVENT_DEFAULTLISTENER},
- {changeW, EVENT_TYPE_EVENT, DISPID_EVMETH_ONCHANGE,
+ {L"change", EVENT_TYPE_EVENT, DISPID_EVMETH_ONCHANGE,
EVENT_DEFAULTLISTENER | EVENT_BUBBLES},
- {clickW, EVENT_TYPE_MOUSE, DISPID_EVMETH_ONCLICK,
+ {L"click", EVENT_TYPE_MOUSE, DISPID_EVMETH_ONCLICK,
EVENT_DEFAULTLISTENER | EVENT_HASDEFAULTHANDLERS | EVENT_BUBBLES | EVENT_CANCELABLE },
- {contextmenuW, EVENT_TYPE_MOUSE, DISPID_EVMETH_ONCONTEXTMENU,
+ {L"contextmenu", EVENT_TYPE_MOUSE, DISPID_EVMETH_ONCONTEXTMENU,
EVENT_BUBBLES | EVENT_CANCELABLE},
- {dataavailableW, EVENT_TYPE_EVENT, DISPID_EVMETH_ONDATAAVAILABLE,
+ {L"dataavailable", EVENT_TYPE_EVENT, DISPID_EVMETH_ONDATAAVAILABLE,
EVENT_FIXME | EVENT_BUBBLES},
- {dblclickW, EVENT_TYPE_MOUSE, DISPID_EVMETH_ONDBLCLICK,
+ {L"dblclick", EVENT_TYPE_MOUSE, DISPID_EVMETH_ONDBLCLICK,
EVENT_DEFAULTLISTENER | EVENT_BUBBLES | EVENT_CANCELABLE},
- {DOMContentLoadedW, EVENT_TYPE_EVENT, 0,
+ {L"DOMContentLoaded", EVENT_TYPE_EVENT, 0,
EVENT_DEFAULTLISTENER | EVENT_BUBBLES | EVENT_CANCELABLE},
- {dragW, EVENT_TYPE_DRAG, DISPID_EVMETH_ONDRAG,
+ {L"drag", EVENT_TYPE_DRAG, DISPID_EVMETH_ONDRAG,
EVENT_FIXME | EVENT_BUBBLES | EVENT_CANCELABLE},
- {dragstartW, EVENT_TYPE_DRAG, DISPID_EVMETH_ONDRAGSTART,
+ {L"dragstart", EVENT_TYPE_DRAG, DISPID_EVMETH_ONDRAGSTART,
EVENT_FIXME | EVENT_BUBBLES | EVENT_CANCELABLE},
- {errorW, EVENT_TYPE_EVENT, DISPID_EVMETH_ONERROR,
+ {L"error", EVENT_TYPE_EVENT, DISPID_EVMETH_ONERROR,
EVENT_BIND_TO_TARGET},
- {focusW, EVENT_TYPE_FOCUS, DISPID_EVMETH_ONFOCUS,
+ {L"focus", EVENT_TYPE_FOCUS, DISPID_EVMETH_ONFOCUS,
EVENT_DEFAULTLISTENER},
- {focusinW, EVENT_TYPE_FOCUS, DISPID_EVMETH_ONFOCUSIN,
+ {L"focusin", EVENT_TYPE_FOCUS, DISPID_EVMETH_ONFOCUSIN,
EVENT_BUBBLES},
- {focusoutW, EVENT_TYPE_FOCUS, DISPID_EVMETH_ONFOCUSOUT,
+ {L"focusout", EVENT_TYPE_FOCUS, DISPID_EVMETH_ONFOCUSOUT,
EVENT_BUBBLES},
- {helpW, EVENT_TYPE_EVENT, DISPID_EVMETH_ONHELP,
+ {L"help", EVENT_TYPE_EVENT, DISPID_EVMETH_ONHELP,
EVENT_BUBBLES | EVENT_CANCELABLE},
- {inputW, EVENT_TYPE_EVENT, DISPID_UNKNOWN,
+ {L"input", EVENT_TYPE_EVENT, DISPID_UNKNOWN,
EVENT_DEFAULTLISTENER | EVENT_BUBBLES},
- {keydownW, EVENT_TYPE_KEYBOARD, DISPID_EVMETH_ONKEYDOWN,
+ {L"keydown", EVENT_TYPE_KEYBOARD, DISPID_EVMETH_ONKEYDOWN,
EVENT_DEFAULTLISTENER | EVENT_HASDEFAULTHANDLERS | EVENT_BUBBLES | EVENT_CANCELABLE },
- {keypressW, EVENT_TYPE_KEYBOARD, DISPID_EVMETH_ONKEYPRESS,
+ {L"keypress", EVENT_TYPE_KEYBOARD, DISPID_EVMETH_ONKEYPRESS,
EVENT_DEFAULTLISTENER | EVENT_BUBBLES | EVENT_CANCELABLE},
- {keyupW, EVENT_TYPE_KEYBOARD, DISPID_EVMETH_ONKEYUP,
+ {L"keyup", EVENT_TYPE_KEYBOARD, DISPID_EVMETH_ONKEYUP,
EVENT_DEFAULTLISTENER | EVENT_BUBBLES | EVENT_CANCELABLE},
- {loadW, EVENT_TYPE_UIEVENT, DISPID_EVMETH_ONLOAD,
+ {L"load", EVENT_TYPE_UIEVENT, DISPID_EVMETH_ONLOAD,
EVENT_BIND_TO_TARGET},
- {messageW, EVENT_TYPE_MESSAGE, DISPID_EVMETH_ONMESSAGE,
+ {L"message", EVENT_TYPE_MESSAGE, DISPID_EVMETH_ONMESSAGE,
0},
- {mousedownW, EVENT_TYPE_MOUSE, DISPID_EVMETH_ONMOUSEDOWN,
+ {L"mousedown", EVENT_TYPE_MOUSE, DISPID_EVMETH_ONMOUSEDOWN,
EVENT_DEFAULTLISTENER | EVENT_BUBBLES | EVENT_CANCELABLE},
- {mousemoveW, EVENT_TYPE_MOUSE, DISPID_EVMETH_ONMOUSEMOVE,
+ {L"mousemove", EVENT_TYPE_MOUSE, DISPID_EVMETH_ONMOUSEMOVE,
EVENT_DEFAULTLISTENER | EVENT_BUBBLES | EVENT_CANCELABLE | EVENT_MOUSE_FROM_RELATED},
- {mouseoutW, EVENT_TYPE_MOUSE, DISPID_EVMETH_ONMOUSEOUT,
+ {L"mouseout", EVENT_TYPE_MOUSE, DISPID_EVMETH_ONMOUSEOUT,
EVENT_DEFAULTLISTENER | EVENT_BUBBLES | EVENT_CANCELABLE | EVENT_MOUSE_TO_RELATED},
- {mouseoverW, EVENT_TYPE_MOUSE, DISPID_EVMETH_ONMOUSEOVER,
+ {L"mouseover", EVENT_TYPE_MOUSE, DISPID_EVMETH_ONMOUSEOVER,
EVENT_DEFAULTLISTENER | EVENT_BUBBLES | EVENT_CANCELABLE | EVENT_MOUSE_FROM_RELATED},
- {mouseupW, EVENT_TYPE_MOUSE, DISPID_EVMETH_ONMOUSEUP,
+ {L"mouseup", EVENT_TYPE_MOUSE, DISPID_EVMETH_ONMOUSEUP,
EVENT_DEFAULTLISTENER | EVENT_BUBBLES | EVENT_CANCELABLE},
- {mousewheelW, EVENT_TYPE_MOUSE, DISPID_EVMETH_ONMOUSEWHEEL,
+ {L"mousewheel", EVENT_TYPE_MOUSE, DISPID_EVMETH_ONMOUSEWHEEL,
EVENT_FIXME},
- {msthumbnailclickW, EVENT_TYPE_MOUSE, DISPID_EVPROP_ONMSTHUMBNAILCLICK,
+ {L"msthumbnailclick", EVENT_TYPE_MOUSE, DISPID_EVPROP_ONMSTHUMBNAILCLICK,
EVENT_FIXME},
- {pasteW, EVENT_TYPE_CLIPBOARD, DISPID_EVMETH_ONPASTE,
+ {L"paste", EVENT_TYPE_CLIPBOARD, DISPID_EVMETH_ONPASTE,
EVENT_FIXME | EVENT_BUBBLES | EVENT_CANCELABLE},
- {readystatechangeW, EVENT_TYPE_EVENT, DISPID_EVMETH_ONREADYSTATECHANGE,
+ {L"readystatechange", EVENT_TYPE_EVENT, DISPID_EVMETH_ONREADYSTATECHANGE,
0},
- {resizeW, EVENT_TYPE_UIEVENT, DISPID_EVMETH_ONRESIZE,
+ {L"resize", EVENT_TYPE_UIEVENT, DISPID_EVMETH_ONRESIZE,
EVENT_DEFAULTLISTENER},
- {scrollW, EVENT_TYPE_UIEVENT, DISPID_EVMETH_ONSCROLL,
+ {L"scroll", EVENT_TYPE_UIEVENT, DISPID_EVMETH_ONSCROLL,
EVENT_DEFAULTLISTENER | EVENT_BUBBLES /* FIXME: not for elements */},
- {selectionchangeW, EVENT_TYPE_EVENT, DISPID_EVMETH_ONSELECTIONCHANGE,
+ {L"selectionchange", EVENT_TYPE_EVENT, DISPID_EVMETH_ONSELECTIONCHANGE,
EVENT_FIXME},
- {selectstartW, EVENT_TYPE_EVENT, DISPID_EVMETH_ONSELECTSTART,
+ {L"selectstart", EVENT_TYPE_EVENT, DISPID_EVMETH_ONSELECTSTART,
EVENT_FIXME | EVENT_BUBBLES | EVENT_CANCELABLE},
- {submitW, EVENT_TYPE_EVENT, DISPID_EVMETH_ONSUBMIT,
+ {L"submit", EVENT_TYPE_EVENT, DISPID_EVMETH_ONSUBMIT,
EVENT_DEFAULTLISTENER | EVENT_HASDEFAULTHANDLERS | EVENT_BUBBLES | EVENT_CANCELABLE},
- {unloadW, EVENT_TYPE_UIEVENT, DISPID_EVMETH_ONUNLOAD,
+ {L"unload", EVENT_TYPE_UIEVENT, DISPID_EVMETH_ONUNLOAD,
EVENT_FIXME}
};
diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c
index 7128d2a58a5..dc5b136edb3 100644
--- a/dlls/mshtml/htmlstyle.c
+++ b/dlls/mshtml/htmlstyle.c
@@ -35,290 +35,85 @@
WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
-static const WCHAR backgroundW[] =
- {'b','a','c','k','g','r','o','u','n','d',0};
-static const WCHAR background_attachmentW[] =
- {'b','a','c','k','g','r','o','u','n','d','-','a','t','t','a','c','h','m','e','n','t',0};
-static const WCHAR background_clipW[] =
- {'b','a','c','k','g','r','o','u','n','d','-','c','l','i','p',0};
-static const WCHAR background_colorW[] =
- {'b','a','c','k','g','r','o','u','n','d','-','c','o','l','o','r',0};
-static const WCHAR background_imageW[] =
- {'b','a','c','k','g','r','o','u','n','d','-','i','m','a','g','e',0};
-static const WCHAR background_positionW[] =
- {'b','a','c','k','g','r','o','u','n','d','-','p','o','s','i','t','i','o','n',0};
-static const WCHAR background_position_xW[] =
- {'b','a','c','k','g','r','o','u','n','d','-','p','o','s','i','t','i','o','n','-','x',0};
-static const WCHAR background_position_yW[] =
- {'b','a','c','k','g','r','o','u','n','d','-','p','o','s','i','t','i','o','n','-','y',0};
-static const WCHAR background_repeatW[] =
- {'b','a','c','k','g','r','o','u','n','d','-','r','e','p','e','a','t',0};
-static const WCHAR borderW[] =
- {'b','o','r','d','e','r',0};
-static const WCHAR border_bottomW[] =
- {'b','o','r','d','e','r','-','b','o','t','t','o','m',0};
-static const WCHAR border_bottom_colorW[] =
- {'b','o','r','d','e','r','-','b','o','t','t','o','m','-','c','o','l','o','r',0};
-static const WCHAR border_bottom_styleW[] =
- {'b','o','r','d','e','r','-','b','o','t','t','o','m','-','s','t','y','l','e',0};
-static const WCHAR border_bottom_widthW[] =
- {'b','o','r','d','e','r','-','b','o','t','t','o','m','-','w','i','d','t','h',0};
-static const WCHAR border_collapseW[] =
- {'b','o','r','d','e','r','-','c','o','l','l','a','p','s','e',0};
-static const WCHAR border_colorW[] =
- {'b','o','r','d','e','r','-','c','o','l','o','r',0};
-static const WCHAR border_leftW[] =
- {'b','o','r','d','e','r','-','l','e','f','t',0};
-static const WCHAR border_left_colorW[] =
- {'b','o','r','d','e','r','-','l','e','f','t','-','c','o','l','o','r',0};
-static const WCHAR border_left_styleW[] =
- {'b','o','r','d','e','r','-','l','e','f','t','-','s','t','y','l','e',0};
-static const WCHAR border_left_widthW[] =
- {'b','o','r','d','e','r','-','l','e','f','t','-','w','i','d','t','h',0};
-static const WCHAR border_rightW[] =
- {'b','o','r','d','e','r','-','r','i','g','h','t',0};
-static const WCHAR border_right_colorW[] =
- {'b','o','r','d','e','r','-','r','i','g','h','t','-','c','o','l','o','r',0};
-static const WCHAR border_right_styleW[] =
- {'b','o','r','d','e','r','-','r','i','g','h','t','-','s','t','y','l','e',0};
-static const WCHAR border_right_widthW[] =
- {'b','o','r','d','e','r','-','r','i','g','h','t','-','w','i','d','t','h',0};
-static const WCHAR border_spacingW[] =
- {'b','o','r','d','e','r','-','s','p','a','c','i','n','g',0};
-static const WCHAR border_topW[] =
- {'b','o','r','d','e','r','-','t','o','p',0};
-static const WCHAR border_top_colorW[] =
- {'b','o','r','d','e','r','-','t','o','p','-','c','o','l','o','r',0};
-static const WCHAR border_styleW[] =
- {'b','o','r','d','e','r','-','s','t','y','l','e',0};
-static const WCHAR border_top_styleW[] =
- {'b','o','r','d','e','r','-','t','o','p','-','s','t','y','l','e',0};
-static const WCHAR border_top_widthW[] =
- {'b','o','r','d','e','r','-','t','o','p','-','w','i','d','t','h',0};
-static const WCHAR border_widthW[] =
- {'b','o','r','d','e','r','-','w','i','d','t','h',0};
-static const WCHAR bottomW[] =
- {'b','o','t','t','o','m',0};
-/* FIXME: Use unprefixed version (requires Gecko changes). */
-static const WCHAR box_sizingW[] =
- {'-','m','o','z','-','b','o','x','-','s','i','z','i','n','g',0};
-static const WCHAR clearW[] =
- {'c','l','e','a','r',0};
-static const WCHAR clipW[] =
- {'c','l','i','p',0};
-static const WCHAR colorW[] =
- {'c','o','l','o','r',0};
-static const WCHAR cursorW[] =
- {'c','u','r','s','o','r',0};
-static const WCHAR directionW[] =
- {'d','i','r','e','c','t','i','o','n',0};
-static const WCHAR displayW[] =
- {'d','i','s','p','l','a','y',0};
-static const WCHAR filterW[] =
- {'f','i','l','e','t','e','r',0};
-static const WCHAR floatW[] =
- {'f','l','o','a','t',0};
-static const WCHAR font_familyW[] =
- {'f','o','n','t','-','f','a','m','i','l','y',0};
-static const WCHAR font_sizeW[] =
- {'f','o','n','t','-','s','i','z','e',0};
-static const WCHAR font_styleW[] =
- {'f','o','n','t','-','s','t','y','l','e',0};
-static const WCHAR font_variantW[] =
- {'f','o','n','t','-','v','a','r','i','a','n','t',0};
-static const WCHAR font_weightW[] =
- {'f','o','n','t','-','w','e','i','g','h','t',0};
-static const WCHAR heightW[] =
- {'h','e','i','g','h','t',0};
-static const WCHAR leftW[] =
- {'l','e','f','t',0};
-static const WCHAR letter_spacingW[] =
- {'l','e','t','t','e','r','-','s','p','a','c','i','n','g',0};
-static const WCHAR line_heightW[] =
- {'l','i','n','e','-','h','e','i','g','h','t',0};
-static const WCHAR list_styleW[] =
- {'l','i','s','t','-','s','t','y','l','e',0};
-static const WCHAR list_style_typeW[] =
- {'l','i','s','t','-','s','t','y','l','e','-','t','y','p','e',0};
-static const WCHAR list_style_positionW[] =
- {'l','i','s','t','-','s','t','y','l','e','-','p','o','s','i','t','i','o','n',0};
-static const WCHAR marginW[] =
- {'m','a','r','g','i','n',0};
-static const WCHAR margin_bottomW[] =
- {'m','a','r','g','i','n','-','b','o','t','t','o','m',0};
-static const WCHAR margin_leftW[] =
- {'m','a','r','g','i','n','-','l','e','f','t',0};
-static const WCHAR margin_rightW[] =
- {'m','a','r','g','i','n','-','r','i','g','h','t',0};
-static const WCHAR margin_topW[] =
- {'m','a','r','g','i','n','-','t','o','p',0};
-static const WCHAR max_heightW[] =
- {'m','a','x','-','h','e','i','g','h','t',0};
-static const WCHAR max_widthW[] =
- {'m','a','x','-','w','i','d','t','h',0};
-static const WCHAR min_heightW[] =
- {'m','i','n','-','h','e','i','g','h','t',0};
-static const WCHAR min_widthW[] =
- {'m','i','n','-','w','i','d','t','h',0};
-static const WCHAR opacityW[] =
- {'o','p','a','c','i','t','y',0};
-static const WCHAR outlineW[] =
- {'o','u','t','l','i','n','e',0};
-static const WCHAR overflowW[] =
- {'o','v','e','r','f','l','o','w',0};
-static const WCHAR overflow_xW[] =
- {'o','v','e','r','f','l','o','w','-','x',0};
-static const WCHAR overflow_yW[] =
- {'o','v','e','r','f','l','o','w','-','y',0};
-static const WCHAR paddingW[] =
- {'p','a','d','d','i','n','g',0};
-static const WCHAR padding_bottomW[] =
- {'p','a','d','d','i','n','g','-','b','o','t','t','o','m',0};
-static const WCHAR padding_leftW[] =
- {'p','a','d','d','i','n','g','-','l','e','f','t',0};
-static const WCHAR padding_rightW[] =
- {'p','a','d','d','i','n','g','-','r','i','g','h','t',0};
-static const WCHAR padding_topW[] =
- {'p','a','d','d','i','n','g','-','t','o','p',0};
-static const WCHAR page_break_afterW[] =
- {'p','a','g','e','-','b','r','e','a','k','-','a','f','t','e','r',0};
-static const WCHAR page_break_beforeW[] =
- {'p','a','g','e','-','b','r','e','a','k','-','b','e','f','o','r','e',0};
-static const WCHAR positionW[] =
- {'p','o','s','i','t','i','o','n',0};
-static const WCHAR rightW[] =
- {'r','i','g','h','t',0};
-static const WCHAR table_layoutW[] =
- {'t','a','b','l','e','-','l','a','y','o','u','t',0};
-static const WCHAR text_alignW[] =
- {'t','e','x','t','-','a','l','i','g','n',0};
-static const WCHAR text_decorationW[] =
- {'t','e','x','t','-','d','e','c','o','r','a','t','i','o','n',0};
-static const WCHAR text_indentW[] =
- {'t','e','x','t','-','i','n','d','e','n','t',0};
-static const WCHAR text_transformW[] =
- {'t','e','x','t','-','t','r','a','n','s','f','o','r','m',0};
-static const WCHAR topW[] =
- {'t','o','p',0};
-static const WCHAR vertical_alignW[] =
- {'v','e','r','t','i','c','a','l','-','a','l','i','g','n',0};
-static const WCHAR visibilityW[] =
- {'v','i','s','i','b','i','l','i','t','y',0};
-static const WCHAR white_spaceW[] =
- {'w','h','i','t','e','-','s','p','a','c','e',0};
-static const WCHAR widthW[] =
- {'w','i','d','t','h',0};
-static const WCHAR word_spacingW[] =
- {'w','o','r','d','-','s','p','a','c','i','n','g',0};
-static const WCHAR word_wrapW[] =
- {'w','o','r','d','-','w','r','a','p',0};
-static const WCHAR z_indexW[] =
- {'z','-','i','n','d','e','x',0};
-
-static const WCHAR autoW[] = {'a','u','t','o',0};
static const WCHAR blinkW[] = {'b','l','i','n','k',0};
-static const WCHAR boldW[] = {'b','o','l','d',0};
-static const WCHAR bolderW[] = {'b','o','l','d','e','r',0};
-static const WCHAR capsW[] = {'s','m','a','l','l','-','c','a','p','s',0};
static const WCHAR dashedW[] = {'d','a','s','h','e','d',0};
static const WCHAR dottedW[] = {'d','o','t','t','e','d',0};
static const WCHAR doubleW[] = {'d','o','u','b','l','e',0};
static const WCHAR grooveW[] = {'g','r','o','o','v','e',0};
-static const WCHAR hiddenW[] = {'h','i','d','d','e','n',0};
static const WCHAR insetW[] = {'i','n','s','e','t',0};
-static const WCHAR italicW[] = {'i','t','a','l','i','c',0};
-static const WCHAR lighterW[] = {'l','i','g','h','t','e','r',0};
static const WCHAR line_throughW[] = {'l','i','n','e','-','t','h','r','o','u','g','h',0};
-static const WCHAR no_repeatW[] = {'n','o','-','r','e','p','e','a','t',0};
static const WCHAR noneW[] = {'n','o','n','e',0};
-static const WCHAR normalW[] = {'n','o','r','m','a','l',0};
-static const WCHAR obliqueW[] = {'o','b','l','i','q','u','e',0};
static const WCHAR outsetW[] = {'o','u','t','s','e','t',0};
static const WCHAR overlineW[] = {'o','v','e','r','l','i','n','e',0};
-static const WCHAR repeatW[] = {'r','e','p','e','a','t',0};
-static const WCHAR repeat_xW[] = {'r','e','p','e','a','t','-','x',0};
-static const WCHAR repeat_yW[] = {'r','e','p','e','a','t','-','y',0};
static const WCHAR ridgeW[] = {'r','i','d','g','e',0};
-static const WCHAR scrollW[] = {'s','c','r','o','l','l',0};
static const WCHAR solidW[] = {'s','o','l','i','d',0};
static const WCHAR underlineW[] = {'u','n','d','e','r','l','i','n','e',0};
-static const WCHAR visibleW[] = {'v','i','s','i','b','l','e',0};
-
-static const WCHAR style100W[] = {'1','0','0',0};
-static const WCHAR style200W[] = {'2','0','0',0};
-static const WCHAR style300W[] = {'3','0','0',0};
-static const WCHAR style400W[] = {'4','0','0',0};
-static const WCHAR style500W[] = {'5','0','0',0};
-static const WCHAR style600W[] = {'6','0','0',0};
-static const WCHAR style700W[] = {'7','0','0',0};
-static const WCHAR style800W[] = {'8','0','0',0};
-static const WCHAR style900W[] = {'9','0','0',0};
static const WCHAR *font_style_values[] = {
- italicW,
- normalW,
- obliqueW,
+ L"italic",
+ L"normal",
+ L"oblique",
NULL
};
static const WCHAR *font_variant_values[] = {
- capsW,
- normalW,
+ L"small-caps",
+ L"normal",
NULL
};
static const WCHAR *font_weight_values[] = {
- style100W,
- style200W,
- style300W,
- style400W,
- style500W,
- style600W,
- style700W,
- style800W,
- style900W,
- boldW,
- bolderW,
- lighterW,
- normalW,
+ L"100",
+ L"200",
+ L"300",
+ L"400",
+ L"500",
+ L"600",
+ L"700",
+ L"800",
+ L"900",
+ L"bold",
+ L"bolder",
+ L"lighter",
+ L"normal",
NULL
};
static const WCHAR *background_repeat_values[] = {
- no_repeatW,
- repeatW,
- repeat_xW,
- repeat_yW,
+ L"no-repeat",
+ L"repeat",
+ L"repeat-x",
+ L"repeat-y",
NULL
};
static const WCHAR *text_decoration_values[] = {
- blinkW,
- line_throughW,
- noneW,
- overlineW,
- underlineW,
+ L"blink",
+ L"line-through",
+ L"none",
+ L"overline",
+ L"underline",
NULL
};
static const WCHAR *border_style_values[] = {
- dashedW,
- dottedW,
- doubleW,
- grooveW,
- insetW,
- noneW,
- outsetW,
- ridgeW,
- solidW,
+ L"dashed",
+ L"dotted",
+ L"double",
+ L"groove",
+ L"inset",
+ L"none",
+ L"outset",
+ L"ridge",
+ L"solid",
NULL
};
static const WCHAR *overflow_values[] = {
- autoW,
- hiddenW,
- scrollW,
- visibleW,
+ L"auto",
+ L"hidden",
+ L"scroll",
+ L"visible",
NULL
};
@@ -348,204 +143,204 @@ static const style_tbl_entry_t style_tbl[] = {
ATTR_COMPAT_IE10
},
{
- backgroundW,
+ L"background",
DISPID_IHTMLCSSSTYLEDECLARATION_BACKGROUND,
DISPID_A_BACKGROUND
},
{
- background_attachmentW,
+ L"background-attachment",
DISPID_IHTMLCSSSTYLEDECLARATION_BACKGROUNDATTACHMENT,
DISPID_A_BACKGROUNDATTACHMENT
},
{
- background_clipW,
+ L"background-clip",
DISPID_IHTMLCSSSTYLEDECLARATION_BACKGROUNDCLIP,
DISPID_UNKNOWN
},
{
- background_colorW,
+ L"background-color",
DISPID_IHTMLCSSSTYLEDECLARATION_BACKGROUNDCOLOR,
DISPID_BACKCOLOR,
ATTR_HEX_INT
},
{
- background_imageW,
+ L"background-image",
DISPID_IHTMLCSSSTYLEDECLARATION_BACKGROUNDIMAGE,
DISPID_A_BACKGROUNDIMAGE,
ATTR_FIX_URL
},
{
- background_positionW,
+ L"background-position",
DISPID_IHTMLCSSSTYLEDECLARATION_BACKGROUNDPOSITION,
DISPID_A_BACKGROUNDPOSITION
},
{
- background_position_xW,
+ L"background-position-x",
DISPID_IHTMLCSSSTYLEDECLARATION_BACKGROUNDPOSITIONX,
DISPID_A_BACKGROUNDPOSX,
ATTR_FIX_PX
},
{
- background_position_yW,
+ L"background-position-y",
DISPID_IHTMLCSSSTYLEDECLARATION_BACKGROUNDPOSITIONY,
DISPID_A_BACKGROUNDPOSY,
ATTR_FIX_PX
},
{
- background_repeatW,
+ L"background-repeat",
DISPID_IHTMLCSSSTYLEDECLARATION_BACKGROUNDREPEAT,
DISPID_A_BACKGROUNDREPEAT,
0, background_repeat_values
},
{
- borderW,
+ L"border",
DISPID_IHTMLCSSSTYLEDECLARATION_BORDER,
DISPID_A_BORDER
},
{
- border_bottomW,
+ L"border-bottom",
DISPID_IHTMLCSSSTYLEDECLARATION_BORDERBOTTOM,
DISPID_A_BORDERBOTTOM,
ATTR_FIX_PX
},
{
- border_bottom_colorW,
+ L"border-bottom-color",
DISPID_IHTMLCSSSTYLEDECLARATION_BORDERBOTTOMCOLOR,
DISPID_A_BORDERBOTTOMCOLOR,
ATTR_HEX_INT
},
{
- border_bottom_styleW,
+ L"border-bottom-style",
DISPID_IHTMLCSSSTYLEDECLARATION_BORDERBOTTOMSTYLE,
DISPID_A_BORDERBOTTOMSTYLE,
0, border_style_values
},
{
- border_bottom_widthW,
+ L"border-bottom-width",
DISPID_IHTMLCSSSTYLEDECLARATION_BORDERBOTTOMWIDTH,
DISPID_A_BORDERBOTTOMWIDTH,
ATTR_FIX_PX
},
{
- border_collapseW,
+ L"border-collapse",
DISPID_IHTMLCSSSTYLEDECLARATION_BORDERCOLLAPSE,
DISPID_A_BORDERCOLLAPSE
},
{
- border_colorW,
+ L"border-color",
DISPID_IHTMLCSSSTYLEDECLARATION_BORDERCOLOR,
DISPID_A_BORDERCOLOR
},
{
- border_leftW,
+ L"border-left",
DISPID_IHTMLCSSSTYLEDECLARATION_BORDERLEFT,
DISPID_A_BORDERLEFT,
ATTR_FIX_PX
},
{
- border_left_colorW,
+ L"border-left-color",
DISPID_IHTMLCSSSTYLEDECLARATION_BORDERLEFTCOLOR,
DISPID_A_BORDERLEFTCOLOR,
ATTR_HEX_INT
},
{
- border_left_styleW,
+ L"border-left-style",
DISPID_IHTMLCSSSTYLEDECLARATION_BORDERLEFTSTYLE,
DISPID_A_BORDERLEFTSTYLE,
0, border_style_values
},
{
- border_left_widthW,
+ L"border-left-width",
DISPID_IHTMLCSSSTYLEDECLARATION_BORDERLEFTWIDTH,
DISPID_A_BORDERLEFTWIDTH,
ATTR_FIX_PX
},
{
- border_rightW,
+ L"border-right",
DISPID_IHTMLCSSSTYLEDECLARATION_BORDERRIGHT,
DISPID_A_BORDERRIGHT,
ATTR_FIX_PX
},
{
- border_right_colorW,
+ L"border-right-color",
DISPID_IHTMLCSSSTYLEDECLARATION_BORDERRIGHTCOLOR,
DISPID_A_BORDERRIGHTCOLOR,
ATTR_HEX_INT
},
{
- border_right_styleW,
+ L"border-right-style",
DISPID_IHTMLCSSSTYLEDECLARATION_BORDERRIGHTSTYLE,
DISPID_A_BORDERRIGHTSTYLE,
0, border_style_values
},
{
- border_right_widthW,
+ L"border-right-width",
DISPID_IHTMLCSSSTYLEDECLARATION_BORDERRIGHTWIDTH,
DISPID_A_BORDERRIGHTWIDTH,
ATTR_FIX_PX
},
{
- border_spacingW,
+ L"border-spacing",
DISPID_IHTMLCSSSTYLEDECLARATION_BORDERSPACING,
DISPID_A_BORDERSPACING
},
{
- border_styleW,
+ L"border-style",
DISPID_IHTMLCSSSTYLEDECLARATION_BORDERSTYLE,
DISPID_A_BORDERSTYLE
},
{
- border_topW,
+ L"border-top",
DISPID_IHTMLCSSSTYLEDECLARATION_BORDERTOP,
DISPID_A_BORDERTOP,
ATTR_FIX_PX
},
{
- border_top_colorW,
+ L"border-top-color",
DISPID_IHTMLCSSSTYLEDECLARATION_BORDERTOPCOLOR,
DISPID_A_BORDERTOPCOLOR,
ATTR_HEX_INT
},
{
- border_top_styleW,
+ L"border-top-style",
DISPID_IHTMLCSSSTYLEDECLARATION_BORDERTOPSTYLE,
DISPID_A_BORDERTOPSTYLE,
0, border_style_values
},
{
- border_top_widthW,
+ L"border-top-width",
DISPID_IHTMLCSSSTYLEDECLARATION_BORDERTOPWIDTH,
DISPID_A_BORDERTOPWIDTH
},
{
- border_widthW,
+ L"border-width",
DISPID_IHTMLCSSSTYLEDECLARATION_BORDERWIDTH,
DISPID_A_BORDERWIDTH
},
{
- bottomW,
+ L"bottom",
DISPID_IHTMLCSSSTYLEDECLARATION_BOTTOM,
STDPROPID_XOBJ_BOTTOM,
ATTR_FIX_PX
},
{
- box_sizingW,
+ L"-moz-box-sizing",
DISPID_IHTMLCSSSTYLEDECLARATION_BOXSIZING,
DISPID_A_BOXSIZING
},
{
- clearW,
+ L"clear",
DISPID_IHTMLCSSSTYLEDECLARATION_CLEAR,
DISPID_A_CLEAR
},
{
- clipW,
+ L"clip",
DISPID_IHTMLCSSSTYLEDECLARATION_CLIP,
DISPID_A_CLIP,
ATTR_REMOVE_COMMA
},
{
- colorW,
+ L"color",
DISPID_IHTMLCSSSTYLEDECLARATION_COLOR,
DISPID_A_COLOR,
ATTR_HEX_INT
@@ -605,210 +400,210 @@ static const style_tbl_entry_t style_tbl[] = {
ATTR_COMPAT_IE10
},
{
- cursorW,
+ L"cursor",
DISPID_IHTMLCSSSTYLEDECLARATION_CURSOR,
DISPID_A_CURSOR
},
{
- directionW,
+ L"direction",
DISPID_IHTMLCSSSTYLEDECLARATION_DIRECTION,
DISPID_A_DIRECTION
},
{
- displayW,
+ L"display",
DISPID_IHTMLCSSSTYLEDECLARATION_DISPLAY,
DISPID_A_DISPLAY
},
{
- filterW,
+ L"fileter",
DISPID_IHTMLCSSSTYLEDECLARATION_FILTER,
DISPID_A_FILTER
},
{
- floatW,
+ L"float",
DISPID_IHTMLCSSSTYLEDECLARATION_CSSFLOAT,
DISPID_A_FLOAT
},
{
- font_familyW,
+ L"font-family",
DISPID_IHTMLCSSSTYLEDECLARATION_FONTFAMILY,
DISPID_A_FONTFACE
},
{
- font_sizeW,
+ L"font-size",
DISPID_IHTMLCSSSTYLEDECLARATION_FONTSIZE,
DISPID_A_FONTSIZE,
ATTR_FIX_PX
},
{
- font_styleW,
+ L"font-style",
DISPID_IHTMLCSSSTYLEDECLARATION_FONTSTYLE,
DISPID_A_FONTSTYLE,
0, font_style_values
},
{
- font_variantW,
+ L"font-variant",
DISPID_IHTMLCSSSTYLEDECLARATION_FONTVARIANT,
DISPID_A_FONTVARIANT,
0, font_variant_values
},
{
- font_weightW,
+ L"font-weight",
DISPID_IHTMLCSSSTYLEDECLARATION_FONTWEIGHT,
DISPID_A_FONTWEIGHT,
ATTR_STR_TO_INT, font_weight_values
},
{
- heightW,
+ L"height",
DISPID_IHTMLCSSSTYLEDECLARATION_HEIGHT,
STDPROPID_XOBJ_HEIGHT,
ATTR_FIX_PX
},
{
- leftW,
+ L"left",
DISPID_IHTMLCSSSTYLEDECLARATION_LEFT,
STDPROPID_XOBJ_LEFT
},
{
- letter_spacingW,
+ L"letter-spacing",
DISPID_IHTMLCSSSTYLEDECLARATION_LETTERSPACING,
DISPID_A_LETTERSPACING
},
{
- line_heightW,
+ L"line-height",
DISPID_IHTMLCSSSTYLEDECLARATION_LINEHEIGHT,
DISPID_A_LINEHEIGHT
},
{
- list_styleW,
+ L"list-style",
DISPID_IHTMLCSSSTYLEDECLARATION_LISTSTYLE,
DISPID_A_LISTSTYLE
},
{
- list_style_positionW,
+ L"list-style-position",
DISPID_IHTMLCSSSTYLEDECLARATION_LISTSTYLEPOSITION,
DISPID_A_LISTSTYLEPOSITION
},
{
- list_style_typeW,
+ L"list-style-type",
DISPID_IHTMLCSSSTYLEDECLARATION_LISTSTYLETYPE,
DISPID_A_LISTSTYLETYPE
},
{
- marginW,
+ L"margin",
DISPID_IHTMLCSSSTYLEDECLARATION_MARGIN,
DISPID_A_MARGIN
},
{
- margin_bottomW,
+ L"margin-bottom",
DISPID_IHTMLCSSSTYLEDECLARATION_MARGINBOTTOM,
DISPID_A_MARGINBOTTOM,
ATTR_FIX_PX
},
{
- margin_leftW,
+ L"margin-left",
DISPID_IHTMLCSSSTYLEDECLARATION_MARGINLEFT,
DISPID_A_MARGINLEFT,
ATTR_FIX_PX
},
{
- margin_rightW,
+ L"margin-right",
DISPID_IHTMLCSSSTYLEDECLARATION_MARGINRIGHT,
DISPID_A_MARGINRIGHT,
ATTR_FIX_PX
},
{
- margin_topW,
+ L"margin-top",
DISPID_IHTMLCSSSTYLEDECLARATION_MARGINTOP,
DISPID_A_MARGINTOP,
ATTR_FIX_PX
},
{
- max_heightW,
+ L"max-height",
DISPID_IHTMLCSSSTYLEDECLARATION_MAXHEIGHT,
DISPID_A_MAXHEIGHT,
ATTR_FIX_PX
},
{
- max_widthW,
+ L"max-width",
DISPID_IHTMLCSSSTYLEDECLARATION_MAXWIDTH,
DISPID_A_MAXWIDTH,
ATTR_FIX_PX
},
{
- min_heightW,
+ L"min-height",
DISPID_IHTMLCSSSTYLEDECLARATION_MINHEIGHT,
DISPID_A_MINHEIGHT
},
{
- min_widthW,
+ L"min-width",
DISPID_IHTMLCSSSTYLEDECLARATION_MINWIDTH,
DISPID_A_MINWIDTH,
ATTR_FIX_PX
},
{
- opacityW,
+ L"opacity",
DISPID_IHTMLCSSSTYLEDECLARATION_OPACITY,
DISPID_UNKNOWN
},
{
- outlineW,
+ L"outline",
DISPID_IHTMLCSSSTYLEDECLARATION_OUTLINE,
DISPID_A_OUTLINE,
ATTR_NO_NULL
},
{
- overflowW,
+ L"overflow",
DISPID_IHTMLCSSSTYLEDECLARATION_OVERFLOW,
DISPID_A_OVERFLOW,
0, overflow_values
},
{
- overflow_xW,
+ L"overflow-x",
DISPID_IHTMLCSSSTYLEDECLARATION_OVERFLOWX,
DISPID_A_OVERFLOWX
},
{
- overflow_yW,
+ L"overflow-y",
DISPID_IHTMLCSSSTYLEDECLARATION_OVERFLOWY,
DISPID_A_OVERFLOWY
},
{
- paddingW,
+ L"padding",
DISPID_IHTMLCSSSTYLEDECLARATION_PADDING,
DISPID_A_PADDING
},
{
- padding_bottomW,
+ L"padding-bottom",
DISPID_IHTMLCSSSTYLEDECLARATION_PADDINGBOTTOM,
DISPID_A_PADDINGBOTTOM,
ATTR_FIX_PX
},
{
- padding_leftW,
+ L"padding-left",
DISPID_IHTMLCSSSTYLEDECLARATION_PADDINGLEFT,
DISPID_A_PADDINGLEFT,
ATTR_FIX_PX
},
{
- padding_rightW,
+ L"padding-right",
DISPID_IHTMLCSSSTYLEDECLARATION_PADDINGRIGHT,
DISPID_A_PADDINGRIGHT,
ATTR_FIX_PX
},
{
- padding_topW,
+ L"padding-top",
DISPID_IHTMLCSSSTYLEDECLARATION_PADDINGTOP,
DISPID_A_PADDINGTOP,
ATTR_FIX_PX
},
{
- page_break_afterW,
+ L"page-break-after",
DISPID_IHTMLCSSSTYLEDECLARATION_PAGEBREAKAFTER,
DISPID_A_PAGEBREAKAFTER
},
{
- page_break_beforeW,
+ L"page-break-before",
DISPID_IHTMLCSSSTYLEDECLARATION_PAGEBREAKBEFORE,
DISPID_A_PAGEBREAKBEFORE
},
@@ -818,44 +613,44 @@ static const style_tbl_entry_t style_tbl[] = {
DISPID_UNKNOWN
},
{
- positionW,
+ L"position",
DISPID_IHTMLCSSSTYLEDECLARATION_POSITION,
DISPID_A_POSITION
},
{
- rightW,
+ L"right",
DISPID_IHTMLCSSSTYLEDECLARATION_RIGHT,
STDPROPID_XOBJ_RIGHT
},
{
- table_layoutW,
+ L"table-layout",
DISPID_IHTMLCSSSTYLEDECLARATION_TABLELAYOUT,
DISPID_A_TABLELAYOUT
},
{
- text_alignW,
+ L"text-align",
DISPID_IHTMLCSSSTYLEDECLARATION_TEXTALIGN,
STDPROPID_XOBJ_BLOCKALIGN
},
{
- text_decorationW,
+ L"text-decoration",
DISPID_IHTMLCSSSTYLEDECLARATION_TEXTDECORATION,
DISPID_A_TEXTDECORATION,
0, text_decoration_values
},
{
- text_indentW,
+ L"text-indent",
DISPID_IHTMLCSSSTYLEDECLARATION_TEXTINDENT,
DISPID_A_TEXTINDENT,
ATTR_FIX_PX
},
{
- text_transformW,
+ L"text-transform",
DISPID_IHTMLCSSSTYLEDECLARATION_TEXTTRANSFORM,
DISPID_A_TEXTTRANSFORM
},
{
- topW,
+ L"top",
DISPID_IHTMLCSSSTYLEDECLARATION_TOP,
STDPROPID_XOBJ_TOP
},
@@ -872,39 +667,39 @@ static const style_tbl_entry_t style_tbl[] = {
ATTR_COMPAT_IE10
},
{
- vertical_alignW,
+ L"vertical-align",
DISPID_IHTMLCSSSTYLEDECLARATION_VERTICALALIGN,
DISPID_A_VERTICALALIGN,
ATTR_FIX_PX
},
{
- visibilityW,
+ L"visibility",
DISPID_IHTMLCSSSTYLEDECLARATION_VISIBILITY,
DISPID_A_VISIBILITY
},
{
- white_spaceW,
+ L"white-space",
DISPID_IHTMLCSSSTYLEDECLARATION_WHITESPACE,
DISPID_A_WHITESPACE
},
{
- widthW,
+ L"width",
DISPID_IHTMLCSSSTYLEDECLARATION_WIDTH,
STDPROPID_XOBJ_WIDTH,
ATTR_FIX_PX
},
{
- word_spacingW,
+ L"word-spacing",
DISPID_IHTMLCSSSTYLEDECLARATION_WORDSPACING,
DISPID_A_WORDSPACING
},
{
- word_wrapW,
+ L"word-wrap",
DISPID_IHTMLCSSSTYLEDECLARATION_WORDWRAP,
DISPID_A_WORDWRAP
},
{
- z_indexW,
+ L"z-index",
DISPID_IHTMLCSSSTYLEDECLARATION_ZINDEX,
DISPID_A_ZINDEX,
ATTR_STR_TO_INT
--
2.25.4
2
1
Hi!
So next years GSoC will be different and I hope it might be good for Wine. We had some years with less students and especially less good proposals.
What changes [1]:
The project size is cut in half, instead of 350 hours per project it'll be 175 hours, thus the student stipend is also cut in half.
2 ealuations instead of 3, but students are not required to pass the first one, they can fail it and still can try to pass the second one.
The coding period will be 10 weeks and mentors can agree with students on how to spread the work time across those weeks. This should help with finals or other commitments.
Eligibility: "we will be allowing students who are 18 years old AND currently enrolled (or accepted into) a post-secondary academic program as of May 17, 2021 or have graduated from a post-secondary academic program between December 1, 2020 and May 17, 2021 to apply to the GSoC program. What this means is that now the program will be open to folks participating in a variety of different academic programs, not just accredited university programs. This includes licensed coding camps, community colleges, and many other programs that may not be accredited yet but are post-secondary academic programs."
Program timeline: [2]
Marketing material: [3]
FAQs: [4]
short videos with tips for mentors and students: [5]
What that means is that I ask everyone to go over our ideas list and adjust to the reduced project size. I realize that this might kick out quite some projects, but I also think it can attract more good students.
If you are a student reading this, feel free to start discussing your idea on the wine-devel mailing list [6] or the #winehackers IRC channel at freenode.net [7]
[1] https://opensource.googleblog.com/2020/10/google-summer-of-code-2021-is-bri…
[2] https://developers.google.com/open-source/gsoc/timeline
[3] https://developers.google.com/open-source/gsoc/resources/marketing
[4] https://developers.google.com/open-source/gsoc/faq
[5] https://developers.google.com/open-source/gsoc/videos
[6] https://www.winehq.org/forums
[7] irc://irc.freenode.net/#winehackers
2
1
[PATCH 1/2] msvcrt/tests: Add scanf tests for leading and trailing dash in scanset.
by Will Mainio 02 Nov '20
by Will Mainio 02 Nov '20
02 Nov '20
Signed-off-by: Will Mainio <will.mainio(a)fastmail.com>
---
dlls/msvcrt/tests/scanf.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/dlls/msvcrt/tests/scanf.c b/dlls/msvcrt/tests/scanf.c
index 57d9cc0ba12..4b878e6d64e 100644
--- a/dlls/msvcrt/tests/scanf.c
+++ b/dlls/msvcrt/tests/scanf.c
@@ -186,6 +186,14 @@ static void test_sscanf( void )
ok( ret == 1, "Error with format \"%s\"\n","%*[a-cd-dg-e]%c");
ok( buffer[0] == 'h', "Error with \"abcefgdh\" \"%c\"\n", buffer[0]);
+ ret = p_sscanf("-123","%[-0-9]s",buffer);
+ ok( ret == 1, "Error with format \"%s\"\n","%[-0-9]s");
+ ok( strncmp("-123",buffer,strlen(buffer)) == 0, "Error with \"-123\" \"%s\"\n",buffer);
+
+ ret = p_sscanf("-321","%[0-9-]s",buffer);
+ ok( ret == 1, "Error with format \"%s\"\n","%[0-9-]s");
+ ok( strncmp("-321",buffer,strlen(buffer)) == 0, "Error with \"-321\" \"%s\"\n",buffer);
+
buffer1[0] = 'b';
ret = p_sscanf("a","%s%s", buffer, buffer1);
ok( ret == 1, "expected 1, got %u\n", ret);
--
2.28.0
4
10
Signed-off-by: Gijs Vermeulen <gijsvrm(a)gmail.com>
---
dlls/quartz/tests/vmr9.c | 23 +++++++++++++--
dlls/quartz/vmr9.c | 60 ++++++++++++++++++++++++++++++++++++++++
2 files changed, 81 insertions(+), 2 deletions(-)
diff --git a/dlls/quartz/tests/vmr9.c b/dlls/quartz/tests/vmr9.c
index df18bd5f2d5..7b470c6e534 100644
--- a/dlls/quartz/tests/vmr9.c
+++ b/dlls/quartz/tests/vmr9.c
@@ -242,7 +242,7 @@ static void test_common_interfaces(IBaseFilter *filter)
check_interface(filter, &IID_IQualityControl, TRUE);
todo_wine check_interface(filter, &IID_IQualProp, TRUE);
check_interface(filter, &IID_IUnknown, TRUE);
- todo_wine check_interface(filter, &IID_IVMRAspectRatioControl9, TRUE);
+ check_interface(filter, &IID_IVMRAspectRatioControl9, TRUE);
todo_wine check_interface(filter, &IID_IVMRDeinterlaceControl9, TRUE);
check_interface(filter, &IID_IVMRFilterConfig9, TRUE);
check_interface(filter, &IID_IVMRMixerBitmap9, TRUE);
@@ -3851,6 +3851,7 @@ static void test_windowless_size(void)
};
IBaseFilter *filter = create_vmr9(VMR9Mode_Windowless);
LONG width, height, aspect_width, aspect_height;
+ IVMRAspectRatioControl9 *aspect_ratio_control;
IVMRWindowlessControl9 *windowless_control;
IFilterGraph2 *graph = create_graph();
VMR9AspectRatioMode aspect_mode;
@@ -3864,6 +3865,7 @@ static void test_windowless_size(void)
IPin *pin;
IBaseFilter_QueryInterface(filter, &IID_IVMRWindowlessControl9, (void **)&windowless_control);
+ IBaseFilter_QueryInterface(filter, &IID_IVMRAspectRatioControl9, (void **)&aspect_ratio_control);
IBaseFilter_FindPin(filter, L"VMR Input0", &pin);
IPin_QueryInterface(pin, &IID_IMemInputPin, (void **)&input);
testfilter_init(&source);
@@ -3902,6 +3904,11 @@ static void test_windowless_size(void)
ok(hr == S_OK, "Got hr %#x.\n", hr);
ok(aspect_mode == VMR9ARMode_None, "Got mode %u.\n", aspect_mode);
+ aspect_mode = 0xdeadbeef;
+ hr = IVMRAspectRatioControl9_GetAspectRatioMode(aspect_ratio_control, &aspect_mode);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(aspect_mode == VMR9ARMode_None, "Got mode %u.\n", aspect_mode);
+
width = height = 0xdeadbeef;
hr = IVMRWindowlessControl9_GetNativeVideoSize(windowless_control, &width, &height, NULL, NULL);
ok(hr == S_OK, "Got hr %#x.\n", hr);
@@ -3956,7 +3963,7 @@ static void test_windowless_size(void)
SetRect(&expect, 0, 0, 640, 480);
ok(EqualRect(&src, &expect), "Got window rect %s.\n", wine_dbgstr_rect(&src));
- hr = IVMRWindowlessControl9_SetAspectRatioMode(windowless_control, VMR9ARMode_LetterBox);
+ hr = IVMRAspectRatioControl9_SetAspectRatioMode(aspect_ratio_control, VMR9ARMode_LetterBox);
ok(hr == S_OK, "Got hr %#x.\n", hr);
aspect_mode = 0xdeadbeef;
@@ -3964,6 +3971,17 @@ static void test_windowless_size(void)
ok(hr == S_OK, "Got hr %#x.\n", hr);
ok(aspect_mode == VMR9ARMode_LetterBox, "Got mode %u.\n", aspect_mode);
+ hr = IVMRWindowlessControl9_SetAspectRatioMode(windowless_control, VMR9ARMode_None);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
+
+ aspect_mode = 0xdeadbeef;
+ hr = IVMRAspectRatioControl9_GetAspectRatioMode(aspect_ratio_control, &aspect_mode);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(aspect_mode == VMR9ARMode_None, "Got mode %u.\n", aspect_mode);
+
+ hr = IVMRWindowlessControl9_SetAspectRatioMode(windowless_control, VMR9ARMode_LetterBox);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
+
memset(&src, 0xcc, sizeof(src));
memset(&dst, 0xcc, sizeof(dst));
hr = IVMRWindowlessControl9_GetVideoPosition(windowless_control, &src, &dst);
@@ -3993,6 +4011,7 @@ out:
IMemInputPin_Release(input);
IPin_Release(pin);
IVMRWindowlessControl9_Release(windowless_control);
+ IVMRAspectRatioControl9_Release(aspect_ratio_control);
ref = IBaseFilter_Release(filter);
ok(!ref, "Got outstanding refcount %d.\n", ref);
DestroyWindow(window);
diff --git a/dlls/quartz/vmr9.c b/dlls/quartz/vmr9.c
index a24dbc62977..3ddef8dbed5 100644
--- a/dlls/quartz/vmr9.c
+++ b/dlls/quartz/vmr9.c
@@ -60,6 +60,7 @@ struct quartz_vmr
IAMCertifiedOutputProtection IAMCertifiedOutputProtection_iface;
IAMFilterMiscFlags IAMFilterMiscFlags_iface;
+ IVMRAspectRatioControl9 IVMRAspectRatioControl9_iface;
IVMRFilterConfig IVMRFilterConfig_iface;
IVMRFilterConfig9 IVMRFilterConfig9_iface;
IVMRMixerBitmap9 IVMRMixerBitmap9_iface;
@@ -603,6 +604,8 @@ static HRESULT vmr_query_interface(struct strmbase_renderer *iface, REFIID iid,
*out = &filter->IAMCertifiedOutputProtection_iface;
else if (IsEqualGUID(iid, &IID_IAMFilterMiscFlags))
*out = &filter->IAMFilterMiscFlags_iface;
+ else if (IsEqualGUID(iid, &IID_IVMRAspectRatioControl9) && is_vmr9(filter))
+ *out = &filter->IVMRAspectRatioControl9_iface;
else if (IsEqualGUID(iid, &IID_IVMRFilterConfig) && !is_vmr9(filter))
*out = &filter->IVMRFilterConfig_iface;
else if (IsEqualGUID(iid, &IID_IVMRFilterConfig9) && is_vmr9(filter))
@@ -2396,6 +2399,62 @@ static const IVMRMixerBitmap9Vtbl mixer_bitmap9_vtbl =
mixer_bitmap9_GetAlphaBitmapParameters,
};
+static inline struct quartz_vmr *impl_from_IVMRAspectRatioControl9(IVMRAspectRatioControl9 *iface)
+{
+ return CONTAINING_RECORD(iface, struct quartz_vmr, IVMRAspectRatioControl9_iface);
+}
+
+static HRESULT WINAPI aspect_ratio_control9_QueryInterface(IVMRAspectRatioControl9 *iface, REFIID iid, void **out)
+{
+ struct quartz_vmr *filter = impl_from_IVMRAspectRatioControl9(iface);
+ return IUnknown_QueryInterface(filter->renderer.filter.outer_unk, iid, out);
+}
+
+static ULONG WINAPI aspect_ratio_control9_AddRef(IVMRAspectRatioControl9 *iface)
+{
+ struct quartz_vmr *filter = impl_from_IVMRAspectRatioControl9(iface);
+ return IUnknown_AddRef(filter->renderer.filter.outer_unk);
+}
+
+static ULONG WINAPI aspect_ratio_control9_Release(IVMRAspectRatioControl9 *iface)
+{
+ struct quartz_vmr *filter = impl_from_IVMRAspectRatioControl9(iface);
+ return IUnknown_Release(filter->renderer.filter.outer_unk);
+}
+
+static HRESULT WINAPI aspect_ratio_control9_GetAspectRatioMode(IVMRAspectRatioControl9 *iface, DWORD *mode)
+{
+ struct quartz_vmr *filter = impl_from_IVMRAspectRatioControl9(iface);
+
+ TRACE("filter %p, mode %p.\n", filter, mode);
+
+ EnterCriticalSection(&filter->renderer.filter.csFilter);
+ *mode = filter->aspect_mode;
+ LeaveCriticalSection(&filter->renderer.filter.csFilter);
+ return S_OK;
+}
+
+static HRESULT WINAPI aspect_ratio_control9_SetAspectRatioMode(IVMRAspectRatioControl9 *iface, DWORD mode)
+{
+ struct quartz_vmr *filter = impl_from_IVMRAspectRatioControl9(iface);
+
+ TRACE("filter %p, mode %u.\n", filter, mode);
+
+ EnterCriticalSection(&filter->renderer.filter.csFilter);
+ filter->aspect_mode = mode;
+ LeaveCriticalSection(&filter->renderer.filter.csFilter);
+ return S_OK;
+}
+
+static const IVMRAspectRatioControl9Vtbl aspect_ratio_control9_vtbl =
+{
+ aspect_ratio_control9_QueryInterface,
+ aspect_ratio_control9_AddRef,
+ aspect_ratio_control9_Release,
+ aspect_ratio_control9_GetAspectRatioMode,
+ aspect_ratio_control9_SetAspectRatioMode,
+};
+
static inline struct quartz_vmr *impl_from_IOverlay(IOverlay *iface)
{
return CONTAINING_RECORD(iface, struct quartz_vmr, IOverlay_iface);
@@ -2522,6 +2581,7 @@ static HRESULT vmr_create(IUnknown *outer, IUnknown **out, const CLSID *clsid)
strmbase_renderer_init(&object->renderer, outer, clsid, L"VMR Input0", &renderer_ops);
object->IAMCertifiedOutputProtection_iface.lpVtbl = &IAMCertifiedOutputProtection_Vtbl;
object->IAMFilterMiscFlags_iface.lpVtbl = &IAMFilterMiscFlags_Vtbl;
+ object->IVMRAspectRatioControl9_iface.lpVtbl = &aspect_ratio_control9_vtbl;
object->IVMRFilterConfig_iface.lpVtbl = &VMR7_FilterConfig_Vtbl;
object->IVMRFilterConfig9_iface.lpVtbl = &VMR9_FilterConfig_Vtbl;
object->IVMRMixerBitmap9_iface.lpVtbl = &mixer_bitmap9_vtbl;
--
2.29.2
3
2