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
February 2016
----- 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
755 discussions
Start a n
N
ew thread
Alexandre Julliard : makefiles: Automatically create all directories that contain a target file.
by Alexandre Julliard
25 Feb '16
25 Feb '16
Module: wine Branch: master Commit: f17419ec4fa72fa6c2a4eecac1cd4ca5cbfc1b7c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f17419ec4fa72fa6c2a4eecac…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Feb 25 18:00:36 2016 +0900 makefiles: Automatically create all directories that contain a target file. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/makedep.c | 40 +++++++++++++++++++++++++++------------- 1 file changed, 27 insertions(+), 13 deletions(-) diff --git a/tools/makedep.c b/tools/makedep.c index 79ad71d..45c9209 100644 --- a/tools/makedep.c +++ b/tools/makedep.c @@ -1839,6 +1839,29 @@ static void create_dir( const char *dir ) /******************************************************************* + * create_file_directories + * + * Create the base directories of all the files. + */ +static void create_file_directories( const struct makefile *make, struct strarray files ) +{ + struct strarray subdirs = empty_strarray; + unsigned int i; + char *dir; + + for (i = 0; i < files.count; i++) + { + if (!strchr( files.str[i], '/' )) continue; + dir = base_dir_path( make, files.str[i] ); + *strrchr( dir, '/' ) = 0; + strarray_add_uniq( &subdirs, dir ); + } + + for (i = 0; i < subdirs.count; i++) create_dir( subdirs.str[i] ); +} + + +/******************************************************************* * output_filenames_obj_dir */ static void output_filenames_obj_dir( const struct makefile *make, struct strarray array ) @@ -2213,7 +2236,6 @@ static struct strarray output_sources( const struct makefile *make ) struct strarray c2man_files = empty_strarray; struct strarray implib_objs = empty_strarray; struct strarray includes = empty_strarray; - struct strarray subdirs = empty_strarray; struct strarray phony_targets = empty_strarray; struct strarray all_targets = empty_strarray; struct strarray install_rules[NB_INSTALL_RULES]; @@ -2245,13 +2267,6 @@ static struct strarray output_sources( const struct makefile *make ) if (!ext) fatal_error( "unsupported file type %s\n", source->name ); *ext++ = 0; - if (make->src_dir && strchr( obj, '/' )) - { - char *subdir = base_dir_path( make, obj ); - *strrchr( subdir, '/' ) = 0; - strarray_add_uniq( &subdirs, subdir ); - } - extradefs = get_expanded_file_local_var( make, obj, "EXTRADEFS" ); get_dependencies( &dependencies, source, source ); @@ -3046,8 +3061,6 @@ static struct strarray output_sources( const struct makefile *make ) output( "\n" ); } - for (i = 0; i < subdirs.count; i++) create_dir( subdirs.str[i] ); - return clean_files; } @@ -3231,6 +3244,8 @@ static void output_dependencies( const struct makefile *make ) FILE *src_file; int found = 0; + if (make->base_dir) create_dir( make->base_dir ); + output_file_name = base_dir_path( make, output_makefile_name ); output_file = create_temp_file( output_file_name ); output_top_variables( make ); @@ -3263,6 +3278,8 @@ static void output_dependencies( const struct makefile *make ) if (!make->src_dir && make->base_dir) output_gitignore( base_dir_path( make, ".gitignore" ), ignore_files ); + create_file_directories( make, targets ); + output_file_name = NULL; } @@ -3345,9 +3362,6 @@ static void load_sources( struct makefile *make ) list_init( &make->sources ); list_init( &make->includes ); - /* FIXME: target dir has to exist to allow locating srcdir-relative include files */ - if (make->base_dir) create_dir( make->base_dir ); - for (var = source_vars; *var; var++) { value = get_expanded_make_var_array( make, *var );
1
0
0
0
Alexandre Julliard : makefiles: Generate top-level rules for building mo files.
by Alexandre Julliard
25 Feb '16
25 Feb '16
Module: wine Branch: master Commit: d5ddc93b82e61a6ca6c3d125643e00b1a1dc7088 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d5ddc93b82e61a6ca6c3d1256…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Feb 25 17:46:56 2016 +0900 makefiles: Generate top-level rules for building mo files. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- configure | 21 +++++---------------- configure.ac | 25 ++++++------------------- tools/makedep.c | 35 +++++++++++++++++++++++++---------- 3 files changed, 36 insertions(+), 45 deletions(-) diff --git a/configure b/configure index b11d5fb..6342d91 100755 --- a/configure +++ b/configure @@ -18308,23 +18308,12 @@ include/stamp-h.in: configure.ac aclocal.m4 @echo timestamp > \$@" fi -if test "$MSGFMT" != false -then - wine_fn_append_rule "__builddeps__: \$(LINGUAS:%=po/%.mo) -clean:: - \$(RM) \$(LINGUAS:%=po/%.mo)" +test "$MSGFMT" != false || LINGUAS= - posrc="po" - test "$srcdir" = . || posrc="$srcdir/po" - for i in $LINGUAS - do - wine_fn_ignore_file "po/$i.mo" - wine_fn_append_rule "po/$i.mo: $posrc/$i.po - \$(MSGFMT) -o \$@ $posrc/$i.po" - done -else - LINGUAS= -fi +for i in $LINGUAS +do + wine_fn_ignore_file "po/$i.mo" +done if test "x$enable_tools" != xno then diff --git a/configure.ac b/configure.ac index 288224c..9e0dcd9 100644 --- a/configure.ac +++ b/configure.ac @@ -3650,25 +3650,12 @@ include/stamp-h.in: configure.ac aclocal.m4 @echo timestamp > \$[@]]) fi -if test "$MSGFMT" != false -then - WINE_APPEND_RULE( -[__builddeps__: \$(LINGUAS:%=po/%.mo) -clean:: - \$(RM) \$(LINGUAS:%=po/%.mo)]) - - posrc="po" - test "$srcdir" = . || posrc="$srcdir/po" - for i in $LINGUAS - do - WINE_IGNORE_FILE("po/$i.mo") - WINE_APPEND_RULE( -[po/$i.mo: $posrc/$i.po - \$(MSGFMT) -o \$@ $posrc/$i.po]) - done -else - LINGUAS= -fi +test "$MSGFMT" != false || LINGUAS= + +for i in $LINGUAS +do + WINE_IGNORE_FILE("po/$i.mo") +done if test "x$enable_tools" != xno then diff --git a/tools/makedep.c b/tools/makedep.c index 70dd753..79ad71d 100644 --- a/tools/makedep.c +++ b/tools/makedep.c @@ -146,6 +146,7 @@ static const char *convert; static const char *rsvg; static const char *icotool; static const char *dlltool; +static const char *msgfmt; struct makefile { @@ -2988,16 +2989,6 @@ static struct strarray output_sources( const struct makefile *make ) strarray_addall( &clean_files, all_targets ); strarray_addall( &clean_files, get_expanded_make_var_array( make, "EXTRA_TARGETS" )); - if (clean_files.count) - { - output( "%s::\n", obj_dir_path( make, "clean" )); - output( "\trm -f" ); - output_filenames_obj_dir( make, clean_files ); - output( "\n" ); - if (make->obj_dir) output( "__clean__: %s\n", obj_dir_path( make, "clean" )); - strarray_add( &phony_targets, obj_dir_path( make, "clean" )); - } - if (make->subdirs.count) { struct strarray makefile_deps = empty_strarray; @@ -3022,9 +3013,32 @@ static struct strarray output_sources( const struct makefile *make ) output( "\n" ); strarray_add( &phony_targets, "distclean" ); + if (msgfmt && strcmp( msgfmt, "false" )) + { + strarray_addall( &clean_files, mo_files ); + output( "__builddeps__:" ); + output_filenames( mo_files ); + output( "\n" ); + for (i = 0; i < linguas.count; i++) + { + output( "%s/%s.mo:", obj_dir_path( make, "po" ), linguas.str[i] ); + output( " %s/%s.po\n", src_dir_path( make, "po" ), linguas.str[i] ); + output( "\t%s -o $@ %s/%s.po\n", msgfmt, src_dir_path( make, "po" ), linguas.str[i] ); + } + } if (get_expanded_make_variable( make, "GETTEXTPO_LIBS" )) output_po_files( make ); } + if (clean_files.count) + { + output( "%s::\n", obj_dir_path( make, "clean" )); + output( "\trm -f" ); + output_filenames_obj_dir( make, clean_files ); + output( "\n" ); + if (make->obj_dir) output( "__clean__: %s\n", obj_dir_path( make, "clean" )); + strarray_add( &phony_targets, obj_dir_path( make, "clean" )); + } + if (phony_targets.count) { output( ".PHONY:" ); @@ -3472,6 +3486,7 @@ int main( int argc, char *argv[] ) rsvg = get_expanded_make_variable( top_makefile, "RSVG" ); icotool = get_expanded_make_variable( top_makefile, "ICOTOOL" ); dlltool = get_expanded_make_variable( top_makefile, "DLLTOOL" ); + msgfmt = get_expanded_make_variable( top_makefile, "MSGFMT" ); if (root_src_dir && !strcmp( root_src_dir, "." )) root_src_dir = NULL; if (tools_dir && !strcmp( tools_dir, "." )) tools_dir = NULL;
1
0
0
0
Alexandre Julliard : makefiles: Parse the entire top-level makefile.
by Alexandre Julliard
25 Feb '16
25 Feb '16
Module: wine Branch: master Commit: 49f88527c93e8d6b2d75455722defdabbff478b1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=49f88527c93e8d6b2d7545572…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Feb 25 17:08:12 2016 +0900 makefiles: Parse the entire top-level makefile. It's only done once so there are no longer any performance concerns. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- Makefile.in | 3 --- tools/makedep.c | 12 ++++++------ 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/Makefile.in b/Makefile.in index b78f43b..91b134f 100644 --- a/Makefile.in +++ b/Makefile.in @@ -18,7 +18,6 @@ # sgmlpages: compile sgml source for the Wine API Guide # xmlpages: compile xml source for the Wine API Guide -# Start of common header # The following variable definitions are copied into all makefiles prefix = @prefix@ @@ -100,8 +99,6 @@ ALL_TEST_RESOURCES = @ALL_TEST_RESOURCES@ @ALL_VARS_RULES@ @SET_MAKE@ -# End of common header - all: wine @echo "Wine build complete." diff --git a/tools/makedep.c b/tools/makedep.c index 4264b5e..70dd753 100644 --- a/tools/makedep.c +++ b/tools/makedep.c @@ -182,6 +182,7 @@ struct makefile static struct makefile *top_makefile; +static const char separator[] = "### Dependencies"; static const char *output_makefile_name = "Makefile"; static const char *input_file_name; static const char *output_file_name; @@ -1685,7 +1686,7 @@ static int set_make_variable( struct strarray *array, const char *assignment ) /******************************************************************* * parse_makefile */ -static struct makefile *parse_makefile( const char *path, const char *separator ) +static struct makefile *parse_makefile( const char *path ) { char *buffer; FILE *file; @@ -1702,7 +1703,7 @@ static struct makefile *parse_makefile( const char *path, const char *separator file = open_input_makefile( make ); while ((buffer = get_line( file ))) { - if (separator && !strncmp( buffer, separator, strlen(separator) )) break; + if (!strncmp( buffer, separator, strlen(separator) )) break; if (*buffer == '\t') continue; /* command */ while (isspace( *buffer )) buffer++; if (*buffer == '#') continue; /* comment */ @@ -3211,7 +3212,6 @@ static void output_top_variables( const struct makefile *make ) */ static void output_dependencies( const struct makefile *make ) { - static const char separator[] = "### Dependencies"; struct strarray targets, ignore_files = empty_strarray; char buffer[1024]; FILE *src_file; @@ -3449,7 +3449,7 @@ int main( int argc, char *argv[] ) for (i = 0; i < HASH_SIZE; i++) list_init( &files[i] ); - top_makefile = parse_makefile( NULL, "# End of common header" ); + top_makefile = parse_makefile( NULL ); linguas = get_expanded_make_var_array( top_makefile, "LINGUAS" ); target_flags = get_expanded_make_var_array( top_makefile, "TARGETFLAGS" ); @@ -3485,7 +3485,7 @@ int main( int argc, char *argv[] ) top_makefile->submakes = xmalloc( top_makefile->subdirs.count * sizeof(*top_makefile->submakes) ); for (i = 0; i < top_makefile->subdirs.count; i++) - top_makefile->submakes[i] = parse_makefile( top_makefile->subdirs.str[i], NULL ); + top_makefile->submakes[i] = parse_makefile( top_makefile->subdirs.str[i] ); load_sources( top_makefile ); for (i = 0; i < top_makefile->subdirs.count; i++) @@ -3500,7 +3500,7 @@ int main( int argc, char *argv[] ) for (i = 1; i < argc; i++) { - struct makefile *make = parse_makefile( argv[i], NULL ); + struct makefile *make = parse_makefile( argv[i] ); load_sources( make ); output_dependencies( make ); }
1
0
0
0
Alexandre Julliard : makefiles: Generate top-level rules for pot files.
by Alexandre Julliard
25 Feb '16
25 Feb '16
Module: wine Branch: master Commit: ce231568a97285102a18a9caf192c52b7172ac1e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ce231568a97285102a18a9caf…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Feb 25 15:36:02 2016 +0900 makefiles: Generate top-level rules for pot files. Get rid of the rsrc.pot and msg.pot hacks, use each individual source file instead. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- aclocal.m4 | 33 +------- configure | 212 ++++++++++++++++++++++----------------------------- configure.ac | 176 +++++++++++++++++++++--------------------- tools/make_makefiles | 4 +- tools/makedep.c | 118 ++++++++++++++++++---------- 5 files changed, 257 insertions(+), 286 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=ce231568a97285102a18a…
1
0
0
0
Jacek Caban : mshtml: Added IHTMLXMLHttpRequest:: getResponseHeader implementation.
by Alexandre Julliard
25 Feb '16
25 Feb '16
Module: wine Branch: master Commit: 206bebfd8fca43b5c8aacbfc5e10c936dfd014ab URL:
http://source.winehq.org/git/wine.git/?a=commit;h=206bebfd8fca43b5c8aacbfc5…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Feb 24 18:53:10 2016 +0100 mshtml: Added IHTMLXMLHttpRequest::getResponseHeader implementation. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mshtml/tests/xmlhttprequest.c | 17 +++++++++++++++++ dlls/mshtml/xmlhttprequest.c | 31 +++++++++++++++++++++++++++++-- 2 files changed, 46 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/tests/xmlhttprequest.c b/dlls/mshtml/tests/xmlhttprequest.c index 5d11ec0..a16dad1 100644 --- a/dlls/mshtml/tests/xmlhttprequest.c +++ b/dlls/mshtml/tests/xmlhttprequest.c @@ -524,6 +524,19 @@ static void test_illegal_xml(IXMLDOMDocument *xmldom) ok(last == NULL, "last != NULL\n"); } +#define set_request_header(a,b,c) _set_request_header(__LINE__,a,b,c) +static void _set_request_header(unsigned line, IHTMLXMLHttpRequest *xhr, const char *header_a, const char *value_a) +{ + BSTR header = a2bstr(header_a), value = a2bstr(value_a); + HRESULT hres; + + hres = IHTMLXMLHttpRequest_setRequestHeader(xhr, header, value); + ok_(__FILE__,line)(hres == S_OK, "setRequestHeader failed: %08x\n", hres); + + SysFreeString(header); + SysFreeString(value); +} + static void test_responseXML(const char *expect_text) { IDispatch *disp; @@ -673,6 +686,8 @@ static void test_sync_xhr(IHTMLDocument2 *doc, const char *xml_url, const char * ok(hres == S_OK, "get_readyState failed: %08x\n", hres); ok(val == 1, "Expect OPENED, got %d\n", val); + set_request_header(xhr, "x-wine-test", "sync-test"); + SET_EXPECT(xmlhttprequest_onreadystatechange_opened); SET_EXPECT(xmlhttprequest_onreadystatechange_headers_received); SET_EXPECT(xmlhttprequest_onreadystatechange_loading); @@ -835,6 +850,8 @@ static void test_async_xhr(IHTMLDocument2 *doc, const char *xml_url, const char ok(hres == S_OK, "get_readyState failed: %08x\n", hres); ok(val == 1, "Expect OPENED, got %d\n", val); + set_request_header(xhr, "x-wine-test", "async-test"); + SET_EXPECT(xmlhttprequest_onreadystatechange_opened); SET_EXPECT(xmlhttprequest_onreadystatechange_headers_received); SET_EXPECT(xmlhttprequest_onreadystatechange_loading); diff --git a/dlls/mshtml/xmlhttprequest.c b/dlls/mshtml/xmlhttprequest.c index ba6dc05..d55570c 100644 --- a/dlls/mshtml/xmlhttprequest.c +++ b/dlls/mshtml/xmlhttprequest.c @@ -613,8 +613,35 @@ static HRESULT WINAPI HTMLXMLHttpRequest_getResponseHeader(IHTMLXMLHttpRequest * static HRESULT WINAPI HTMLXMLHttpRequest_setRequestHeader(IHTMLXMLHttpRequest *iface, BSTR bstrHeader, BSTR bstrValue) { HTMLXMLHttpRequest *This = impl_from_IHTMLXMLHttpRequest(iface); - FIXME("(%p)->(%s %s)\n", This, debugstr_w(bstrHeader), debugstr_w(bstrValue)); - return E_NOTIMPL; + char *header_u, *value_u; + nsACString header, value; + nsresult nsres; + + TRACE("(%p)->(%s %s)\n", This, debugstr_w(bstrHeader), debugstr_w(bstrValue)); + + header_u = heap_strdupWtoU(bstrHeader); + if(bstrHeader && !header_u) + return E_OUTOFMEMORY; + + value_u = heap_strdupWtoU(bstrValue); + if(bstrValue && !value_u) { + heap_free(header_u); + return E_OUTOFMEMORY; + } + + nsACString_InitDepend(&header, header_u); + nsACString_InitDepend(&value, value_u); + nsres = nsIXMLHttpRequest_SetRequestHeader(This->nsxhr, &header, &value); + nsACString_Finish(&header); + nsACString_Finish(&value); + heap_free(header_u); + heap_free(value_u); + if(NS_FAILED(nsres)) { + ERR("SetRequestHeader failed: %08x\n", nsres); + return E_FAIL; + } + + return S_OK; } static const IHTMLXMLHttpRequestVtbl HTMLXMLHttpRequestVtbl = {
1
0
0
0
André Hentschel : winmm/tests: Use todo_wine_if() in tests.
by Alexandre Julliard
25 Feb '16
25 Feb '16
Module: wine Branch: master Commit: 4361a1f0902a574daf1dcb0c8b1bacf5b875dd09 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4361a1f0902a574daf1dcb0c8…
Author: André Hentschel <nerv(a)dawncrow.de> Date: Fri Feb 19 23:12:21 2016 +0100 winmm/tests: Use todo_wine_if() in tests. Signed-off-by: André Hentschel <nerv(a)dawncrow.de> Signed-off-by: Andrew Eikum <aeikum(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winmm/tests/mci.c | 12 ++++-------- dlls/winmm/tests/midi.c | 8 +++----- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/dlls/winmm/tests/mci.c b/dlls/winmm/tests/mci.c index 7470ed1..14500a5 100644 --- a/dlls/winmm/tests/mci.c +++ b/dlls/winmm/tests/mci.c @@ -721,10 +721,8 @@ static void test_recordWAVE(HWND hwnd) /* A few ME machines pass all tests except set format tag pcm! */ err = mciSendStringA("record x to 2000 wait", NULL, 0, hwnd); ok(err || !ok_pcm,"can record yet set wave format pcm returned %s\n", dbg_mcierr(ok_pcm)); - if(!ndevs) todo_wine /* with sound disabled */ - ok(ndevs>0 ? !err : err==MCIERR_WAVE_INPUTSUNSUITABLE,"mci record to 2000 returned %s\n", dbg_mcierr(err)); - else - ok(ndevs>0 ? !err : err==MCIERR_WAVE_INPUTSUNSUITABLE,"mci record to 2000 returned %s\n", dbg_mcierr(err)); + todo_wine_if (!ndevs) /* with sound disabled */ + ok(ndevs > 0 ? !err : err == MCIERR_WAVE_INPUTSUNSUITABLE, "mci record to 2000 returned %s\n", dbg_mcierr(err)); if(err) { if (err==MCIERR_WAVE_INPUTSUNSUITABLE) skip("Please install audio driver. Everything is skipped.\n"); @@ -1165,10 +1163,8 @@ static void test_AutoOpenWAVE(HWND hwnd) test_notification(hwnd, "-prior to auto-open-", 0); err = mciSendStringA("play tempfile.wav notify", buf, sizeof(buf), hwnd); - if(ok_saved==MCIERR_FILE_NOT_FOUND) todo_wine /* same as above */ - ok(err==MCIERR_NOTIFY_ON_AUTO_OPEN,"mci auto-open play notify returned %s\n", dbg_mcierr(err)); - else - ok(err==MCIERR_NOTIFY_ON_AUTO_OPEN,"mci auto-open play notify returned %s\n", dbg_mcierr(err)); + todo_wine_if (ok_saved == MCIERR_FILE_NOT_FOUND) /* same as above */ + ok(err==MCIERR_NOTIFY_ON_AUTO_OPEN,"mci auto-open play notify returned %s\n", dbg_mcierr(err)); if(err) /* FIXME: don't open twice yet, it confuses Wine. */ err = mciSendStringA("play tempfile.wav", buf, sizeof(buf), hwnd); diff --git a/dlls/winmm/tests/midi.c b/dlls/winmm/tests/midi.c index 6438dba..b80d5d2 100644 --- a/dlls/winmm/tests/midi.c +++ b/dlls/winmm/tests/midi.c @@ -800,11 +800,9 @@ static void test_midi_outfns(HWND hwnd) ok(rc==MMSYSERR_BADDEVICEID || broken(rc==MMSYSERR_NODRIVER /*nt,w2k*/), "midiOutGetDevCaps MAPPER with no MIDI rc=%s\n", mmsys_error(rc)); rc = midiOutOpen(&hm, MIDIMAPPER, 0, 0, CALLBACK_NULL); - if (rc==MIDIERR_INVALIDSETUP) todo_wine /* Wine without snd-seq */ - ok(rc==MMSYSERR_BADDEVICEID || broken(rc==MMSYSERR_NODRIVER /*w2k*/), "midiOutOpen MAPPER with no MIDI rc=%s\n", mmsys_error(rc)); - else - ok(rc==MMSYSERR_BADDEVICEID || broken(rc==MMSYSERR_NODRIVER /*w2k sound disabled*/), - "midiOutOpen MAPPER with no MIDI rc=%s\n", mmsys_error(rc)); + todo_wine_if (rc == MIDIERR_INVALIDSETUP) /* Wine without snd-seq */ + ok(rc == MMSYSERR_BADDEVICEID || broken(rc == MMSYSERR_NODRIVER /*w2k sound disabled*/), + "midiOutOpen MAPPER with no MIDI rc=%s\n", mmsys_error(rc)); if (!rc) { rc = midiOutClose(hm); ok(!rc, "midiOutClose rc=%s\n", mmsys_error(rc));
1
0
0
0
Frédéric Delanoy : windowscodecs/tests: Use todo_wine_if() in tests.
by Alexandre Julliard
25 Feb '16
25 Feb '16
Module: wine Branch: master Commit: e8704b6b8d9530680ceff2bd49d137985dedbdb2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e8704b6b8d9530680ceff2bd4…
Author: Frédéric Delanoy <frederic.delanoy(a)gmail.com> Date: Tue Feb 23 21:42:30 2016 +0100 windowscodecs/tests: Use todo_wine_if() in tests. Signed-off-by: Frédéric Delanoy <frederic.delanoy(a)gmail.com> Signed-off-by: Vincent Povirk <vincent(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/windowscodecs/tests/bitmap.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/dlls/windowscodecs/tests/bitmap.c b/dlls/windowscodecs/tests/bitmap.c index 1b91dca..42f452a 100644 --- a/dlls/windowscodecs/tests/bitmap.c +++ b/dlls/windowscodecs/tests/bitmap.c @@ -823,13 +823,8 @@ todo_wine hr = IWICBitmap_CopyPixels(bitmap, NULL, 4, sizeof(data), data); ok(hr == S_OK, "IWICBitmap_CopyPixels error %#x\n", hr); for (i = 0; i < sizeof(data); i++) - { - if (data[i] != data_8bpp_pal_wic[i]) -todo_wine + todo_wine_if (data[i] != data_8bpp_pal_wic[i]) ok(data[i] == data_8bpp_pal_wic[i], "%u: expected %#x, got %#x\n", i, data_8bpp_pal_wic[i], data[i]); - else - ok(data[i] == data_8bpp_pal_wic[i], "%u: expected %#x, got %#x\n", i, data_8bpp_pal_wic[i], data[i]); - } IWICBitmap_Release(bitmap); DeleteObject(hbmp);
1
0
0
0
Jacek Caban : mshtml/tests: Fixed tests on some IE versions.
by Alexandre Julliard
24 Feb '16
24 Feb '16
Module: wine Branch: master Commit: b652c119690afe8b89b8ce9cddde34b4c1589a62 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b652c119690afe8b89b8ce9cd…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Feb 24 16:12:24 2016 +0100 mshtml/tests: Fixed tests on some IE versions. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mshtml/tests/events.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/tests/events.html b/dlls/mshtml/tests/events.html index 5a0bbfb..64e03f5 100644 --- a/dlls/mshtml/tests/events.html +++ b/dlls/mshtml/tests/events.html @@ -160,8 +160,8 @@ function test_string_event_handler() { window.onload = function() { try { ok(inlscr_complete_called, "onreadystatechange not fired"); - ok(extern_res_script_rs === "eval,complete1,", - "extern_res_script_rs = " + extern_res_script_rs + " expected eval,complete1,"); + ok(extern_res_script_rs === "eval,complete1," || extern_res_script_rs == "loaded0,eval,complete1,", + "extern_res_script_rs = " + extern_res_script_rs + " expected (loaded0)?,eval,complete1,"); ok(extern_http_script_rs === "loading,loaded,complete,", "extern_http_script_rs = " + extern_http_script_rs + " expected loading,loaded,complete,");
1
0
0
0
Jacek Caban : mshtml: Expose XMLHttpRequest constructor to scripts.
by Alexandre Julliard
24 Feb '16
24 Feb '16
Module: wine Branch: master Commit: c0fda9824e213e5a779bddfba6052dfc20b9c8d3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c0fda9824e213e5a779bddfba…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Feb 24 15:21:24 2016 +0100 mshtml: Expose XMLHttpRequest constructor to scripts. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mshtml/dispex.c | 52 +++++++++++++++++++++++++++---------------- dlls/mshtml/htmlwindow.c | 3 ++- dlls/mshtml/mshtml_private.h | 1 + dlls/mshtml/tests/dom.c | 24 ++++++++++++++++++++ dlls/mshtml/tests/jstest.html | 9 ++++++++ 5 files changed, 69 insertions(+), 20 deletions(-) diff --git a/dlls/mshtml/dispex.c b/dlls/mshtml/dispex.c index 3980daf..90e5c72 100644 --- a/dlls/mshtml/dispex.c +++ b/dlls/mshtml/dispex.c @@ -241,8 +241,8 @@ static void add_func_info(dispex_data_t *data, DWORD *size, tid_t tid, const FUN if(info == data->funcs+data->func_cnt) { if(data->func_cnt == *size) data->funcs = heap_realloc_zero(data->funcs, (*size <<= 1)*sizeof(func_info_t)); - info = data->funcs+data->func_cnt; + hres = ITypeInfo_GetDocumentation(dti, desc->memid, &info->name, NULL, NULL, NULL); if(FAILED(hres)) return; @@ -315,6 +315,31 @@ static void add_func_info(dispex_data_t *data, DWORD *size, tid_t tid, const FUN } } +static HRESULT process_interface(dispex_data_t *data, tid_t tid, ITypeInfo *disp_typeinfo, DWORD *size) +{ + unsigned i = 7; /* skip IDispatch functions */ + ITypeInfo *typeinfo; + FUNCDESC *funcdesc; + HRESULT hres; + + hres = get_typeinfo(tid, &typeinfo); + if(FAILED(hres)) + return hres; + + while(1) { + hres = ITypeInfo_GetFuncDesc(typeinfo, i++, &funcdesc); + if(FAILED(hres)) + break; + + TRACE("adding...\n"); + + add_func_info(data, size, tid, funcdesc, disp_typeinfo ? disp_typeinfo : typeinfo); + ITypeInfo_ReleaseFuncDesc(typeinfo, funcdesc); + } + + return S_OK; +} + static int dispid_cmp(const void *p1, const void *p2) { return ((const func_info_t*)p1)->id - ((const func_info_t*)p2)->id; @@ -327,11 +352,10 @@ static int func_name_cmp(const void *p1, const void *p2) static dispex_data_t *preprocess_dispex_data(DispatchEx *This) { - const tid_t *tid = This->data->iface_tids; - FUNCDESC *funcdesc; + const tid_t *tid; dispex_data_t *data; DWORD size = 16, i; - ITypeInfo *ti, *dti; + ITypeInfo *dti; HRESULT hres; TRACE("(%p)\n", This); @@ -359,24 +383,15 @@ static dispex_data_t *preprocess_dispex_data(DispatchEx *This) } list_add_tail(&dispex_data_list, &data->entry); - while(*tid) { - hres = get_typeinfo(*tid, &ti); + for(tid = This->data->iface_tids; *tid; tid++) { + hres = process_interface(data, *tid, dti, &size); if(FAILED(hres)) break; - - i=7; - while(1) { - hres = ITypeInfo_GetFuncDesc(ti, i++, &funcdesc); - if(FAILED(hres)) - break; - - add_func_info(data, &size, *tid, funcdesc, dti); - ITypeInfo_ReleaseFuncDesc(ti, funcdesc); - } - - tid++; } + if(This->data->additional_tid) + process_interface(data, This->data->additional_tid, NULL, &size); + if(!data->func_cnt) { heap_free(data->funcs); data->name_table = NULL; @@ -392,7 +407,6 @@ static dispex_data_t *preprocess_dispex_data(DispatchEx *This) for(i=0; i < data->func_cnt; i++) data->name_table[i] = data->funcs+i; qsort(data->name_table, data->func_cnt, sizeof(func_info_t*), func_name_cmp); - return data; } diff --git a/dlls/mshtml/htmlwindow.c b/dlls/mshtml/htmlwindow.c index d7d133a..f203405 100644 --- a/dlls/mshtml/htmlwindow.c +++ b/dlls/mshtml/htmlwindow.c @@ -2939,7 +2939,8 @@ static dispex_static_data_t HTMLWindow_dispex = { &HTMLWindow_dispex_vtbl, DispHTMLWindow2_tid, NULL, - HTMLWindow_iface_tids + HTMLWindow_iface_tids, + IHTMLWindow5_tid }; static void *alloc_window(size_t size) diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 1f0255f..f4e6668 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -248,6 +248,7 @@ typedef struct { const tid_t disp_tid; dispex_data_t *data; const tid_t* const iface_tids; + const tid_t additional_tid; } dispex_static_data_t; struct DispatchEx { diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index 4b2b825..e27339a 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -6598,6 +6598,28 @@ static void test_dom_implementation(IHTMLDocument2 *doc) IHTMLDOMImplementation_Release(dom_implementation); } +static void test_xhr(IHTMLDocument2 *doc) +{ + IHTMLWindow2 *window; + IDispatchEx *dispex; + DISPID id; + BSTR str; + HRESULT hres; + + hres = IHTMLDocument2_get_parentWindow(doc, &window); + ok(hres == S_OK, "get_parentWindow failed: %08x\n", hres); + + hres = IHTMLWindow2_QueryInterface(window, &IID_IDispatchEx, (void**)&dispex); + ok(hres == S_OK, "Could not get IDispatchEx iface: %08x\n", hres); + + str = a2bstr("XMLHttpRequest"); + hres = IDispatchEx_GetDispID(dispex, str, 0, &id); + ok(hres == S_OK, "GetDispID failed: %08x\n", hres); + SysFreeString(str); + + IHTMLWindow2_Release(window); +} + static void test_defaults(IHTMLDocument2 *doc) { IHTMLStyleSheetsCollection *stylesheetcol; @@ -6670,6 +6692,8 @@ static void test_defaults(IHTMLDocument2 *doc) IHTMLElementCollection_Release(collection); } + test_xhr(doc); + hres = IHTMLElement_QueryInterface(elem, &IID_IHTMLBodyElement, (void**)&body); ok(hres == S_OK, "Could not get IHTMBodyElement: %08x\n", hres); test_default_body(body); diff --git a/dlls/mshtml/tests/jstest.html b/dlls/mshtml/tests/jstest.html index f0d3e3b..2a5a447 100644 --- a/dlls/mshtml/tests/jstest.html +++ b/dlls/mshtml/tests/jstest.html @@ -354,6 +354,14 @@ function test_text_node() { ok(text2.data == "testing", "text2.data = " + text2.data); } +function test_xhr() { + ok("XMLHttpRequest" in window, "XMLHttpRequest not found in window object\n"); + ok(typeof(XMLHttpRequest) === "object", "typeof(XMLHttpRequest) = " + typeof(XMLHttpRequest)); + + var xhr = new XMLHttpRequest(); + ok(typeof(xhr) === "object", "typeof(xhr) = " + typeof(xhr)); +} + var globalVar = false; function runTests() { @@ -379,6 +387,7 @@ function runTests() { test_whitespace_nodes(); test_language_attribute(); test_text_node(); + test_xhr(); var r = window.execScript("globalVar = true;"); ok(r === undefined, "execScript returned " + r);
1
0
0
0
Jacek Caban : mshtml: Added HTMLXMLHttpRequestFactory DISPID_VALUE implementation.
by Alexandre Julliard
24 Feb '16
24 Feb '16
Module: wine Branch: master Commit: 5996de5c2e5b8f1b27aa345714cb9dca401333d8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5996de5c2e5b8f1b27aa34571…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Feb 24 15:21:14 2016 +0100 mshtml: Added HTMLXMLHttpRequestFactory DISPID_VALUE implementation. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mshtml/xmlhttprequest.c | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/dlls/mshtml/xmlhttprequest.c b/dlls/mshtml/xmlhttprequest.c index d188478..ba6dc05 100644 --- a/dlls/mshtml/xmlhttprequest.c +++ b/dlls/mshtml/xmlhttprequest.c @@ -828,12 +828,44 @@ static const IHTMLXMLHttpRequestFactoryVtbl HTMLXMLHttpRequestFactoryVtbl = { HTMLXMLHttpRequestFactory_create }; +static inline HTMLXMLHttpRequestFactory *factory_from_DispatchEx(DispatchEx *iface) +{ + return CONTAINING_RECORD(iface, HTMLXMLHttpRequestFactory, dispex); +} + +static HRESULT HTMLXMLHttpRequestFactory_value(DispatchEx *iface, LCID lcid, WORD flags, DISPPARAMS *params, + VARIANT *res, EXCEPINFO *ei, IServiceProvider *caller) +{ + HTMLXMLHttpRequestFactory *This = factory_from_DispatchEx(iface); + IHTMLXMLHttpRequest *xhr; + HRESULT hres; + + TRACE("\n"); + + if(flags != DISPATCH_CONSTRUCT) { + FIXME("flags %x not supported\n", flags); + return E_NOTIMPL; + } + + hres = IHTMLXMLHttpRequestFactory_create(&This->IHTMLXMLHttpRequestFactory_iface, &xhr); + if(FAILED(hres)) + return hres; + + V_VT(res) = VT_DISPATCH; + V_DISPATCH(res) = (IDispatch*)xhr; + return S_OK; +} + +static const dispex_static_data_vtbl_t HTMLXMLHttpRequestFactory_dispex_vtbl = { + HTMLXMLHttpRequestFactory_value +}; + static const tid_t HTMLXMLHttpRequestFactory_iface_tids[] = { IHTMLXMLHttpRequestFactory_tid, 0 }; static dispex_static_data_t HTMLXMLHttpRequestFactory_dispex = { - NULL, + &HTMLXMLHttpRequestFactory_dispex_vtbl, IHTMLXMLHttpRequestFactory_tid, NULL, HTMLXMLHttpRequestFactory_iface_tids
1
0
0
0
← Newer
1
...
5
6
7
8
9
10
11
...
76
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
Results per page:
10
25
50
100
200