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
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
October 2012
----- 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
960 discussions
Start a n
N
ew thread
Nikolay Sivov : dwrite: Added IDWriteTextFormat stub implementation.
by Alexandre Julliard
10 Oct '12
10 Oct '12
Module: wine Branch: master Commit: 9a32882c4da3e44164f73eaf187aba72cb700bc9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9a32882c4da3e44164f73eaf1…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Oct 10 14:58:20 2012 -0400 dwrite: Added IDWriteTextFormat stub implementation. --- dlls/dwrite/dwrite_private.h | 1 + dlls/dwrite/layout.c | 275 ++++++++++++++++++++++++++++++++++++++++++ dlls/dwrite/main.c | 4 +- 3 files changed, 278 insertions(+), 2 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=9a32882c4da3e44164f73…
1
0
0
0
Nikolay Sivov : dwrite: Implement GetFontStretch().
by Alexandre Julliard
10 Oct '12
10 Oct '12
Module: wine Branch: master Commit: 0a6663908d9eb2156e92ca25f5e2b5655c51822e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0a6663908d9eb2156e92ca25f…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Oct 10 08:37:55 2012 -0400 dwrite: Implement GetFontStretch(). --- dlls/dwrite/font.c | 96 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 94 insertions(+), 2 deletions(-) diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c index 4acd35f..c218c25 100644 --- a/dlls/dwrite/font.c +++ b/dlls/dwrite/font.c @@ -27,6 +27,69 @@ WINE_DEFAULT_DEBUG_CHANNEL(dwrite); +/* PANOSE is 10 bytes in size, need to pack the structure properly */ +#include "pshpack2.h" +typedef struct +{ + USHORT version; + SHORT xAvgCharWidth; + USHORT usWeightClass; + USHORT usWidthClass; + SHORT fsType; + SHORT ySubscriptXSize; + SHORT ySubscriptYSize; + SHORT ySubscriptXOffset; + SHORT ySubscriptYOffset; + SHORT ySuperscriptXSize; + SHORT ySuperscriptYSize; + SHORT ySuperscriptXOffset; + SHORT ySuperscriptYOffset; + SHORT yStrikeoutSize; + SHORT yStrikeoutPosition; + SHORT sFamilyClass; + PANOSE panose; + ULONG ulUnicodeRange1; + ULONG ulUnicodeRange2; + ULONG ulUnicodeRange3; + ULONG ulUnicodeRange4; + CHAR achVendID[4]; + USHORT fsSelection; + USHORT usFirstCharIndex; + USHORT usLastCharIndex; + /* According to the Apple spec, original version didn't have the below fields, + * version numbers were taken from the OpenType spec. + */ + /* version 0 (TrueType 1.5) */ + USHORT sTypoAscender; + USHORT sTypoDescender; + USHORT sTypoLineGap; + USHORT usWinAscent; + USHORT usWinDescent; + /* version 1 (TrueType 1.66) */ + ULONG ulCodePageRange1; + ULONG ulCodePageRange2; + /* version 2 (OpenType 1.2) */ + SHORT sxHeight; + SHORT sCapHeight; + USHORT usDefaultChar; + USHORT usBreakChar; + USHORT usMaxContext; +} TT_OS2_V2; +#include "poppack.h" + +#ifdef WORDS_BIGENDIAN +#define GET_BE_WORD(x) (x) +#define GET_BE_DWORD(x) (x) +#else +#define GET_BE_WORD(x) MAKEWORD(HIBYTE(x), LOBYTE(x)) +#define GET_BE_DWORD(x) MAKELONG(GET_BE_WORD(HIWORD(x)), GET_BE_WORD(LOWORD(x))); +#endif + +#define MS_MAKE_TAG(ch0, ch1, ch2, ch3) \ + ((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) | \ + ((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24)) +#define MS_OS2_TAG MS_MAKE_TAG('O','S','/','2') + struct dwrite_fontfamily { IDWriteFontFamily IDWriteFontFamily_iface; LONG ref; @@ -41,6 +104,7 @@ struct dwrite_font { IDWriteFontFamily *family; IDWriteFontFace *face; DWRITE_FONT_STYLE style; + DWRITE_FONT_STRETCH stretch; }; struct dwrite_fontface { @@ -314,8 +378,8 @@ static DWRITE_FONT_WEIGHT WINAPI dwritefont_GetWeight(IDWriteFont *iface) static DWRITE_FONT_STRETCH WINAPI dwritefont_GetStretch(IDWriteFont *iface) { struct dwrite_font *This = impl_from_IDWriteFont(iface); - FIXME("(%p): stub\n", This); - return DWRITE_FONT_STRETCH_UNDEFINED; + TRACE("(%p)\n", This); + return This->stretch; } static DWRITE_FONT_STYLE WINAPI dwritefont_GetStyle(IDWriteFont *iface) @@ -528,12 +592,37 @@ static HRESULT create_fontfamily(const WCHAR *familyname, IDWriteFontFamily **fa return S_OK; } +static DWRITE_FONT_STRETCH get_font_stretch(HDC hdc) +{ + DWRITE_FONT_STRETCH stretch; + TT_OS2_V2 tt_os2; + LONG size; + + /* default stretch to normal */ + stretch = DWRITE_FONT_STRETCH_NORMAL; + + size = GetFontData(hdc, MS_OS2_TAG, 0, NULL, 0); + if (size == GDI_ERROR) return stretch; + + if (size > sizeof(tt_os2)) size = sizeof(tt_os2); + + memset(&tt_os2, 0, sizeof(tt_os2)); + if (GetFontData(hdc, MS_OS2_TAG, 0, &tt_os2, size) != size) return stretch; + + /* DWRITE_FONT_STRETCH enumeration values directly match font data values */ + if (GET_BE_WORD(tt_os2.usWeightClass) <= DWRITE_FONT_STRETCH_ULTRA_EXPANDED) + stretch = GET_BE_WORD(tt_os2.usWeightClass); + + return stretch; +} + HRESULT create_font_from_logfont(const LOGFONTW *logfont, IDWriteFont **font) { const WCHAR* facename, *familyname; struct dwrite_font *This; IDWriteFontFamily *family; OUTLINETEXTMETRICW *otm; + DWRITE_FONT_STRETCH stretch; HRESULT hr; HFONT hfont; HDC hdc; @@ -552,6 +641,8 @@ HRESULT create_font_from_logfont(const LOGFONTW *logfont, IDWriteFont **font) otm->otmSize = ret; ret = GetOutlineTextMetricsW(hdc, otm->otmSize, otm); + stretch = get_font_stretch(hdc); + DeleteDC(hdc); DeleteObject(hfont); @@ -575,6 +666,7 @@ HRESULT create_font_from_logfont(const LOGFONTW *logfont, IDWriteFont **font) This->face = NULL; This->family = family; This->style = logfont->lfItalic ? DWRITE_FONT_STYLE_ITALIC : DWRITE_FONT_STYLE_NORMAL; + This->stretch = stretch; *font = &This->IDWriteFont_iface;
1
0
0
0
Hans Leidekker : wbemprox: Add support for array types.
by Alexandre Julliard
10 Oct '12
10 Oct '12
Module: wine Branch: master Commit: 3e52cea324af31fa7436615db2602fbb6984f6b2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3e52cea324af31fa7436615db…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Oct 10 12:03:10 2012 +0200 wbemprox: Add support for array types. --- dlls/wbemprox/class.c | 18 ++++- dlls/wbemprox/query.c | 175 ++++++++++++++++++++++++++++++++------ dlls/wbemprox/table.c | 4 +- dlls/wbemprox/wbemprox_private.h | 10 ++- 4 files changed, 177 insertions(+), 30 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=3e52cea324af31fa74366…
1
0
0
0
Hans Leidekker : wbemprox: Add support for uncommitted instances in IWbemClassObject::Get.
by Alexandre Julliard
10 Oct '12
10 Oct '12
Module: wine Branch: master Commit: b552ad3672aabedea9f58d52eb37c3f41c3838cc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b552ad3672aabedea9f58d52e…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Oct 10 12:02:05 2012 +0200 wbemprox: Add support for uncommitted instances in IWbemClassObject::Get. --- dlls/wbemprox/class.c | 41 +++++++++++++++++++++++++++++++++++++++-- 1 files changed, 39 insertions(+), 2 deletions(-) diff --git a/dlls/wbemprox/class.c b/dlls/wbemprox/class.c index 5bbd6aa..8e1d664 100644 --- a/dlls/wbemprox/class.c +++ b/dlls/wbemprox/class.c @@ -323,6 +323,32 @@ static HRESULT WINAPI class_object_GetQualifierSet( return E_NOTIMPL; } +static HRESULT record_get_value( const struct record *record, UINT index, VARIANT *var, CIMTYPE *type ) +{ + if (type) *type = record->fields[index].type; + + switch (record->fields[index].type) + { + case CIM_STRING: + case CIM_DATETIME: + V_VT( var ) = VT_BSTR; + V_BSTR( var ) = SysAllocString( record->fields[index].u.sval ); + return S_OK; + case CIM_SINT32: + V_VT( var ) = VT_I4; + V_I4( var ) = record->fields[index].u.ival; + return S_OK; + case CIM_UINT32: + V_VT( var ) = VT_UI4; + V_UI4( var ) = record->fields[index].u.ival; + return S_OK; + default: + FIXME("unhandled type %u\n", record->fields[index].type); + break; + } + return WBEM_E_INVALID_PARAMETER; +} + static HRESULT WINAPI class_object_Get( IWbemClassObject *iface, LPCWSTR wszName, @@ -333,11 +359,22 @@ static HRESULT WINAPI class_object_Get( { struct class_object *co = impl_from_IWbemClassObject( iface ); struct enum_class_object *ec = impl_from_IEnumWbemClassObject( co->iter ); - struct view *view = ec->query->view; TRACE("%p, %s, %08x, %p, %p, %p\n", iface, debugstr_w(wszName), lFlags, pVal, pType, plFlavor); - return get_propval( view, co->index, wszName, pVal, pType, plFlavor ); + if (co->record) + { + struct table *table = grab_table( co->name ); + UINT index; + HRESULT hr; + + if (!table) return WBEM_E_FAILED; + hr = get_column_index( table, wszName, &index ); + release_table( table ); + if (hr != S_OK) return hr; + return record_get_value( co->record, index, pVal, pType ); + } + return get_propval( ec->query->view, co->index, wszName, pVal, pType, plFlavor ); } static HRESULT record_set_value( struct record *record, UINT index, VARIANT *var )
1
0
0
0
Hans Leidekker : wbemprox: Add reference counting to the table structure.
by Alexandre Julliard
10 Oct '12
10 Oct '12
Module: wine Branch: master Commit: ef6fa2b9f2e5141000d8602625159dfe45867fe6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ef6fa2b9f2e5141000d860262…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Oct 10 12:01:44 2012 +0200 wbemprox: Add reference counting to the table structure. --- dlls/wbemprox/class.c | 35 ++++++++++++++++++++--------------- dlls/wbemprox/query.c | 4 ++-- dlls/wbemprox/services.c | 8 +++++--- dlls/wbemprox/table.c | 37 ++++++++++++++++++++++++++++++------- dlls/wbemprox/wbemprox_private.h | 8 +++++--- 5 files changed, 62 insertions(+), 30 deletions(-) diff --git a/dlls/wbemprox/class.c b/dlls/wbemprox/class.c index 5a70e9d..5bbd6aa 100644 --- a/dlls/wbemprox/class.c +++ b/dlls/wbemprox/class.c @@ -382,11 +382,14 @@ static HRESULT WINAPI class_object_Put( if (co->record) { - struct table *table = get_table( co->name ); + struct table *table = grab_table( co->name ); UINT index; HRESULT hr; - if ((hr = get_column_index( table, wszName, &index )) != S_OK) return hr; + if (!table) return WBEM_E_FAILED; + hr = get_column_index( table, wszName, &index ); + release_table( table ); + if (hr != S_OK) return hr; return record_set_value( co->record, index, pVal ); } return put_propval( ec->query->view, co->index, wszName, pVal, Type ); @@ -450,18 +453,18 @@ static HRESULT WINAPI class_object_Next( struct class_object *co = impl_from_IWbemClassObject( iface ); struct enum_class_object *ec = impl_from_IEnumWbemClassObject( co->iter ); struct view *view = ec->query->view; - const WCHAR *property; + BSTR property; HRESULT hr; TRACE("%p, %08x, %p, %p, %p, %p\n", iface, lFlags, strName, pVal, pType, plFlavor); if (!(property = get_property_name( co->name, co->index_property ))) return WBEM_S_NO_MORE_DATA; - if (!(*strName = SysAllocString( property ))) return E_OUTOFMEMORY; if ((hr = get_propval( view, co->index, property, pVal, pType, plFlavor ) != S_OK)) { - SysFreeString( *strName ); + SysFreeString( property ); return hr; } + *strName = property; co->index_property++; return S_OK; } @@ -834,7 +837,7 @@ static HRESULT WINAPI class_object_NextMethod( IWbemClassObject **ppOutSignature) { struct class_object *co = impl_from_IWbemClassObject( iface ); - const WCHAR *method; + BSTR method; HRESULT hr; TRACE("%p, %08x, %p, %p, %p\n", iface, lFlags, pstrName, ppInSignature, ppOutSignature); @@ -842,18 +845,20 @@ static HRESULT WINAPI class_object_NextMethod( if (!(method = get_method_name( co->name, co->index_method ))) return WBEM_S_NO_MORE_DATA; hr = create_signature( co->name, method, PARAM_IN, ppInSignature ); - if (hr != S_OK) return hr; - + if (hr != S_OK) + { + SysFreeString( method ); + return hr; + } hr = create_signature( co->name, method, PARAM_OUT, ppOutSignature ); - if (hr != S_OK) IWbemClassObject_Release( *ppInSignature ); + if (hr != S_OK) + { + SysFreeString( method ); + IWbemClassObject_Release( *ppInSignature ); + } else { - if (!(*pstrName = SysAllocString( method ))) - { - IWbemClassObject_Release( *ppInSignature ); - IWbemClassObject_Release( *ppOutSignature ); - return E_OUTOFMEMORY; - } + *pstrName = method; co->index_method++; } return hr; diff --git a/dlls/wbemprox/query.c b/dlls/wbemprox/query.c index 223a373..8df09bc 100644 --- a/dlls/wbemprox/query.c +++ b/dlls/wbemprox/query.c @@ -37,7 +37,7 @@ HRESULT create_view( const struct property *proplist, const WCHAR *class, if (!view) return E_OUTOFMEMORY; view->proplist = proplist; - view->table = get_table( class ); + view->table = grab_table( class ); view->cond = cond; view->result = NULL; view->count = 0; @@ -47,7 +47,7 @@ HRESULT create_view( const struct property *proplist, const WCHAR *class, void destroy_view( struct view *view ) { - free_table( view->table ); + if (view->table) release_table( view->table ); heap_free( view->result ); heap_free( view ); } diff --git a/dlls/wbemprox/services.c b/dlls/wbemprox/services.c index 5e9cec0..3f87d5b 100644 --- a/dlls/wbemprox/services.c +++ b/dlls/wbemprox/services.c @@ -578,7 +578,7 @@ static HRESULT WINAPI wbem_services_ExecMethod( IWbemClassObject **ppOutParams, IWbemCallResult **ppCallResult ) { - const struct table *table; + struct table *table; class_method *func; struct path *path; HRESULT hr; @@ -590,11 +590,13 @@ static HRESULT WINAPI wbem_services_ExecMethod( if ((hr = parse_path( strObjectPath, &path )) != S_OK) return hr; - table = get_table( path->class ); + table = grab_table( path->class ); free_path( path ); if (!table) return WBEM_E_NOT_FOUND; - if ((hr = get_method( table, strMethodName, &func )) != S_OK) return hr; + hr = get_method( table, strMethodName, &func ); + release_table( table ); + if (hr != S_OK) return hr; return func( pInParams, ppOutParams ); } diff --git a/dlls/wbemprox/table.c b/dlls/wbemprox/table.c index c414aa9..a49bf58 100644 --- a/dlls/wbemprox/table.c +++ b/dlls/wbemprox/table.c @@ -316,7 +316,12 @@ void free_table( struct table *table ) } } -struct table *get_table( const WCHAR *name ) +void release_table( struct table *table ) +{ + if (!InterlockedDecrement( &table->refs )) free_table( table ); +} + +struct table *grab_table( const WCHAR *name ) { struct table *table; @@ -325,6 +330,8 @@ struct table *get_table( const WCHAR *name ) if (!strcmpiW( table->name, name )) { if (table->fill && !table->data) table->fill( table ); + InterlockedIncrement( &table->refs ); + TRACE("returning %p\n", table); return table; } } @@ -344,6 +351,7 @@ struct table *create_table( const WCHAR *name, UINT num_cols, const struct colum table->data = data; table->fill = fill; table->flags = TABLE_FLAG_DYNAMIC; + table->refs = 0; list_init( &table->entry ); return table; } @@ -361,41 +369,56 @@ BOOL add_table( struct table *table ) } } list_add_tail( table_list, &table->entry ); + TRACE("added %p\n", table); return TRUE; } -const WCHAR *get_method_name( const WCHAR *class, UINT index ) +BSTR get_method_name( const WCHAR *class, UINT index ) { struct table *table; UINT i, count = 0; + BSTR ret; - if (!(table = get_table( class ))) return NULL; + if (!(table = grab_table( class ))) return NULL; for (i = 0; i < table->num_cols; i++) { if (table->columns[i].type & COL_FLAG_METHOD) { - if (index == count) return table->columns[i].name; + if (index == count) + { + ret = SysAllocString( table->columns[i].name ); + release_table( table ); + return ret; + } count++; } } + release_table( table ); return NULL; } -const WCHAR *get_property_name( const WCHAR *class, UINT index ) +BSTR get_property_name( const WCHAR *class, UINT index ) { struct table *table; UINT i, count = 0; + BSTR ret; - if (!(table = get_table( class ))) return NULL; + if (!(table = grab_table( class ))) return NULL; for (i = 0; i < table->num_cols; i++) { if (!(table->columns[i].type & COL_FLAG_METHOD)) { - if (index == count) return table->columns[i].name; + if (index == count) + { + ret = SysAllocString( table->columns[i].name ); + release_table( table ); + return ret; + } count++; } } + release_table( table ); return NULL; } diff --git a/dlls/wbemprox/wbemprox_private.h b/dlls/wbemprox/wbemprox_private.h index b99897e..b0e9933 100644 --- a/dlls/wbemprox/wbemprox_private.h +++ b/dlls/wbemprox/wbemprox_private.h @@ -57,6 +57,7 @@ struct table void (*fill)(struct table *); UINT flags; struct list entry; + LONG refs; }; struct property @@ -151,7 +152,8 @@ HRESULT create_view( const struct property *, const WCHAR *, const struct expr * struct view ** ) DECLSPEC_HIDDEN; void destroy_view( struct view * ) DECLSPEC_HIDDEN; void init_table_list( void ) DECLSPEC_HIDDEN; -struct table *get_table( const WCHAR * ) DECLSPEC_HIDDEN; +struct table *grab_table( const WCHAR * ) DECLSPEC_HIDDEN; +void release_table( struct table * ) DECLSPEC_HIDDEN; struct table *create_table( const WCHAR *, UINT, const struct column *, UINT, BYTE *, void (*)(struct table *)) DECLSPEC_HIDDEN; BOOL add_table( struct table * ) DECLSPEC_HIDDEN; @@ -169,8 +171,8 @@ HRESULT put_propval( const struct view *, UINT, const WCHAR *, VARIANT *, CIMTYP HRESULT variant_to_longlong( VARIANT *, LONGLONG *, CIMTYPE * ) DECLSPEC_HIDDEN; HRESULT get_properties( const struct view *, SAFEARRAY ** ) DECLSPEC_HIDDEN; HRESULT get_object( const WCHAR *, IWbemClassObject ** ) DECLSPEC_HIDDEN; -const WCHAR *get_method_name( const WCHAR *, UINT ) DECLSPEC_HIDDEN; -const WCHAR *get_property_name( const WCHAR *, UINT ) DECLSPEC_HIDDEN; +BSTR get_method_name( const WCHAR *, UINT ) DECLSPEC_HIDDEN; +BSTR get_property_name( const WCHAR *, UINT ) DECLSPEC_HIDDEN; HRESULT WbemLocator_create(IUnknown *, LPVOID *) DECLSPEC_HIDDEN; HRESULT WbemServices_create(IUnknown *, const WCHAR *, LPVOID *) DECLSPEC_HIDDEN;
1
0
0
0
Hans Leidekker : wbemprox: Implement Win32_NetworkAdapter.AdapterType.
by Alexandre Julliard
10 Oct '12
10 Oct '12
Module: wine Branch: master Commit: b0045eccde3042ac9e443a47fef1540773bcb148 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b0045eccde3042ac9e443a47f…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Oct 10 12:01:22 2012 +0200 wbemprox: Implement Win32_NetworkAdapter.AdapterType. --- dlls/wbemprox/builtin.c | 22 ++++++++++++++++++++++ 1 files changed, 22 insertions(+), 0 deletions(-) diff --git a/dlls/wbemprox/builtin.c b/dlls/wbemprox/builtin.c index 9beb3e2..5be3b2c 100644 --- a/dlls/wbemprox/builtin.c +++ b/dlls/wbemprox/builtin.c @@ -74,6 +74,8 @@ static const WCHAR class_stdregprovW[] = static const WCHAR class_videocontrollerW[] = {'W','i','n','3','2','_','V','i','d','e','o','C','o','n','t','r','o','l','l','e','r',0}; +static const WCHAR prop_adaptertypeW[] = + {'A','d','a','p','t','e','r','T','y','p','e',0}; static const WCHAR prop_acceptpauseW[] = {'A','c','c','e','p','t','P','a','u','s','e',0}; static const WCHAR prop_acceptstopW[] = @@ -249,6 +251,7 @@ static const struct column col_logicaldisk[] = }; static const struct column col_networkadapter[] = { + { prop_adaptertypeW, CIM_STRING }, { prop_deviceidW, CIM_STRING|COL_FLAG_DYNAMIC|COL_FLAG_KEY }, { prop_interfaceindexW, CIM_UINT32, VT_I4 }, { prop_macaddressW, CIM_STRING|COL_FLAG_DYNAMIC }, @@ -422,6 +425,7 @@ struct record_logicaldisk }; struct record_networkadapter { + const WCHAR *adaptertype; const WCHAR *device_id; INT32 interface_index; const WCHAR *mac_address; @@ -711,6 +715,23 @@ static WCHAR *get_mac_address( const BYTE *addr, DWORD len ) sprintfW( ret, fmtW, addr[0], addr[1], addr[2], addr[3], addr[4], addr[5] ); return ret; } +static const WCHAR *get_adaptertype( DWORD type ) +{ + static const WCHAR ethernetW[] = {'E','t','h','e','r','n','e','t',' ','8','0','2','.','3',0}; + static const WCHAR wirelessW[] = {'W','i','r','e','l','e','s','s',0}; + static const WCHAR firewireW[] = {'1','3','9','4',0}; + static const WCHAR tunnelW[] = {'T','u','n','n','e','l',0}; + + switch (type) + { + case IF_TYPE_ETHERNET_CSMACD: return ethernetW; + case IF_TYPE_IEEE80211: return wirelessW; + case IF_TYPE_IEEE1394: return firewireW; + case IF_TYPE_TUNNEL: return tunnelW; + default: break; + } + return NULL; +} static void fill_networkadapter( struct table *table ) { @@ -740,6 +761,7 @@ static void fill_networkadapter( struct table *table ) { rec = (struct record_networkadapter *)(table->data + offset); sprintfW( device_id, fmtW, aa->u.s.IfIndex ); + rec->adaptertype = get_adaptertype( aa->IfType ); rec->device_id = heap_strdupW( device_id ); rec->interface_index = aa->u.s.IfIndex; rec->mac_address = get_mac_address( aa->PhysicalAddress, aa->PhysicalAddressLength );
1
0
0
0
Hans Leidekker : wbemprox: Handle NULL operands in eval_strcmp.
by Alexandre Julliard
10 Oct '12
10 Oct '12
Module: wine Branch: master Commit: 68f0e174d6de3b313a7cf4f22e72a40a40ec05fb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=68f0e174d6de3b313a7cf4f22…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Oct 10 12:00:58 2012 +0200 wbemprox: Handle NULL operands in eval_strcmp. --- dlls/wbemprox/query.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/dlls/wbemprox/query.c b/dlls/wbemprox/query.c index 3525be9..223a373 100644 --- a/dlls/wbemprox/query.c +++ b/dlls/wbemprox/query.c @@ -72,6 +72,11 @@ static BOOL eval_like( const WCHAR *lstr, const WCHAR *rstr ) static HRESULT eval_strcmp( UINT op, const WCHAR *lstr, const WCHAR *rstr, LONGLONG *val ) { + if (!lstr || !rstr) + { + *val = 0; + return S_OK; + } switch (op) { case OP_EQ:
1
0
0
0
Jacek Caban : mshtml: Added more ActiveX loading and script binding tests.
by Alexandre Julliard
10 Oct '12
10 Oct '12
Module: wine Branch: master Commit: e63b9f4ec029989a0df9e64439bf11b9cdbde5c2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e63b9f4ec029989a0df9e6443…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Oct 10 11:19:55 2012 +0200 mshtml: Added more ActiveX loading and script binding tests. --- dlls/mshtml/tests/activex.c | 47 +++++++++++++++++++++++++++++++++++++++--- 1 files changed, 43 insertions(+), 4 deletions(-) diff --git a/dlls/mshtml/tests/activex.c b/dlls/mshtml/tests/activex.c index 9243282..ce9b711 100644 --- a/dlls/mshtml/tests/activex.c +++ b/dlls/mshtml/tests/activex.c @@ -79,6 +79,7 @@ DEFINE_EXPECT(Invoke_ENABLED); DEFINE_EXPECT(Invoke_VALID); DEFINE_EXPECT(Invoke_SECURITYCTX); DEFINE_EXPECT(Invoke_SCRIPTPROP); +DEFINE_EXPECT(Invoke_SCRIPTCALL); DEFINE_EXPECT(GetIDsOfNames_scriptprop); DEFINE_EXPECT(DoVerb); DEFINE_EXPECT(SetExtent); @@ -106,6 +107,7 @@ DEFINE_EXPECT(Advise); DEFINE_EXPECT(Unadvise); #define DISPID_SCRIPTPROP 1000 +#define DISPID_SCRIPTCALL 1001 enum { TEST_FLASH, @@ -132,6 +134,9 @@ static const char object_ax_str[] = "<param name=\"param_name\" value=\"param_value\">" "<param name=\"num_param\" value=\"3\">" "</object>" + "<script>" + "objid.scriptCall();" + "</script>" "</body></html>"; static const char event_binding_str[] = @@ -711,14 +716,20 @@ static HRESULT WINAPI Dispatch_GetTypeInfo(IDispatch *iface, UINT iTInfo, LCID l static HRESULT WINAPI Dispatch_GetIDsOfNames(IDispatch *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId) { - CHECK_EXPECT(GetIDsOfNames_scriptprop); ok(IsEqualGUID(riid, &IID_NULL), "riid = %s\n", debugstr_guid(riid)); ok(cNames == 1, "cNames = %d\n", cNames); ok(rgszNames != NULL, "rgszNames == NULL\n"); - ok(!strcmp_wa(rgszNames[0], "scriptprop"), "rgszNames[0] = %s\n", wine_dbgstr_w(rgszNames[0])); ok(rgDispId != NULL, "rgDispId == NULL\n"); - *rgDispId = DISPID_SCRIPTPROP; + if(!strcmp_wa(rgszNames[0], "scriptprop")) { + CHECK_EXPECT(GetIDsOfNames_scriptprop); + *rgDispId = DISPID_SCRIPTPROP; + }else if(!strcmp_wa(rgszNames[0], "scriptCall")) { + *rgDispId = DISPID_SCRIPTCALL; + }else { + ok(0, "rgszNames[0] = %s\n", wine_dbgstr_w(rgszNames[0])); + } + return S_OK; } @@ -730,7 +741,6 @@ static HRESULT WINAPI Dispatch_Invoke(IDispatch *iface, DISPID dispIdMember, REF ok(pDispParams != NULL, "pDispParams == NULL\n"); ok(!pDispParams->cNamedArgs, "pDispParams->cNamedArgs = %d\n", pDispParams->cNamedArgs); ok(!pDispParams->rgdispidNamedArgs, "pDispParams->rgdispidNamedArgs != NULL\n"); - ok(pVarResult != NULL, "pVarResult == NULL\n"); switch(dispIdMember) { case DISPID_READYSTATE: @@ -740,6 +750,7 @@ static HRESULT WINAPI Dispatch_Invoke(IDispatch *iface, DISPID dispIdMember, REF ok(!pDispParams->rgvarg, "pDispParams->rgvarg != NULL\n"); ok(!pExcepInfo, "pExcepInfo != NULL\n"); ok(puArgErr != NULL, "puArgErr == NULL\n"); + ok(pVarResult != NULL, "pVarResult == NULL\n"); V_VT(pVarResult) = VT_I4; V_I4(pVarResult) = plugin_readystate; @@ -751,6 +762,7 @@ static HRESULT WINAPI Dispatch_Invoke(IDispatch *iface, DISPID dispIdMember, REF ok(!pDispParams->rgvarg, "pDispParams->rgvarg != NULL\n"); ok(!pExcepInfo, "pExcepInfo != NULL\n"); ok(puArgErr != NULL, "puArgErr == NULL\n"); + ok(pVarResult != NULL, "pVarResult == NULL\n"); return DISP_E_MEMBERNOTFOUND; case DISPID_VALID: CHECK_EXPECT(Invoke_VALID); @@ -759,6 +771,7 @@ static HRESULT WINAPI Dispatch_Invoke(IDispatch *iface, DISPID dispIdMember, REF ok(!pDispParams->rgvarg, "pDispParams->rgvarg != NULL\n"); ok(!pExcepInfo, "pExcepInfo != NULL\n"); ok(puArgErr != NULL, "puArgErr == NULL\n"); + ok(pVarResult != NULL, "pVarResult == NULL\n"); return DISP_E_MEMBERNOTFOUND; case DISPID_SECURITYCTX: CHECK_EXPECT(Invoke_SECURITYCTX); @@ -767,6 +780,7 @@ static HRESULT WINAPI Dispatch_Invoke(IDispatch *iface, DISPID dispIdMember, REF ok(!pDispParams->rgvarg, "pDispParams->rgvarg != NULL\n"); ok(!pExcepInfo, "pExcepInfo != NULL\n"); ok(puArgErr != NULL, "puArgErr == NULL\n"); + ok(pVarResult != NULL, "pVarResult == NULL\n"); return DISP_E_MEMBERNOTFOUND; case DISPID_SCRIPTPROP: CHECK_EXPECT(Invoke_SCRIPTPROP); @@ -775,10 +789,23 @@ static HRESULT WINAPI Dispatch_Invoke(IDispatch *iface, DISPID dispIdMember, REF ok(!pDispParams->rgvarg, "pDispParams->rgvarg != NULL\n"); ok(pExcepInfo != NULL, "pExcepInfo == NULL\n"); ok(!puArgErr, "puArgErr != NULL\n"); + ok(pVarResult != NULL, "pVarResult == NULL\n"); V_VT(pVarResult) = VT_I4; V_I4(pVarResult) = 4; return S_OK; + case DISPID_SCRIPTCALL: + CHECK_EXPECT(Invoke_SCRIPTCALL); + ok(wFlags == DISPATCH_METHOD, "wFlags = %x\n", wFlags); + ok(!pDispParams->cArgs, "pDispParams->cArgs = %d\n", pDispParams->cArgs); + ok(pExcepInfo != NULL, "pExcepInfo == NULL\n"); + ok(!puArgErr, "puArgErr != NULL\n"); + ok(!pVarResult, "pVarResult != NULL\n"); + /* + V_VT(pVarResult) = VT_I4; + V_I4(pVarResult) = 4; + */ + return S_OK; default: ok(0, "unexpected call %d\n", dispIdMember); } @@ -2381,6 +2408,8 @@ static void test_flash_ax(void) SET_EXPECT(FreezeEvents_FALSE); SET_EXPECT(IPersistPropertyBag_Load); SET_EXPECT(Invoke_READYSTATE); + SET_EXPECT(Invoke_SECURITYCTX); + SET_EXPECT(Invoke_SCRIPTCALL); SET_EXPECT(SetExtent); SET_EXPECT(GetExtent); SET_EXPECT(DoVerb); @@ -2395,6 +2424,8 @@ static void test_flash_ax(void) CHECK_CALLED(FreezeEvents_FALSE); CHECK_CALLED(IPersistPropertyBag_Load); CHECK_CALLED(Invoke_READYSTATE); + CHECK_CALLED(Invoke_SECURITYCTX); + CHECK_CALLED(Invoke_SCRIPTCALL); todo_wine CHECK_CALLED(SetExtent); todo_wine @@ -2440,6 +2471,8 @@ static void test_noquickact_ax(void) SET_EXPECT(GetViewStatus); SET_EXPECT(FreezeEvents_FALSE); SET_EXPECT(Invoke_READYSTATE); + SET_EXPECT(Invoke_SECURITYCTX); + SET_EXPECT(Invoke_SCRIPTCALL); SET_EXPECT(SetExtent); SET_EXPECT(GetExtent); SET_EXPECT(DoVerb); @@ -2454,6 +2487,8 @@ static void test_noquickact_ax(void) CHECK_CALLED(GetViewStatus); todo_wine CHECK_CALLED(FreezeEvents_FALSE); CHECK_CALLED(Invoke_READYSTATE); + CHECK_CALLED(Invoke_SECURITYCTX); + CHECK_CALLED(Invoke_SCRIPTCALL); todo_wine CHECK_CALLED(SetExtent); todo_wine CHECK_CALLED(GetExtent); CHECK_CALLED(DoVerb); @@ -2541,11 +2576,15 @@ static void test_nooleobj_ax(void) SET_EXPECT(CreateInstance); SET_EXPECT(Invoke_READYSTATE); + SET_EXPECT(Invoke_SECURITYCTX); + SET_EXPECT(Invoke_SCRIPTCALL); doc = create_doc(object_ax_str); CHECK_CALLED(CreateInstance); CHECK_CALLED(Invoke_READYSTATE); + CHECK_CALLED(Invoke_SECURITYCTX); + CHECK_CALLED(Invoke_SCRIPTCALL); release_doc(doc); }
1
0
0
0
Jacek Caban : mshtml: Get rid of no longer needed workarounds for async ActiveX loading.
by Alexandre Julliard
10 Oct '12
10 Oct '12
Module: wine Branch: master Commit: 3e27a4dfa7685be4be843488b712d5bb9a1c0fc7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3e27a4dfa7685be4be843488b…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Oct 10 11:19:38 2012 +0200 mshtml: Get rid of no longer needed workarounds for async ActiveX loading. --- dlls/mshtml/tests/activex.c | 41 ++++++----------------------------------- 1 files changed, 6 insertions(+), 35 deletions(-) diff --git a/dlls/mshtml/tests/activex.c b/dlls/mshtml/tests/activex.c index 0bb2837..9243282 100644 --- a/dlls/mshtml/tests/activex.c +++ b/dlls/mshtml/tests/activex.c @@ -2297,7 +2297,7 @@ static IHTMLDocument2 *create_document(void) return doc; } -static IHTMLDocument2 *create_doc(const char *str, BOOL *b) +static IHTMLDocument2 *create_doc(const char *str) { IHTMLDocument2 *doc; MSG msg; @@ -2307,7 +2307,7 @@ static IHTMLDocument2 *create_doc(const char *str, BOOL *b) doc_load_string(doc, str); do_advise((IUnknown*)doc, &IID_IPropertyNotifySink, (IUnknown*)&PropertyNotifySink); - while((!doc_complete || (b && !*b)) && GetMessage(&msg, NULL, 0, 0)) { + while(!doc_complete && GetMessage(&msg, NULL, 0, 0)) { TranslateMessage(&msg); DispatchMessage(&msg); } @@ -2375,11 +2375,6 @@ static void test_flash_ax(void) init_test(TEST_FLASH); - /* - * We pump messages until both document is loaded and plugin instance is created. - * Pumping until document is loaded should be enough, but Gecko loads plugins - * asynchronously and until we'll work around it, we need this hack. - */ SET_EXPECT(CreateInstance); SET_EXPECT(FreezeEvents_TRUE); SET_EXPECT(QuickActivate); @@ -2390,7 +2385,7 @@ static void test_flash_ax(void) SET_EXPECT(GetExtent); SET_EXPECT(DoVerb); - doc = create_doc(object_ax_str, &called_CreateInstance); + doc = create_doc(object_ax_str); CHECK_CALLED(CreateInstance); todo_wine @@ -2449,7 +2444,7 @@ static void test_noquickact_ax(void) SET_EXPECT(GetExtent); SET_EXPECT(DoVerb); - doc = create_doc(object_ax_str, &called_CreateInstance); + doc = create_doc(object_ax_str); CHECK_CALLED(CreateInstance); todo_wine CHECK_CALLED(FreezeEvents_TRUE); @@ -2482,11 +2477,6 @@ static void test_event_binding(void) init_test(TEST_FLASH); - /* - * We pump messages until both document is loaded and plugin instance is created. - * Pumping until document is loaded should be enough, but Gecko loads plugins - * asynchronously and until we'll work around it, we need this hack. - */ SET_EXPECT(CreateInstance); SET_EXPECT(FreezeEvents_TRUE); SET_EXPECT(QuickActivate); @@ -2502,7 +2492,7 @@ static void test_event_binding(void) SET_EXPECT(FindConnectionPoint); SET_EXPECT(Advise); - doc = create_doc(event_binding_str, &called_CreateInstance); + doc = create_doc(event_binding_str); CHECK_CALLED(CreateInstance); todo_wine @@ -2522,25 +2512,6 @@ static void test_event_binding(void) CHECK_CALLED(InPlaceObject_GetWindow); CHECK_CALLED(SetObjectRects); - /* FIXME: to be removed once we have support for synchronous plugin loading (planned for Wine Gecko 1.8) */ - if(!called_GetClassInfo) { - todo_wine ok(0, "GetClassInfo not called\n"); - - CLEAR_CALLED(GetClassInfo); - CLEAR_CALLED(OnAmbientPropertyChange_UNKNOWN); - CLEAR_CALLED(FindConnectionPoint); - CLEAR_CALLED(Advise); - - SET_EXPECT(InPlaceDeactivate); - SET_EXPECT(Close); - SET_EXPECT(SetClientSite_NULL); - release_doc(doc); - CHECK_CALLED(InPlaceDeactivate); - CHECK_CALLED(Close); - CHECK_CALLED(SetClientSite_NULL); - return; - } - CHECK_CALLED(GetClassInfo); todo_wine CHECK_CALLED(OnAmbientPropertyChange_UNKNOWN); @@ -2571,7 +2542,7 @@ static void test_nooleobj_ax(void) SET_EXPECT(CreateInstance); SET_EXPECT(Invoke_READYSTATE); - doc = create_doc(object_ax_str, &called_CreateInstance); + doc = create_doc(object_ax_str); CHECK_CALLED(CreateInstance); CHECK_CALLED(Invoke_READYSTATE);
1
0
0
0
Jacek Caban : mshtml: Added noscript tag handling tests.
by Alexandre Julliard
10 Oct '12
10 Oct '12
Module: wine Branch: master Commit: c7f155f333147b474613083ea75b3b86691fd297 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c7f155f333147b474613083ea…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Oct 10 11:19:22 2012 +0200 mshtml: Added noscript tag handling tests. --- dlls/mshtml/tests/dom.c | 48 +++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 44 insertions(+), 4 deletions(-) diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index 08ea83e7..f7bba1d 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -80,6 +80,9 @@ static const char frameset_str[] = static const char emptydiv_str[] = "<html><head><title>emptydiv test</title></head>" "<body><div id=\"divid\"></div></body></html>"; +static const char noscript_str[] = + "<html><head><title>noscript test</title><noscript><style>.body { margin-right: 0px; }</style></noscript></head>" + "<body><noscript><div>test</div></noscript></body></html>"; static WCHAR characterW[] = {'c','h','a','r','a','c','t','e','r',0}; static WCHAR texteditW[] = {'t','e','x','t','e','d','i','t',0}; @@ -115,7 +118,8 @@ typedef enum { ET_OBJECT, ET_EMBED, ET_DIV, - ET_META + ET_META, + ET_NOSCRIPT } elem_type_t; static const IID * const none_iids[] = { @@ -427,7 +431,8 @@ static const elem_type_info_t elem_type_infos[] = { {"OBJECT", object_iids, &DIID_DispHTMLObjectElement}, {"EMBED", embed_iids, &DIID_DispHTMLEmbed}, {"DIV", elem_iids, NULL}, - {"META", meta_iids, &DIID_DispHTMLMetaElement} + {"META", meta_iids, &DIID_DispHTMLMetaElement}, + {"NOSCRIPT", elem_iids, NULL /*&DIID_DispHTMLNoShowElement*/} }; static const char *dbgstr_guid(REFIID riid) @@ -2011,8 +2016,11 @@ static void _test_elem_innertext(unsigned line, IHTMLElement *elem, const char * hres = IHTMLElement_get_innerText(elem, &text); ok_(__FILE__,line) (hres == S_OK, "get_innerText failed: %08x\n", hres); - ok_(__FILE__,line) (!strcmp_wa(text, extext), "get_innerText returned %s expected %s\n", - wine_dbgstr_w(text), extext); + if(extext) + ok_(__FILE__,line) (!strcmp_wa(text, extext), "get_innerText returned %s expected %s\n", + wine_dbgstr_w(text), extext); + else + ok_(__FILE__,line) (!text, "get_innerText returned %s expected NULL\n", wine_dbgstr_w(text)); SysFreeString(text); } @@ -6042,6 +6050,37 @@ static void test_replacechild_elems(IHTMLDocument2 *doc) IHTMLElement_Release(body); } +static void test_noscript(IHTMLDocument2 *doc) +{ + IHTMLElementCollection *col; + IHTMLElement *body; + HRESULT hres; + + static const elem_type_t all_types[] = { + ET_HTML, + ET_HEAD, + ET_TITLE, + ET_NOSCRIPT, + ET_BODY, + ET_NOSCRIPT + }; + + static const elem_type_t body_all_types[] = { + ET_DIV, + ET_NOSCRIPT + }; + + hres = IHTMLDocument2_get_all(doc, &col); + ok(hres == S_OK, "get_all failed: %08x\n", hres); + test_elem_collection((IUnknown*)col, all_types, sizeof(all_types)/sizeof(all_types[0])); + IHTMLElementCollection_Release(col); + + body = doc_get_body(doc); + test_elem_set_innerhtml((IUnknown*)body, "<div>test</div><noscript><a href=\"about:blank\">A</a></noscript>"); + test_elem_all((IUnknown*)body, body_all_types, sizeof(body_all_types)/sizeof(*body_all_types)); + IHTMLElement_Release(body); +} + static void test_null_write(IHTMLDocument2 *doc) { HRESULT hres; @@ -6536,6 +6575,7 @@ START_TEST(dom) run_domtest(frameset_str, test_frameset); run_domtest(emptydiv_str, test_docfrag); run_domtest(doc_blank, test_replacechild_elems); + run_domtest(noscript_str, test_noscript); CoUninitialize(); }
1
0
0
0
← Newer
1
...
63
64
65
66
67
68
69
...
96
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
Results per page:
10
25
50
100
200