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
October 2009
----- 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
3 participants
1207 discussions
Start a n
N
ew thread
Nikolay Sivov : comctl32/monthcal: Implement handler for WM_ERASEBKGND.
by Alexandre Julliard
13 Oct '09
13 Oct '09
Module: wine Branch: master Commit: 7beaa88ed9efcb048595f56e403dca16363a4486 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7beaa88ed9efcb048595f56e4…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Tue Oct 13 04:16:31 2009 +0400 comctl32/monthcal: Implement handler for WM_ERASEBKGND. --- dlls/comctl32/monthcal.c | 28 ++++++++++++++++++++-------- 1 files changed, 20 insertions(+), 8 deletions(-) diff --git a/dlls/comctl32/monthcal.c b/dlls/comctl32/monthcal.c index dc61d01..8440e15 100644 --- a/dlls/comctl32/monthcal.c +++ b/dlls/comctl32/monthcal.c @@ -1015,8 +1015,7 @@ static void MONTHCAL_PaintCalendar(MONTHCAL_INFO *infoPtr, HDC hdc, const PAINTS static void MONTHCAL_Refresh(MONTHCAL_INFO *infoPtr, HDC hdc, const PAINTSTRUCT *ps) { - RECT *title=&infoPtr->title; - HBRUSH hbr; + RECT *title = &infoPtr->title; COLORREF old_text_clr, old_bk_clr; HFONT old_font; RECT r_temp; @@ -1025,11 +1024,6 @@ static void MONTHCAL_Refresh(MONTHCAL_INFO *infoPtr, HDC hdc, const PAINTSTRUCT old_bk_clr = GetBkColor(hdc); old_font = GetCurrentObject(hdc, OBJ_FONT); - /* fill background */ - hbr = CreateSolidBrush (infoPtr->bk); - FillRect(hdc, &ps->rcPaint, hbr); - DeleteObject(hbr); - /* draw title, redraw all its elements */ if(IntersectRect(&r_temp, &(ps->rcPaint), title)) MONTHCAL_PaintTitle(infoPtr, hdc, ps); @@ -1048,7 +1042,6 @@ static void MONTHCAL_Refresh(MONTHCAL_INFO *infoPtr, HDC hdc, const PAINTSTRUCT SetTextColor(hdc, old_text_clr); } - static LRESULT MONTHCAL_GetMinReqRect(const MONTHCAL_INFO *infoPtr, LPRECT lpRect) { @@ -2114,6 +2107,22 @@ MONTHCAL_Paint(MONTHCAL_INFO *infoPtr, HDC hdc_paint) } static LRESULT +MONTHCAL_EraseBkgnd(const MONTHCAL_INFO *infoPtr, HDC hdc) +{ + HBRUSH hbr; + RECT rc; + + if (!GetClipBox(hdc, &rc)) return FALSE; + + /* fill background */ + hbr = CreateSolidBrush (infoPtr->bk); + FillRect(hdc, &rc, hbr); + DeleteObject(hbr); + + return TRUE; +} + +static LRESULT MONTHCAL_SetFocus(const MONTHCAL_INFO *infoPtr) { TRACE("\n"); @@ -2529,6 +2538,9 @@ MONTHCAL_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) case WM_PAINT: return MONTHCAL_Paint(infoPtr, (HDC)wParam); + case WM_ERASEBKGND: + return MONTHCAL_EraseBkgnd(infoPtr, (HDC)wParam); + case WM_SETFOCUS: return MONTHCAL_SetFocus(infoPtr);
1
0
0
0
Nikolay Sivov : comctl32/monthcal: Simplify painting operations, split painting to several helpers.
by Alexandre Julliard
13 Oct '09
13 Oct '09
Module: wine Branch: master Commit: 840a39e90a29bc0bb63853cbdb77ce4f694a0673 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=840a39e90a29bc0bb63853cbd…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Tue Oct 13 04:05:31 2009 +0400 comctl32/monthcal: Simplify painting operations, split painting to several helpers. --- dlls/comctl32/monthcal.c | 519 +++++++++++++++++++++------------------------- include/commctrl.h | 1 + 2 files changed, 241 insertions(+), 279 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=840a39e90a29bc0bb6385…
1
0
0
0
Jacek Caban : mshtml: Added more events tests.
by Alexandre Julliard
13 Oct '09
13 Oct '09
Module: wine Branch: master Commit: 8272ecd3f2235b923f2ec67bb51d051bdfbf466f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8272ecd3f2235b923f2ec67bb…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Oct 13 00:42:37 2009 +0200 mshtml: Added more events tests. --- dlls/mshtml/tests/events.c | 98 ++++++++++++++++++++++++++++++++++++++----- 1 files changed, 86 insertions(+), 12 deletions(-) diff --git a/dlls/mshtml/tests/events.c b/dlls/mshtml/tests/events.c index d0ddadb..9d23775 100644 --- a/dlls/mshtml/tests/events.c +++ b/dlls/mshtml/tests/events.c @@ -65,6 +65,7 @@ DEFINE_EXPECT(timeout); static HWND container_hwnd = NULL; static IHTMLWindow2 *window; static IOleDocumentView *view; +static BOOL xy_todo; typedef struct { LONG x; @@ -209,6 +210,18 @@ static IHTMLElement2 *_get_elem2_iface(unsigned line, IUnknown *unk) return elem2; } +#define get_elem3_iface(u) _get_elem3_iface(__LINE__,u) +static IHTMLElement3 *_get_elem3_iface(unsigned line, IUnknown *unk) +{ + IHTMLElement3 *elem3; + HRESULT hres; + + hres = IUnknown_QueryInterface(unk, &IID_IHTMLElement3, (void**)&elem3); + ok_(__FILE__,line) (hres == S_OK, "Could not get IHTMLElement3 iface: %08x\n", hres); + + return elem3; +} + #define doc_get_body(d) _doc_get_body(__LINE__,d) static IHTMLElement *_doc_get_body(unsigned line, IHTMLDocument2 *doc) { @@ -268,6 +281,22 @@ static IHTMLEventObj *_get_event_obj(unsigned line) return event; } +#define elem_fire_event(a,b,c) _elem_fire_event(__LINE__,a,b,c) +static void _elem_fire_event(unsigned line, IUnknown *unk, const char *event, VARIANT *evobj) +{ + IHTMLElement3 *elem3 = _get_elem3_iface(line, unk); + VARIANT_BOOL b; + BSTR str; + HRESULT hres; + + b = 100; + str = a2bstr(event); + hres = IHTMLElement3_fireEvent(elem3, str, evobj, &b); + SysFreeString(str); + ok_(__FILE__,line)(hres == S_OK, "fireEvent failed: %08x\n", hres); + ok_(__FILE__,line)(b == VARIANT_TRUE, "fireEvent returned %x\n", b); +} + #define test_event_args(a,b,c,d,e,f,g) _test_event_args(__LINE__,a,b,c,d,e,f,g) static void _test_event_args(unsigned line, const IID *dispiid, DISPID id, WORD wFlags, DISPPARAMS *pdp, VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller) @@ -465,10 +494,14 @@ static void _test_event_clientx(unsigned line, IHTMLEventObj *event, LONG exl) hres = IHTMLEventObj_get_clientX(event, &l); ok_(__FILE__,line)(hres == S_OK, "get_clientX failed: %08x\n", hres); - if(exl == -10) /* don't test the exact value */ - ok_(__FILE__,line)(l > 0, "clientX = %d\n", l); - else + if(exl == -10) {/* don't test the exact value */ + if(xy_todo) + todo_wine ok_(__FILE__,line)(l > 0, "clientX = %d\n", l); + else + ok_(__FILE__,line)(l > 0, "clientX = %d\n", l); + }else { ok_(__FILE__,line)(l == exl, "clientX = %d, expected %d\n", l, exl); + } } static void _test_event_clienty(unsigned line, IHTMLEventObj *event, LONG exl) @@ -478,10 +511,14 @@ static void _test_event_clienty(unsigned line, IHTMLEventObj *event, LONG exl) hres = IHTMLEventObj_get_clientY(event, &l); ok_(__FILE__,line)(hres == S_OK, "get_clientY failed: %08x\n", hres); - if(exl == -10) /* don't test the exact value */ - ok_(__FILE__,line)(l > 0, "clientY = %d\n", l); - else + if(exl == -10) {/* don't test the exact value */ + if(xy_todo) + todo_wine ok_(__FILE__,line)(l > 0, "clientY = %d\n", l); + else + ok_(__FILE__,line)(l > 0, "clientY = %d\n", l); + }else { ok_(__FILE__,line)(l == exl, "clientY = %d, expected %d\n", l, exl); + } } static void _test_event_offsetx(unsigned line, IHTMLEventObj *event, LONG exl) @@ -517,10 +554,14 @@ static void _test_event_screenx(unsigned line, IHTMLEventObj *event, LONG exl) hres = IHTMLEventObj_get_screenX(event, &l); ok_(__FILE__,line)(hres == S_OK, "get_screenX failed: %08x\n", hres); - if(exl == -10) /* don't test the exact value */ - ok_(__FILE__,line)(l > 0, "screenX = %d\n", l); - else + if(exl == -10) { /* don't test the exact value */ + if(xy_todo) + todo_wine ok_(__FILE__,line)(l > 0, "screenX = %d\n", l); + else + ok_(__FILE__,line)(l > 0, "screenX = %d\n", l); + }else { ok_(__FILE__,line)(l == exl, "screenX = %d, expected %d\n", l, exl); + } } static void _test_event_screeny(unsigned line, IHTMLEventObj *event, LONG exl) @@ -530,10 +571,14 @@ static void _test_event_screeny(unsigned line, IHTMLEventObj *event, LONG exl) hres = IHTMLEventObj_get_screenY(event, &l); ok_(__FILE__,line)(hres == S_OK, "get_screenY failed: %08x\n", hres); - if(exl == -10) /* don't test the exact value */ - ok_(__FILE__,line)(l > 0, "screenY = %d\n", l); - else + if(exl == -10) { /* don't test the exact value */ + if(xy_todo) + todo_wine ok_(__FILE__,line)(l > 0, "screenY = %d\n", l); + else + ok_(__FILE__,line)(l > 0, "screenY = %d\n", l); + }else { ok_(__FILE__,line)(l == exl, "screenY = %d, expected %d\n", l, exl); + } } static void _test_event_type(unsigned line, IHTMLEventObj *event, const char *exstr) @@ -918,6 +963,34 @@ static void test_onclick(IHTMLDocument2 *doc) CHECK_CALLED(document_onclick); } + xy_todo = TRUE; + + SET_EXPECT(div_onclick); + SET_EXPECT(div_onclick_attached); + SET_EXPECT(body_onclick); + SET_EXPECT(document_onclick); + + hres = IHTMLElement_click(div); + ok(hres == S_OK, "click failed: %08x\n", hres); + + CHECK_CALLED(div_onclick); + CHECK_CALLED(div_onclick_attached); + CHECK_CALLED(body_onclick); + CHECK_CALLED(document_onclick); + + SET_EXPECT(div_onclick); + SET_EXPECT(div_onclick_attached); + SET_EXPECT(body_onclick); + SET_EXPECT(document_onclick); + + V_VT(&v) = VT_EMPTY; + elem_fire_event((IUnknown*)div, "onclick", &v); + + CHECK_CALLED(div_onclick); + CHECK_CALLED(div_onclick_attached); + CHECK_CALLED(body_onclick); + CHECK_CALLED(document_onclick); + IHTMLElement_Release(div); IHTMLElement_Release(body); } @@ -1482,6 +1555,7 @@ static void run_test(const char *str, testfunc_t test) MSG msg; HRESULT hres; + xy_todo = FALSE; doc = create_document(); set_client_site(doc, TRUE); doc_load_string(doc, str);
1
0
0
0
Jacek Caban : mshtml: Added IHTMLElement::click implementation.
by Alexandre Julliard
13 Oct '09
13 Oct '09
Module: wine Branch: master Commit: 6e319087a997da62e4330e7882b7cc4e5e3680c8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6e319087a997da62e4330e788…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Oct 13 00:42:22 2009 +0200 mshtml: Added IHTMLElement::click implementation. --- dlls/mshtml/htmlelem.c | 6 ++++-- dlls/mshtml/htmlevent.c | 16 ++++++++++++++++ dlls/mshtml/htmlevent.h | 1 + dlls/mshtml/htmlinput.c | 21 +++++++++++++++++++++ dlls/mshtml/htmlselect.c | 1 + dlls/mshtml/htmltextarea.c | 1 + dlls/mshtml/mshtml_private.h | 1 + 7 files changed, 45 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/htmlelem.c b/dlls/mshtml/htmlelem.c index 28421bb..d019634 100644 --- a/dlls/mshtml/htmlelem.c +++ b/dlls/mshtml/htmlelem.c @@ -1103,8 +1103,10 @@ static HRESULT WINAPI HTMLElement_get_isTextEdit(IHTMLElement *iface, VARIANT_BO static HRESULT WINAPI HTMLElement_click(IHTMLElement *iface) { HTMLElement *This = HTMLELEM_THIS(iface); - FIXME("(%p)\n", This); - return E_NOTIMPL; + + TRACE("(%p)\n", This); + + return call_event(&This->node, EVENTID_CLICK); } static HRESULT WINAPI HTMLElement_get_filters(IHTMLElement *iface, diff --git a/dlls/mshtml/htmlevent.c b/dlls/mshtml/htmlevent.c index b006478..a6c95a3 100644 --- a/dlls/mshtml/htmlevent.c +++ b/dlls/mshtml/htmlevent.c @@ -877,6 +877,22 @@ HRESULT dispatch_event(HTMLDOMNode *node, const WCHAR *event_name, VARIANT *even return S_OK; } +HRESULT call_event(HTMLDOMNode *node, eventid_t eid) +{ + HRESULT hres; + + if(node->vtbl->call_event) { + BOOL handled = FALSE; + + hres = node->vtbl->call_event(node, eid, &handled); + if(handled) + return hres; + } + + fire_event(node->doc, eid, node->nsnode, NULL); + return S_OK; +} + static inline event_target_t *get_event_target(event_target_t **event_target_ptr) { if(!*event_target_ptr) diff --git a/dlls/mshtml/htmlevent.h b/dlls/mshtml/htmlevent.h index 6c716a8..21e7ff0 100644 --- a/dlls/mshtml/htmlevent.h +++ b/dlls/mshtml/htmlevent.h @@ -46,6 +46,7 @@ HRESULT set_event_handler(event_target_t**,HTMLDocument*,eventid_t,VARIANT*); HRESULT get_event_handler(event_target_t**,eventid_t,VARIANT*); HRESULT attach_event(event_target_t**,HTMLDocument*,BSTR,IDispatch*,VARIANT_BOOL*); HRESULT dispatch_event(HTMLDOMNode*,const WCHAR*,VARIANT*,VARIANT_BOOL*); +HRESULT call_event(HTMLDOMNode*,eventid_t); static inline event_target_t **get_node_event_target(HTMLDOMNode *node) { diff --git a/dlls/mshtml/htmlinput.c b/dlls/mshtml/htmlinput.c index 7db777c..488e2b1 100644 --- a/dlls/mshtml/htmlinput.c +++ b/dlls/mshtml/htmlinput.c @@ -28,6 +28,7 @@ #include "wine/debug.h" #include "mshtml_private.h" +#include "htmlevent.h" WINE_DEFAULT_DEBUG_CHANNEL(mshtml); @@ -1129,6 +1130,25 @@ static void HTMLInputElement_destructor(HTMLDOMNode *iface) HTMLElement_destructor(&This->element.node); } +static HRESULT HTMLInputElementImpl_call_event(HTMLDOMNode *iface, eventid_t eid, BOOL *handled) +{ + HTMLInputElement *This = HTMLINPUT_NODE_THIS(iface); + + if(eid == EVENTID_CLICK) { + nsresult nsres; + + *handled = TRUE; + + nsres = nsIDOMHTMLInputElement_Click(This->nsinput); + if(NS_FAILED(nsres)) { + ERR("Click failed: %08x\n", nsres); + return E_FAIL; + } + } + + return S_OK; +} + static HRESULT HTMLInputElementImpl_put_disabled(HTMLDOMNode *iface, VARIANT_BOOL v) { HTMLInputElement *This = HTMLINPUT_NODE_THIS(iface); @@ -1147,6 +1167,7 @@ static const NodeImplVtbl HTMLInputElementImplVtbl = { HTMLInputElement_QI, HTMLInputElement_destructor, NULL, + HTMLInputElementImpl_call_event, HTMLInputElementImpl_put_disabled, HTMLInputElementImpl_get_disabled, }; diff --git a/dlls/mshtml/htmlselect.c b/dlls/mshtml/htmlselect.c index f3dd757..ded73f6 100644 --- a/dlls/mshtml/htmlselect.c +++ b/dlls/mshtml/htmlselect.c @@ -481,6 +481,7 @@ static const NodeImplVtbl HTMLSelectElementImplVtbl = { HTMLSelectElement_QI, HTMLSelectElement_destructor, NULL, + NULL, HTMLSelectElementImpl_put_disabled, HTMLSelectElementImpl_get_disabled }; diff --git a/dlls/mshtml/htmltextarea.c b/dlls/mshtml/htmltextarea.c index 2ff5c25..c34c841 100644 --- a/dlls/mshtml/htmltextarea.c +++ b/dlls/mshtml/htmltextarea.c @@ -406,6 +406,7 @@ static const NodeImplVtbl HTMLTextAreaElementImplVtbl = { HTMLTextAreaElement_QI, HTMLTextAreaElement_destructor, NULL, + NULL, HTMLTextAreaElementImpl_put_disabled, HTMLTextAreaElementImpl_get_disabled }; diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 44a816e..51074ed 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -425,6 +425,7 @@ typedef struct { HRESULT (*qi)(HTMLDOMNode*,REFIID,void**); void (*destructor)(HTMLDOMNode*); event_target_t **(*get_event_target)(HTMLDOMNode*); + HRESULT (*call_event)(HTMLDOMNode*,DWORD,BOOL*); HRESULT (*put_disabled)(HTMLDOMNode*,VARIANT_BOOL); HRESULT (*get_disabled)(HTMLDOMNode*,VARIANT_BOOL*); } NodeImplVtbl;
1
0
0
0
Jacek Caban : mshtml: Added IHTMLElement3::fireEvent implementation.
by Alexandre Julliard
13 Oct '09
13 Oct '09
Module: wine Branch: master Commit: 946bd4ae1c3c0c7a596de138e8b865e6656f970e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=946bd4ae1c3c0c7a596de138e…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Oct 13 00:42:02 2009 +0200 mshtml: Added IHTMLElement3::fireEvent implementation. --- dlls/mshtml/htmlelem3.c | 8 ++++++-- dlls/mshtml/htmlevent.c | 24 ++++++++++++++++++++++++ dlls/mshtml/htmlevent.h | 1 + 3 files changed, 31 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/htmlelem3.c b/dlls/mshtml/htmlelem3.c index 22c93a9..30c8546 100644 --- a/dlls/mshtml/htmlelem3.c +++ b/dlls/mshtml/htmlelem3.c @@ -29,6 +29,7 @@ #include "wine/unicode.h" #include "mshtml_private.h" +#include "htmlevent.h" WINE_DEFAULT_DEBUG_CHANNEL(mshtml); @@ -292,8 +293,11 @@ static HRESULT WINAPI HTMLElement3_fireEvent(IHTMLElement3 *iface, BSTR bstrEven VARIANT *pvarEventObject, VARIANT_BOOL *pfCancelled) { HTMLElement *This = HTMLELEM3_THIS(iface); - FIXME("(%p)->(%s %p %p)\n", This, debugstr_w(bstrEventName), pvarEventObject, pfCancelled); - return E_NOTIMPL; + + TRACE("(%p)->(%s %s %p)\n", This, debugstr_w(bstrEventName), debugstr_variant(pvarEventObject), + pfCancelled); + + return dispatch_event(&This->node, bstrEventName, pvarEventObject, pfCancelled); } static HRESULT WINAPI HTMLElement3_put_onresizestart(IHTMLElement3 *iface, VARIANT v) diff --git a/dlls/mshtml/htmlevent.c b/dlls/mshtml/htmlevent.c index 73e0540..b006478 100644 --- a/dlls/mshtml/htmlevent.c +++ b/dlls/mshtml/htmlevent.c @@ -853,6 +853,30 @@ void fire_event(HTMLDocumentNode *doc, eventid_t eid, nsIDOMNode *target, nsIDOM doc->basedoc.window->event = prev_event; } +HRESULT dispatch_event(HTMLDOMNode *node, const WCHAR *event_name, VARIANT *event_obj, VARIANT_BOOL *cancelled) +{ + eventid_t eid; + + eid = attr_to_eid(event_name); + if(eid == EVENTID_LAST) { + WARN("unknown event %s\n", debugstr_w(event_name)); + return E_INVALIDARG; + } + + if(event_obj && V_VT(event_obj) != VT_EMPTY && V_VT(event_obj) != VT_ERROR) + FIXME("event_obj not implemented\n"); + + if(!(event_info[eid].flags & EVENT_DEFAULTLISTENER)) { + FIXME("not EVENT_DEFAULTEVENTHANDLER\n"); + return E_NOTIMPL; + } + + fire_event(node->doc, eid, node->nsnode, NULL); + + *cancelled = VARIANT_TRUE; /* FIXME */ + return S_OK; +} + static inline event_target_t *get_event_target(event_target_t **event_target_ptr) { if(!*event_target_ptr) diff --git a/dlls/mshtml/htmlevent.h b/dlls/mshtml/htmlevent.h index 4446aa9..6c716a8 100644 --- a/dlls/mshtml/htmlevent.h +++ b/dlls/mshtml/htmlevent.h @@ -45,6 +45,7 @@ void fire_event(HTMLDocumentNode*,eventid_t,nsIDOMNode*,nsIDOMEvent*); HRESULT set_event_handler(event_target_t**,HTMLDocument*,eventid_t,VARIANT*); HRESULT get_event_handler(event_target_t**,eventid_t,VARIANT*); HRESULT attach_event(event_target_t**,HTMLDocument*,BSTR,IDispatch*,VARIANT_BOOL*); +HRESULT dispatch_event(HTMLDOMNode*,const WCHAR*,VARIANT*,VARIANT_BOOL*); static inline event_target_t **get_node_event_target(HTMLDOMNode *node) {
1
0
0
0
Jacek Caban : mshtml: Create nsIDOMEvent in create_event if not available.
by Alexandre Julliard
13 Oct '09
13 Oct '09
Module: wine Branch: master Commit: 672bca557a1f58b0f38fb4eae308e8bd759c175c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=672bca557a1f58b0f38fb4eae…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Oct 13 00:41:44 2009 +0200 mshtml: Create nsIDOMEvent in create_event if not available. --- dlls/mshtml/htmlevent.c | 85 +++++++++++++++++++++++++++++++++++----------- dlls/mshtml/nsiface.idl | 12 +++++++ 2 files changed, 76 insertions(+), 21 deletions(-) diff --git a/dlls/mshtml/htmlevent.c b/dlls/mshtml/htmlevent.c index 8c0104f..73e0540 100644 --- a/dlls/mshtml/htmlevent.c +++ b/dlls/mshtml/htmlevent.c @@ -96,9 +96,28 @@ static const WCHAR onreadystatechangeW[] = {'o','n','r','e','a','d','y','s','t', static const WCHAR selectstartW[] = {'s','e','l','e','c','t','s','t','a','r','t',0}; static const WCHAR onselectstartW[] = {'o','n','s','e','l','e','c','t','s','t','a','r','t',0}; +static const WCHAR HTMLEventsW[] = {'H','T','M','L','E','v','e','n','t','s',0}; +static const WCHAR KeyboardEventW[] = {'K','e','y','b','o','a','r','d','E','v','e','n','t',0}; +static const WCHAR MouseEventW[] = {'M','o','u','s','e','E','v','e','n','t',0}; + +enum { + EVENTT_NONE, + EVENTT_HTML, + EVENTT_KEY, + EVENTT_MOUSE +}; + +static const WCHAR *event_types[] = { + NULL, + HTMLEventsW, + KeyboardEventW, + MouseEventW +}; + typedef struct { LPCWSTR name; LPCWSTR attr_name; + DWORD type; DWORD flags; } event_info_t; @@ -107,24 +126,24 @@ typedef struct { #define EVENT_FORWARDBODY 0x0004 static const event_info_t event_info[] = { - {beforeunloadW, onbeforeunloadW, EVENT_DEFAULTLISTENER|EVENT_FORWARDBODY}, - {blurW, onblurW, EVENT_DEFAULTLISTENER}, - {changeW, onchangeW, EVENT_DEFAULTLISTENER|EVENT_BUBBLE}, - {clickW, onclickW, EVENT_DEFAULTLISTENER|EVENT_BUBBLE}, - {dblclickW, ondblclickW, EVENT_DEFAULTLISTENER|EVENT_BUBBLE}, - {dragW, ondragW, 0}, - {dragstartW, ondragstartW, 0}, - {focusW, onfocusW, EVENT_DEFAULTLISTENER}, - {keydownW, onkeydownW, EVENT_DEFAULTLISTENER|EVENT_BUBBLE}, - {keyupW, onkeyupW, EVENT_DEFAULTLISTENER|EVENT_BUBBLE}, - {loadW, onloadW, 0}, - {mousedownW, onmousedownW, EVENT_DEFAULTLISTENER|EVENT_BUBBLE}, - {mouseoutW, onmouseoutW, EVENT_DEFAULTLISTENER|EVENT_BUBBLE}, - {mouseoverW, onmouseoverW, EVENT_DEFAULTLISTENER|EVENT_BUBBLE}, - {mouseupW, onmouseupW, EVENT_DEFAULTLISTENER|EVENT_BUBBLE}, - {pasteW, onpasteW, 0}, - {readystatechangeW, onreadystatechangeW, 0}, - {selectstartW, onselectstartW, 0} + {beforeunloadW, onbeforeunloadW, EVENTT_NONE, EVENT_DEFAULTLISTENER|EVENT_FORWARDBODY}, + {blurW, onblurW, EVENTT_HTML, EVENT_DEFAULTLISTENER}, + {changeW, onchangeW, EVENTT_HTML, EVENT_DEFAULTLISTENER|EVENT_BUBBLE}, + {clickW, onclickW, EVENTT_MOUSE, EVENT_DEFAULTLISTENER|EVENT_BUBBLE}, + {dblclickW, ondblclickW, EVENTT_MOUSE, EVENT_DEFAULTLISTENER|EVENT_BUBBLE}, + {dragW, ondragW, EVENTT_MOUSE, 0}, + {dragstartW, ondragstartW, EVENTT_MOUSE, 0}, + {focusW, onfocusW, EVENTT_HTML, EVENT_DEFAULTLISTENER}, + {keydownW, onkeydownW, EVENTT_KEY, EVENT_DEFAULTLISTENER|EVENT_BUBBLE}, + {keyupW, onkeyupW, EVENTT_KEY, EVENT_DEFAULTLISTENER|EVENT_BUBBLE}, + {loadW, onloadW, EVENTT_HTML, 0}, + {mousedownW, onmousedownW, EVENTT_MOUSE, EVENT_DEFAULTLISTENER|EVENT_BUBBLE}, + {mouseoutW, onmouseoutW, EVENTT_MOUSE, EVENT_DEFAULTLISTENER|EVENT_BUBBLE}, + {mouseoverW, onmouseoverW, EVENTT_MOUSE, EVENT_DEFAULTLISTENER|EVENT_BUBBLE}, + {mouseupW, onmouseupW, EVENTT_MOUSE, EVENT_DEFAULTLISTENER|EVENT_BUBBLE}, + {pasteW, onpasteW, EVENTT_NONE, 0}, + {readystatechangeW, onreadystatechangeW, EVENTT_NONE, 0}, + {selectstartW, onselectstartW, EVENTT_MOUSE, 0} }; eventid_t str_to_eid(LPCWSTR str) @@ -680,15 +699,39 @@ static IHTMLEventObj *create_event(HTMLDOMNode *target, eventid_t eid, nsIDOMEve HTMLEventObj *ret; ret = heap_alloc(sizeof(*ret)); + if(!ret) + return NULL; + ret->lpIHTMLEventObjVtbl = &HTMLEventObjVtbl; ret->ref = 1; ret->type = event_info+eid; - ret->target = target; - IHTMLDOMNode_AddRef(HTMLDOMNODE(target)); ret->nsevent = nsevent; - if(nsevent) + if(nsevent) { nsIDOMEvent_AddRef(nsevent); + }else if(event_types[event_info[eid].type]) { + nsIDOMDocumentEvent *doc_event; + nsresult nsres; + + nsres = nsIDOMHTMLDocument_QueryInterface(target->doc->basedoc.nsdoc, &IID_nsIDOMDocumentEvent, + (void**)&doc_event); + if(NS_SUCCEEDED(nsres)) { + nsAString type_str; + + nsAString_Init(&type_str, event_types[event_info[eid].type]); + nsres = nsIDOMDocumentEvent_CreateEvent(doc_event, &type_str, &ret->nsevent); + nsAString_Finish(&type_str); + nsIDOMDocumentEvent_Release(doc_event); + } + if(NS_FAILED(nsres)) { + ERR("Could not create event: %08x\n", nsres); + IHTMLEventObj_Release(HTMLEVENTOBJ(ret)); + return NULL; + } + } + + ret->target = target; + IHTMLDOMNode_AddRef(HTMLDOMNODE(target)); init_dispex(&ret->dispex, (IUnknown*)HTMLEVENTOBJ(ret), &HTMLEventObj_dispex); diff --git a/dlls/mshtml/nsiface.idl b/dlls/mshtml/nsiface.idl index 7429c60..b469ffe 100644 --- a/dlls/mshtml/nsiface.idl +++ b/dlls/mshtml/nsiface.idl @@ -1013,6 +1013,18 @@ interface nsIDOMDocumentView : nsISupports [ object, + uuid(46b91d66-28e2-11d4-ab1e-0010830123b4), + local + /* FROZEN */ +] +interface nsIDOMDocumentEvent : nsISupports +{ +cpp_quote("#undef CreateEvent") + nsresult CreateEvent(const nsAString *eventType, nsIDOMEvent **_retval); +} + +[ + object, uuid(a6cf90ce-15b3-11d2-932e-00805f8add32), local /* FROZEN */
1
0
0
0
Jacek Caban : mshtml: Added IHTMLWindow2::get_length implementation.
by Alexandre Julliard
13 Oct '09
13 Oct '09
Module: wine Branch: master Commit: 3e0fa120a867bff2b1c0040ff0f3c8666b0145c4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3e0fa120a867bff2b1c0040ff…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Oct 13 00:41:28 2009 +0200 mshtml: Added IHTMLWindow2::get_length implementation. --- dlls/mshtml/htmlwindow.c | 23 +++++++++++++++++++++-- dlls/mshtml/nsiface.idl | 15 ++++++++++++++- dlls/mshtml/tests/dom.c | 14 ++++++++++++++ 3 files changed, 49 insertions(+), 3 deletions(-) diff --git a/dlls/mshtml/htmlwindow.c b/dlls/mshtml/htmlwindow.c index c5c2e78..40df40c 100644 --- a/dlls/mshtml/htmlwindow.c +++ b/dlls/mshtml/htmlwindow.c @@ -177,8 +177,27 @@ static HRESULT WINAPI HTMLWindow2_item(IHTMLWindow2 *iface, VARIANT *pvarIndex, static HRESULT WINAPI HTMLWindow2_get_length(IHTMLWindow2 *iface, LONG *p) { HTMLWindow *This = HTMLWINDOW2_THIS(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + nsIDOMWindowCollection *nscollection; + PRUint32 length; + nsresult nsres; + + TRACE("(%p)->(%p)\n", This, p); + + nsres = nsIDOMWindow_GetFrames(This->nswindow, &nscollection); + if(NS_FAILED(nsres)) { + ERR("GetFrames failed: %08x\n", nsres); + return E_FAIL; + } + + nsres = nsIDOMWindowCollection_GetLength(nscollection, &length); + nsIDOMWindowCollection_Release(nscollection); + if(NS_FAILED(nsres)) { + ERR("GetLength failed: %08x\n", nsres); + return E_FAIL; + } + + *p = length; + return S_OK; } static HRESULT WINAPI HTMLWindow2_get_frames(IHTMLWindow2 *iface, IHTMLFramesCollection2 **p) diff --git a/dlls/mshtml/nsiface.idl b/dlls/mshtml/nsiface.idl index 571c023..7429c60 100644 --- a/dlls/mshtml/nsiface.idl +++ b/dlls/mshtml/nsiface.idl @@ -89,6 +89,7 @@ interface nsIDocumentStateListener; interface nsIDOMCSSStyleSheet; interface nsIDOMDocumentView; interface nsIDocumentObserver; +interface nsIDOMWindow; interface IMoniker; @@ -109,7 +110,6 @@ typedef nsISupports nsISHistory; typedef nsISupports nsIWidget; typedef nsISupports nsIHttpHeaderVisitor; typedef nsISupports nsIDOMBarProp; -typedef nsISupports nsIDOMWindowCollection; typedef nsISupports nsIPrompt; typedef nsISupports nsIAuthPrompt; typedef nsISupports nsIDOMNamedNodeMap; @@ -1108,6 +1108,19 @@ interface nsISelection : nsISupports [ object, + uuid(a6cf906f-15b3-11d2-932e-00805f8add32), + local + /* FROZEN */ +] +interface nsIDOMWindowCollection : nsISupports +{ + nsresult GetLength(PRUint32 *aLength); + nsresult Item(PRUint32 index, nsIDOMWindow **_retval); + nsresult NamedItem(const nsAString *name, nsIDOMWindow **_retval); +} + +[ + object, uuid(a6cf906b-15b3-11d2-932e-00805f8add32), local /* FROZEN */ diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index bb97429..f826a01 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -851,6 +851,16 @@ static void _set_window_name(unsigned line, IHTMLWindow2 *window, const char *na _test_window_name(line, window, name); } +#define test_window_length(w,l) _test_window_length(__LINE__,w,l) +static void _test_window_length(unsigned line, IHTMLWindow2 *window, LONG exlen) +{ + LONG length = -1; + HRESULT hres; + + hres = IHTMLWindow2_get_length(window, &length); + ok_(__FILE__,line)(hres == S_OK, "get_length failed: %08x\n", hres); + ok_(__FILE__,line)(length == exlen, "length = %d, expected %d\n", length, exlen); +} static void test_get_set_attr(IHTMLDocument2 *doc) { @@ -4414,6 +4424,7 @@ static void test_window(IHTMLDocument2 *doc) test_window_name(window, NULL); set_window_name(window, "test"); + test_window_length(window, 0); IHTMLWindow2_Release(window); } @@ -4648,6 +4659,8 @@ static void test_iframe_elem(IHTMLElement *elem) ok(hres == S_OK, "get_contentWindow failed: %08x\n", hres); ok(content_window != NULL, "contentWindow = NULL\n"); + test_window_length(content_window, 0); + content_doc = NULL; hres = IHTMLWindow2_get_document(content_window, &content_doc); IHTMLWindow2_Release(content_window); @@ -5202,6 +5215,7 @@ static void test_elems(IHTMLDocument2 *doc) window = get_doc_window(doc); test_window_name(window, NULL); set_window_name(window, "test name"); + test_window_length(window, 1); IHTMLWindow2_Release(window); }
1
0
0
0
Jacek Caban : mshtml: Added IHTMLWindow2::name property implementation.
by Alexandre Julliard
13 Oct '09
13 Oct '09
Module: wine Branch: master Commit: 2d4236bfda3c1a9ed6fd78911e897e5866d1693b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2d4236bfda3c1a9ed6fd78911…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Oct 13 00:41:11 2009 +0200 mshtml: Added IHTMLWindow2::name property implementation. --- dlls/mshtml/htmlwindow.c | 42 +++++++++++++++++++++++++++++++++--- dlls/mshtml/tests/dom.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 90 insertions(+), 4 deletions(-) diff --git a/dlls/mshtml/htmlwindow.c b/dlls/mshtml/htmlwindow.c index f8d62a3..c5c2e78 100644 --- a/dlls/mshtml/htmlwindow.c +++ b/dlls/mshtml/htmlwindow.c @@ -438,15 +438,49 @@ static HRESULT WINAPI HTMLWindow2_get_navigator(IHTMLWindow2 *iface, IOmNavigato static HRESULT WINAPI HTMLWindow2_put_name(IHTMLWindow2 *iface, BSTR v) { HTMLWindow *This = HTMLWINDOW2_THIS(iface); - FIXME("(%p)->(%s)\n", This, debugstr_w(v)); - return E_NOTIMPL; + nsAString name_str; + nsresult nsres; + + TRACE("(%p)->(%s)\n", This, debugstr_w(v)); + + nsAString_Init(&name_str, v); + nsres = nsIDOMWindow_SetName(This->nswindow, &name_str); + nsAString_Finish(&name_str); + if(NS_FAILED(nsres)) + ERR("SetName failed: %08x\n", nsres); + + return S_OK; } static HRESULT WINAPI HTMLWindow2_get_name(IHTMLWindow2 *iface, BSTR *p) { HTMLWindow *This = HTMLWINDOW2_THIS(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + nsAString name_str; + nsresult nsres; + HRESULT hres; + + TRACE("(%p)->(%p)\n", This, p); + + nsAString_Init(&name_str, NULL); + nsres = nsIDOMWindow_GetName(This->nswindow, &name_str); + if(NS_SUCCEEDED(nsres)) { + const PRUnichar *name; + + nsAString_GetData(&name_str, &name); + if(*name) { + *p = SysAllocString(name); + hres = *p ? S_OK : E_OUTOFMEMORY; + }else { + *p = NULL; + hres = S_OK; + } + }else { + ERR("GetName failed: %08x\n", nsres); + hres = E_FAIL; + } + nsAString_Finish(&name_str); + + return hres; } static HRESULT WINAPI HTMLWindow2_get_parent(IHTMLWindow2 *iface, IHTMLWindow2 **p) diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index c13c0a8..bb97429 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -656,6 +656,20 @@ static IHTMLDocument2 *_get_owner_doc(unsigned line, IUnknown *unk) return doc; } +#define get_doc_window(d) _get_doc_window(__LINE__,d) +static IHTMLWindow2 *_get_doc_window(unsigned line, IHTMLDocument2 *doc) +{ + IHTMLWindow2 *window; + HRESULT hres; + + window = NULL; + hres = IHTMLDocument2_get_parentWindow(doc, &window); + ok_(__FILE__,line)(hres == S_OK, "get_parentWindow failed: %08x\n", hres); + ok_(__FILE__,line)(window != NULL, "window == NULL\n"); + + return window; +} + #define clone_node(n,d) _clone_node(__LINE__,n,d) static IHTMLDOMNode *_clone_node(unsigned line, IUnknown *unk, VARIANT_BOOL deep) { @@ -809,6 +823,35 @@ static IHTMLDocument2 *_get_doc_node(unsigned line, IHTMLDocument2 *doc) return ret; } +#define test_window_name(d,e) _test_window_name(__LINE__,d,e) +static void _test_window_name(unsigned line, IHTMLWindow2 *window, const char *exname) +{ + BSTR name; + HRESULT hres; + + hres = IHTMLWindow2_get_name(window, &name); + ok_(__FILE__,line)(hres == S_OK, "get_name failed: %08x\n", hres); + if(exname) + ok_(__FILE__,line)(!strcmp_wa(name, exname), "name = %s\n", wine_dbgstr_w(name)); + else + ok_(__FILE__,line)(!name, "name = %s\n", wine_dbgstr_w(name)); +} + +#define set_window_name(w,n) _set_window_name(__LINE__,w,n) +static void _set_window_name(unsigned line, IHTMLWindow2 *window, const char *name) +{ + BSTR str; + HRESULT hres; + + str = a2bstr(name); + hres = IHTMLWindow2_put_name(window, str); + SysFreeString(str); + ok_(__FILE__,line)(hres == S_OK, "put_name failed: %08x\n", hres); + + _test_window_name(line, window, name); +} + + static void test_get_set_attr(IHTMLDocument2 *doc) { IHTMLElement *elem; @@ -4369,6 +4412,9 @@ static void test_window(IHTMLDocument2 *doc) ok(!strcmp_wa(str, "[object]"), "toString returned %s\n", wine_dbgstr_w(str)); SysFreeString(str); + test_window_name(window, NULL); + set_window_name(window, "test"); + IHTMLWindow2_Release(window); } @@ -4738,6 +4784,7 @@ static void test_elems(IHTMLDocument2 *doc) IHTMLDOMChildrenCollection *child_col; IHTMLElement *elem, *elem2, *elem3; IHTMLDOMNode *node, *node2; + IHTMLWindow2 *window; IDispatch *disp; LONG type; HRESULT hres; @@ -5151,6 +5198,11 @@ static void test_elems(IHTMLDocument2 *doc) IHTMLElement_Release(elem); IHTMLDocument3_Release(doc3); + + window = get_doc_window(doc); + test_window_name(window, NULL); + set_window_name(window, "test name"); + IHTMLWindow2_Release(window); } static void test_create_elems(IHTMLDocument2 *doc)
1
0
0
0
Alexandre Julliard : oleaut32/tests: Fix some test failures on Win64.
by Alexandre Julliard
13 Oct '09
13 Oct '09
Module: wine Branch: master Commit: 6310ff1d7bb3a80090eae59cbeff09220698244b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6310ff1d7bb3a80090eae59cb…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Oct 12 19:45:06 2009 +0200 oleaut32/tests: Fix some test failures on Win64. --- dlls/oleaut32/tests/vartype.c | 29 ++++++++++++++++++++--------- 1 files changed, 20 insertions(+), 9 deletions(-) diff --git a/dlls/oleaut32/tests/vartype.c b/dlls/oleaut32/tests/vartype.c index 65a6a4b..b7528c4 100644 --- a/dlls/oleaut32/tests/vartype.c +++ b/dlls/oleaut32/tests/vartype.c @@ -4020,6 +4020,12 @@ static void test_VarCyInt(void) scl, sgn, hi, (LONG)(mid), (LONG)(lo), S(U(out)).scale, \ S(U(out)).sign, out.Hi32, S1(U1(out)).Mid32, S1(U1(out)).Lo32, hres) +/* expect either a positive or negative zero */ +#define EXPECTDECZERO() ok(hres == S_OK && S(U(out)).scale == 0 && \ + (S(U(out)).sign == 0 || S(U(out)).sign == 0x80) && out.Hi32 == 0 && U1(out).Lo64 == 0, \ + "expected zero, got (%d,%d,%d,(%x %x)) hres 0x%08x\n", \ + S(U(out)).scale, S(U(out)).sign, out.Hi32, S1(U1(out)).Mid32, S1(U1(out)).Lo32, hres) + #define EXPECTDECI if (i < 0) EXPECTDEC(0, 0x80, 0, -i); else EXPECTDEC(0, 0, 0, i) static void test_VarDecFromI1(void) @@ -4263,11 +4269,11 @@ static void test_VarDecAdd(void) SETDEC(l,0,0,0,1); SETDEC(r,0,0,0,0); MATH2(VarDecAdd); EXPECTDEC(0,0,0,1); SETDEC(l,0,0,0,1); SETDEC(r,0,0,0,1); MATH2(VarDecAdd); EXPECTDEC(0,0,0,2); - SETDEC(l,0,0,0,1); SETDEC(r,0,0x80,0,1); MATH2(VarDecAdd); EXPECTDEC(0,0x80,0,0); /* '-0'! */ + SETDEC(l,0,0,0,1); SETDEC(r,0,0x80,0,1); MATH2(VarDecAdd); EXPECTDECZERO(); SETDEC(l,0,0,0,1); SETDEC(r,0,0x80,0,2); MATH2(VarDecAdd); EXPECTDEC(0,0x80,0,1); SETDEC(l,0,0x80,0,0); SETDEC(r,0,0,0,1); MATH2(VarDecAdd); EXPECTDEC(0,0,0,1); - SETDEC(l,0,0x80,0,1); SETDEC(r,0,0,0,1); MATH2(VarDecAdd); EXPECTDEC(0,0,0,0); + SETDEC(l,0,0x80,0,1); SETDEC(r,0,0,0,1); MATH2(VarDecAdd); EXPECTDECZERO(); SETDEC(l,0,0x80,0,1); SETDEC(r,0,0,0,2); MATH2(VarDecAdd); EXPECTDEC(0,0,0,1); SETDEC(l,0,0x80,0,1); SETDEC(r,0,0x80,0,1); MATH2(VarDecAdd); EXPECTDEC(0,0x80,0,2); SETDEC(l,0,0x80,0,2); SETDEC(r,0,0,0,1); MATH2(VarDecAdd); EXPECTDEC(0,0x80,0,1); @@ -4304,9 +4310,9 @@ static void test_VarDecSub(void) MATHVARS2; CHECKPTR(VarDecSub); - SETDEC(l,0,0,0,0); SETDEC(r,0,0,0,0); MATH2(VarDecSub); EXPECTDEC(0,0x80,0,0); + SETDEC(l,0,0,0,0); SETDEC(r,0,0,0,0); MATH2(VarDecSub); EXPECTDECZERO(); SETDEC(l,0,0,0,0); SETDEC(r,0,0,0,1); MATH2(VarDecSub); EXPECTDEC(0,0x80,0,1); - SETDEC(l,0,0,0,1); SETDEC(r,0,0,0,1); MATH2(VarDecSub); EXPECTDEC(0,0x80,0,0); + SETDEC(l,0,0,0,1); SETDEC(r,0,0,0,1); MATH2(VarDecSub); EXPECTDECZERO(); SETDEC(l,0,0,0,1); SETDEC(r,0,0x80,0,1); MATH2(VarDecSub); EXPECTDEC(0,0,0,2); } @@ -4377,12 +4383,14 @@ static void test_VarDecDiv(void) SETDEC(l,0,0,0,45); SETDEC(r,1,0,0,9); MATH2(VarDecDiv); EXPECTDEC(0,0,0,50); SETDEC(l,1,0,0,45); SETDEC(r,2,0,0,9); MATH2(VarDecDiv); EXPECTDEC(0,0,0,50); /* these last three results suggest that native oleaut32 scales both operands down to zero - before the division, but does *not* try to scale the result, even if it is possible - - analogous to multiplication behavior + before the division, but does not always try to scale the result, even if it is possible - + analogous to multiplication behavior. */ SETDEC(l,1,0,0,45); SETDEC(r,1,0,0,9); MATH2(VarDecDiv); EXPECTDEC(0,0,0,5); - SETDEC(l,2,0,0,450); SETDEC(r,1,0,0,9); MATH2(VarDecDiv); EXPECTDEC(1,0,0,50); - + SETDEC(l,2,0,0,450); SETDEC(r,1,0,0,9); MATH2(VarDecDiv); + if (S(U(out)).scale == 1) EXPECTDEC(1,0,0,50); + else EXPECTDEC(0,0,0,5); + /* inexact divisions */ SETDEC(l,0,0,0,1); SETDEC(r,0,0,0,3); MATH2(VarDecDiv); EXPECTDEC64(28,0,180700362,0x14b700cb,0x05555555); SETDEC(l,1,0,0,1); SETDEC(r,0,0,0,3); MATH2(VarDecDiv); EXPECTDEC64(28,0,18070036,0x35458014,0x4d555555); @@ -4854,7 +4862,10 @@ static void test_VarBstrFromR4(void) ok(hres == S_OK, "got hres 0x%08x\n", hres); if (bstr) { - ok(memcmp(bstr, szZero, sizeof(szZero)) == 0, "negative zero (got %s)\n", wtoascii(bstr)); + if (bstr[0] == '-') + ok(memcmp(bstr + 1, szZero, sizeof(szZero)) == 0, "negative zero (got %s)\n", wtoascii(bstr)); + else + ok(memcmp(bstr, szZero, sizeof(szZero)) == 0, "negative zero (got %s)\n", wtoascii(bstr)); } /* The following tests that lcid is used for decimal separator even without LOCALE_USE_NLS */
1
0
0
0
Hans Leidekker : sti: Return success from the IStillImageW:: UnregisterLaunchApplication stub.
by Alexandre Julliard
12 Oct '09
12 Oct '09
Module: wine Branch: master Commit: d95d7db7f698cda6e4e8fd5462c048c5003b195f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d95d7db7f698cda6e4e8fd546…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Mon Oct 12 13:39:54 2009 +0200 sti: Return success from the IStillImageW::UnregisterLaunchApplication stub. --- dlls/sti/sti.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/sti/sti.c b/dlls/sti/sti.c index 129627b..c88205d 100644 --- a/dlls/sti/sti.c +++ b/dlls/sti/sti.c @@ -128,7 +128,7 @@ static HRESULT WINAPI stillimagew_UnregisterLaunchApplication(IStillImageW *ifac { stillimage *This = impl_from_StillImageW(iface); FIXME("(%p, %s): stub\n", This, debugstr_w(pwszAppName)); - return E_NOTIMPL; + return S_OK; } static HRESULT WINAPI stillimagew_EnableHwNotifications(IStillImageW *iface, LPCWSTR pwszDeviceName,
1
0
0
0
← Newer
1
...
71
72
73
74
75
76
77
...
121
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
111
112
113
114
115
116
117
118
119
120
121
Results per page:
10
25
50
100
200