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
November 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
910 discussions
Start a n
N
ew thread
Gerald Pfeifer : include: Remove use of _WIN32_WINNT.
by Alexandre Julliard
23 Nov '09
23 Nov '09
Module: wine Branch: master Commit: 36fad653382626980270e8bd92ff987b14ac6d7f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=36fad653382626980270e8bd9…
Author: Gerald Pfeifer <gerald(a)pfeifer.com> Date: Fri Nov 20 23:49:20 2009 +0100 include: Remove use of _WIN32_WINNT. --- include/winternl.h | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/include/winternl.h b/include/winternl.h index d38f49c..6f21ad0 100644 --- a/include/winternl.h +++ b/include/winternl.h @@ -1670,9 +1670,7 @@ typedef struct _RTL_HANDLE_TABLE #define FILE_PIPE_SERVER_END 0x00000001 #define FILE_PIPE_CLIENT_END 0x00000000 -#if (_WIN32_WINNT >= 0x0501) #define INTERNAL_TS_ACTIVE_CONSOLE_ID ( *((volatile ULONG*)(0x7ffe02d8)) ) -#endif /* (_WIN32_WINNT >= 0x0501) */ #define LOGONID_CURRENT ((ULONG)-1)
1
0
0
0
Gerald Pfeifer : include: Fix preprocessor use of _MSC_VER.
by Alexandre Julliard
23 Nov '09
23 Nov '09
Module: wine Branch: master Commit: 2ad4439d517e8da509b09b3cc15eab95712f9833 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2ad4439d517e8da509b09b3cc…
Author: Gerald Pfeifer <gerald(a)pfeifer.com> Date: Fri Nov 20 22:08:43 2009 +0100 include: Fix preprocessor use of _MSC_VER. --- include/winnt.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/include/winnt.h b/include/winnt.h index a77a607..222af22 100644 --- a/include/winnt.h +++ b/include/winnt.h @@ -296,7 +296,7 @@ extern "C" { #endif /* Eliminate Microsoft C/C++ compiler warning 4715 */ -#if (_MSC_VER > 1200) +#if defined(_MSC_VER) && (_MSC_VER > 1200) # define DEFAULT_UNREACHABLE default: __assume(0) #else # define DEFAULT_UNREACHABLE
1
0
0
0
Gerald Pfeifer : msvidc32: Guard old code by #ifdef instead of plain #if.
by Alexandre Julliard
23 Nov '09
23 Nov '09
Module: wine Branch: master Commit: a15f283c7d41b8b2e8c5e4009e27b3e2dbbc19d6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a15f283c7d41b8b2e8c5e4009…
Author: Gerald Pfeifer <gerald(a)pfeifer.com> Date: Fri Nov 20 23:13:16 2009 +0100 msvidc32: Guard old code by #ifdef instead of plain #if. --- dlls/msvidc32/msvideo1.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/msvidc32/msvideo1.c b/dlls/msvidc32/msvideo1.c index ab51e4c..3052964 100644 --- a/dlls/msvidc32/msvideo1.c +++ b/dlls/msvidc32/msvideo1.c @@ -132,7 +132,7 @@ msvideo1_decode_8bit( int width, int height, const unsigned char *buf, int buf_s for (pixel_y = 0; pixel_y < 4; pixel_y++) { for (pixel_x = 0; pixel_x < 4; pixel_x++, flags >>= 1) { -#if ORIGINAL +#ifdef ORIGINAL pixels[pixel_ptr++] = colors[(flags & 0x1) ^ 1]; #else pixels[width*(height-(pixel_ptr/width)-1) + @@ -154,7 +154,7 @@ msvideo1_decode_8bit( int width, int height, const unsigned char *buf, int buf_s for (pixel_y = 0; pixel_y < 4; pixel_y++) { for (pixel_x = 0; pixel_x < 4; pixel_x++, flags >>= 1) { -#if ORIGINAL +#ifdef ORIGINAL pixels[pixel_ptr++] = colors[((pixel_y & 0x2) << 1) + (pixel_x & 0x2) + ((flags & 0x1) ^ 1)]; @@ -175,7 +175,7 @@ msvideo1_decode_8bit( int width, int height, const unsigned char *buf, int buf_s for (pixel_y = 0; pixel_y < 4; pixel_y++) { for (pixel_x = 0; pixel_x < 4; pixel_x++) { -#if ORIGINAL +#ifdef ORIGINAL pixels[pixel_ptr++] = colors[0]; #else pixels[width*(height-(pixel_ptr/width)-1) +
1
0
0
0
Gerald Pfeifer : include: Guard preprocessor use of _WIN32_IE.
by Alexandre Julliard
23 Nov '09
23 Nov '09
Module: wine Branch: master Commit: aa7cedc895bbb5c340bfdd98b65f5f15bf29d30b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=aa7cedc895bbb5c340bfdd98b…
Author: Gerald Pfeifer <gerald(a)pfeifer.com> Date: Fri Nov 20 22:28:52 2009 +0100 include: Guard preprocessor use of _WIN32_IE. --- include/prsht.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/include/prsht.h b/include/prsht.h index 27e43c8..0830757 100644 --- a/include/prsht.h +++ b/include/prsht.h @@ -266,7 +266,7 @@ DECL_WINELIB_TYPE_AW(LPFNPSPCALLBACK) #define PSH_WIZARD97_NEW 0x01000000 /* for IE >= 5 */ #define PSH_NOCONTEXTHELP 0x02000000 #ifndef __WINESRC__ -# if _WIN32_IE < 0x0500 +# if defined(_WIN32_IE) && (_WIN32_IE < 0x0500) # define PSH_WIZARD97 PSH_WIZARD97_OLD # else # define PSH_WIZARD97 PSH_WIZARD97_NEW
1
0
0
0
Gerald Pfeifer : comdlg32: Simplify CC_WMPaint, CC_WMLButtonUp and CC_WMLButtonDown by shedding unused parameters.
by Alexandre Julliard
23 Nov '09
23 Nov '09
Module: wine Branch: master Commit: 5e3f66c21174e687ee98331196d910183719add4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5e3f66c21174e687ee9833119…
Author: Gerald Pfeifer <gerald(a)pfeifer.com> Date: Fri Nov 20 21:58:42 2009 +0100 comdlg32: Simplify CC_WMPaint, CC_WMLButtonUp and CC_WMLButtonDown by shedding unused parameters. --- dlls/comdlg32/colordlg.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dlls/comdlg32/colordlg.c b/dlls/comdlg32/colordlg.c index e134d45..2a61706 100644 --- a/dlls/comdlg32/colordlg.c +++ b/dlls/comdlg32/colordlg.c @@ -1081,7 +1081,7 @@ static LRESULT CC_WMCommand( HWND hDlg, WPARAM wParam, LPARAM lParam, WORD notif /*********************************************************************** * CC_WMPaint [internal] */ -static LRESULT CC_WMPaint( HWND hDlg, WPARAM wParam, LPARAM lParam ) +static LRESULT CC_WMPaint( HWND hDlg ) { PAINTSTRUCT ps; LPCCPRIV lpp = GetPropW( hDlg, szColourDialogProp ); @@ -1103,7 +1103,7 @@ static LRESULT CC_WMPaint( HWND hDlg, WPARAM wParam, LPARAM lParam ) /*********************************************************************** * CC_WMLButtonUp [internal] */ -static LRESULT CC_WMLButtonUp( HWND hDlg, WPARAM wParam, LPARAM lParam ) +static LRESULT CC_WMLButtonUp( HWND hDlg ) { LPCCPRIV lpp = GetPropW( hDlg, szColourDialogProp ); @@ -1158,7 +1158,7 @@ static LRESULT CC_WMMouseMove( HWND hDlg, LPARAM lParam ) /*********************************************************************** * CC_WMLButtonDown [internal] */ -static LRESULT CC_WMLButtonDown( HWND hDlg, WPARAM wParam, LPARAM lParam ) +static LRESULT CC_WMLButtonDown( HWND hDlg, LPARAM lParam ) { LPCCPRIV lpp = GetPropW( hDlg, szColourDialogProp ); int r, g, b, i; @@ -1252,7 +1252,7 @@ static INT_PTR CALLBACK ColorDlgProc( HWND hDlg, UINT message, return TRUE; break; case WM_PAINT: - if ( CC_WMPaint(hDlg, wParam, lParam)) + if (CC_WMPaint(hDlg)) return TRUE; break; case WM_LBUTTONDBLCLK: @@ -1264,11 +1264,11 @@ static INT_PTR CALLBACK ColorDlgProc( HWND hDlg, UINT message, return TRUE; break; case WM_LBUTTONUP: /* FIXME: ClipCursor off (if in color graph)*/ - if (CC_WMLButtonUp(hDlg, wParam, lParam)) + if (CC_WMLButtonUp(hDlg)) return TRUE; break; case WM_LBUTTONDOWN:/* FIXME: ClipCursor on (if in color graph)*/ - if (CC_WMLButtonDown(hDlg, wParam, lParam)) + if (CC_WMLButtonDown(hDlg, lParam)) return TRUE; break; }
1
0
0
0
Marcin Baczyński : gdiplus: Add missing declarations for graphicspath.c.
by Alexandre Julliard
23 Nov '09
23 Nov '09
Module: wine Branch: master Commit: 1aedfa8c6c23f526e01b708169471c0f1a63b6db URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1aedfa8c6c23f526e01b70816…
Author: Marcin Baczyński <marbacz(a)gmail.com> Date: Sat Nov 21 01:45:47 2009 +0100 gdiplus: Add missing declarations for graphicspath.c. --- include/gdiplusflat.h | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h index 8d24929..563ee96 100644 --- a/include/gdiplusflat.h +++ b/include/gdiplusflat.h @@ -350,6 +350,9 @@ GpStatus WINGDIPAPI GdipSetPathFillMode(GpPath*,GpFillMode); GpStatus WINGDIPAPI GdipSetPathMarker(GpPath*); GpStatus WINGDIPAPI GdipStartPathFigure(GpPath*); GpStatus WINGDIPAPI GdipTransformPath(GpPath*,GpMatrix*); +GpStatus WINGDIPAPI GdipWarpPath(GpPath*,GpMatrix*,GDIPCONST GpPointF*,INT,REAL, + REAL,REAL,REAL,WarpMode,REAL); +GpStatus WINGDIPAPI GdipWidenPath(GpPath*,GpPen*,GpMatrix*,REAL); /* HatchBrush */ GpStatus WINGDIPAPI GdipCreateHatchBrush(HatchStyle,ARGB,ARGB,GpHatch**);
1
0
0
0
Marcin Baczyński : gdiplus: Add missing declaration for font.c.
by Alexandre Julliard
23 Nov '09
23 Nov '09
Module: wine Branch: master Commit: 56057fdb2448c3beda824c80ab421e2fbd746de7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=56057fdb2448c3beda824c80a…
Author: Marcin Baczyński <marbacz(a)gmail.com> Date: Sat Nov 21 01:45:46 2009 +0100 gdiplus: Add missing declaration for font.c. --- include/gdiplusflat.h | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h index d4f51a3..8d24929 100644 --- a/include/gdiplusflat.h +++ b/include/gdiplusflat.h @@ -107,6 +107,8 @@ GpStatus WINGDIPAPI GdipNewInstalledFontCollection(GpFontCollection**); GpStatus WINGDIPAPI GdipNewPrivateFontCollection(GpFontCollection**); GpStatus WINGDIPAPI GdipDeletePrivateFontCollection(GpFontCollection**); GpStatus WINGDIPAPI GdipPrivateAddFontFile(GpFontCollection*, GDIPCONST WCHAR*); +GpStatus WINGDIPAPI GdipPrivateAddMemoryFont(GpFontCollection*, + GDIPCONST void*,INT); GpStatus WINGDIPAPI GdipGetFontCollectionFamilyCount(GpFontCollection*, INT*); GpStatus WINGDIPAPI GdipGetFontCollectionFamilyList(GpFontCollection*, INT, GpFontFamily*[], INT*);
1
0
0
0
Marcin Baczyński : gdiplus: Add missing declarations for customlinecap.c.
by Alexandre Julliard
23 Nov '09
23 Nov '09
Module: wine Branch: master Commit: f9456924d59635f6bc347c78b8092ec9fa91cb29 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f9456924d59635f6bc347c78b…
Author: Marcin Baczyński <marbacz(a)gmail.com> Date: Sat Nov 21 01:45:45 2009 +0100 gdiplus: Add missing declarations for customlinecap.c. --- include/gdiplusflat.h | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h index 9824646..d4f51a3 100644 --- a/include/gdiplusflat.h +++ b/include/gdiplusflat.h @@ -74,12 +74,15 @@ GpStatus WINGDIPAPI GdipCreateCustomLineCap(GpPath*,GpPath*,GpLineCap,REAL, GpCustomLineCap**); GpStatus WINGDIPAPI GdipDeleteCustomLineCap(GpCustomLineCap*); GpStatus WINGDIPAPI GdipGetCustomLineCapBaseCap(GpCustomLineCap*,GpLineCap*); +GpStatus WINGDIPAPI GdipSetCustomLineCapBaseCap(GpCustomLineCap*,GpLineCap); GpStatus WINGDIPAPI GdipGetCustomLineCapBaseInset(GpCustomLineCap*,REAL*); +GpStatus WINGDIPAPI GdipSetCustomLineCapBaseInset(GpCustomLineCap*,REAL); GpStatus WINGDIPAPI GdipSetCustomLineCapStrokeCaps(GpCustomLineCap*,GpLineCap, GpLineCap); GpStatus WINGDIPAPI GdipGetCustomLineCapStrokeJoin(GpCustomLineCap*,GpLineJoin*); GpStatus WINGDIPAPI GdipSetCustomLineCapStrokeJoin(GpCustomLineCap*,GpLineJoin); GpStatus WINGDIPAPI GdipGetCustomLineCapWidthScale(GpCustomLineCap*,REAL*); +GpStatus WINGDIPAPI GdipSetCustomLineCapBaseInset(GpCustomLineCap*,REAL); /* Font */ GpStatus WINGDIPAPI GdipCloneFont(GpFont*,GpFont**);
1
0
0
0
Andrew Eikum : mshtml: Also search by node name attribute in IHTMLDocument3 ::getElementById.
by Alexandre Julliard
23 Nov '09
23 Nov '09
Module: wine Branch: master Commit: d51c0966158f6161e7749afdce1a81e7c54c95a8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d51c0966158f6161e7749afdc…
Author: Andrew Eikum <aeikum(a)codeweavers.com> Date: Fri Nov 20 17:04:58 2009 -0600 mshtml: Also search by node name attribute in IHTMLDocument3::getElementById. --- dlls/mshtml/htmldoc3.c | 58 +++++++++++++++++++++++++++++++++++++++++++--- dlls/mshtml/nsiface.idl | 33 ++++++++++++++++++++++++++ dlls/mshtml/tests/dom.c | 9 ++++++- 3 files changed, 95 insertions(+), 5 deletions(-) diff --git a/dlls/mshtml/htmldoc3.c b/dlls/mshtml/htmldoc3.c index a00fa95..b930d88 100644 --- a/dlls/mshtml/htmldoc3.c +++ b/dlls/mshtml/htmldoc3.c @@ -431,6 +431,8 @@ static HRESULT WINAPI HTMLDocument3_getElementById(IHTMLDocument3 *iface, BSTR v HTMLDocument *This = HTMLDOC3_THIS(iface); nsIDOMElement *nselem; HTMLDOMNode *node; + nsIDOMNode *nsnode, *nsnode_by_id, *nsnode_by_name; + nsIDOMNodeList *nsnode_list; nsAString id_str; nsresult nsres; @@ -442,16 +444,64 @@ static HRESULT WINAPI HTMLDocument3_getElementById(IHTMLDocument3 *iface, BSTR v } nsAString_Init(&id_str, v); + /* get element by id attribute */ nsres = nsIDOMHTMLDocument_GetElementById(This->doc_node->nsdoc, &id_str, &nselem); - nsAString_Finish(&id_str); if(FAILED(nsres)) { ERR("GetElementById failed: %08x\n", nsres); + nsAString_Finish(&id_str); return E_FAIL; } + nsnode_by_id = (nsIDOMNode*)nselem; - if(nselem) { - node = get_node(This->doc_node, (nsIDOMNode*)nselem, TRUE); - nsIDOMElement_Release(nselem); + /* get first element by name attribute */ + nsres = nsIDOMHTMLDocument_GetElementsByName(This->doc_node->nsdoc, &id_str, &nsnode_list); + if(FAILED(nsres)) { + ERR("getElementsByName failed: %08x\n", nsres); + nsAString_Finish(&id_str); + if(nsnode_by_id) + nsIDOMNode_Release(nsnode_by_id); + return E_FAIL; + } + nsIDOMNodeList_Item(nsnode_list, 0, &nsnode_by_name); + nsIDOMNodeList_Release(nsnode_list); + + nsAString_Finish(&id_str); + + if(nsnode_by_name && nsnode_by_id) { + nsIDOM3Node *node3; + PRUint16 pos; + + nsres = nsIDOMNode_QueryInterface(nsnode_by_name, &IID_nsIDOM3Node, (void**)&node3); + if(NS_FAILED(nsres)) { + FIXME("failed to get nsIDOM3Node interface: 0x%08x\n", nsres); + nsIDOMNode_Release(nsnode_by_name); + nsIDOMNode_Release(nsnode_by_id); + return E_FAIL; + } + + nsres = nsIDOM3Node_CompareDocumentPosition(node3, nsnode_by_id, &pos); + nsIDOM3Node_Release(node3); + if(NS_FAILED(nsres)) { + FIXME("nsIDOM3Node_CompareDocumentPosition failed: 0x%08x\n", nsres); + nsIDOMNode_Release(nsnode_by_name); + nsIDOMNode_Release(nsnode_by_id); + return E_FAIL; + } + + TRACE("CompareDocumentPosition gave: 0x%x\n", pos); + if(pos & PRECEDING || pos & CONTAINS) { + nsnode = nsnode_by_id; + nsIDOMNode_Release(nsnode_by_name); + }else { + nsnode = nsnode_by_name; + nsIDOMNode_Release(nsnode_by_id); + } + }else + nsnode = nsnode_by_name ? nsnode_by_name : nsnode_by_id; + + if(nsnode) { + node = get_node(This->doc_node, nsnode, TRUE); + nsIDOMNode_Release(nsnode); IHTMLDOMNode_QueryInterface(HTMLDOMNODE(node), &IID_IHTMLElement, (void**)pel); }else { diff --git a/dlls/mshtml/nsiface.idl b/dlls/mshtml/nsiface.idl index 19f29b0..9d0bb30 100644 --- a/dlls/mshtml/nsiface.idl +++ b/dlls/mshtml/nsiface.idl @@ -140,6 +140,8 @@ typedef nsISupports nsIContent; typedef nsISupports nsINode; typedef nsISupports nsIStyleSheet; typedef nsISupports nsIStyleRule; +typedef nsISupports nsIVariant; +typedef nsISupports nsIDOMUserDataHandler; [ object, @@ -603,6 +605,37 @@ interface nsIDOMNodeList : nsISupports [ object, + uuid(29fb2a18-1dd2-11b2-8dd9-a6fd5d5ad12f), + local + /* NOT_FROZEN */ +] +interface nsIDOM3Node : nsISupports +{ + enum NSDOCPOSITION { + DISCONNECTED = 1, + PRECEDING = 2, + FOLLOWING = 4, + CONTAINS = 8, + CONTAINED_BY = 16, + IMPLEMENTATION_SPECIFIC = 32 + }; + + nsresult GetBaseURI(nsAString *aBaseURI); + nsresult CompareDocumentPosition(nsIDOMNode *other, PRUint16 *_retval); + nsresult GetTextContent(nsAString *aTextContent); + nsresult SetTextContent(const nsAString *aTextContent); + nsresult IsSameNode(nsIDOMNode *other, PRBool *_retval); + nsresult LookupPrefix(const nsAString *namespaceURI, PRBool *_retval); + nsresult IsDefaultNamespace(const nsAString *namespaceURI, PRBool *_retval); + nsresult LookupNamespaceURI(const nsAString *prefix, nsAString _retval); + nsresult IsEqualNode(nsIDOMNode *arg, PRBool *_retval); + nsresult GetFeature(const nsAString *feature, const nsAString *version, nsISupports **_retval); + nsresult SetUserData(const nsAString *key, nsIVariant *data, nsIDOMUserDataHandler *handler, nsIVariant **_retval); + nsresult GetUserData(const nsAString *key, nsIVariant **_retval); +} + +[ + object, uuid(a6cf907c-15b3-11d2-932e-00805f8add32), local /* FROZEN */ diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index 8681164..bd55c9f 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -65,7 +65,7 @@ static const char cond_comment_str[] = "</body></html>"; static const char frameset_str[] = "<html><head><title>frameset test</title></head><frameset rows=\"28, *\">" - "<frame src=\"about:blank\" id=\"fr1\"><frame src=\"about:blank\" id=\"fr2\">" + "<frame src=\"about:blank\" name=\"nm1\" id=\"fr1\"><frame src=\"about:blank\" name=\"nm2\" id=\"fr2\">" "</frameset></html>"; static WCHAR characterW[] = {'c','h','a','r','a','c','t','e','r',0}; @@ -5396,6 +5396,7 @@ static void test_elems(IHTMLDocument2 *doc) ok(!node, "node = %p\n", node); elem2 = get_doc_elem_by_id(doc, "x"); + test_elem_tag((IUnknown*)elem2, "A"); node = node_get_next((IUnknown*)elem2); IHTMLDOMNode_Release(node); IHTMLElement_Release(elem2); @@ -5682,6 +5683,7 @@ static void test_frameset(IHTMLDocument2 *doc) { IHTMLWindow2 *window; IHTMLFramesCollection2 *frames; + IHTMLElement *elem; LONG length; VARIANT index_var, result_var; HRESULT hres; @@ -5805,6 +5807,11 @@ static void test_frameset(IHTMLDocument2 *doc) ok(hres == E_INVALIDARG, "IHTMLWindow2_item should have" "failed with E_INVALIDARG, instead: 0x%08x\n", hres); VariantClear(&result_var); + + /* getElementById with node name attributes */ + elem = get_doc_elem_by_id(doc, "nm1"); + test_elem_id((IUnknown*)elem, "fr1"); + IHTMLElement_Release(elem); } static IHTMLDocument2 *notif_doc;
1
0
0
0
Andrew Eikum : mshtml: Also get dispid by element name & id in HTMLElementCollection.
by Alexandre Julliard
23 Nov '09
23 Nov '09
Module: wine Branch: master Commit: 9a9c5f9cdfbe890bd60acc6f2faa79eb3b38a64f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9a9c5f9cdfbe890bd60acc6f2…
Author: Andrew Eikum <aeikum(a)codeweavers.com> Date: Fri Nov 20 16:21:54 2009 -0600 mshtml: Also get dispid by element name & id in HTMLElementCollection. --- dlls/mshtml/htmlelemcol.c | 31 ++++++++++++++++++++++++++++++- 1 files changed, 30 insertions(+), 1 deletions(-) diff --git a/dlls/mshtml/htmlelemcol.c b/dlls/mshtml/htmlelemcol.c index 70827bc..c973707 100644 --- a/dlls/mshtml/htmlelemcol.c +++ b/dlls/mshtml/htmlelemcol.c @@ -205,6 +205,26 @@ static HRESULT WINAPI HTMLElementCollection_get__newEnum(IHTMLElementCollection return E_NOTIMPL; } +static BOOL is_elem_id(HTMLElement *elem, LPCWSTR name) +{ + BSTR elem_id; + HRESULT hres; + + hres = IHTMLElement_get_id(HTMLELEM(elem), &elem_id); + if(FAILED(hres)){ + WARN("IHTMLElement_get_id failed: 0x%08x\n", hres); + return FALSE; + } + + if(elem_id && !strcmpW(elem_id, name)) { + SysFreeString(elem_id); + return TRUE; + } + + SysFreeString(elem_id); + return FALSE; +} + static BOOL is_elem_name(HTMLElement *elem, LPCWSTR name) { const PRUnichar *str; @@ -376,7 +396,16 @@ static HRESULT HTMLElementCollection_get_dispid(IUnknown *iface, BSTR name, DWOR for(ptr = name; *ptr && isdigitW(*ptr); ptr++) idx = idx*10 + (*ptr-'0'); - if(*ptr || idx >= This->len) + if(*ptr) { + /* the name contains alpha characters, so search by name & id */ + for(idx = 0; idx < This->len; ++idx) { + if(is_elem_id(This->elems[idx], name) || + is_elem_name(This->elems[idx], name)) + break; + } + } + + if(idx >= This->len) return DISP_E_UNKNOWNNAME; *dispid = DISPID_ELEMCOL_0 + idx;
1
0
0
0
← Newer
1
...
15
16
17
18
19
20
21
...
91
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
Results per page:
10
25
50
100
200