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
December 2010
----- 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
1099 discussions
Start a n
N
ew thread
Michael Stefaniuc : Remove the audioio sound driver. It is unused.
by Alexandre Julliard
17 Dec '10
17 Dec '10
Module: wine Branch: master Commit: a2f0750f0b660bbd637c0c4d39b1d453cf7952b6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a2f0750f0b660bbd637c0c4d3…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Fri Dec 17 11:11:42 2010 +0100 Remove the audioio sound driver. It is unused. The supported Solaris version 9 and 10 do not have audioio anymore. They are using the ESD sound driver instead. --- configure | 64 +- configure.ac | 17 +- dlls/wineaudioio.drv/Makefile.in | 9 - dlls/wineaudioio.drv/audio.c | 2213 ----------------------------- dlls/wineaudioio.drv/audioio.c | 82 -- dlls/wineaudioio.drv/wineaudioio.drv.spec | 3 - include/config.h.in | 6 - 7 files changed, 4 insertions(+), 2390 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=a2f0750f0b660bbd637c0…
1
0
0
0
Michael Stefaniuc : winecfg: Remove the support to configure the audioio driver sound.
by Alexandre Julliard
17 Dec '10
17 Dec '10
Module: wine Branch: master Commit: d44bfdbff8cf11c4f4ddc1f9862aa1511cbd1d22 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d44bfdbff8cf11c4f4ddc1f98…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Fri Dec 17 11:11:20 2010 +0100 winecfg: Remove the support to configure the audioio driver sound. --- programs/winecfg/Bg.rc | 1 - programs/winecfg/Cs.rc | 1 - programs/winecfg/Da.rc | 1 - programs/winecfg/De.rc | 1 - programs/winecfg/En.rc | 1 - programs/winecfg/Es.rc | 1 - programs/winecfg/Fi.rc | 1 - programs/winecfg/Fr.rc | 1 - programs/winecfg/Hu.rc | 1 - programs/winecfg/It.rc | 1 - programs/winecfg/Ja.rc | 1 - programs/winecfg/Ko.rc | 1 - programs/winecfg/Lt.rc | 1 - programs/winecfg/Nl.rc | 1 - programs/winecfg/No.rc | 1 - programs/winecfg/Pl.rc | 1 - programs/winecfg/Pt.rc | 2 -- programs/winecfg/Ro.rc | 1 - programs/winecfg/Ru.rc | 1 - programs/winecfg/Si.rc | 1 - programs/winecfg/Sr.rc | 1 - programs/winecfg/Sv.rc | 1 - programs/winecfg/Tr.rc | 1 - programs/winecfg/Uk.rc | 1 - programs/winecfg/Zh.rc | 2 -- programs/winecfg/audio.c | 1 - programs/winecfg/resource.h | 2 +- 27 files changed, 1 insertions(+), 29 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=d44bfdbff8cf11c4f4ddc…
1
0
0
0
Piotr Caban : kernel32: Added more ReadDirectoryChangesW tests.
by Alexandre Julliard
17 Dec '10
17 Dec '10
Module: wine Branch: master Commit: 52e5087aece2505caf311f6e0af89ffef89e95bf URL:
http://source.winehq.org/git/wine.git/?a=commit;h=52e5087aece2505caf311f6e0…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Thu Dec 16 01:02:41 2010 +0100 kernel32: Added more ReadDirectoryChangesW tests. --- dlls/kernel32/tests/change.c | 174 ++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 174 insertions(+), 0 deletions(-) diff --git a/dlls/kernel32/tests/change.c b/dlls/kernel32/tests/change.c index 49dbb88..0e8804f 100644 --- a/dlls/kernel32/tests/change.c +++ b/dlls/kernel32/tests/change.c @@ -784,6 +784,179 @@ static void test_readdirectorychanges_filedir(void) ok( r == TRUE, "failed to remove directory\n"); } +static void CALLBACK readdirectorychanges_cr(DWORD error, DWORD len, LPOVERLAPPED ov) +{ + ok(error == 0, "ReadDirectoryChangesW error %d\n", error); + ok(ov->hEvent == (void*)0xdeadbeef, "hEvent should not have changed\n"); +} + +static void test_readdirectorychanges_cr(void) +{ + static const WCHAR szBoo[] = { '\\','b','o','o','\\',0 }; + static const WCHAR szDir[] = { 'd','i','r',0 }; + static const WCHAR szFile[] = { 'f','i','l','e',0 }; + + WCHAR path[MAX_PATH], file[MAX_PATH], dir[MAX_PATH]; + FILE_NOTIFY_INFORMATION fni[1024], *fni_next; + OVERLAPPED ov; + HANDLE hdir, hfile; + NTSTATUS r; + + if (!pReadDirectoryChangesW) + { + win_skip("ReadDirectoryChangesW is not available\n"); + return; + } + + SetLastError(0xdeadbeef); + r = GetTempPathW(MAX_PATH, path); + if (!r && (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)) + { + win_skip("GetTempPathW is not implemented\n"); + return; + } + ok(r != 0, "temp path failed\n"); + if (!r) + return; + + lstrcatW(path, szBoo); + lstrcpyW(dir, path); + lstrcatW(dir, szDir); + lstrcpyW(file, path); + lstrcatW(file, szFile); + + DeleteFileW(file); + RemoveDirectoryW(dir); + RemoveDirectoryW(path); + + r = CreateDirectoryW(path, NULL); + ok(r == TRUE, "failed to create directory\n"); + + hdir = CreateFileW(path, GENERIC_READ, + FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE, NULL, OPEN_EXISTING, + FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OVERLAPPED, NULL); + ok(hdir != INVALID_HANDLE_VALUE, "failed to open directory\n"); + + memset(&ov, 0, sizeof(ov)); + ov.hEvent = (void*)0xdeadbeef; + r = pReadDirectoryChangesW(hdir, fni, sizeof(fni), FALSE, + FILE_NOTIFY_CHANGE_FILE_NAME, NULL, &ov, readdirectorychanges_cr); + ok(r == TRUE, "pReadDirectoryChangesW failed\n"); + + hfile = CreateFileW(file, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL); + ok(hfile != INVALID_HANDLE_VALUE, "failed to create file\n"); + CloseHandle(hfile); + + r = SleepEx(1000, TRUE); + ok(r != 0, "failed to receive file creation event\n"); + ok(fni->NextEntryOffset == 0, "there should be no more events in buffer\n"); + ok(fni->Action == FILE_ACTION_ADDED, "Action = %d\n", fni->Action); + ok(fni->FileNameLength == lstrlenW(szFile)*sizeof(WCHAR), + "FileNameLength = %d\n", fni->FileNameLength); + ok(!memcmp(fni->FileName, szFile, lstrlenW(szFile)*sizeof(WCHAR)), + "FileName = %s\n", wine_dbgstr_w(fni->FileName)); + + r = pReadDirectoryChangesW(hdir, fni, sizeof(fni), FALSE, + FILE_NOTIFY_CHANGE_FILE_NAME, NULL, &ov, readdirectorychanges_cr); + ok(r == TRUE, "pReadDirectoryChangesW failed\n"); + + /* This event will not be reported */ + r = CreateDirectoryW(dir, NULL); + ok(r == TRUE, "failed to create directory\n"); + + r = DeleteFileW(file); + ok(r == TRUE, "failed to delete file\n"); + + r = SleepEx(1000, TRUE); + ok(r != 0, "failed to receive file removal event\n"); + ok(fni->NextEntryOffset == 0, "there should be no more events in buffer\n"); + ok(fni->Action == FILE_ACTION_REMOVED, "Action = %d\n", fni->Action); + ok(fni->FileNameLength == lstrlenW(szFile)*sizeof(WCHAR), + "FileNameLength = %d\n", fni->FileNameLength); + ok(!memcmp(fni->FileName, szFile, lstrlenW(szFile)*sizeof(WCHAR)), + "FileName = %s\n", wine_dbgstr_w(fni->FileName)); + + CloseHandle(hdir); + + hdir = CreateFileW(path, GENERIC_READ, + FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE, NULL, OPEN_EXISTING, + FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OVERLAPPED, NULL); + ok(hdir != INVALID_HANDLE_VALUE, "failed to open directory\n"); + + r = pReadDirectoryChangesW(hdir, fni, sizeof(fni), FALSE, + FILE_NOTIFY_CHANGE_DIR_NAME, NULL, &ov, readdirectorychanges_cr); + ok(r == TRUE, "pReadDirectoryChangesW failed\n"); + + r = MoveFileW(dir, file); + ok(r == TRUE, "failed to move directory\n"); + + r = SleepEx(1000, TRUE); + ok(r != 0, "failed to receive directory move event\n"); + ok(fni->Action == FILE_ACTION_RENAMED_OLD_NAME, "Action = %d\n", fni->Action); + ok(fni->FileNameLength == lstrlenW(szDir)*sizeof(WCHAR), + "FileNameLength = %d\n", fni->FileNameLength); + ok(!memcmp(fni->FileName, szDir, lstrlenW(szDir)*sizeof(WCHAR)), + "FileName = %s\n", wine_dbgstr_w(fni->FileName)); + if (fni->NextEntryOffset) + fni_next = (FILE_NOTIFY_INFORMATION*)((char*)fni+fni->NextEntryOffset); + else + { + r = pReadDirectoryChangesW(hdir, fni, sizeof(fni), FALSE, + FILE_NOTIFY_CHANGE_DIR_NAME, NULL, &ov, readdirectorychanges_cr); + ok(r == TRUE, "pReadDirectoryChangesW failed\n"); + + r = SleepEx(1000, TRUE); + ok(r != 0, "failed to receive directory move event\n"); + fni_next = fni; + } + ok(fni_next->NextEntryOffset == 0, "there should be no more events in buffer\n"); + ok(fni_next->Action == FILE_ACTION_RENAMED_NEW_NAME, "Action = %d\n", fni_next->Action); + ok(fni_next->FileNameLength == lstrlenW(szFile)*sizeof(WCHAR), + "FileNameLength = %d\n", fni_next->FileNameLength); + ok(!memcmp(fni_next->FileName, szFile, lstrlenW(szFile)*sizeof(WCHAR)), + "FileName = %s\n", wine_dbgstr_w(fni_next->FileName)); + + r = CreateDirectoryW(dir, NULL); + ok(r == TRUE, "failed to create directory\n"); + + r = RemoveDirectoryW(dir); + ok(r == TRUE, "failed to remove directory\n"); + + r = pReadDirectoryChangesW(hdir, fni, sizeof(fni), FALSE, + FILE_NOTIFY_CHANGE_DIR_NAME, NULL, &ov, readdirectorychanges_cr); + ok(r == TRUE, "pReadDirectoryChangesW failed\n"); + + r = SleepEx(1000, TRUE); + ok(r != 0, "failed to receive directory creation event\n"); + ok(fni->Action == FILE_ACTION_ADDED, "Action = %d\n", fni->Action); + ok(fni->FileNameLength == lstrlenW(szDir)*sizeof(WCHAR), + "FileNameLength = %d\n", fni->FileNameLength); + ok(!memcmp(fni->FileName, szDir, lstrlenW(szDir)*sizeof(WCHAR)), + "FileName = %s\n", wine_dbgstr_w(fni->FileName)); + if (fni->NextEntryOffset) + fni_next = (FILE_NOTIFY_INFORMATION*)((char*)fni+fni->NextEntryOffset); + else + { + r = pReadDirectoryChangesW(hdir, fni, sizeof(fni), FALSE, + FILE_NOTIFY_CHANGE_DIR_NAME, NULL, &ov, readdirectorychanges_cr); + ok(r == TRUE, "pReadDirectoryChangesW failed\n"); + + r = SleepEx(1000, TRUE); + ok(r != 0, "failed to receive directory removal event\n"); + fni_next = fni; + } + ok(fni_next->NextEntryOffset == 0, "there should be no more events in buffer\n"); + ok(fni_next->Action == FILE_ACTION_REMOVED, "Action = %d\n", fni_next->Action); + ok(fni_next->FileNameLength == lstrlenW(szDir)*sizeof(WCHAR), + "FileNameLength = %d\n", fni_next->FileNameLength); + ok(!memcmp(fni_next->FileName, szDir, lstrlenW(szDir)*sizeof(WCHAR)), + "FileName = %s\n", wine_dbgstr_w(fni_next->FileName)); + + CloseHandle(hdir); + RemoveDirectoryW(file); + RemoveDirectoryW(path); +} + static void test_ffcn_directory_overlap(void) { HANDLE parent_watch, child_watch, parent_thread, child_thread; @@ -884,5 +1057,6 @@ START_TEST(change) test_readdirectorychanges(); test_readdirectorychanges_null(); test_readdirectorychanges_filedir(); + test_readdirectorychanges_cr(); test_ffcn_directory_overlap(); }
1
0
0
0
Piotr Caban : server: Handle more inotify mask values.
by Alexandre Julliard
17 Dec '10
17 Dec '10
Module: wine Branch: master Commit: f4e64a442f4f0b875db3791611bb57eee04a3b49 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f4e64a442f4f0b875db379161…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Thu Dec 16 12:23:04 2010 +0100 server: Handle more inotify mask values. --- server/change.c | 43 ++++++++++++++++++------------------------- 1 files changed, 18 insertions(+), 25 deletions(-) diff --git a/server/change.c b/server/change.c index 0dd7d29..2bdc444 100644 --- a/server/change.c +++ b/server/change.c @@ -94,6 +94,8 @@ struct inotify_event { #define IN_DELETE 0x00000200 #define IN_DELETE_SELF 0x00000400 +#define IN_ISDIR 0x40000000 + static inline int inotify_init( void ) { int ret; @@ -664,6 +666,11 @@ static unsigned int filter_from_event( struct inotify_event *ie ) if (ie->mask & IN_CREATE) filter |= FILE_NOTIFY_CHANGE_CREATION; + if (ie->mask & IN_ISDIR) + filter &= ~FILE_NOTIFY_CHANGE_FILE_NAME; + else + filter &= ~FILE_NOTIFY_CHANGE_DIR_NAME; + return filter; } @@ -719,30 +726,22 @@ static char *inode_get_path( struct inode *inode, int sz ) return path; } -static int inode_check_dir( struct inode *parent, const char *name ) +static void inode_check_dir( struct inode *parent, const char *name ) { char *path; unsigned int filter; struct inode *inode; struct stat st; - int wd = -1, r = -1; + int wd = -1; path = inode_get_path( parent, strlen(name) ); if (!path) - return r; + return; strcat( path, name ); - r = stat( path, &st ); - if (r < 0) goto end; - - if (!S_ISDIR(st.st_mode)) - { - r = 0; + if (stat( path, &st ) < 0) goto end; - } - - r = 1; filter = filter_from_inode( parent, 1 ); if (!filter) @@ -760,7 +759,6 @@ static int inode_check_dir( struct inode *parent, const char *name ) end: free( path ); - return r; } static int prepend( char **path, const char *segment ) @@ -808,22 +806,17 @@ static void inotify_notify_all( struct inotify_event *ie ) if (ie->mask & IN_CREATE) { - switch (inode_check_dir( inode, ie->name )) - { - case 1: - filter &= ~FILE_NOTIFY_CHANGE_FILE_NAME; - break; - case 0: - filter &= ~FILE_NOTIFY_CHANGE_DIR_NAME; - break; - default: - break; - /* Maybe the file disappeared before we could check it? */ - } + if (ie->mask & IN_ISDIR) + inode_check_dir( inode, ie->name ); + action = FILE_ACTION_ADDED; } else if (ie->mask & IN_DELETE) action = FILE_ACTION_REMOVED; + else if (ie->mask & IN_MOVED_FROM) + action = FILE_ACTION_RENAMED_OLD_NAME; + else if (ie->mask & IN_MOVED_TO) + action = FILE_ACTION_RENAMED_NEW_NAME; else action = FILE_ACTION_MODIFIED;
1
0
0
0
Jacek Caban : mshtml: Added IHTMLStyleElement::type property implementation .
by Alexandre Julliard
17 Dec '10
17 Dec '10
Module: wine Branch: master Commit: 98e1433779e5db8e387a66723d7b230c691082f6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=98e1433779e5db8e387a66723…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Dec 17 03:39:36 2010 +0100 mshtml: Added IHTMLStyleElement::type property implementation. --- dlls/mshtml/htmlstyleelem.c | 26 ++++++++++++++++++++++---- dlls/mshtml/tests/dom.c | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+), 4 deletions(-) diff --git a/dlls/mshtml/htmlstyleelem.c b/dlls/mshtml/htmlstyleelem.c index a4cc98e..294a9d5 100644 --- a/dlls/mshtml/htmlstyleelem.c +++ b/dlls/mshtml/htmlstyleelem.c @@ -98,15 +98,33 @@ static HRESULT WINAPI HTMLStyleElement_Invoke(IHTMLStyleElement *iface, DISPID d static HRESULT WINAPI HTMLStyleElement_put_type(IHTMLStyleElement *iface, BSTR v) { HTMLStyleElement *This = HTMLSTYLE_THIS(iface); - FIXME("(%p)->(%s)\n", This, debugstr_w(v)); - return E_NOTIMPL; + nsAString type_str; + nsresult nsres; + + TRACE("(%p)->(%s)\n", This, debugstr_w(v)); + + nsAString_InitDepend(&type_str, v); + nsres = nsIDOMHTMLStyleElement_SetType(This->nsstyle, &type_str); + nsAString_Finish(&type_str); + if(NS_FAILED(nsres)) { + ERR("SetType failed: %08x\n", nsres); + return E_FAIL; + } + + return S_OK; } static HRESULT WINAPI HTMLStyleElement_get_type(IHTMLStyleElement *iface, BSTR *p) { HTMLStyleElement *This = HTMLSTYLE_THIS(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + nsAString nsstr; + nsresult nsres; + + TRACE("(%p)->(%p)\n", This, p); + + nsAString_Init(&nsstr, NULL); + nsres = nsIDOMHTMLStyleElement_GetType(This->nsstyle, &nsstr); + return return_nsstr(nsres, &nsstr, p); } static HRESULT WINAPI HTMLStyleElement_get_readyState(IHTMLStyleElement *iface, BSTR *p) diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index 536d528..6601d2d 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -2480,6 +2480,40 @@ static void _test_style_put_media(unsigned line, IUnknown *unk, const char *medi _test_style_media(line, unk, media); } +#define test_style_type(s,m) _test_style_type(__LINE__,s,m) +static void _test_style_type(unsigned line, IUnknown *unk, const char *extype) +{ + IHTMLStyleElement *style = _get_style_iface(line, unk); + BSTR type; + HRESULT hres; + + hres = IHTMLStyleElement_get_type(style, &type); + ok_(__FILE__,line)(hres == S_OK, "get_type failed: %08x\n", hres); + if(extype) + ok_(__FILE__,line)(!strcmp_wa(type, extype), "type = %s, expected %s\n", wine_dbgstr_w(type), extype); + else + ok_(__FILE__,line)(!type, "type = %s, expected NULL\n", wine_dbgstr_w(type)); + + IHTMLStyleElement_Release(style); + SysFreeString(type); +} + +#define test_style_put_type(s,m) _test_style_put_type(__LINE__,s,m) +static void _test_style_put_type(unsigned line, IUnknown *unk, const char *type) +{ + IHTMLStyleElement *style = _get_style_iface(line, unk); + BSTR str; + HRESULT hres; + + str = a2bstr(type); + hres = IHTMLStyleElement_put_type(style, str); + ok_(__FILE__,line)(hres == S_OK, "put_type failed: %08x\n", hres); + IHTMLStyleElement_Release(style); + SysFreeString(str); + + _test_style_type(line, unk, type); +} + #define test_elem_filters(u) _test_elem_filters(__LINE__,u) static void _test_elem_filters(unsigned line, IUnknown *unk) { @@ -6328,6 +6362,8 @@ static void test_elems(IHTMLDocument2 *doc) if(elem) { test_style_media((IUnknown*)elem, NULL); test_style_put_media((IUnknown*)elem, "screen"); + test_style_type((IUnknown*)elem, NULL); + test_style_put_type((IUnknown*)elem, "text/css"); IHTMLElement_Release(elem); }
1
0
0
0
Jacek Caban : mshtml: Added IHTMLStyleElement:: media property implementation.
by Alexandre Julliard
17 Dec '10
17 Dec '10
Module: wine Branch: master Commit: 09c63b22152cdfbe1ee76d5b4baffee8119f3e65 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=09c63b22152cdfbe1ee76d5b4…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Dec 17 03:39:24 2010 +0100 mshtml: Added IHTMLStyleElement::media property implementation. --- dlls/mshtml/htmlstyleelem.c | 39 +++++++++++++++++++++++++++--- dlls/mshtml/nsiface.idl | 15 ++++++++++++ dlls/mshtml/tests/dom.c | 54 ++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 103 insertions(+), 5 deletions(-) diff --git a/dlls/mshtml/htmlstyleelem.c b/dlls/mshtml/htmlstyleelem.c index ee62472..a4cc98e 100644 --- a/dlls/mshtml/htmlstyleelem.c +++ b/dlls/mshtml/htmlstyleelem.c @@ -36,6 +36,8 @@ typedef struct { HTMLElement element; const IHTMLStyleElementVtbl *lpIHTMLStyleElementVtbl; + + nsIDOMHTMLStyleElement *nsstyle; } HTMLStyleElement; #define HTMLSTYLE(x) (&(x)->lpIHTMLStyleElementVtbl) @@ -180,15 +182,33 @@ static HRESULT WINAPI HTMLStyleElement_get_disabled(IHTMLStyleElement *iface, VA static HRESULT WINAPI HTMLStyleElement_put_media(IHTMLStyleElement *iface, BSTR v) { HTMLStyleElement *This = HTMLSTYLE_THIS(iface); - FIXME("(%p)->(%s)\n", This, debugstr_w(v)); - return E_NOTIMPL; + nsAString media_str; + nsresult nsres; + + TRACE("(%p)->(%s)\n", This, debugstr_w(v)); + + nsAString_InitDepend(&media_str, v); + nsres = nsIDOMHTMLStyleElement_SetMedia(This->nsstyle, &media_str); + nsAString_Finish(&media_str); + if(NS_FAILED(nsres)) { + ERR("SetMedia failed: %08x\n", nsres); + return E_FAIL; + } + + return S_OK; } static HRESULT WINAPI HTMLStyleElement_get_media(IHTMLStyleElement *iface, BSTR *p) { HTMLStyleElement *This = HTMLSTYLE_THIS(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + nsAString nsstr; + nsresult nsres; + + TRACE("(%p)->(%p)\n", This, p); + + nsAString_Init(&nsstr, NULL); + nsres = nsIDOMHTMLStyleElement_GetMedia(This->nsstyle, &nsstr); + return return_nsstr(nsres, &nsstr, p); } #undef HTMLSTYLE_THIS @@ -244,6 +264,9 @@ static void HTMLStyleElement_destructor(HTMLDOMNode *iface) { HTMLStyleElement *This = HTMLSTYLE_NODE_THIS(iface); + if(This->nsstyle) + nsIDOMHTMLStyleElement_Release(This->nsstyle); + HTMLElement_destructor(&This->element.node); } @@ -270,6 +293,7 @@ static dispex_static_data_t HTMLStyleElement_dispex = { HRESULT HTMLStyleElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem) { HTMLStyleElement *ret; + nsresult nsres; ret = heap_alloc_zero(sizeof(*ret)); if(!ret) @@ -278,6 +302,13 @@ HRESULT HTMLStyleElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem ret->lpIHTMLStyleElementVtbl = &HTMLStyleElementVtbl; ret->element.node.vtbl = &HTMLStyleElementImplVtbl; + nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLStyleElement, (void**)&ret->nsstyle); + if(NS_FAILED(nsres)) { + ERR("Could not get nsIDOMHTMLStyleElement iface: %08x\n", nsres); + heap_free(ret); + return E_FAIL; + } + HTMLElement_Init(&ret->element, doc, nselem, &HTMLStyleElement_dispex); *elem = &ret->element; return S_OK; diff --git a/dlls/mshtml/nsiface.idl b/dlls/mshtml/nsiface.idl index fc00b25..4248768 100644 --- a/dlls/mshtml/nsiface.idl +++ b/dlls/mshtml/nsiface.idl @@ -1704,6 +1704,21 @@ interface nsIDOMHTMLParamElement : nsIDOMHTMLElement [ object, + uuid(a6cf908d-15b3-11d2-932e-00805f8add32), + local +] +interface nsIDOMHTMLStyleElement : nsIDOMHTMLElement +{ + nsresult GetDisabled(PRBool *aDisabled); + nsresult SetDisabled(PRBool aDisabled); + nsresult GetMedia(nsAString *aMedia); + nsresult SetMedia(const nsAString *aMedia); + nsresult GetType(nsAString *aType); + nsresult SetType(const nsAString *aType); +} + +[ + object, uuid(94928ab3-8b63-11d3-989d-001083010e9b), local ] diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index c29f616..536d528 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -40,7 +40,7 @@ static const char range_test_str[] = static const char range_test2_str[] = "<html><body>abc<hr />123<br /><hr />def</body></html>"; static const char elem_test_str[] = - "<html><head><title>test</title><style>.body { margin-right: 0px; }</style>" + "<html><head><title>test</title><style id=\"styleid\">.body { margin-right: 0px; }</style>" "<body onload=\"Testing()\">text test<!-- a comment -->" "<a id=\"a\" href=\"
http://test\
" name=\"x\">link</a>" "<input id=\"in\" class=\"testclass\" tabIndex=\"2\" title=\"test title\" />" @@ -787,6 +787,17 @@ static IHTMLObjectElement *_get_object_iface(unsigned line, IUnknown *unk) return obj; } +#define get_style_iface(u) _get_style_iface(__LINE__,u) +static IHTMLStyleElement *_get_style_iface(unsigned line, IUnknown *unk) +{ + IHTMLStyleElement *obj; + HRESULT hres; + + hres = IUnknown_QueryInterface(unk, &IID_IHTMLStyleElement, (void**)&obj); + ok_(__FILE__,line) (hres == S_OK, "Could not get IHTMLStyleElement: %08x\n", hres); + return obj; +} + #define test_node_name(u,n) _test_node_name(__LINE__,u,n) static void _test_node_name(unsigned line, IUnknown *unk, const char *exname) { @@ -2435,6 +2446,40 @@ static void _test_elem_set_tabindex(unsigned line, IUnknown *unk, short index) _test_elem_tabindex(line, unk, index); } +#define test_style_media(s,m) _test_style_media(__LINE__,s,m) +static void _test_style_media(unsigned line, IUnknown *unk, const char *exmedia) +{ + IHTMLStyleElement *style = _get_style_iface(line, unk); + BSTR media; + HRESULT hres; + + hres = IHTMLStyleElement_get_media(style, &media); + ok_(__FILE__,line)(hres == S_OK, "get_media failed: %08x\n", hres); + if(exmedia) + ok_(__FILE__,line)(!strcmp_wa(media, exmedia), "media = %s, expected %s\n", wine_dbgstr_w(media), exmedia); + else + ok_(__FILE__,line)(!media, "media = %s, expected NULL\n", wine_dbgstr_w(media)); + + IHTMLStyleElement_Release(style); + SysFreeString(media); +} + +#define test_style_put_media(s,m) _test_style_put_media(__LINE__,s,m) +static void _test_style_put_media(unsigned line, IUnknown *unk, const char *media) +{ + IHTMLStyleElement *style = _get_style_iface(line, unk); + BSTR str; + HRESULT hres; + + str = a2bstr(media); + hres = IHTMLStyleElement_put_media(style, str); + ok_(__FILE__,line)(hres == S_OK, "put_media failed: %08x\n", hres); + IHTMLStyleElement_Release(style); + SysFreeString(str); + + _test_style_media(line, unk, media); +} + #define test_elem_filters(u) _test_elem_filters(__LINE__,u) static void _test_elem_filters(unsigned line, IUnknown *unk) { @@ -6279,6 +6324,13 @@ static void test_elems(IHTMLDocument2 *doc) IHTMLElement_Release(elem); } + elem = get_elem_by_id(doc, "styleid", TRUE); + if(elem) { + test_style_media((IUnknown*)elem, NULL); + test_style_put_media((IUnknown*)elem, "screen"); + IHTMLElement_Release(elem); + } + elem = get_doc_elem_by_id(doc, "tbl"); ok(elem != NULL, "elem == NULL\n"); if(elem) {
1
0
0
0
Jacek Caban : mshtml: Added IHTMLScriptElement::get_scr implementation.
by Alexandre Julliard
17 Dec '10
17 Dec '10
Module: wine Branch: master Commit: 96efe799c191027f3e58e58f663fc465525568bc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=96efe799c191027f3e58e58f6…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Dec 17 03:39:11 2010 +0100 mshtml: Added IHTMLScriptElement::get_scr implementation. --- dlls/mshtml/htmlscript.c | 10 ++++++++-- dlls/mshtml/mshtml_private.h | 1 + dlls/mshtml/nsembed.c | 24 ++++++++++++++++++++++++ dlls/mshtml/tests/dom.c | 5 +++++ 4 files changed, 38 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/htmlscript.c b/dlls/mshtml/htmlscript.c index 91e1d22..bd066ac 100644 --- a/dlls/mshtml/htmlscript.c +++ b/dlls/mshtml/htmlscript.c @@ -106,8 +106,14 @@ static HRESULT WINAPI HTMLScriptElement_put_src(IHTMLScriptElement *iface, BSTR static HRESULT WINAPI HTMLScriptElement_get_src(IHTMLScriptElement *iface, BSTR *p) { HTMLScriptElement *This = impl_from_IHTMLScriptElement(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + nsAString src_str; + nsresult nsres; + + TRACE("(%p)->(%p)\n", This, p); + + nsAString_Init(&src_str, NULL); + nsres = nsIDOMHTMLScriptElement_GetSrc(This->nsscript, &src_str); + return return_nsstr(nsres, &src_str, p); } static HRESULT WINAPI HTMLScriptElement_put_htmlFor(IHTMLScriptElement *iface, BSTR v) diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 7162abb..326439f 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -781,6 +781,7 @@ void nsAString_InitDepend(nsAString*,const PRUnichar*); void nsAString_SetData(nsAString*,const PRUnichar*); PRUint32 nsAString_GetData(const nsAString*,const PRUnichar**); void nsAString_Finish(nsAString*); +HRESULT return_nsstr(nsresult,nsAString*,BSTR*); nsICommandParams *create_nscommand_params(void); HRESULT nsnode_to_nsstring(nsIDOMNode*,nsAString*); diff --git a/dlls/mshtml/nsembed.c b/dlls/mshtml/nsembed.c index 556ae08..d766af8 100644 --- a/dlls/mshtml/nsembed.c +++ b/dlls/mshtml/nsembed.c @@ -733,6 +733,30 @@ void nsAString_Finish(nsAString *str) NS_StringContainerFinish(str); } +HRESULT return_nsstr(nsresult nsres, nsAString *nsstr, BSTR *p) +{ + const PRUnichar *str; + + if(NS_FAILED(nsres)) { + ERR("failed: %08x\n", nsres); + nsAString_Finish(nsstr); + return E_FAIL; + } + + nsAString_GetData(nsstr, &str); + TRACE("ret %s\n", debugstr_w(str)); + if(*str) { + *p = SysAllocString(str); + if(!*p) + return E_OUTOFMEMORY; + }else { + *p = NULL; + } + + nsAString_Finish(nsstr); + return S_OK; +} + nsICommandParams *create_nscommand_params(void) { nsICommandParams *ret = NULL; diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index 19b7d14..c29f616 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -6211,6 +6211,11 @@ static void test_elems(IHTMLDocument2 *doc) hres = IHTMLScriptElement_put_defer(script, VARIANT_FALSE); ok(hres == S_OK, "put_defer failed: %08x\n", hres); + + str = (BSTR)0xdeadbeef; + hres = IHTMLScriptElement_get_src(script, &str); + ok(hres == S_OK, "get_src failed: %08x\n", hres); + ok(!str, "src = %s\n", wine_dbgstr_w(str)); } IHTMLScriptElement_Release(script);
1
0
0
0
Jacek Caban : mshtml: Improved IOmNavigator::javaEnabled stub.
by Alexandre Julliard
17 Dec '10
17 Dec '10
Module: wine Branch: master Commit: f01d831b9b12d04300d2b31d417501b5d78c902d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f01d831b9b12d04300d2b31d4…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Dec 17 03:38:56 2010 +0100 mshtml: Improved IOmNavigator::javaEnabled stub. --- dlls/mshtml/omnavigator.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/omnavigator.c b/dlls/mshtml/omnavigator.c index 66bfd87..af36537 100644 --- a/dlls/mshtml/omnavigator.c +++ b/dlls/mshtml/omnavigator.c @@ -368,8 +368,11 @@ static HRESULT WINAPI OmNavigator_get_userAgent(IOmNavigator *iface, BSTR *p) static HRESULT WINAPI OmNavigator_javaEnabled(IOmNavigator *iface, VARIANT_BOOL *enabled) { OmNavigator *This = impl_from_IOmNavigator(iface); - FIXME("(%p)->(%p)\n", This, enabled); - return E_NOTIMPL; + + FIXME("(%p)->(%p) semi-stub\n", This, enabled); + + *enabled = VARIANT_FALSE; + return S_OK; } static HRESULT WINAPI OmNavigator_taintEnabled(IOmNavigator *iface, VARIANT_BOOL *enabled)
1
0
0
0
Jacek Caban : mshtml: Improved QueryService debug traces.
by Alexandre Julliard
17 Dec '10
17 Dec '10
Module: wine Branch: master Commit: 5cfe10b3e8d94f84265e40a1872969b5af42733e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5cfe10b3e8d94f84265e40a18…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Dec 17 03:38:44 2010 +0100 mshtml: Improved QueryService debug traces. --- dlls/mshtml/service.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/service.c b/dlls/mshtml/service.c index cb8893d..4b9327d 100644 --- a/dlls/mshtml/service.c +++ b/dlls/mshtml/service.c @@ -245,6 +245,8 @@ static HRESULT WINAPI ServiceProvider_QueryService(IServiceProvider *iface, REFG return IOleUndoManager_QueryInterface(This->doc_obj->undomgr, riid, ppv); } + TRACE("(%p)->(%s %s %p)\n", This, debugstr_guid(guidService), debugstr_guid(riid), ppv); + if(This->doc_obj->client) { IServiceProvider *sp; HRESULT hres; @@ -260,8 +262,7 @@ static HRESULT WINAPI ServiceProvider_QueryService(IServiceProvider *iface, REFG } } - FIXME("(%p)->(%s %s %p)\n", This, debugstr_guid(guidService), debugstr_guid(riid), ppv); - + FIXME("unknown service %s\n", debugstr_guid(guidService)); return E_NOINTERFACE; }
1
0
0
0
Jacek Caban : mshtml: Added support for forwarding object element' s DOM calls to ActiveX control.
by Alexandre Julliard
17 Dec '10
17 Dec '10
Module: wine Branch: master Commit: 42d9e0c813e6f8f76a14ecd328906b7e38cd258d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=42d9e0c813e6f8f76a14ecd32…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Dec 17 03:38:33 2010 +0100 mshtml: Added support for forwarding object element's DOM calls to ActiveX control. --- dlls/mshtml/htmlobject.c | 24 +++++++++++++- dlls/mshtml/pluginhost.c | 76 +++++++++++++++++++++++++++++++++++++++++++ dlls/mshtml/pluginhost.h | 6 +++ dlls/mshtml/tests/activex.c | 60 ++++++++++++++++++++++++++++++++- 4 files changed, 163 insertions(+), 3 deletions(-) diff --git a/dlls/mshtml/htmlobject.c b/dlls/mshtml/htmlobject.c index fe97eb9..8f8bef2 100644 --- a/dlls/mshtml/htmlobject.c +++ b/dlls/mshtml/htmlobject.c @@ -439,6 +439,26 @@ static HRESULT HTMLObjectElement_get_readystate(HTMLDOMNode *iface, BSTR *p) return E_NOTIMPL; } +static HRESULT HTMLObjectElement_get_dispid(HTMLDOMNode *iface, BSTR name, + DWORD grfdex, DISPID *pid) +{ + HTMLObjectElement *This = HTMLOBJECT_NODE_THIS(iface); + + TRACE("(%p)->(%s %x %p)\n", This, debugstr_w(name), grfdex, pid); + + return get_plugin_dispid(&This->plugin_container, name, pid); +} + +static HRESULT HTMLObjectElement_invoke(HTMLDOMNode *iface, DISPID id, LCID lcid, + WORD flags, DISPPARAMS *params, VARIANT *res, EXCEPINFO *ei, IServiceProvider *caller) +{ + HTMLObjectElement *This = HTMLOBJECT_NODE_THIS(iface); + + TRACE("(%p)->(%d)\n", This, id); + + return invoke_plugin_prop(&This->plugin_container, id, lcid, flags, params, res, ei); +} + #undef HTMLOBJECT_NODE_THIS static const NodeImplVtbl HTMLObjectElementImplVtbl = { @@ -450,7 +470,9 @@ static const NodeImplVtbl HTMLObjectElementImplVtbl = { NULL, NULL, NULL, - HTMLObjectElement_get_readystate + HTMLObjectElement_get_readystate, + HTMLObjectElement_get_dispid, + HTMLObjectElement_invoke }; static const tid_t HTMLObjectElement_iface_tids[] = { diff --git a/dlls/mshtml/pluginhost.c b/dlls/mshtml/pluginhost.c index 91b6fda..c6df421 100644 --- a/dlls/mshtml/pluginhost.c +++ b/dlls/mshtml/pluginhost.c @@ -318,6 +318,82 @@ HRESULT get_plugin_disp(HTMLPluginContainer *plugin_container, IDispatch **ret) return S_OK; } +HRESULT get_plugin_dispid(HTMLPluginContainer *plugin_container, WCHAR *name, DISPID *ret) +{ + IDispatch *disp; + DISPID id; + DWORD i; + HRESULT hres; + + if(!plugin_container->plugin_host) { + WARN("no plugin host\n"); + return DISP_E_UNKNOWNNAME; + } + + disp = plugin_container->plugin_host->disp; + if(!disp) + return DISP_E_UNKNOWNNAME; + + hres = IDispatch_GetIDsOfNames(disp, &IID_NULL, &name, 1, 0, &id); + if(FAILED(hres)) { + TRACE("no prop %s\n", debugstr_w(name)); + return DISP_E_UNKNOWNNAME; + } + + for(i=0; i < plugin_container->props_len; i++) { + if(id == plugin_container->props[i]) { + *ret = MSHTML_DISPID_CUSTOM_MIN+i; + return S_OK; + } + } + + if(!plugin_container->props) { + plugin_container->props = heap_alloc(8*sizeof(DISPID)); + if(!plugin_container->props) + return E_OUTOFMEMORY; + plugin_container->props_size = 8; + }else if(plugin_container->props_len == plugin_container->props_size) { + DISPID *new_props; + + new_props = heap_realloc(plugin_container->props, plugin_container->props_size*2); + if(!new_props) + return E_OUTOFMEMORY; + + plugin_container->props = new_props; + plugin_container->props_size *= 2; + } + + plugin_container->props[plugin_container->props_len] = id; + *ret = MSHTML_DISPID_CUSTOM_MIN+plugin_container->props_len; + plugin_container->props_len++; + return S_OK; +} + +HRESULT invoke_plugin_prop(HTMLPluginContainer *plugin_container, DISPID id, LCID lcid, WORD flags, DISPPARAMS *params, + VARIANT *res, EXCEPINFO *ei) +{ + PluginHost *host; + + host = plugin_container->plugin_host; + if(!host || !host->disp) { + FIXME("Called with no disp\n"); + return E_UNEXPECTED; + } + + if(!check_script_safety(host)) { + FIXME("Insecure object\n"); + return E_FAIL; + } + + if(id < MSHTML_DISPID_CUSTOM_MIN || id > MSHTML_DISPID_CUSTOM_MIN + plugin_container->props_len) { + ERR("Invalid id\n"); + return E_FAIL; + } + + return IDispatch_Invoke(host->disp, plugin_container->props[id-MSHTML_DISPID_CUSTOM_MIN], &IID_NULL, + lcid, flags, params, res, ei, NULL); +} + static inline PluginHost *impl_from_IOleClientSite(IOleClientSite *iface) { return CONTAINING_RECORD(iface, PluginHost, IOleClientSite_iface); diff --git a/dlls/mshtml/pluginhost.h b/dlls/mshtml/pluginhost.h index bedb8ca..014e3ac 100644 --- a/dlls/mshtml/pluginhost.h +++ b/dlls/mshtml/pluginhost.h @@ -50,6 +50,10 @@ struct HTMLPluginContainer { HTMLElement element; PluginHost *plugin_host; + + DISPID *props; + DWORD props_size; + DWORD props_len; }; extern const IID IID_HTMLPluginContainer; @@ -64,3 +68,5 @@ HRESULT create_ip_window(IOleInPlaceUIWindow**); HRESULT create_ip_frame(IOleInPlaceFrame**); HRESULT get_plugin_disp(HTMLPluginContainer*,IDispatch**); +HRESULT get_plugin_dispid(HTMLPluginContainer*,WCHAR*,DISPID*); +HRESULT invoke_plugin_prop(HTMLPluginContainer*,DISPID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*); diff --git a/dlls/mshtml/tests/activex.c b/dlls/mshtml/tests/activex.c index 809453b..d3cbb9d 100644 --- a/dlls/mshtml/tests/activex.c +++ b/dlls/mshtml/tests/activex.c @@ -70,6 +70,8 @@ DEFINE_EXPECT(Invoke_READYSTATE); DEFINE_EXPECT(Invoke_ENABLED); DEFINE_EXPECT(Invoke_VALID); DEFINE_EXPECT(Invoke_SECURITYCTX); +DEFINE_EXPECT(Invoke_SCRIPTPROP); +DEFINE_EXPECT(GetIDsOfNames_scriptprop); DEFINE_EXPECT(DoVerb); DEFINE_EXPECT(SetExtent); DEFINE_EXPECT(GetExtent); @@ -570,8 +572,15 @@ static HRESULT WINAPI Dispatch_GetTypeInfo(IDispatch *iface, UINT iTInfo, LCID l static HRESULT WINAPI Dispatch_GetIDsOfNames(IDispatch *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId) { - ok(0, "unexpected call\n"); - return E_FAIL; + CHECK_EXPECT(GetIDsOfNames_scriptprop); + ok(IsEqualGUID(riid, &IID_NULL), "riid = %s\n", debugstr_guid(riid)); + ok(cNames == 1, "cNames = %d\n", cNames); + ok(rgszNames != NULL, "rgszNames == NULL\n"); + ok(!strcmp_wa(rgszNames[0], "scriptprop"), "rgszNames[0] = %s\n", wine_dbgstr_w(rgszNames[0])); + ok(rgDispId != NULL, "rgDispId == NULL\n"); + + *rgDispId = DISPID_SCRIPTPROP; + return S_OK; } static HRESULT WINAPI Dispatch_Invoke(IDispatch *iface, DISPID dispIdMember, REFIID riid, @@ -620,6 +629,17 @@ static HRESULT WINAPI Dispatch_Invoke(IDispatch *iface, DISPID dispIdMember, REF ok(!pExcepInfo, "pExcepInfo != NULL\n"); ok(puArgErr != NULL, "puArgErr == NULL\n"); return DISP_E_MEMBERNOTFOUND; + case DISPID_SCRIPTPROP: + CHECK_EXPECT(Invoke_SCRIPTPROP); + ok(wFlags == DISPATCH_PROPERTYGET, "wFlags = %x\n", wFlags); + ok(!pDispParams->cArgs, "pDispParams->cArgs = %d\n", pDispParams->cArgs); + ok(!pDispParams->rgvarg, "pDispParams->rgvarg != NULL\n"); + ok(pExcepInfo != NULL, "pExcepInfo == NULL\n"); + ok(!puArgErr, "puArgErr != NULL\n"); + + V_VT(pVarResult) = VT_I4; + V_I4(pVarResult) = 4; + return S_OK; default: ok(0, "unexpected call %d\n", dispIdMember); } @@ -1197,10 +1217,42 @@ static const IClassFactoryVtbl ClassFactoryVtbl = { static IClassFactory activex_cf = { &ClassFactoryVtbl }; +static void test_elem_dispex(IDispatchEx *dispex) +{ + DISPPARAMS dp; + EXCEPINFO ei; + VARIANT v; + DISPID id; + BSTR str; + HRESULT hres; + + str = a2bstr("scriptprop"); + SET_EXPECT(GetIDsOfNames_scriptprop); + hres = IDispatchEx_GetDispID(dispex, str, 0, &id); + CHECK_CALLED(GetIDsOfNames_scriptprop); + SysFreeString(str); + ok(hres == S_OK, "GetDispID failed: %08x\n", hres); + todo_wine + ok(id == DISPID_SCRIPTPROP, "id = %d\n", id); + + SET_EXPECT(Invoke_SECURITYCTX); + SET_EXPECT(Invoke_SCRIPTPROP); + memset(&dp, 0, sizeof(dp)); + memset(&ei, 0, sizeof(ei)); + V_VT(&v) = VT_EMPTY; + hres = IDispatchEx_InvokeEx(dispex, id, LOCALE_NEUTRAL, DISPATCH_PROPERTYGET, &dp, &v, &ei, NULL); + ok(hres == S_OK, "InvokeEx failed: %08x\n", hres); + ok(V_VT(&v) == VT_I4, "V_VT(v) = %d\n", V_VT(&v)); + ok(V_I4(&v) == 4, "V_I4(v) = %d\n", V_I4(&v)); + CHECK_CALLED(Invoke_SECURITYCTX); + CHECK_CALLED(Invoke_SCRIPTPROP); +} + static void test_object_elem(IHTMLDocument2 *doc) { IHTMLObjectElement *objelem; IHTMLDocument3 *doc3; + IDispatchEx *dispex; IHTMLElement *elem; IDispatch *disp; BSTR str; @@ -1227,6 +1279,10 @@ static void test_object_elem(IHTMLDocument2 *doc) ok(disp == &Dispatch, "disp != Dispatch\n"); CHECK_CALLED(Invoke_SECURITYCTX); + hres = IHTMLObjectElement_QueryInterface(objelem, &IID_IDispatchEx, (void**)&dispex); + test_elem_dispex(dispex); + IDispatchEx_Release(dispex); + IHTMLObjectElement_Release(objelem); }
1
0
0
0
← Newer
1
...
36
37
38
39
40
41
42
...
110
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
Results per page:
10
25
50
100
200