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
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
List overview
wine-commits
November 2011
----- 2025 -----
July 2025
June 2025
May 2025
April 2025
March 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
852 discussions
Start a n
N
ew thread
Jacek Caban : jscript: Store expression type in expression_t.
by Alexandre Julliard
18 Nov '11
18 Nov '11
Module: wine Branch: master Commit: 8b66110e51366c7c705240d7f0a90d0ef61ed1d4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8b66110e51366c7c705240d7f…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Nov 18 14:05:57 2011 +0100 jscript: Store expression type in expression_t. --- dlls/jscript/engine.h | 123 +++++++++++++++++++++++++------------------------ dlls/jscript/parser.y | 1 + 2 files changed, 63 insertions(+), 61 deletions(-) diff --git a/dlls/jscript/engine.h b/dlls/jscript/engine.h index 73d06c9..c346e5f 100644 --- a/dlls/jscript/engine.h +++ b/dlls/jscript/engine.h @@ -291,9 +291,71 @@ typedef struct { } u; } exprval_t; +typedef enum { + EXPR_COMMA, + EXPR_OR, + EXPR_AND, + EXPR_BOR, + EXPR_BXOR, + EXPR_BAND, + EXPR_INSTANCEOF, + EXPR_IN, + EXPR_ADD, + EXPR_SUB, + EXPR_MUL, + EXPR_DIV, + EXPR_MOD, + EXPR_DELETE, + EXPR_VOID, + EXPR_TYPEOF, + EXPR_MINUS, + EXPR_PLUS, + EXPR_POSTINC, + EXPR_POSTDEC, + EXPR_PREINC, + EXPR_PREDEC, + EXPR_EQ, + EXPR_EQEQ, + EXPR_NOTEQ, + EXPR_NOTEQEQ, + EXPR_LESS, + EXPR_LESSEQ, + EXPR_GREATER, + EXPR_GREATEREQ, + EXPR_BITNEG, + EXPR_LOGNEG, + EXPR_LSHIFT, + EXPR_RSHIFT, + EXPR_RRSHIFT, + EXPR_ASSIGN, + EXPR_ASSIGNLSHIFT, + EXPR_ASSIGNRSHIFT, + EXPR_ASSIGNRRSHIFT, + EXPR_ASSIGNADD, + EXPR_ASSIGNSUB, + EXPR_ASSIGNMUL, + EXPR_ASSIGNDIV, + EXPR_ASSIGNMOD, + EXPR_ASSIGNAND, + EXPR_ASSIGNOR, + EXPR_ASSIGNXOR, + EXPR_COND, + EXPR_ARRAY, + EXPR_MEMBER, + EXPR_NEW, + EXPR_CALL, + EXPR_THIS, + EXPR_FUNC, + EXPR_IDENT, + EXPR_ARRAYLIT, + EXPR_PROPVAL, + EXPR_LITERAL +} expression_type_t; + typedef HRESULT (*expression_eval_t)(script_ctx_t*,expression_t*,DWORD,jsexcept_t*,exprval_t*); struct _expression_t { + expression_type_t type; expression_eval_t eval; }; @@ -396,67 +458,6 @@ typedef struct { prop_val_t *property_list; } property_value_expression_t; -typedef enum { - EXPR_COMMA, - EXPR_OR, - EXPR_AND, - EXPR_BOR, - EXPR_BXOR, - EXPR_BAND, - EXPR_INSTANCEOF, - EXPR_IN, - EXPR_ADD, - EXPR_SUB, - EXPR_MUL, - EXPR_DIV, - EXPR_MOD, - EXPR_DELETE, - EXPR_VOID, - EXPR_TYPEOF, - EXPR_MINUS, - EXPR_PLUS, - EXPR_POSTINC, - EXPR_POSTDEC, - EXPR_PREINC, - EXPR_PREDEC, - EXPR_EQ, - EXPR_EQEQ, - EXPR_NOTEQ, - EXPR_NOTEQEQ, - EXPR_LESS, - EXPR_LESSEQ, - EXPR_GREATER, - EXPR_GREATEREQ, - EXPR_BITNEG, - EXPR_LOGNEG, - EXPR_LSHIFT, - EXPR_RSHIFT, - EXPR_RRSHIFT, - EXPR_ASSIGN, - EXPR_ASSIGNLSHIFT, - EXPR_ASSIGNRSHIFT, - EXPR_ASSIGNRRSHIFT, - EXPR_ASSIGNADD, - EXPR_ASSIGNSUB, - EXPR_ASSIGNMUL, - EXPR_ASSIGNDIV, - EXPR_ASSIGNMOD, - EXPR_ASSIGNAND, - EXPR_ASSIGNOR, - EXPR_ASSIGNXOR, - EXPR_COND, - EXPR_ARRAY, - EXPR_MEMBER, - EXPR_NEW, - EXPR_CALL, - EXPR_THIS, - EXPR_FUNC, - EXPR_IDENT, - EXPR_ARRAYLIT, - EXPR_PROPVAL, - EXPR_LITERAL -} expression_type_t; - HRESULT function_expression_eval(script_ctx_t*,expression_t*,DWORD,jsexcept_t*,exprval_t*) DECLSPEC_HIDDEN; HRESULT conditional_expression_eval(script_ctx_t*,expression_t*,DWORD,jsexcept_t*,exprval_t*) DECLSPEC_HIDDEN; HRESULT array_expression_eval(script_ctx_t*,expression_t*,DWORD,jsexcept_t*,exprval_t*) DECLSPEC_HIDDEN; diff --git a/dlls/jscript/parser.y b/dlls/jscript/parser.y index 69b9483..db7a3c5 100644 --- a/dlls/jscript/parser.y +++ b/dlls/jscript/parser.y @@ -1369,6 +1369,7 @@ static void *new_expression(parser_ctx_t *ctx, expression_type_t type, size_t si { expression_t *ret = parser_alloc(ctx, size ? size : sizeof(*ret)); + ret->type = type; ret->eval = expression_eval_table[type]; return ret;
1
0
0
0
Jacek Caban : jscript: Use a helper function to allocate expression structs .
by Alexandre Julliard
18 Nov '11
18 Nov '11
Module: wine Branch: master Commit: fe9cb0c2665376f7f8c0ee35a5fdbaecd13de088 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fe9cb0c2665376f7f8c0ee35a…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Nov 18 14:05:33 2011 +0100 jscript: Use a helper function to allocate expression structs. --- dlls/jscript/engine.h | 13 ++++++++- dlls/jscript/parser.y | 69 ++++++++++++++++++++++++------------------------- 2 files changed, 46 insertions(+), 36 deletions(-) diff --git a/dlls/jscript/engine.h b/dlls/jscript/engine.h index 9b2e2b5..73d06c9 100644 --- a/dlls/jscript/engine.h +++ b/dlls/jscript/engine.h @@ -443,7 +443,18 @@ typedef enum { EXPR_ASSIGNMOD, EXPR_ASSIGNAND, EXPR_ASSIGNOR, - EXPR_ASSIGNXOR + EXPR_ASSIGNXOR, + EXPR_COND, + EXPR_ARRAY, + EXPR_MEMBER, + EXPR_NEW, + EXPR_CALL, + EXPR_THIS, + EXPR_FUNC, + EXPR_IDENT, + EXPR_ARRAYLIT, + EXPR_PROPVAL, + EXPR_LITERAL } expression_type_t; HRESULT function_expression_eval(script_ctx_t*,expression_t*,DWORD,jsexcept_t*,exprval_t*) DECLSPEC_HIDDEN; diff --git a/dlls/jscript/parser.y b/dlls/jscript/parser.y index 8f2db14..69b9483 100644 --- a/dlls/jscript/parser.y +++ b/dlls/jscript/parser.y @@ -123,6 +123,7 @@ static inline void pop_func(parser_ctx_t *ctx) ctx->func_stack = ctx->func_stack->next; } +static void *new_expression(parser_ctx_t *ctx,expression_type_t,size_t); static expression_t *new_function_expression(parser_ctx_t*,const WCHAR*,parameter_list_t*, source_elements_t*,const WCHAR*,DWORD); static expression_t *new_binary_expression(parser_ctx_t*,expression_type_t,expression_t*,expression_t*); @@ -132,7 +133,6 @@ static expression_t *new_array_expression(parser_ctx_t*,expression_t*,expression static expression_t *new_member_expression(parser_ctx_t*,expression_t*,const WCHAR*); static expression_t *new_new_expression(parser_ctx_t*,expression_t*,argument_list_t*); static expression_t *new_call_expression(parser_ctx_t*,expression_t*,argument_list_t*); -static expression_t *new_this_expression(parser_ctx_t*); static expression_t *new_identifier_expression(parser_ctx_t*,const WCHAR*); static expression_t *new_literal_expression(parser_ctx_t*,literal_t*); static expression_t *new_array_literal_expression(parser_ctx_t*,element_list_t*,int); @@ -740,7 +740,7 @@ ArgumentList /* ECMA-262 3rd Edition 11.1 */ PrimaryExpression - : kTHIS { $$ = new_this_expression(ctx); } + : kTHIS { $$ = new_expression(ctx, EXPR_THIS, 0); } | tIdentifier { $$ = new_identifier_expression(ctx, $1); } | Literal { $$ = new_literal_expression(ctx, $1); } | ArrayLiteral { $$ = $1; } @@ -1281,9 +1281,8 @@ static parameter_list_t *parameter_list_add(parser_ctx_t *ctx, parameter_list_t static expression_t *new_function_expression(parser_ctx_t *ctx, const WCHAR *identifier, parameter_list_t *parameter_list, source_elements_t *source_elements, const WCHAR *src_str, DWORD src_len) { - function_expression_t *ret = parser_alloc(ctx, sizeof(function_expression_t)); + function_expression_t *ret = new_expression(ctx, EXPR_FUNC, sizeof(*ret)); - ret->expr.eval = function_expression_eval; ret->identifier = identifier; ret->parameter_list = parameter_list ? parameter_list->head : NULL; ret->source_elements = source_elements; @@ -1353,14 +1352,33 @@ static const expression_eval_t expression_eval_table[] = { assign_and_expression_eval, assign_or_expression_eval, assign_xor_expression_eval, + conditional_expression_eval, + array_expression_eval, + member_expression_eval, + new_expression_eval, + call_expression_eval, + this_expression_eval, + function_expression_eval, + identifier_expression_eval, + array_literal_expression_eval, + property_value_expression_eval, + literal_expression_eval }; +static void *new_expression(parser_ctx_t *ctx, expression_type_t type, size_t size) +{ + expression_t *ret = parser_alloc(ctx, size ? size : sizeof(*ret)); + + ret->eval = expression_eval_table[type]; + + return ret; +} + static expression_t *new_binary_expression(parser_ctx_t *ctx, expression_type_t type, expression_t *expression1, expression_t *expression2) { - binary_expression_t *ret = parser_alloc(ctx, sizeof(binary_expression_t)); + binary_expression_t *ret = new_expression(ctx, type, sizeof(*ret)); - ret->expr.eval = expression_eval_table[type]; ret->expression1 = expression1; ret->expression2 = expression2; @@ -1369,9 +1387,8 @@ static expression_t *new_binary_expression(parser_ctx_t *ctx, expression_type_t static expression_t *new_unary_expression(parser_ctx_t *ctx, expression_type_t type, expression_t *expression) { - unary_expression_t *ret = parser_alloc(ctx, sizeof(unary_expression_t)); + unary_expression_t *ret = new_expression(ctx, type, sizeof(*ret)); - ret->expr.eval = expression_eval_table[type]; ret->expression = expression; return &ret->expr; @@ -1380,9 +1397,8 @@ static expression_t *new_unary_expression(parser_ctx_t *ctx, expression_type_t t static expression_t *new_conditional_expression(parser_ctx_t *ctx, expression_t *expression, expression_t *true_expression, expression_t *false_expression) { - conditional_expression_t *ret = parser_alloc(ctx, sizeof(conditional_expression_t)); + conditional_expression_t *ret = new_expression(ctx, EXPR_COND, sizeof(*ret)); - ret->expr.eval = conditional_expression_eval; ret->expression = expression; ret->true_expression = true_expression; ret->false_expression = false_expression; @@ -1392,9 +1408,8 @@ static expression_t *new_conditional_expression(parser_ctx_t *ctx, expression_t static expression_t *new_array_expression(parser_ctx_t *ctx, expression_t *member_expr, expression_t *expression) { - array_expression_t *ret = parser_alloc(ctx, sizeof(array_expression_t)); + array_expression_t *ret = new_expression(ctx, EXPR_ARRAY, sizeof(*ret)); - ret->expr.eval = array_expression_eval; ret->member_expr = member_expr; ret->expression = expression; @@ -1403,9 +1418,8 @@ static expression_t *new_array_expression(parser_ctx_t *ctx, expression_t *membe static expression_t *new_member_expression(parser_ctx_t *ctx, expression_t *expression, const WCHAR *identifier) { - member_expression_t *ret = parser_alloc(ctx, sizeof(member_expression_t)); + member_expression_t *ret = new_expression(ctx, EXPR_MEMBER, sizeof(*ret)); - ret->expr.eval = member_expression_eval; ret->expression = expression; ret->identifier = identifier; @@ -1414,9 +1428,8 @@ static expression_t *new_member_expression(parser_ctx_t *ctx, expression_t *expr static expression_t *new_new_expression(parser_ctx_t *ctx, expression_t *expression, argument_list_t *argument_list) { - call_expression_t *ret = parser_alloc(ctx, sizeof(call_expression_t)); + call_expression_t *ret = new_expression(ctx, EXPR_NEW, sizeof(*ret)); - ret->expr.eval = new_expression_eval; ret->expression = expression; ret->argument_list = argument_list ? argument_list->head : NULL; @@ -1425,24 +1438,14 @@ static expression_t *new_new_expression(parser_ctx_t *ctx, expression_t *express static expression_t *new_call_expression(parser_ctx_t *ctx, expression_t *expression, argument_list_t *argument_list) { - call_expression_t *ret = parser_alloc(ctx, sizeof(call_expression_t)); + call_expression_t *ret = new_expression(ctx, EXPR_CALL, sizeof(*ret)); - ret->expr.eval = call_expression_eval; ret->expression = expression; ret->argument_list = argument_list ? argument_list->head : NULL; return &ret->expr; } -static expression_t *new_this_expression(parser_ctx_t *ctx) -{ - expression_t *ret = parser_alloc(ctx, sizeof(expression_t)); - - ret->eval = this_expression_eval; - - return ret; -} - static int parser_error(const char *str) { return 0; @@ -1464,9 +1467,8 @@ static BOOL explicit_error(parser_ctx_t *ctx, void *obj, WCHAR next) static expression_t *new_identifier_expression(parser_ctx_t *ctx, const WCHAR *identifier) { - identifier_expression_t *ret = parser_alloc(ctx, sizeof(identifier_expression_t)); + identifier_expression_t *ret = new_expression(ctx, EXPR_IDENT, sizeof(*ret)); - ret->expr.eval = identifier_expression_eval; ret->identifier = identifier; return &ret->expr; @@ -1474,9 +1476,8 @@ static expression_t *new_identifier_expression(parser_ctx_t *ctx, const WCHAR *i static expression_t *new_array_literal_expression(parser_ctx_t *ctx, element_list_t *element_list, int length) { - array_literal_expression_t *ret = parser_alloc(ctx, sizeof(array_literal_expression_t)); + array_literal_expression_t *ret = new_expression(ctx, EXPR_ARRAYLIT, sizeof(*ret)); - ret->expr.eval = array_literal_expression_eval; ret->element_list = element_list ? element_list->head : NULL; ret->length = length; @@ -1485,9 +1486,8 @@ static expression_t *new_array_literal_expression(parser_ctx_t *ctx, element_lis static expression_t *new_prop_and_value_expression(parser_ctx_t *ctx, property_list_t *property_list) { - property_value_expression_t *ret = parser_alloc(ctx, sizeof(property_value_expression_t)); + property_value_expression_t *ret = new_expression(ctx, EXPR_PROPVAL, sizeof(*ret)); - ret->expr.eval = property_value_expression_eval; ret->property_list = property_list ? property_list->head : NULL; return &ret->expr; @@ -1495,9 +1495,8 @@ static expression_t *new_prop_and_value_expression(parser_ctx_t *ctx, property_l static expression_t *new_literal_expression(parser_ctx_t *ctx, literal_t *literal) { - literal_expression_t *ret = parser_alloc(ctx, sizeof(literal_expression_t)); + literal_expression_t *ret = new_expression(ctx, EXPR_LITERAL, sizeof(*ret)); - ret->expr.eval = literal_expression_eval; ret->literal = literal; return &ret->expr;
1
0
0
0
Jacek Caban : mshtml: Use CLEAR_CALLED instead of SET_CALLED in some places .
by Alexandre Julliard
18 Nov '11
18 Nov '11
Module: wine Branch: master Commit: 2a9d63f822a005c853b675d3d64f1173a092b58a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2a9d63f822a005c853b675d3d…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Nov 18 13:52:08 2011 +0100 mshtml: Use CLEAR_CALLED instead of SET_CALLED in some places. --- dlls/mshtml/tests/htmldoc.c | 43 ++++++++++++++++++++----------------------- 1 files changed, 20 insertions(+), 23 deletions(-) diff --git a/dlls/mshtml/tests/htmldoc.c b/dlls/mshtml/tests/htmldoc.c index 5a8e9ff..d72eb1b 100644 --- a/dlls/mshtml/tests/htmldoc.c +++ b/dlls/mshtml/tests/htmldoc.c @@ -4753,7 +4753,7 @@ static void test_Load(IPersistMoniker *persist, IMoniker *mon) } CHECK_CALLED(OnChanged_READYSTATE); CHECK_CALLED(Invoke_OnReadyStateChange_Loading); - SET_CALLED(IsSystemMoniker); /* IE7 */ + CLEAR_CALLED(IsSystemMoniker); /* IE7 */ SET_CALLED(Exec_ShellDocView_84); if(mon == &Moniker) CHECK_CALLED(BindToStorage); @@ -4890,7 +4890,7 @@ static void test_download(DWORD flags) if(is_js) CHECK_CALLED(GetExternal); CHECK_CALLED(OnViewChange); - SET_CALLED(GetDropTarget); + CLEAR_CALLED(GetDropTarget); if(flags & DWL_TRYCSS) SET_CALLED(Exec_ShellDocView_84); if(flags & DWL_CSS) { @@ -4919,33 +4919,30 @@ static void test_download(DWORD flags) if(flags & DWL_HTTP) { todo_wine CHECK_CALLED(OnChanged_1012); todo_wine CHECK_CALLED(Exec_HTTPEQUIV); - if(support_wbapp) - CHECK_CALLED(Exec_SETTITLE); - else - todo_wine CHECK_CALLED(Exec_SETTITLE); + todo_wine CHECK_CALLED(Exec_SETTITLE); } if(!is_js) { CHECK_CALLED(OnChanged_1005); CHECK_CALLED(OnChanged_READYSTATE); CHECK_CALLED(Exec_SETPROGRESSPOS); }else { - SET_CALLED(OnChanged_READYSTATE); /* sometimes called */ + CLEAR_CALLED(OnChanged_READYSTATE); /* sometimes called */ todo_wine CHECK_CALLED(Exec_SETPROGRESSPOS); } if(!(flags & DWL_EMPTY)) CHECK_CALLED(Exec_SETDOWNLOADSTATE_0); - SET_CALLED(Exec_ShellDocView_103); - SET_CALLED(Exec_ShellDocView_105); - SET_CALLED(Exec_ShellDocView_140); + CLEAR_CALLED(Exec_ShellDocView_103); + CLEAR_CALLED(Exec_ShellDocView_105); + CLEAR_CALLED(Exec_ShellDocView_140); if(!is_js) { CHECK_CALLED(Exec_MSHTML_PARSECOMPLETE); CHECK_CALLED(Exec_HTTPEQUIV_DONE); } SET_CALLED(SetStatusText); if(nav_url || support_wbapp) { /* avoiding race, FIXME: find better way */ - SET_CALLED(UpdateUI); - SET_CALLED(Exec_UPDATECOMMANDS); - SET_CALLED(Exec_SETTITLE); + CLEAR_CALLED(UpdateUI); + CLEAR_CALLED(Exec_UPDATECOMMANDS); + CLEAR_CALLED(Exec_SETTITLE); todo_wine CHECK_CALLED_BROKEN(UpdateBackForwardState); } if(!is_js) { @@ -5076,20 +5073,20 @@ static void test_put_href(IHTMLDocument2 *doc, BOOL use_replace, const char *hre CHECK_CALLED(Navigate); } }else { - SET_CALLED(TranslateUrl); + CLEAR_CALLED(TranslateUrl); if(support_wbapp) { - SET_CALLED(FireBeforeNavigate2); + CLEAR_CALLED(FireBeforeNavigate2); SET_CALLED(Exec_ShellDocView_67); if(!is_hash) { - SET_CALLED(Invoke_AMBIENT_SILENT); - SET_CALLED(Invoke_AMBIENT_OFFLINEIFNOTCONNECTED); - SET_CALLED(Exec_ShellDocView_63); + CLEAR_CALLED(Invoke_AMBIENT_SILENT); + CLEAR_CALLED(Invoke_AMBIENT_OFFLINEIFNOTCONNECTED); + CLEAR_CALLED(Exec_ShellDocView_63); }else { - SET_CALLED(FireNavigateComplete2); - SET_CALLED(FireDocumentComplete); + CLEAR_CALLED(FireNavigateComplete2); + CLEAR_CALLED(FireDocumentComplete); } }else { - SET_CALLED(Navigate); + CLEAR_CALLED(Navigate); } } @@ -5493,7 +5490,7 @@ static void test_exec_editmode(IUnknown *unk, BOOL loaded) CHECK_CALLED(Invoke_AMBIENT_OFFLINEIFNOTCONNECTED); CHECK_CALLED(OnChanged_READYSTATE); CHECK_CALLED(Invoke_OnReadyStateChange_Loading); - SET_CALLED(IsSystemMoniker); /* IE7 */ + CLEAR_CALLED(IsSystemMoniker); /* IE7 */ SET_CALLED(Exec_ShellDocView_84); if(loaded) CHECK_CALLED(BindToStorage); @@ -6788,7 +6785,7 @@ static void test_editing_mode(BOOL do_load) SET_EXPECT(SetStatusText); /* ignore race in native mshtml */ test_timer(EXPECT_UPDATEUI); - SET_CALLED(SetStatusText); + CLEAR_CALLED(SetStatusText); test_MSHTML_QueryStatus(doc, OLECMDF_SUPPORTED|OLECMDF_ENABLED);
1
0
0
0
Jacek Caban : ieframe: Fixed tests on IE9.
by Alexandre Julliard
18 Nov '11
18 Nov '11
Module: wine Branch: master Commit: 0574a30f654a12a9000008192cd56e1daf392c5c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0574a30f654a12a9000008192…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Nov 18 12:51:54 2011 +0100 ieframe: Fixed tests on IE9. --- dlls/ieframe/tests/webbrowser.c | 28 ++++++++++++++++++++++------ 1 files changed, 22 insertions(+), 6 deletions(-) diff --git a/dlls/ieframe/tests/webbrowser.c b/dlls/ieframe/tests/webbrowser.c index 6d41462..cc84f27 100644 --- a/dlls/ieframe/tests/webbrowser.c +++ b/dlls/ieframe/tests/webbrowser.c @@ -432,6 +432,8 @@ static HRESULT WINAPI OleCommandTarget_Exec(IOleCommandTarget *iface, const GUID */ CHECK_EXPECT(Exec_IDM_STOP); return OLECMDERR_E_NOTSUPPORTED; + case 6058: /* TODO */ + return E_NOTIMPL; default: ok(0, "unexpected nsCmdID %d\n", nCmdID); } @@ -445,6 +447,7 @@ static HRESULT WINAPI OleCommandTarget_Exec(IOleCommandTarget *iface, const GUID case 67: /* TODO */ case 69: /* TODO */ case 101: /* TODO (IE8) */ + case 109: /* TODO (IE9) */ return E_FAIL; default: ok(0, "unexpected nCmdID %d\n", nCmdID); @@ -1813,6 +1816,8 @@ static void test_ClientSite(IUnknown *unk, IOleClientSite *client, BOOL stop_dow SET_EXPECT(Invoke_DOWNLOADCOMPLETE); if (use_container_olecmd) SET_EXPECT(Exec_SETDOWNLOADSTATE_0); SET_EXPECT(Invoke_COMMANDSTATECHANGE); + }else { + SET_EXPECT(Invoke_STATUSTEXTCHANGE); } hres = IOleObject_SetClientSite(oleobj, client); @@ -1827,7 +1832,9 @@ static void test_ClientSite(IUnknown *unk, IOleClientSite *client, BOOL stop_dow todo_wine CHECK_CALLED(Invoke_DOWNLOADCOMPLETE); if (use_container_olecmd) todo_wine CHECK_CALLED(Exec_SETDOWNLOADSTATE_0); todo_wine CHECK_CALLED(Invoke_COMMANDSTATECHANGE); - } + }else { + CLEAR_CALLED(Invoke_STATUSTEXTCHANGE); /* Called by IE9 */ + } hres = IOleInPlaceObject_GetWindow(inplace, &hwnd); ok(hres == S_OK, "GetWindow failed: %08x\n", hres); @@ -2461,8 +2468,8 @@ static void test_Navigate2(IUnknown *unk) CHECK_CALLED(GetHostInfo); CHECK_CALLED(Invoke_AMBIENT_DLCONTROL); CHECK_CALLED(Invoke_AMBIENT_USERAGENT); - CHECK_CALLED(Invoke_AMBIENT_PALETTE); - CHECK_CALLED(GetOptionKeyPath); + CLEAR_CALLED(Invoke_AMBIENT_PALETTE); /* Not called by IE9 */ + CLEAR_CALLED(GetOptionKeyPath); CHECK_CALLED(GetOverridesKeyPath); if (use_container_olecmd) todo_wine CHECK_CALLED(QueryStatus_SETPROGRESSTEXT); if (use_container_olecmd) todo_wine CHECK_CALLED(Exec_SETPROGRESSMAX); @@ -2545,13 +2552,20 @@ static void test_ExecWB(IWebBrowser2 *webbrowser, BOOL use_custom_target, BOOL h * These tests show that QueryStatusWB uses a NULL pguidCmdGroup, since OLECMDID_STOP * succeeds (S_OK) and IDM_STOP does not (OLECMDERR_E_NOTSUPPORTED). */ - if (use_custom_target) + if(use_custom_target) { SET_EXPECT(Exec_STOP); + }else if(has_document) { + SET_EXPECT(Invoke_STATUSTEXTCHANGE); + SET_EXPECT(SetStatusText); + } hres = IWebBrowser2_ExecWB(webbrowser, OLECMDID_STOP, OLECMDEXECOPT_DONTPROMPTUSER, 0, 0); - if (!use_custom_target && has_document) + if(!use_custom_target && has_document) { todo_wine ok(hres == olecmdid_state, "ExecWB failed: %08x %08x\n", hres, olecmdid_state); - else + CLEAR_CALLED(Invoke_STATUSTEXTCHANGE); /* Called by IE9 */ + CLEAR_CALLED(SetStatusText); /* Called by IE9 */ + }else { ok(hres == olecmdid_state, "ExecWB failed: %08x %08x\n", hres, olecmdid_state); + } if (use_custom_target) SET_EXPECT(Exec_IDM_STOP); hres = IWebBrowser2_ExecWB(webbrowser, IDM_STOP, OLECMDEXECOPT_DONTPROMPTUSER, 0, 0); @@ -3037,6 +3051,7 @@ static void test_Close(IWebBrowser2 *wb, BOOL do_download) SET_EXPECT(OnUIDeactivate); SET_EXPECT(OnFocus); SET_EXPECT(OnInPlaceDeactivate); + SET_EXPECT(Invoke_STATUSTEXTCHANGE); if(!do_download) { SET_EXPECT(Invoke_COMMANDSTATECHANGE); SET_EXPECT(Invoke_DOWNLOADCOMPLETE); @@ -3048,6 +3063,7 @@ static void test_Close(IWebBrowser2 *wb, BOOL do_download) CHECK_CALLED(OnUIDeactivate); todo_wine CHECK_CALLED(OnFocus); CHECK_CALLED(OnInPlaceDeactivate); + CLEAR_CALLED(Invoke_STATUSTEXTCHANGE); /* Called by IE9 */ if(!do_download) { todo_wine CHECK_CALLED(Invoke_COMMANDSTATECHANGE); todo_wine CHECK_CALLED(Invoke_DOWNLOADCOMPLETE);
1
0
0
0
Jacek Caban : mshtml: Implement nsIStandardURL interface in nsWineURI object.
by Alexandre Julliard
18 Nov '11
18 Nov '11
Module: wine Branch: master Commit: 1243dc9fe42ab01aacc992c9739008fbf0a7021a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1243dc9fe42ab01aacc992c97…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Nov 18 12:21:47 2011 +0100 mshtml: Implement nsIStandardURL interface in nsWineURI object. --- dlls/mshtml/nsiface.idl | 21 ++++++++++++++ dlls/mshtml/nsio.c | 67 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 88 insertions(+), 0 deletions(-) diff --git a/dlls/mshtml/nsiface.idl b/dlls/mshtml/nsiface.idl index 5a1970d..7849ee5 100644 --- a/dlls/mshtml/nsiface.idl +++ b/dlls/mshtml/nsiface.idl @@ -369,6 +369,27 @@ interface nsIURL : nsIURI [ object, + uuid(321578d0-03c1-4d95-8821-021ac612d18d), + local +] +interface nsIMutable : nsISupports +{ + nsresult GetMutable(PRBool *aMutable); + nsresult SetMutable(PRBool aMutable); +} + +[ + object, + uuid(babd6cca-ebe7-4329-967c-d6b9e33caa81), + local +] +interface nsIStandardURL : nsIMutable +{ + nsresult Init(PRUint32 aUrlType, PRInt32 aDefaultPort, const nsACString *aSpec, const char *aOriginCharset, nsIURI *aBaseURI); +} + +[ + object, uuid(ef6bfbd2-fd46-48d8-96b7-9f8f0fd387fe), local ] diff --git a/dlls/mshtml/nsio.c b/dlls/mshtml/nsio.c index b1497dc..59f9c2f 100644 --- a/dlls/mshtml/nsio.c +++ b/dlls/mshtml/nsio.c @@ -54,6 +54,7 @@ static const char *request_method_strings[] = {"GET", "PUT", "POST"}; struct nsWineURI { nsIURL nsIURL_iface; + nsIStandardURL nsIStandardURL_iface; LONG ref; @@ -348,6 +349,7 @@ static nsresult get_channel_http_header(struct list *headers, const nsACString * if(!data) return NS_ERROR_UNEXPECTED; + TRACE("%s -> %s\n", debugstr_a(header_namea), debugstr_a(data)); nsACString_SetData(_retval, data); heap_free(data); return NS_OK; @@ -1708,6 +1710,12 @@ static nsresult NSAPI nsURI_QueryInterface(nsIURL *iface, nsIIDRef riid, void ** }else if(IsEqualGUID(&IID_nsIURL, riid)) { TRACE("(%p)->(IID_nsIURL %p)\n", This, result); *result = &This->nsIURL_iface; + }else if(IsEqualGUID(&IID_nsIMutable, riid)) { + TRACE("(%p)->(IID_nsIMutable %p)\n", This, result); + *result = &This->nsIStandardURL_iface; + }else if(IsEqualGUID(&IID_nsIStandardURL, riid)) { + TRACE("(%p)->(IID_nsIStandardURL %p)\n", This, result); + *result = &This->nsIStandardURL_iface; }else if(IsEqualGUID(&IID_nsWineURI, riid)) { TRACE("(%p)->(IID_nsWineURI %p)\n", This, result); *result = This; @@ -2719,11 +2727,70 @@ static const nsIURLVtbl nsURLVtbl = { nsURL_GetRelativeSpec }; +static inline nsWineURI *impl_from_nsIStandardURL(nsIStandardURL *iface) +{ + return CONTAINING_RECORD(iface, nsWineURI, nsIStandardURL_iface); +} + +static nsresult NSAPI nsStandardURL_QueryInterface(nsIStandardURL *iface, nsIIDRef riid, + void **result) +{ + nsWineURI *This = impl_from_nsIStandardURL(iface); + return nsIURL_QueryInterface(&This->nsIURL_iface, riid, result); +} + +static nsrefcnt NSAPI nsStandardURL_AddRef(nsIStandardURL *iface) +{ + nsWineURI *This = impl_from_nsIStandardURL(iface); + return nsIURL_AddRef(&This->nsIURL_iface); +} + +static nsrefcnt NSAPI nsStandardURL_Release(nsIStandardURL *iface) +{ + nsWineURI *This = impl_from_nsIStandardURL(iface); + return nsIURL_Release(&This->nsIURL_iface); +} + +static nsresult NSAPI nsStandardURL_GetMutable(nsIStandardURL *iface, PRBool *aMutable) +{ + nsWineURI *This = impl_from_nsIStandardURL(iface); + + TRACE("(%p)->(%p)\n", This, aMutable); + + *aMutable = TRUE; + return NS_OK; +} + +static nsresult NSAPI nsStandardURL_SetMutable(nsIStandardURL *iface, PRBool aMutable) +{ + nsWineURI *This = impl_from_nsIStandardURL(iface); + FIXME("(%p)->(%x)\n", This, aMutable); + return NS_ERROR_NOT_IMPLEMENTED; +} + +static nsresult NSAPI nsStandardURL_Init(nsIStandardURL *iface, PRUint32 aUrlType, PRInt32 aDefaultPort, + const nsACString *aSpec, const char *aOriginCharset, nsIURI *aBaseURI) +{ + nsWineURI *This = impl_from_nsIStandardURL(iface); + FIXME("(%p)->(%d %d %s %s %p)\n", This, aUrlType, aDefaultPort, debugstr_nsacstr(aSpec), debugstr_a(aOriginCharset), aBaseURI); + return NS_ERROR_NOT_IMPLEMENTED; +} + +static const nsIStandardURLVtbl nsStandardURLVtbl = { + nsStandardURL_QueryInterface, + nsStandardURL_AddRef, + nsStandardURL_Release, + nsStandardURL_GetMutable, + nsStandardURL_SetMutable, + nsStandardURL_Init +}; + static nsresult create_nsuri(IUri *iuri, nsIURI *nsuri, HTMLWindow *window, NSContainer *container, nsWineURI **_retval) { nsWineURI *ret = heap_alloc_zero(sizeof(nsWineURI)); ret->nsIURL_iface.lpVtbl = &nsURLVtbl; + ret->nsIStandardURL_iface.lpVtbl = &nsStandardURLVtbl; ret->ref = 1; ret->nsuri = nsuri;
1
0
0
0
Jörg Höhle : mmdevapi/tests: Add PCM format tests .
by Alexandre Julliard
18 Nov '11
18 Nov '11
Module: wine Branch: master Commit: 31eb83359a2da80b90979a5251b0ad75c7eea34d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=31eb83359a2da80b90979a525…
Author: Jörg Höhle <hoehle(a)users.sourceforge.net> Date: Wed Nov 16 18:46:09 2011 +0100 mmdevapi/tests: Add PCM format tests. --- dlls/mmdevapi/tests/render.c | 109 ++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 109 insertions(+), 0 deletions(-) diff --git a/dlls/mmdevapi/tests/render.c b/dlls/mmdevapi/tests/render.c index 7108815..8590abd 100644 --- a/dlls/mmdevapi/tests/render.c +++ b/dlls/mmdevapi/tests/render.c @@ -38,6 +38,18 @@ #include "audioclient.h" #include "audiopolicy.h" +static const unsigned int win_formats[][4] = { + { 8000, 8, 1}, { 8000, 8, 2}, { 8000, 16, 1}, { 8000, 16, 2}, + {11025, 8, 1}, {11025, 8, 2}, {11025, 16, 1}, {11025, 16, 2}, + {12000, 8, 1}, {12000, 8, 2}, {12000, 16, 1}, {12000, 16, 2}, + {16000, 8, 1}, {16000, 8, 2}, {16000, 16, 1}, {16000, 16, 2}, + {22050, 8, 1}, {22050, 8, 2}, {22050, 16, 1}, {22050, 16, 2}, + {44100, 8, 1}, {44100, 8, 2}, {44100, 16, 1}, {44100, 16, 2}, + {48000, 8, 1}, {48000, 8, 2}, {48000, 16, 1}, {48000, 16, 2}, + {96000, 8, 1}, {96000, 8, 2}, {96000, 16, 1}, {96000, 16, 2} +}; +#define NB_WIN_FORMATS (sizeof(win_formats)/sizeof(*win_formats)) + #define NULL_PTR_ERR MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, RPC_X_NULL_REF_POINTER) static IMMDeviceEnumerator *mme = NULL; @@ -328,6 +340,101 @@ static void test_audioclient(void) CoTaskMemFree(pwfx); } +static void test_formats(AUDCLNT_SHAREMODE mode) +{ + IAudioClient *ac; + HRESULT hr, hrs; + WAVEFORMATEX fmt, *pwfx, *pwfx2; + int i; + + fmt.wFormatTag = WAVE_FORMAT_PCM; + fmt.cbSize = 0; + + for(i = 0; i < NB_WIN_FORMATS; i++) { + hr = IMMDevice_Activate(dev, &IID_IAudioClient, CLSCTX_INPROC_SERVER, + NULL, (void**)&ac); + ok(hr == S_OK, "Activation failed with %08x\n", hr); + if(hr != S_OK) + continue; + + hr = IAudioClient_GetMixFormat(ac, &pwfx); + ok(hr == S_OK, "GetMixFormat failed: %08x\n", hr); + + fmt.nSamplesPerSec = win_formats[i][0]; + fmt.wBitsPerSample = win_formats[i][1]; + fmt.nChannels = win_formats[i][2]; + fmt.nBlockAlign = fmt.nChannels * fmt.wBitsPerSample / 8; + fmt.nAvgBytesPerSec= fmt.nBlockAlign * fmt.nSamplesPerSec; + + pwfx2 = (WAVEFORMATEX*)0xDEADF00D; + hr = IAudioClient_IsFormatSupported(ac, mode, &fmt, &pwfx2); + hrs = hr; + /* Only shared mode suggests something ... GetMixFormat! */ + ok(hr == S_OK || (mode == AUDCLNT_SHAREMODE_SHARED + ? hr == S_FALSE || broken(hr == AUDCLNT_E_UNSUPPORTED_FORMAT && + /* 5:1 card exception when asked for 1 channel at mixer rate */ + pwfx->nChannels > 2 && fmt.nSamplesPerSec == pwfx->nSamplesPerSec) + : (hr == AUDCLNT_E_UNSUPPORTED_FORMAT || hr == hexcl)), + "IsFormatSupported(%d, %ux%2ux%u) returns %08x\n", mode, + fmt.nSamplesPerSec, fmt.wBitsPerSample, fmt.nChannels, hr); + if (hr == S_OK) + trace("IsSupported(%s, %ux%2ux%u)\n", + mode == AUDCLNT_SHAREMODE_SHARED ? "shared " : "exclus.", + fmt.nSamplesPerSec, fmt.wBitsPerSample, fmt.nChannels); + + /* Change GetMixFormat wBitsPerSample only => S_OK */ + if (mode == AUDCLNT_SHAREMODE_SHARED + && fmt.nSamplesPerSec == pwfx->nSamplesPerSec + && fmt.nChannels == pwfx->nChannels) + ok(hr == S_OK, "Varying BitsPerSample %u\n", fmt.wBitsPerSample); + + ok((hr == S_FALSE)^(pwfx2 == NULL), "hr %x<->suggest %p\n", hr, pwfx2); + if (pwfx2 == (WAVEFORMATEX*)0xDEADF00D) + pwfx2 = NULL; /* broken in Wine < 1.3.28 */ + if (pwfx2) { + ok(pwfx2->nSamplesPerSec == pwfx->nSamplesPerSec && + pwfx2->nChannels == pwfx->nChannels && + pwfx2->wBitsPerSample == pwfx->wBitsPerSample, + "Suggestion %ux%2ux%u differs from GetMixFormat\n", + pwfx2->nSamplesPerSec, pwfx2->wBitsPerSample, pwfx2->nChannels); + } + + /* Vista returns E_INVALIDARG upon AUDCLNT_STREAMFLAGS_RATEADJUST */ + hr = IAudioClient_Initialize(ac, mode, 0, 5000000, 0, &fmt, NULL); + if ((hrs == S_OK) ^ (hr == S_OK)) + trace("Initialize (%u , %ux%2ux%u) returns %08x unlike IsFormatSupported\n", + mode, fmt.nSamplesPerSec, fmt.wBitsPerSample, fmt.nChannels, hr); + if (mode == AUDCLNT_SHAREMODE_SHARED) + ok(hrs == S_OK ? hr == S_OK : hr == AUDCLNT_E_UNSUPPORTED_FORMAT, + "Initialize(shared, %ux%2ux%u) returns %08x\n", + fmt.nSamplesPerSec, fmt.wBitsPerSample, fmt.nChannels, hr); + else if (hrs == AUDCLNT_E_EXCLUSIVE_MODE_NOT_ALLOWED) + /* Unsupported format implies "create failed" and shadows "not allowed" */ + ok(hrs == hexcl && (hr == AUDCLNT_E_ENDPOINT_CREATE_FAILED || hr == hrs), + "Initialize(noexcl., %ux%2ux%u) returns %08x(%08x)\n", + fmt.nSamplesPerSec, fmt.wBitsPerSample, fmt.nChannels, hr, hrs); + else + /* On testbot 48000x16x1 claims support, but does not Initialize. + * 5:1 cards Initialize 44100|48000x16x1 yet claim no support. */ + ok(hrs == S_OK ? hr == S_OK || broken(hr == AUDCLNT_E_ENDPOINT_CREATE_FAILED) + : hr == AUDCLNT_E_ENDPOINT_CREATE_FAILED || broken(hr == S_OK && + pwfx->nChannels > 2 && fmt.nChannels == 1), + "Initialize(exclus., %ux%2ux%u) returns %08x\n", + fmt.nSamplesPerSec, fmt.wBitsPerSample, fmt.nChannels, hr); + + /* Bug in native (Vista/w2k8/w7): after Initialize failed, better + * Release this ac and Activate a new one. + * A second call (with a known working format) would yield + * ALREADY_INITIALIZED in shared mode yet be unusable, and in exclusive + * mode some entity keeps a lock on the device, causing DEVICE_IN_USE to + * all subsequent calls until the audio engine service is restarted. */ + + CoTaskMemFree(pwfx2); + CoTaskMemFree(pwfx); + IAudioClient_Release(ac); + } +} + static void test_references(void) { IAudioClient *ac; @@ -1447,6 +1554,8 @@ START_TEST(render) } test_audioclient(); + test_formats(AUDCLNT_SHAREMODE_EXCLUSIVE); + test_formats(AUDCLNT_SHAREMODE_SHARED); test_references(); test_event(); test_padding();
1
0
0
0
Erich Hoover : user32: Prioritize focus for dialog owner on EndDialog.
by Alexandre Julliard
18 Nov '11
18 Nov '11
Module: wine Branch: master Commit: d2029908514d84e8fc0a805803fe9a427229e046 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d2029908514d84e8fc0a80580…
Author: Erich Hoover <ehoover(a)mines.edu> Date: Tue Nov 15 17:58:32 2011 -0700 user32: Prioritize focus for dialog owner on EndDialog. --- dlls/user32/dialog.c | 14 ++++++++++++-- dlls/user32/tests/msg.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+), 2 deletions(-) diff --git a/dlls/user32/dialog.c b/dlls/user32/dialog.c index aa159c7..b9e739a 100644 --- a/dlls/user32/dialog.c +++ b/dlls/user32/dialog.c @@ -928,7 +928,8 @@ BOOL WINAPI EndDialog( HWND hwnd, INT_PTR retval ) dlgInfo->flags |= DF_END; wasEnabled = (dlgInfo->flags & DF_OWNERENABLED); - if (wasEnabled && (owner = GetWindow( hwnd, GW_OWNER ))) + owner = GetWindow( hwnd, GW_OWNER ); + if (wasEnabled && owner) DIALOG_EnableOwner( owner ); /* Windows sets the focus to the dialog itself in EndDialog */ @@ -942,7 +943,16 @@ BOOL WINAPI EndDialog( HWND hwnd, INT_PTR retval ) SetWindowPos(hwnd, NULL, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE | SWP_HIDEWINDOW); - if (hwnd == GetActiveWindow()) WINPOS_ActivateOtherWindow( hwnd ); + if (hwnd == GetActiveWindow()) + { + /* If this dialog was given an owner then set the focus to that owner + even when the owner is disabled (normally when a window closes any + disabled windows cannot receive the focus). */ + if (owner) + SetForegroundWindow( owner ); + else + WINPOS_ActivateOtherWindow( hwnd ); + } /* unblock dialog loop */ PostMessageA(hwnd, WM_NULL, 0, 0); diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index 0376162..1e8e253 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -11256,6 +11256,52 @@ static void test_dialog_messages(void) UnregisterClass(cls.lpszClassName, cls.hInstance); } +static void test_EndDialog(void) +{ + HWND hparent, hother, hactive, hdlg; + WNDCLASS cls; + + hparent = CreateWindowExA(0, "TestParentClass", "Test parent", + WS_OVERLAPPEDWINDOW | WS_VISIBLE | WS_DISABLED, + 100, 100, 200, 200, 0, 0, 0, NULL); + ok (hparent != 0, "Failed to create parent window\n"); + + hother = CreateWindowExA(0, "TestParentClass", "Test parent 2", + WS_OVERLAPPEDWINDOW | WS_VISIBLE, + 100, 100, 200, 200, 0, 0, 0, NULL); + ok (hother != 0, "Failed to create parent window\n"); + + ok(GetClassInfo(0, "#32770", &cls), "GetClassInfo failed\n"); + cls.lpszClassName = "MyDialogClass"; + cls.hInstance = GetModuleHandle(0); + /* need a cast since a dlgproc is used as a wndproc */ + cls.lpfnWndProc = (WNDPROC)test_dlg_proc; + if (!RegisterClass(&cls)) assert(0); + + flush_sequence(); + SetForegroundWindow(hother); + hactive = GetForegroundWindow(); + ok(hother == hactive, "Wrong window has focus (%p != %p)\n", hother, hactive); + + /* create a dialog where the parent is disabled, this parent should still + receive the focus when the dialog exits (even though "normally" a + disabled window should not receive the focus) */ + hdlg = CreateDialogParam(0, "CLASS_TEST_DIALOG_2", hparent, test_dlg_proc, 0); + ok(IsWindow(hdlg), "CreateDialogParam failed\n"); + SetForegroundWindow(hdlg); + hactive = GetForegroundWindow(); + ok(hdlg == hactive, "Wrong window has focus (%p != %p)\n", hdlg, hactive); + EndDialog(hdlg, 0); + hactive = GetForegroundWindow(); + ok(hparent == hactive, "Wrong window has focus (parent != active) (active: %p, parent: %p, dlg: %p, other: %p)\n", hactive, hparent, hdlg, hother); + DestroyWindow(hdlg); + flush_sequence(); + + DestroyWindow( hother ); + DestroyWindow( hparent ); + UnregisterClass(cls.lpszClassName, cls.hInstance); +} + static void test_nullCallback(void) { HWND hwnd; @@ -13573,6 +13619,7 @@ START_TEST(msg) test_SetWindowRgn(); test_sys_menu(); test_dialog_messages(); + test_EndDialog(); test_nullCallback(); test_dbcs_wm_char(); test_menu_messages();
1
0
0
0
Bernhard Loos : ntoskrnl: irp.AssociatedIrp. SystemBuffer is also used for METHOD_IN/OUT_DIRECT ioctls.
by Alexandre Julliard
18 Nov '11
18 Nov '11
Module: wine Branch: master Commit: 66e98122b6fdccecac888c4c9a1b97f4f1b5e83f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=66e98122b6fdccecac888c4c9…
Author: Bernhard Loos <bernhardloos(a)googlemail.com> Date: Fri Nov 18 11:21:14 2011 +0100 ntoskrnl: irp.AssociatedIrp.SystemBuffer is also used for METHOD_IN/OUT_DIRECT ioctls. --- dlls/ntoskrnl.exe/ntoskrnl.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c index b00c070..6126c3f 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/ntoskrnl.c @@ -159,6 +159,8 @@ static NTSTATUS process_ioctl( DEVICE_OBJECT *device, ULONG code, void *in_buff, return STATUS_NO_MEMORY; memcpy( irp.AssociatedIrp.SystemBuffer, in_buff, in_size ); } + else + irp.AssociatedIrp.SystemBuffer = in_buff; irp.UserBuffer = out_buff; irp.MdlAddress = &mdl; irp.Tail.Overlay.s.u2.CurrentStackLocation = &irpsp;
1
0
0
0
Hans Leidekker : winhttp: Implement WinHttpGetProxyForUrl.
by Alexandre Julliard
18 Nov '11
18 Nov '11
Module: wine Branch: master Commit: 768300c8aa2f977d14910610b8646582f9b376c9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=768300c8aa2f977d14910610b…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Fri Nov 18 10:36:04 2011 +0100 winhttp: Implement WinHttpGetProxyForUrl. --- dlls/winhttp/Makefile.in | 2 +- dlls/winhttp/session.c | 317 +++++++++++++++++++++++++++++++++++++++++- dlls/winhttp/tests/winhttp.c | 89 ++++++++++++ include/winhttp.h | 5 + 4 files changed, 409 insertions(+), 4 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=768300c8aa2f977d14910…
1
0
0
0
Frédéric Delanoy : cmd: Move WCMD_part_execute function to avoid forward declaration.
by Alexandre Julliard
18 Nov '11
18 Nov '11
Module: wine Branch: master Commit: e3a5423478a220006984c3f444edf02380f0a1b0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e3a5423478a220006984c3f44…
Author: Frédéric Delanoy <frederic.delanoy(a)gmail.com> Date: Fri Nov 18 01:25:45 2011 +0100 cmd: Move WCMD_part_execute function to avoid forward declaration. --- programs/cmd/builtins.c | 203 +++++++++++++++++++++++------------------------ 1 files changed, 99 insertions(+), 104 deletions(-) diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c index 59fbc8e..bb64b66 100644 --- a/programs/cmd/builtins.c +++ b/programs/cmd/builtins.c @@ -41,10 +41,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(cmd); -static void WCMD_part_execute(CMD_LIST **commands, const WCHAR *firstcmd, - const WCHAR *variable, const WCHAR *value, - BOOL isIF, BOOL conditionTRUE); - static struct env_stack *saved_environment; struct env_stack *pushd_directories; @@ -922,6 +918,105 @@ void WCMD_echo (const WCHAR *command) HeapFree(GetProcessHeap(), 0, trimmed); } +/***************************************************************************** + * WCMD_part_execute + * + * Execute a command, and any && or bracketed follow on to the command. The + * first command to be executed may not be at the front of the + * commands->thiscommand string (eg. it may point after a DO or ELSE) + */ +static void WCMD_part_execute(CMD_LIST **cmdList, const WCHAR *firstcmd, + const WCHAR *variable, const WCHAR *value, + BOOL isIF, BOOL conditionTRUE) +{ + CMD_LIST *curPosition = *cmdList; + int myDepth = (*cmdList)->bracketDepth; + + WINE_TRACE("cmdList(%p), firstCmd(%p), with variable '%s'='%s', doIt(%d)\n", + cmdList, wine_dbgstr_w(firstcmd), + wine_dbgstr_w(variable), wine_dbgstr_w(value), + conditionTRUE); + + /* Skip leading whitespace between condition and the command */ + while (firstcmd && *firstcmd && (*firstcmd==' ' || *firstcmd=='\t')) firstcmd++; + + /* Process the first command, if there is one */ + if (conditionTRUE && firstcmd && *firstcmd) { + WCHAR *command = WCMD_strdupW(firstcmd); + WCMD_execute (firstcmd, (*cmdList)->redirects, variable, value, cmdList); + HeapFree(GetProcessHeap(), 0, command); + } + + + /* If it didn't move the position, step to next command */ + if (curPosition == *cmdList) *cmdList = (*cmdList)->nextcommand; + + /* Process any other parts of the command */ + if (*cmdList) { + BOOL processThese = TRUE; + + if (isIF) processThese = conditionTRUE; + + while (*cmdList) { + static const WCHAR ifElse[] = {'e','l','s','e'}; + + /* execute all appropriate commands */ + curPosition = *cmdList; + + WINE_TRACE("Processing cmdList(%p) - delim(%d) bd(%d / %d)\n", + *cmdList, + (*cmdList)->prevDelim, + (*cmdList)->bracketDepth, myDepth); + + /* Execute any statements appended to the line */ + /* FIXME: Only if previous call worked for && or failed for || */ + if ((*cmdList)->prevDelim == CMD_ONFAILURE || + (*cmdList)->prevDelim == CMD_ONSUCCESS) { + if (processThese && (*cmdList)->command) { + WCMD_execute ((*cmdList)->command, (*cmdList)->redirects, variable, + value, cmdList); + } + if (curPosition == *cmdList) *cmdList = (*cmdList)->nextcommand; + + /* Execute any appended to the statement with (...) */ + } else if ((*cmdList)->bracketDepth > myDepth) { + if (processThese) { + *cmdList = WCMD_process_commands(*cmdList, TRUE, variable, value); + WINE_TRACE("Back from processing commands, (next = %p)\n", *cmdList); + } + if (curPosition == *cmdList) *cmdList = (*cmdList)->nextcommand; + + /* End of the command - does 'ELSE ' follow as the next command? */ + } else { + if (isIF + && WCMD_keyword_ws_found(ifElse, sizeof(ifElse)/sizeof(ifElse[0]), + (*cmdList)->command)) { + + /* Swap between if and else processing */ + processThese = !processThese; + + /* Process the ELSE part */ + if (processThese) { + const int keyw_len = sizeof(ifElse)/sizeof(ifElse[0]) + 1; + WCHAR *cmd = ((*cmdList)->command) + keyw_len; + + /* Skip leading whitespace between condition and the command */ + while (*cmd && (*cmd==' ' || *cmd=='\t')) cmd++; + if (*cmd) { + WCMD_execute (cmd, (*cmdList)->redirects, variable, value, cmdList); + } + } + if (curPosition == *cmdList) *cmdList = (*cmdList)->nextcommand; + } else { + WINE_TRACE("Found end of this IF statement (next = %p)\n", *cmdList); + break; + } + } + } + } + return; +} + /************************************************************************** * WCMD_for * @@ -1249,106 +1344,6 @@ void WCMD_for (WCHAR *p, CMD_LIST **cmdList) { if (cmdEnd && cmdEnd->command == NULL) *cmdList = cmdEnd->nextcommand; } - -/***************************************************************************** - * WCMD_part_execute - * - * Execute a command, and any && or bracketed follow on to the command. The - * first command to be executed may not be at the front of the - * commands->thiscommand string (eg. it may point after a DO or ELSE) - */ -static void WCMD_part_execute(CMD_LIST **cmdList, const WCHAR *firstcmd, - const WCHAR *variable, const WCHAR *value, - BOOL isIF, BOOL conditionTRUE) { - - CMD_LIST *curPosition = *cmdList; - int myDepth = (*cmdList)->bracketDepth; - - WINE_TRACE("cmdList(%p), firstCmd(%p), with variable '%s'='%s', doIt(%d)\n", - cmdList, wine_dbgstr_w(firstcmd), - wine_dbgstr_w(variable), wine_dbgstr_w(value), - conditionTRUE); - - /* Skip leading whitespace between condition and the command */ - while (firstcmd && *firstcmd && (*firstcmd==' ' || *firstcmd=='\t')) firstcmd++; - - /* Process the first command, if there is one */ - if (conditionTRUE && firstcmd && *firstcmd) { - WCHAR *command = WCMD_strdupW(firstcmd); - WCMD_execute (firstcmd, (*cmdList)->redirects, variable, value, cmdList); - HeapFree(GetProcessHeap(), 0, command); - } - - - /* If it didn't move the position, step to next command */ - if (curPosition == *cmdList) *cmdList = (*cmdList)->nextcommand; - - /* Process any other parts of the command */ - if (*cmdList) { - BOOL processThese = TRUE; - - if (isIF) processThese = conditionTRUE; - - while (*cmdList) { - static const WCHAR ifElse[] = {'e','l','s','e'}; - - /* execute all appropriate commands */ - curPosition = *cmdList; - - WINE_TRACE("Processing cmdList(%p) - delim(%d) bd(%d / %d)\n", - *cmdList, - (*cmdList)->prevDelim, - (*cmdList)->bracketDepth, myDepth); - - /* Execute any statements appended to the line */ - /* FIXME: Only if previous call worked for && or failed for || */ - if ((*cmdList)->prevDelim == CMD_ONFAILURE || - (*cmdList)->prevDelim == CMD_ONSUCCESS) { - if (processThese && (*cmdList)->command) { - WCMD_execute ((*cmdList)->command, (*cmdList)->redirects, variable, - value, cmdList); - } - if (curPosition == *cmdList) *cmdList = (*cmdList)->nextcommand; - - /* Execute any appended to the statement with (...) */ - } else if ((*cmdList)->bracketDepth > myDepth) { - if (processThese) { - *cmdList = WCMD_process_commands(*cmdList, TRUE, variable, value); - WINE_TRACE("Back from processing commands, (next = %p)\n", *cmdList); - } - if (curPosition == *cmdList) *cmdList = (*cmdList)->nextcommand; - - /* End of the command - does 'ELSE ' follow as the next command? */ - } else { - if (isIF - && WCMD_keyword_ws_found(ifElse, sizeof(ifElse)/sizeof(ifElse[0]), - (*cmdList)->command)) { - - /* Swap between if and else processing */ - processThese = !processThese; - - /* Process the ELSE part */ - if (processThese) { - const int keyw_len = sizeof(ifElse)/sizeof(ifElse[0]) + 1; - WCHAR *cmd = ((*cmdList)->command) + keyw_len; - - /* Skip leading whitespace between condition and the command */ - while (*cmd && (*cmd==' ' || *cmd=='\t')) cmd++; - if (*cmd) { - WCMD_execute (cmd, (*cmdList)->redirects, variable, value, cmdList); - } - } - if (curPosition == *cmdList) *cmdList = (*cmdList)->nextcommand; - } else { - WINE_TRACE("Found end of this IF statement (next = %p)\n", *cmdList); - break; - } - } - } - } - return; -} - /************************************************************************** * WCMD_give_help *
1
0
0
0
← Newer
1
...
30
31
32
33
34
35
36
...
86
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
Results per page:
10
25
50
100
200