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
January 2012
----- 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
972 discussions
Start a n
N
ew thread
Luca Bennati : po: Update Italian translation.
by Alexandre Julliard
27 Jan '12
27 Jan '12
Module: wine Branch: master Commit: f3be2883d3b90e0a2d49f4c46aaa0756fc23c242 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f3be2883d3b90e0a2d49f4c46…
Author: Luca Bennati <lucak3(a)gmail.com> Date: Fri Jan 27 12:26:32 2012 +0100 po: Update Italian translation. --- po/it.po | 150 +++++++++++++++++++------------------------------------------ 1 files changed, 47 insertions(+), 103 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=f3be2883d3b90e0a2d49f…
1
0
0
0
Jacek Caban : mshtml: Added VT_I2 handling to IHTMLSelectElement: add implementation.
by Alexandre Julliard
27 Jan '12
27 Jan '12
Module: wine Branch: master Commit: 0dedfab9a73812ecaece786b6e60981750fd4d1f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0dedfab9a73812ecaece786b6…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Jan 27 17:45:39 2012 +0100 mshtml: Added VT_I2 handling to IHTMLSelectElement:add implementation. --- dlls/mshtml/htmlelem.c | 5 +++ dlls/mshtml/htmlselect.c | 44 +++++++++++++++++------- dlls/mshtml/mshtml_private.h | 3 ++ dlls/mshtml/nsembed.c | 17 +++++++++ dlls/mshtml/nsiface.idl | 77 +++++++++++++++++++++++++++++++++++++++++- 5 files changed, 132 insertions(+), 14 deletions(-) diff --git a/dlls/mshtml/htmlelem.c b/dlls/mshtml/htmlelem.c index 36103be..030a0d2 100644 --- a/dlls/mshtml/htmlelem.c +++ b/dlls/mshtml/htmlelem.c @@ -1649,6 +1649,11 @@ static const IHTMLElementVtbl HTMLElementVtbl = { HTMLElement_get_all }; +HTMLElement *unsafe_impl_from_IHTMLElement(IHTMLElement *iface) +{ + return iface->lpVtbl == &HTMLElementVtbl ? impl_from_IHTMLElement(iface) : NULL; +} + static inline HTMLElement *impl_from_HTMLDOMNode(HTMLDOMNode *iface) { return CONTAINING_RECORD(iface, HTMLElement, node); diff --git a/dlls/mshtml/htmlselect.c b/dlls/mshtml/htmlselect.c index 0d45448..fc91c2d 100644 --- a/dlls/mshtml/htmlselect.c +++ b/dlls/mshtml/htmlselect.c @@ -375,26 +375,44 @@ static HRESULT WINAPI HTMLSelectElement_add(IHTMLSelectElement *iface, IHTMLElem VARIANT before) { HTMLSelectElement *This = impl_from_IHTMLSelectElement(iface); - IHTMLDOMNode *node, *tmp; - HRESULT hres; + nsIWritableVariant *nsvariant; + HTMLElement *element_obj; + nsresult nsres; + + TRACE("(%p)->(%p %s)\n", This, element, debugstr_variant(&before)); + + element_obj = unsafe_impl_from_IHTMLElement(element); + if(!element_obj) { + FIXME("External IHTMLElement implementation?\n"); + return E_INVALIDARG; + } - FIXME("(%p)->(%p %s): semi-stub\n", This, element, debugstr_variant(&before)); + nsvariant = create_nsvariant(); + if(!nsvariant) + return E_FAIL; - if(V_VT(&before) != VT_EMPTY) { + switch(V_VT(&before)) { + case VT_EMPTY: + nsres = nsIWritableVariant_SetAsEmpty(nsvariant); + break; + case VT_I2: + nsres = nsIWritableVariant_SetAsInt16(nsvariant, V_I2(&before)); + break; + default: FIXME("unhandled before %s\n", debugstr_variant(&before)); + nsIWritableVariant_Release(nsvariant); return E_NOTIMPL; } - hres = IHTMLElement_QueryInterface(element, &IID_IHTMLDOMNode, (void**)&node); - if(FAILED(hres)) - return hres; - - hres = IHTMLDOMNode_appendChild(&This->element.node.IHTMLDOMNode_iface, node, &tmp); - IHTMLDOMNode_Release(node); - if(SUCCEEDED(hres) && tmp) - IHTMLDOMNode_Release(tmp); + if(NS_SUCCEEDED(nsres)) + nsres = nsIDOMHTMLSelectElement_Add(This->nsselect, element_obj->nselem, (nsIVariant*)nsvariant); + nsIWritableVariant_Release(nsvariant); + if(NS_FAILED(nsres)) { + ERR("Add failed: %08x\n", nsres); + return E_FAIL; + } - return hres; + return S_OK; } static HRESULT WINAPI HTMLSelectElement_remove(IHTMLSelectElement *iface, LONG index) diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 20923e9..2385588 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -706,6 +706,7 @@ nsICommandParams *create_nscommand_params(void) DECLSPEC_HIDDEN; HRESULT nsnode_to_nsstring(nsIDOMNode*,nsAString*) DECLSPEC_HIDDEN; void get_editor_controller(NSContainer*) DECLSPEC_HIDDEN; nsresult get_nsinterface(nsISupports*,REFIID,void**) DECLSPEC_HIDDEN; +nsIWritableVariant *create_nsvariant(void) DECLSPEC_HIDDEN; void set_window_bscallback(HTMLWindow*,nsChannelBSC*) DECLSPEC_HIDDEN; void set_current_mon(HTMLWindow*,IMoniker*) DECLSPEC_HIDDEN; @@ -802,6 +803,8 @@ void HTMLFrameBase_destructor(HTMLFrameBase*) DECLSPEC_HIDDEN; HRESULT get_node(HTMLDocumentNode*,nsIDOMNode*,BOOL,HTMLDOMNode**) DECLSPEC_HIDDEN; void release_nodes(HTMLDocumentNode*) DECLSPEC_HIDDEN; +HTMLElement *unsafe_impl_from_IHTMLElement(IHTMLElement*) DECLSPEC_HIDDEN; + void release_script_hosts(HTMLWindow*) DECLSPEC_HIDDEN; void connect_scripts(HTMLWindow*) DECLSPEC_HIDDEN; void doc_insert_script(HTMLWindow*,nsIDOMHTMLScriptElement*) DECLSPEC_HIDDEN; diff --git a/dlls/mshtml/nsembed.c b/dlls/mshtml/nsembed.c index 6874459..fdc6286 100644 --- a/dlls/mshtml/nsembed.c +++ b/dlls/mshtml/nsembed.c @@ -46,6 +46,7 @@ WINE_DECLARE_DEBUG_CHANNEL(gecko); #define NS_HTMLSERIALIZER_CONTRACTID "@mozilla.org/layout/contentserializer;1?mimetype=text/html" #define NS_EDITORCONTROLLER_CONTRACTID "@mozilla.org/editor/editorcontroller;1" #define NS_PREFERENCES_CONTRACTID "@mozilla.org/preferences;1" +#define NS_VARIANT_CONTRACTID "@mozilla.org/variant;1" #define PR_UINT32_MAX 0xffffffff @@ -713,6 +714,22 @@ nsICommandParams *create_nscommand_params(void) return ret; } +nsIWritableVariant *create_nsvariant(void) +{ + nsIWritableVariant *ret = NULL; + nsresult nsres; + + if(!pCompMgr) + return NULL; + + nsres = nsIComponentManager_CreateInstanceByContractID(pCompMgr, + NS_VARIANT_CONTRACTID, NULL, &IID_nsIWritableVariant, (void**)&ret); + if(NS_FAILED(nsres)) + ERR("Could not get nsIVariant\n"); + + return ret; +} + nsresult get_nsinterface(nsISupports *iface, REFIID riid, void **ppv) { nsIInterfaceRequestor *iface_req; diff --git a/dlls/mshtml/nsiface.idl b/dlls/mshtml/nsiface.idl index 6a88103..2cefaec 100644 --- a/dlls/mshtml/nsiface.idl +++ b/dlls/mshtml/nsiface.idl @@ -133,7 +133,6 @@ typedef nsISupports nsIDOMClientRectList; typedef nsISupports nsINode; typedef nsISupports nsIStyleSheet; typedef nsISupports nsIStyleRule; -typedef nsISupports nsIVariant; typedef nsISupports nsIDOMUserDataHandler; typedef nsISupports nsIDocShellLoadInfo; typedef nsISupports nsISHEntry; @@ -286,6 +285,82 @@ interface nsISimpleEnumerator : nsISupports [ object, + uuid(81e4c2de-acac-4ad6-901a-b5fb1b851a0d), + local +] +interface nsIVariant : nsISupports +{ + nsresult GetDataType(PRUint16 *aDataType); + nsresult GetAsInt8(PRUint8 *_retval); + nsresult GetAsInt16(PRInt16 *_retval); + nsresult GetAsInt32(PRInt32 *_retval); + nsresult GetAsInt64(PRInt64 *_retval); + nsresult GetAsUint8(PRUint8 *_retval); + nsresult GetAsUint16(PRUint16 *_retval); + nsresult GetAsUint32(PRUint32 *_retval); + nsresult GetAsUint64(PRUint64 *_retval); + nsresult GetAsFloat(float *_retval); + nsresult GetAsDouble(double *_retval); + nsresult GetAsBool(PRBool *_retval); + nsresult GetAsChar(char *_retval); + nsresult GetAsWChar(PRUnichar *_retval); + nsresult GetAsID(nsID *retval); + nsresult GetAsAString(nsAString *_retval); + nsresult GetAsDOMString(nsAString *_retval); + nsresult GetAsACString(nsACString *_retval); + nsresult GetAsAUTF8String(nsACString *_retval); + nsresult GetAsString(char * *_retval); + nsresult GetAsWString(PRUnichar * *_retval); + nsresult GetAsISupports(nsISupports * *_retval); + nsresult GetAsJSVal(long /*jsval*/ *_retval); + nsresult GetAsInterface(nsIID **iid, void **iface); + nsresult GetAsArray(PRUint16 *type, nsIID *iid, PRUint32 *count, void **ptr); + nsresult GetAsStringWithSize(PRUint32 *size, char **str); + nsresult GetAsWStringWithSize(PRUint32 *size, PRUnichar **str); +} + +[ + object, + uuid(5586a590-8c82-11d5-90f3-0010a4e73d9a), + local +] +interface nsIWritableVariant : nsIVariant +{ + nsresult GetWritable(PRBool *aWritable); + nsresult SetWritable(PRBool aWritable); + nsresult SetAsInt8(PRUint8 aValue); + nsresult SetAsInt16(PRInt16 aValue); + nsresult SetAsInt32(PRInt32 aValue); + nsresult SetAsInt64(PRInt64 aValue); + nsresult SetAsUint8(PRUint8 aValue); + nsresult SetAsUint16(PRUint16 aValue); + nsresult SetAsUint32(PRUint32 aValue); + nsresult SetAsUint64(PRUint64 aValue); + nsresult SetAsFloat(float aValue); + nsresult SetAsDouble(double aValue); + nsresult SetAsBool(PRBool aValue); + nsresult SetAsChar(char aValue); + nsresult SetAsWChar(PRUnichar aValue); + nsresult SetAsID(const nsID *aValue); + nsresult SetAsAString(const nsAString *aValue); + nsresult SetAsDOMString(const nsAString *aValue); + nsresult SetAsACString(const nsACString *aValue); + nsresult SetAsAUTF8String(const nsACString *aValue); + nsresult SetAsString(const char * aValue); + nsresult SetAsWString(const PRUnichar * aValue); + nsresult SetAsISupports(nsISupports *aValue); + nsresult SetAsInterface(const nsIID *iid, void *iface); + nsresult SetAsArray(PRUint16 type, const nsIID *iid, PRUint32 count, void *ptr); + nsresult SetAsStringWithSize(PRUint32 size, const char *str); + nsresult SetAsWStringWithSize(PRUint32 size, const PRUnichar *str); + nsresult SetAsVoid(); + nsresult SetAsEmpty(); + nsresult SetAsEmptyArray(); + nsresult SetFromVariant(nsIVariant *aValue); +} + +[ + object, uuid(fa9c7f6c-61b3-11d4-9877-00c04fa0cf4a), local ]
1
0
0
0
Jacek Caban : mshtml: Added VT_I2 handling to debugstr_variant.
by Alexandre Julliard
27 Jan '12
27 Jan '12
Module: wine Branch: master Commit: 3029bdf33d516ee460ea3c378ef4d6c3d9e86fa6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3029bdf33d516ee460ea3c378…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Jan 27 17:45:17 2012 +0100 mshtml: Added VT_I2 handling to debugstr_variant. --- dlls/mshtml/main.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/dlls/mshtml/main.c b/dlls/mshtml/main.c index e82e8e2..c1dfd13 100644 --- a/dlls/mshtml/main.c +++ b/dlls/mshtml/main.c @@ -509,6 +509,8 @@ const char *debugstr_variant(const VARIANT *v) return "{VT_EMPTY}"; case VT_NULL: return "{VT_NULL}"; + case VT_I2: + return wine_dbg_sprintf("{VT_I2: %d}", V_I2(v)); case VT_I4: return wine_dbg_sprintf("{VT_I4: %d}", V_I4(v)); case VT_R8:
1
0
0
0
Jacek Caban : mshtml: Fallback to text/ html mime type for document channel in nsIChannel::GetContentType.
by Alexandre Julliard
27 Jan '12
27 Jan '12
Module: wine Branch: master Commit: 7ab1259a72030d0b469463fa2a2ac9a950ae26ba URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7ab1259a72030d0b469463fa2…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Jan 27 15:56:32 2012 +0100 mshtml: Fallback to text/html mime type for document channel in nsIChannel::GetContentType. --- dlls/mshtml/nsio.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/dlls/mshtml/nsio.c b/dlls/mshtml/nsio.c index 8e7bdec..744e914 100644 --- a/dlls/mshtml/nsio.c +++ b/dlls/mshtml/nsio.c @@ -787,6 +787,12 @@ static nsresult NSAPI nsChannel_GetContentType(nsIHttpChannel *iface, nsACString return S_OK; } + if(This->uri->is_doc_uri) { + WARN("Document channel with no MIME set. Assuming text/html\n"); + nsACString_SetData(aContentType, "text/html"); + return S_OK; + } + WARN("unknown type\n"); return NS_ERROR_FAILURE; }
1
0
0
0
Jacek Caban : mshtml: Added support for middle-button opening anchors in a new window.
by Alexandre Julliard
27 Jan '12
27 Jan '12
Module: wine Branch: master Commit: 61fd6c97badea7ff92dc77bd903aa7bb3e338307 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=61fd6c97badea7ff92dc77bd9…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Jan 27 15:56:13 2012 +0100 mshtml: Added support for middle-button opening anchors in a new window. --- dlls/mshtml/htmlanchor.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/dlls/mshtml/htmlanchor.c b/dlls/mshtml/htmlanchor.c index 9e9f369..27d39e3 100644 --- a/dlls/mshtml/htmlanchor.c +++ b/dlls/mshtml/htmlanchor.c @@ -642,6 +642,9 @@ static HRESULT HTMLAnchorElement_handle_event(HTMLDOMNode *iface, eventid_t eid, case 0: *prevent_default = TRUE; return navigate_anchor(This); + case 1: + *prevent_default = TRUE; + return navigate_anchor_window(This, NULL); default: *prevent_default = FALSE; return S_OK;
1
0
0
0
Jacek Caban : mshtml: Added support for anchor targets.
by Alexandre Julliard
27 Jan '12
27 Jan '12
Module: wine Branch: master Commit: bc69cba2fe9d75c1c0e523b7fa497786d3f0430f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bc69cba2fe9d75c1c0e523b7f…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Jan 27 15:56:00 2012 +0100 mshtml: Added support for anchor targets. --- dlls/mshtml/htmlanchor.c | 39 +++++++++++++++++++++++++++++++++++++-- 1 files changed, 37 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/htmlanchor.c b/dlls/mshtml/htmlanchor.c index 1424f1e..9e9f369 100644 --- a/dlls/mshtml/htmlanchor.c +++ b/dlls/mshtml/htmlanchor.c @@ -29,6 +29,7 @@ #include "mshtml_private.h" #include "htmlevent.h" +#include "binding.h" #include "wine/debug.h" @@ -42,13 +43,42 @@ typedef struct { nsIDOMHTMLAnchorElement *nsanchor; } HTMLAnchorElement; +static HRESULT navigate_anchor_window(HTMLAnchorElement *This, const WCHAR *target) +{ + nsAString href_str; + IUri *uri; + nsresult nsres; + HRESULT hres; + + nsAString_Init(&href_str, NULL); + nsres = nsIDOMHTMLAnchorElement_GetHref(This->nsanchor, &href_str); + if(NS_SUCCEEDED(nsres)) { + const PRUnichar *href; + + nsAString_GetData(&href_str, &href); + hres = create_relative_uri(This->element.node.doc->basedoc.window, href, &uri); + }else { + ERR("Could not get anchor href: %08x\n", nsres); + hres = E_FAIL; + } + nsAString_Finish(&href_str); + if(FAILED(hres)) + return hres; + + hres = navigate_new_window(This->element.node.doc->basedoc.window, uri, target, NULL); + IUri_Release(uri); + return hres; +} + static HRESULT navigate_anchor(HTMLAnchorElement *This) { nsAString href_str, target_str; nsresult nsres; HRESULT hres = E_FAIL; + static const WCHAR _parentW[] = {'p','a','r','e','n','t',0}; static const WCHAR _selfW[] = {'_','s','e','l','f',0}; + static const WCHAR _topW[] = {'_','t','o','p',0}; nsAString_Init(&target_str, NULL); nsres = nsIDOMHTMLAnchorElement_GetTarget(This->nsanchor, &target_str); @@ -57,9 +87,14 @@ static HRESULT navigate_anchor(HTMLAnchorElement *This) nsAString_GetData(&target_str, &target); if(*target && strcmpiW(target, _selfW)) { - FIXME("Navigating to target %s is not implemented\n", debugstr_w(target)); + if(strcmpiW(target, _parentW) && strcmpiW(target, _topW)) { + hres = navigate_anchor_window(This, target); + }else { + FIXME("Navigating to target %s is not implemented\n", debugstr_w(target)); + hres = S_OK; + } nsAString_Finish(&target_str); - return S_OK; + return hres; } } nsAString_Finish(&target_str);
1
0
0
0
Jacek Caban : mshtml: Moved creating URIs relative to window to a new function.
by Alexandre Julliard
27 Jan '12
27 Jan '12
Module: wine Branch: master Commit: c5257dc126fbb63ae5afe27dd221e8bd08c7bbb5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c5257dc126fbb63ae5afe27dd…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Jan 27 15:55:46 2012 +0100 mshtml: Moved creating URIs relative to window to a new function. --- dlls/mshtml/binding.h | 1 + dlls/mshtml/htmlwindow.c | 5 +---- dlls/mshtml/persist.c | 7 +++++++ 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/dlls/mshtml/binding.h b/dlls/mshtml/binding.h index dfb14cf..697370a 100644 --- a/dlls/mshtml/binding.h +++ b/dlls/mshtml/binding.h @@ -114,3 +114,4 @@ HRESULT create_channelbsc(IMoniker*,const WCHAR*,BYTE*,DWORD,nsChannelBSC**) DEC HRESULT channelbsc_load_stream(nsChannelBSC*,IStream*) DECLSPEC_HIDDEN; void channelbsc_set_channel(nsChannelBSC*,nsChannel*,nsIStreamListener*,nsISupports*) DECLSPEC_HIDDEN; IUri *nsuri_get_uri(nsWineURI*) DECLSPEC_HIDDEN; +HRESULT create_relative_uri(HTMLWindow*,const WCHAR*,IUri**) DECLSPEC_HIDDEN; diff --git a/dlls/mshtml/htmlwindow.c b/dlls/mshtml/htmlwindow.c index 25fd1ce..67cf3fb 100644 --- a/dlls/mshtml/htmlwindow.c +++ b/dlls/mshtml/htmlwindow.c @@ -814,10 +814,7 @@ static HRESULT WINAPI HTMLWindow2_open(IHTMLWindow2 *iface, BSTR url, BSTR name, return S_OK; } - if(This->uri) - hres = CoInternetCombineUrlEx(This->uri, url, URL_ESCAPE_SPACES_ONLY|URL_DONT_ESCAPE_EXTRA_INFO, &uri, 0); - else - hres = CreateUri(url, 0, 0, &uri); + hres = create_relative_uri(This, url, &uri); if(FAILED(hres)) return hres; diff --git a/dlls/mshtml/persist.c b/dlls/mshtml/persist.c index 6cb7b72..f131062 100644 --- a/dlls/mshtml/persist.c +++ b/dlls/mshtml/persist.c @@ -175,6 +175,13 @@ void set_current_mon(HTMLWindow *This, IMoniker *mon) set_script_mode(This, use_gecko_script(This) ? SCRIPTMODE_GECKO : SCRIPTMODE_ACTIVESCRIPT); } +HRESULT create_relative_uri(HTMLWindow *window, const WCHAR *rel_uri, IUri **uri) +{ + return window->uri + ? CoInternetCombineUrlEx(window->uri, rel_uri, URL_ESCAPE_SPACES_ONLY|URL_DONT_ESCAPE_EXTRA_INFO, uri, 0) + : CreateUri(rel_uri, 0, 0, uri); +} + void set_download_state(HTMLDocumentObj *doc, int state) { if(doc->client) {
1
0
0
0
Jacek Caban : mshtml: Follow anchors only on left button click.
by Alexandre Julliard
27 Jan '12
27 Jan '12
Module: wine Branch: master Commit: 0b55645820cd1619965f0ffce4750a658a4dab90 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0b55645820cd1619965f0ffce…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Jan 27 15:55:33 2012 +0100 mshtml: Follow anchors only on left button click. --- dlls/mshtml/htmlanchor.c | 26 +++++++++++++++++++++++--- dlls/mshtml/htmlevent.c | 2 +- dlls/mshtml/mshtml_private.h | 2 +- 3 files changed, 25 insertions(+), 5 deletions(-) diff --git a/dlls/mshtml/htmlanchor.c b/dlls/mshtml/htmlanchor.c index 13bd2a4..1424f1e 100644 --- a/dlls/mshtml/htmlanchor.c +++ b/dlls/mshtml/htmlanchor.c @@ -18,6 +18,7 @@ #include <stdarg.h> #include <stdio.h> +#include <assert.h> #define COBJMACROS @@ -583,14 +584,33 @@ static void HTMLAnchorElement_destructor(HTMLDOMNode *iface) HTMLElement_destructor(&This->element.node); } -static HRESULT HTMLAnchorElement_handle_event(HTMLDOMNode *iface, eventid_t eid, BOOL *prevent_default) +static HRESULT HTMLAnchorElement_handle_event(HTMLDOMNode *iface, eventid_t eid, nsIDOMEvent *event, BOOL *prevent_default) { HTMLAnchorElement *This = impl_from_HTMLDOMNode(iface); if(eid == EVENTID_CLICK) { + nsIDOMMouseEvent *mouse_event; + PRUint16 button; + nsresult nsres; + TRACE("CLICK\n"); - *prevent_default = TRUE; - return navigate_anchor(This); + + nsres = nsIDOMEvent_QueryInterface(event, &IID_nsIDOMMouseEvent, (void**)&mouse_event); + assert(nsres == NS_OK); + + nsres = nsIDOMMouseEvent_GetButton(mouse_event, &button); + assert(nsres == NS_OK); + + nsIDOMMouseEvent_Release(mouse_event); + + switch(button) { + case 0: + *prevent_default = TRUE; + return navigate_anchor(This); + default: + *prevent_default = FALSE; + return S_OK; + } } return S_OK; diff --git a/dlls/mshtml/htmlevent.c b/dlls/mshtml/htmlevent.c index 74e8069..b2efeed 100644 --- a/dlls/mshtml/htmlevent.c +++ b/dlls/mshtml/htmlevent.c @@ -1065,7 +1065,7 @@ void fire_event(HTMLDocumentNode *doc, eventid_t eid, BOOL set_event, nsIDOMNode break; if(node && node->vtbl->handle_event) { - hres = node->vtbl->handle_event(node, eid, &prevent_default); + hres = node->vtbl->handle_event(node, eid, nsevent, &prevent_default); if(FAILED(hres) || prevent_default) break; } diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 7373e15..20923e9 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -518,7 +518,7 @@ typedef struct { HRESULT (*get_attr_col)(HTMLDOMNode*,HTMLAttributeCollection**); event_target_t **(*get_event_target)(HTMLDOMNode*); HRESULT (*fire_event)(HTMLDOMNode*,DWORD,BOOL*); - HRESULT (*handle_event)(HTMLDOMNode*,DWORD,BOOL*); + HRESULT (*handle_event)(HTMLDOMNode*,DWORD,nsIDOMEvent*,BOOL*); HRESULT (*put_disabled)(HTMLDOMNode*,VARIANT_BOOL); HRESULT (*get_disabled)(HTMLDOMNode*,VARIANT_BOOL*); HRESULT (*get_document)(HTMLDOMNode*,IDispatch**);
1
0
0
0
Michael Stefaniuc : shell32: Avoid an unsafe IExtractIconW to object cast.
by Alexandre Julliard
27 Jan '12
27 Jan '12
Module: wine Branch: master Commit: 83693d9611659eca62ae260ba6f6309e310594a5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=83693d9611659eca62ae260ba…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Fri Jan 27 14:42:22 2012 +0100 shell32: Avoid an unsafe IExtractIconW to object cast. --- dlls/shell32/folders.c | 69 +++++++++++++++++++++++------------------------- 1 files changed, 33 insertions(+), 36 deletions(-) diff --git a/dlls/shell32/folders.c b/dlls/shell32/folders.c index bab2b1c..b57fcf4 100644 --- a/dlls/shell32/folders.c +++ b/dlls/shell32/folders.c @@ -70,32 +70,7 @@ static inline IExtractIconWImpl *impl_from_IPersistFile(IPersistFile *iface) return CONTAINING_RECORD(iface, IExtractIconWImpl, IPersistFile_iface); } -static const IExtractIconAVtbl eiavt; -static const IExtractIconWVtbl eivt; -static const IPersistFileVtbl pfvt; - -/************************************************************************** -* IExtractIconW_Constructor -*/ -IExtractIconW* IExtractIconW_Constructor(LPCITEMIDLIST pidl) -{ - IExtractIconWImpl* ei; - - TRACE("%p\n", pidl); - - ei = HeapAlloc(GetProcessHeap(),0,sizeof(IExtractIconWImpl)); - ei->ref=1; - ei->IExtractIconW_iface.lpVtbl = &eivt; - ei->IExtractIconA_iface.lpVtbl = &eiavt; - ei->IPersistFile_iface.lpVtbl = &pfvt; - ei->pidl=ILClone(pidl); - - pdump(pidl); - - TRACE("(%p)\n", ei); - return &ei->IExtractIconW_iface; -} /************************************************************************** * IExtractIconW::QueryInterface */ @@ -404,17 +379,6 @@ static const IExtractIconWVtbl eivt = }; /************************************************************************** -* IExtractIconA_Constructor -*/ -IExtractIconA* IExtractIconA_Constructor(LPCITEMIDLIST pidl) -{ - IExtractIconWImpl *This = (IExtractIconWImpl *)IExtractIconW_Constructor(pidl); - IExtractIconA *eia = &This->IExtractIconA_iface; - - TRACE("(%p)->(%p)\n", This, eia); - return eia; -} -/************************************************************************** * IExtractIconA::QueryInterface */ static HRESULT WINAPI IExtractIconA_fnQueryInterface(IExtractIconA * iface, REFIID riid, @@ -564,3 +528,36 @@ static const IPersistFileVtbl pfvt = (void *) 0xdeadbeef /* IEIPersistFile_fnSaveCompleted */, (void *) 0xdeadbeef /* IEIPersistFile_fnGetCurFile */ }; + +IExtractIconWImpl *extracticon_create(LPCITEMIDLIST pidl) +{ + IExtractIconWImpl *ei; + + TRACE("%p\n", pidl); + + ei = HeapAlloc(GetProcessHeap(), 0, sizeof(*ei)); + ei->ref=1; + ei->IExtractIconW_iface.lpVtbl = &eivt; + ei->IExtractIconA_iface.lpVtbl = &eiavt; + ei->IPersistFile_iface.lpVtbl = &pfvt; + ei->pidl=ILClone(pidl); + + pdump(pidl); + + TRACE("(%p)\n", ei); + return ei; +} + +IExtractIconW *IExtractIconW_Constructor(LPCITEMIDLIST pidl) +{ + IExtractIconWImpl *ei = extracticon_create(pidl); + + return &ei->IExtractIconW_iface; +} + +IExtractIconA *IExtractIconA_Constructor(LPCITEMIDLIST pidl) +{ + IExtractIconWImpl *ei = extracticon_create(pidl); + + return &ei->IExtractIconA_iface; +}
1
0
0
0
Michael Stefaniuc : shell32: COM cleanup for IPersistFile.
by Alexandre Julliard
27 Jan '12
27 Jan '12
Module: wine Branch: master Commit: b12a950c84ee304bdf06b540daa9a143ecb1247b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b12a950c84ee304bdf06b540d…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Fri Jan 27 14:36:58 2012 +0100 shell32: COM cleanup for IPersistFile. --- dlls/shell32/folders.c | 63 ++++++++++++++++++++++-------------------------- 1 files changed, 29 insertions(+), 34 deletions(-) diff --git a/dlls/shell32/folders.c b/dlls/shell32/folders.c index 01fc1a4..bab2b1c 100644 --- a/dlls/shell32/folders.c +++ b/dlls/shell32/folders.c @@ -50,8 +50,8 @@ typedef struct { IExtractIconW IExtractIconW_iface; IExtractIconA IExtractIconA_iface; + IPersistFile IPersistFile_iface; LONG ref; - const IPersistFileVtbl *lpvtblPersistFile; LPITEMIDLIST pidl; } IExtractIconWImpl; @@ -65,15 +65,15 @@ static inline IExtractIconWImpl *impl_from_IExtractIconA(IExtractIconA *iface) return CONTAINING_RECORD(iface, IExtractIconWImpl, IExtractIconA_iface); } +static inline IExtractIconWImpl *impl_from_IPersistFile(IPersistFile *iface) +{ + return CONTAINING_RECORD(iface, IExtractIconWImpl, IPersistFile_iface); +} + static const IExtractIconAVtbl eiavt; static const IExtractIconWVtbl eivt; static const IPersistFileVtbl pfvt; -static inline IExtractIconW *impl_from_IPersistFile( IPersistFile *iface ) -{ - return (IExtractIconW *)((char*)iface - FIELD_OFFSET(IExtractIconWImpl, lpvtblPersistFile)); -} - /************************************************************************** * IExtractIconW_Constructor @@ -87,8 +87,8 @@ IExtractIconW* IExtractIconW_Constructor(LPCITEMIDLIST pidl) ei = HeapAlloc(GetProcessHeap(),0,sizeof(IExtractIconWImpl)); ei->ref=1; ei->IExtractIconW_iface.lpVtbl = &eivt; - ei->lpvtblPersistFile = &pfvt; ei->IExtractIconA_iface.lpVtbl = &eiavt; + ei->IPersistFile_iface.lpVtbl = &pfvt; ei->pidl=ILClone(pidl); pdump(pidl); @@ -110,7 +110,7 @@ static HRESULT WINAPI IExtractIconW_fnQueryInterface(IExtractIconW *iface, REFII if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IExtractIconW)) *ppv = iface; else if (IsEqualIID(riid, &IID_IPersistFile)) - *ppv = &This->lpvtblPersistFile; + *ppv = &This->IPersistFile_iface; else if (IsEqualIID(riid, &IID_IExtractIconA)) *ppv = &This->IExtractIconA_iface; @@ -495,46 +495,40 @@ static const IExtractIconAVtbl eiavt = }; /************************************************************************ - * IEIPersistFile_QueryInterface (IUnknown) + * IEIPersistFile::QueryInterface */ -static HRESULT WINAPI IEIPersistFile_fnQueryInterface( - IPersistFile *iface, - REFIID iid, - LPVOID *ppvObj) +static HRESULT WINAPI IEIPersistFile_fnQueryInterface(IPersistFile *iface, REFIID iid, + void **ppv) { - IExtractIconW *This = impl_from_IPersistFile(iface); + IExtractIconWImpl *This = impl_from_IPersistFile(iface); - return IExtractIconW_QueryInterface(This, iid, ppvObj); + return IExtractIconW_QueryInterface(&This->IExtractIconW_iface, iid, ppv); } /************************************************************************ - * IEIPersistFile_AddRef (IUnknown) + * IEIPersistFile::AddRef */ -static ULONG WINAPI IEIPersistFile_fnAddRef( - IPersistFile *iface) +static ULONG WINAPI IEIPersistFile_fnAddRef(IPersistFile *iface) { - IExtractIconW *This = impl_from_IPersistFile(iface); + IExtractIconWImpl *This = impl_from_IPersistFile(iface); - return IExtractIconW_AddRef(This); + return IExtractIconW_AddRef(&This->IExtractIconW_iface); } /************************************************************************ - * IEIPersistFile_Release (IUnknown) + * IEIPersistFile::Release */ -static ULONG WINAPI IEIPersistFile_fnRelease( - IPersistFile *iface) +static ULONG WINAPI IEIPersistFile_fnRelease(IPersistFile *iface) { - IExtractIconW *This = impl_from_IPersistFile(iface); + IExtractIconWImpl *This = impl_from_IPersistFile(iface); - return IExtractIconW_Release(This); + return IExtractIconW_Release(&This->IExtractIconW_iface); } /************************************************************************ - * IEIPersistFile_GetClassID (IPersist) + * IEIPersistFile::GetClassID */ -static HRESULT WINAPI IEIPersistFile_fnGetClassID( - IPersistFile *iface, - LPCLSID lpClassId) +static HRESULT WINAPI IEIPersistFile_fnGetClassID(IPersistFile *iface, LPCLSID lpClassId) { CLSID StdFolderID = { 0x00000000, 0x0000, 0x0000, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} }; @@ -547,14 +541,15 @@ static HRESULT WINAPI IEIPersistFile_fnGetClassID( } /************************************************************************ - * IEIPersistFile_Load (IPersistFile) + * IEIPersistFile_Load */ -static HRESULT WINAPI IEIPersistFile_fnLoad(IPersistFile* iface, LPCOLESTR pszFileName, DWORD dwMode) +static HRESULT WINAPI IEIPersistFile_fnLoad(IPersistFile* iface, LPCOLESTR pszFileName, + DWORD dwMode) { - IExtractIconW *This = impl_from_IPersistFile(iface); - FIXME("%p\n", This); - return E_NOTIMPL; + IExtractIconWImpl *This = impl_from_IPersistFile(iface); + FIXME("%p\n", This); + return E_NOTIMPL; } static const IPersistFileVtbl pfvt =
1
0
0
0
← Newer
1
...
4
5
6
7
8
9
10
...
98
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
Results per page:
10
25
50
100
200