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
June 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
3 participants
827 discussions
Start a n
N
ew thread
Piotr Caban : msvcp90: Added num_get<wchar>::_Getifld implementation.
by Alexandre Julliard
25 Jun '12
25 Jun '12
Module: wine Branch: master Commit: 0dd32496b40a6ca467b8f7c733c61acb9177fab2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0dd32496b40a6ca467b8f7c73…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Mon Jun 25 15:49:15 2012 +0200 msvcp90: Added num_get<wchar>::_Getifld implementation. --- dlls/msvcp90/locale.c | 136 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 130 insertions(+), 6 deletions(-) diff --git a/dlls/msvcp90/locale.c b/dlls/msvcp90/locale.c index 6b72c65..e9b931a 100644 --- a/dlls/msvcp90/locale.c +++ b/dlls/msvcp90/locale.c @@ -4439,22 +4439,146 @@ int __cdecl num_get_wchar__Getffldx(num_get *this, char *dest, istreambuf_iterat return -1; } +static int num_get__Getifld(const num_get *this, char *dest, istreambuf_iterator_wchar *first, + istreambuf_iterator_wchar *last, int fmtflags, const locale *loc, numpunct_wchar *numpunct) +{ + wchar_t digits[23], *digits_pos, sep; + basic_string_char grouping_bstr; + int i, basefield, base, groups_no = 0, cur_group = 0; + char *dest_beg = dest, *dest_end = dest+24, *groups = NULL; + const char *grouping; + BOOL error = TRUE, dest_empty = TRUE; + + TRACE("(%p %p %p %04x %p)\n", dest, first, last, fmtflags, loc); + + for(i=0; i<10; i++) + digits[i] = mb_to_wc('0'+i, &this->cvt); + for(i=0; i<6; i++) { + digits[10+i] = mb_to_wc('a'+i, &this->cvt); + digits[16+i] = mb_to_wc('A'+i, &this->cvt); + } + + numpunct_wchar_grouping(numpunct, &grouping_bstr); + grouping = MSVCP_basic_string_char_c_str(&grouping_bstr); + sep = grouping[0] ? numpunct_wchar_thousands_sep(numpunct) : '\0'; + + basefield = fmtflags & FMTFLAG_basefield; + if(basefield == FMTFLAG_oct) + base = 8; + else if(basefield == FMTFLAG_hex) + base = 22; /* equal to the size of digits buffer */ + else if(!basefield) + base = 0; + else + base = 10; + + istreambuf_iterator_wchar_val(first); + if(first->strbuf && first->val==mb_to_wc('-', &this->cvt)) { + *dest++ = '-'; + istreambuf_iterator_wchar_inc(first); + }else if(first->strbuf && first->val==mb_to_wc('+', &this->cvt)) { + *dest++ = '+'; + istreambuf_iterator_wchar_inc(first); + } + + if(!base && first->strbuf && first->val==digits[0]) { + istreambuf_iterator_wchar_inc(first); + if(first->strbuf && (first->val==mb_to_wc('x', &this->cvt) || first->val==mb_to_wc('x', &this->cvt))) { + istreambuf_iterator_wchar_inc(first); + base = 22; + }else { + error = FALSE; + base = 8; + } + }else { + base = 10; + } + digits[base] = 0; + + if(sep) { + groups_no = strlen(grouping)+2; + groups = calloc(groups_no, sizeof(char)); + } + + for(; first->strbuf; istreambuf_iterator_wchar_inc(first)) { + if(!(digits_pos = wcschr(digits, first->val))) { + if(sep && first->val==sep) { + if(cur_group == groups_no+1) { + if(groups[1] != groups[2]) { + error = TRUE; + break; + }else { + memmove(groups+1, groups+2, groups_no); + groups[cur_group] = 0; + } + }else { + cur_group++; + } + }else { + break; + } + }else { + error = FALSE; + if(dest_empty && first->val == digits[0]) + continue; + dest_empty = FALSE; + /* skip digits that can't be copied to dest buffer, other + * functions are responsible for detecting overflows */ + if(dest < dest_end) + *dest++ = (digits_pos-digits<10 ? '0'+digits_pos-digits : + (digits_pos-digits<16 ? 'a'+digits_pos-digits-10 : + 'A'+digits_pos-digits-16)); + if(sep && groups[cur_group]<CHAR_MAX) + groups[cur_group]++; + } + } + + if(cur_group && !groups[cur_group]) + error = TRUE; + else if(!cur_group) + cur_group--; + + for(; cur_group>=0 && !error; cur_group--) { + if(*grouping == CHAR_MAX) { + if(cur_group) + error = TRUE; + break; + }else if((cur_group && *grouping!=groups[cur_group]) + || (!cur_group && *grouping<groups[cur_group])) { + error = TRUE; + break; + }else if(grouping[1]) { + grouping++; + } + } + MSVCP_basic_string_char_dtor(&grouping_bstr); + free(groups); + + if(error) + dest = dest_beg; + else if(dest_empty) + *dest++ = '0'; + *dest = '\0'; + + return (base==22 ? 16 : base); +} + /* ?_Getifld@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@ABAHPADAAV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@1HABVlocale@2@@Z */ /* ?_Getifld@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEBAHPEADAEAV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@1HAEBVlocale@2@@Z */ -int __cdecl num_get_wchar__Getifld(num_get *this, char *dest, istreambuf_iterator_wchar *first, +int __cdecl num_get_wchar__Getifld(const num_get *this, char *dest, istreambuf_iterator_wchar *first, istreambuf_iterator_wchar *last, int fmtflags, const locale *loc) { - FIXME("(%p %p %p %04x %p) stub\n", dest, first, last, fmtflags, loc); - return -1; + return num_get__Getifld(this, dest, first, last, + fmtflags, loc, numpunct_wchar_use_facet(loc)); } /* ?_Getifld@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@ABAHPADAAV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@1HABVlocale@2@@Z */ /* ?_Getifld@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@AEBAHPEADAEAV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@1HAEBVlocale@2@@Z */ -int __cdecl num_get_short__Getifld(num_get *this, char *dest, istreambuf_iterator_wchar *first, +int __cdecl num_get_short__Getifld(const num_get *this, char *dest, istreambuf_iterator_wchar *first, istreambuf_iterator_wchar *last, int fmtflags, const locale *loc) { - FIXME("(%p %p %p %04x %p) stub\n", dest, first, last, fmtflags, loc); - return -1; + return num_get__Getifld(this, dest, first, last, + fmtflags, loc, numpunct_short_use_facet(loc)); } /* ?_Hexdig@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@ABEH_W000@Z */
1
0
0
0
Piotr Caban : msvcp90: Added num_get<wchar>::_Getffld implementation.
by Alexandre Julliard
25 Jun '12
25 Jun '12
Module: wine Branch: master Commit: 9afd07be92aaaff1ebdeecdf000e233978eaecc1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9afd07be92aaaff1ebdeecdf0…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Mon Jun 25 15:48:59 2012 +0200 msvcp90: Added num_get<wchar>::_Getffld implementation. --- dlls/msvcp90/locale.c | 224 +++++++++++++++++++++++++++++++++++++++++++++--- dlls/msvcp90/msvcp90.h | 8 ++ 2 files changed, 219 insertions(+), 13 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=9afd07be92aaaff1ebdee…
1
0
0
0
Piotr Caban : msvcp90: Added partial num_get<wchar> and num_get<short> implementation.
by Alexandre Julliard
25 Jun '12
25 Jun '12
Module: wine Branch: master Commit: 4732e3f75c11255e8ecef51267519874056b9970 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4732e3f75c11255e8ecef5126…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Mon Jun 25 15:48:39 2012 +0200 msvcp90: Added partial num_get<wchar> and num_get<short> implementation. --- dlls/msvcp90/locale.c | 288 +++++++++++++++++++++++++++++++++++---------- dlls/msvcp90/msvcp90.spec | 52 ++++---- 2 files changed, 250 insertions(+), 90 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=4732e3f75c11255e8ecef…
1
0
0
0
Piotr Caban : msvcp90: Added num_put<wchar> implementation.
by Alexandre Julliard
25 Jun '12
25 Jun '12
Module: wine Branch: master Commit: 55b9bbc491dc618b93ea24dde7b354bdd7a797cf URL:
http://source.winehq.org/git/wine.git/?a=commit;h=55b9bbc491dc618b93ea24dde…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Mon Jun 25 15:48:18 2012 +0200 msvcp90: Added num_put<wchar> implementation. --- dlls/msvcp90/locale.c | 673 +++++++++++++++++++++++++++++++++++++++++++++ dlls/msvcp90/msvcp90.h | 13 +- dlls/msvcp90/msvcp90.spec | 124 ++++---- dlls/msvcp90/string.c | 2 +- 4 files changed, 748 insertions(+), 64 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=55b9bbc491dc618b93ea2…
1
0
0
0
Jacek Caban : mshtml: Store event object in HTMLInnerWindow instead of HTMLOuterWindow.
by Alexandre Julliard
25 Jun '12
25 Jun '12
Module: wine Branch: master Commit: c73b135686d145c760c9c66622489ca4dbd81c4c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c73b135686d145c760c9c6662…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Jun 25 14:06:27 2012 +0200 mshtml: Store event object in HTMLInnerWindow instead of HTMLOuterWindow. --- dlls/mshtml/htmlevent.c | 10 ++++++---- dlls/mshtml/htmlwindow.c | 2 +- dlls/mshtml/mshtml_private.h | 4 ++-- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/dlls/mshtml/htmlevent.c b/dlls/mshtml/htmlevent.c index 4b201c4..ca966ba 100644 --- a/dlls/mshtml/htmlevent.c +++ b/dlls/mshtml/htmlevent.c @@ -989,6 +989,7 @@ void fire_event(HTMLDocumentNode *doc, eventid_t eid, BOOL set_event, nsIDOMNode IHTMLEventObj *prev_event; nsIDOMNode *parent, *nsnode; BOOL prevent_default = FALSE; + HTMLInnerWindow *window; HTMLDOMNode *node; PRUint16 node_type; nsresult nsres; @@ -996,7 +997,8 @@ void fire_event(HTMLDocumentNode *doc, eventid_t eid, BOOL set_event, nsIDOMNode TRACE("(%p) %s\n", doc, debugstr_w(event_info[eid].name)); - prev_event = doc->basedoc.window->event; + window = doc->basedoc.window->base.inner_window; + prev_event = window->event; if(set_event) { hres = get_node(doc, target, TRUE, &node); if(FAILED(hres)) @@ -1004,9 +1006,9 @@ void fire_event(HTMLDocumentNode *doc, eventid_t eid, BOOL set_event, nsIDOMNode event_obj = create_event(node, eid, nsevent); node_release(node); - doc->basedoc.window->event = &event_obj->IHTMLEventObj_iface; + window->event = &event_obj->IHTMLEventObj_iface; }else { - doc->basedoc.window->event = NULL; + window->event = NULL; } nsIDOMNode_GetNodeType(target, &node_type); @@ -1070,7 +1072,7 @@ void fire_event(HTMLDocumentNode *doc, eventid_t eid, BOOL set_event, nsIDOMNode if(event_obj && event_obj->prevent_default) prevent_default = TRUE; - doc->basedoc.window->event = prev_event; + window->event = prev_event; if(event_obj) IHTMLEventObj_Release(&event_obj->IHTMLEventObj_iface); diff --git a/dlls/mshtml/htmlwindow.c b/dlls/mshtml/htmlwindow.c index c20d765..dc6d9af 100644 --- a/dlls/mshtml/htmlwindow.c +++ b/dlls/mshtml/htmlwindow.c @@ -1027,7 +1027,7 @@ static HRESULT WINAPI HTMLWindow2_get_document(IHTMLWindow2 *iface, IHTMLDocumen static HRESULT WINAPI HTMLWindow2_get_event(IHTMLWindow2 *iface, IHTMLEventObj **p) { HTMLWindow *This = impl_from_IHTMLWindow2(iface); - HTMLOuterWindow *window = This->outer_window; + HTMLInnerWindow *window = This->inner_window; TRACE("(%p)->(%p)\n", This, p); diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index de0a237..31532cd 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -331,8 +331,6 @@ struct HTMLOuterWindow { IUri *uri; BSTR url; - IHTMLEventObj *event; - SCRIPTMODE scriptmode; IInternetSecurityManager *secmgr; @@ -355,6 +353,8 @@ struct HTMLInnerWindow { struct list script_hosts; + IHTMLEventObj *event; + HTMLOptionElementFactory *option_factory; global_prop_t *global_props;
1
0
0
0
Jacek Caban : mshtml: Moved script_hosts from HTMLOuterWindow to HTMLInnerWindow.
by Alexandre Julliard
25 Jun '12
25 Jun '12
Module: wine Branch: master Commit: bb02767f15ec3ecc51f467ef16d90aac3c2519d7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bb02767f15ec3ecc51f467ef1…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Jun 25 14:06:09 2012 +0200 mshtml: Moved script_hosts from HTMLOuterWindow to HTMLInnerWindow. --- dlls/mshtml/htmlevent.c | 2 +- dlls/mshtml/htmlwindow.c | 15 ++++++++------- dlls/mshtml/mshtml_private.h | 15 ++++++++------- dlls/mshtml/mutation.c | 2 +- dlls/mshtml/navigate.c | 2 +- dlls/mshtml/nsevents.c | 2 +- dlls/mshtml/script.c | 28 +++++++++++++++------------- 7 files changed, 35 insertions(+), 31 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=bb02767f15ec3ecc51f46…
1
0
0
0
Jacek Caban : mshtml: Moved option_factory from HTMLOuterWindow to HTMLInnerWindow.
by Alexandre Julliard
25 Jun '12
25 Jun '12
Module: wine Branch: master Commit: c77b8bfdd9a25e4b36f4b1f7738b7e9e41cd4d4c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c77b8bfdd9a25e4b36f4b1f77…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Jun 25 14:05:58 2012 +0200 mshtml: Moved option_factory from HTMLOuterWindow to HTMLInnerWindow. --- dlls/mshtml/htmloption.c | 9 ++++++--- dlls/mshtml/htmlwindow.c | 21 +++++++++++++-------- dlls/mshtml/mshtml_private.h | 7 ++++--- 3 files changed, 23 insertions(+), 14 deletions(-) diff --git a/dlls/mshtml/htmloption.c b/dlls/mshtml/htmloption.c index ad3e8fb..8bc0f40 100644 --- a/dlls/mshtml/htmloption.c +++ b/dlls/mshtml/htmloption.c @@ -517,15 +517,18 @@ static const IHTMLOptionElementFactoryVtbl HTMLOptionElementFactoryVtbl = { HTMLOptionElementFactory_create }; -HTMLOptionElementFactory *HTMLOptionElementFactory_Create(HTMLOuterWindow *window) +HRESULT HTMLOptionElementFactory_Create(HTMLInnerWindow *window, HTMLOptionElementFactory **ret_ptr) { HTMLOptionElementFactory *ret; - ret = heap_alloc(sizeof(HTMLOptionElementFactory)); + ret = heap_alloc(sizeof(*ret)); + if(!ret) + return E_OUTOFMEMORY; ret->IHTMLOptionElementFactory_iface.lpVtbl = &HTMLOptionElementFactoryVtbl; ret->ref = 1; ret->window = window; - return ret; + *ret_ptr = ret; + return S_OK; } diff --git a/dlls/mshtml/htmlwindow.c b/dlls/mshtml/htmlwindow.c index 94731ec..f6d6212 100644 --- a/dlls/mshtml/htmlwindow.c +++ b/dlls/mshtml/htmlwindow.c @@ -192,11 +192,6 @@ static void release_outer_window(HTMLOuterWindow *This) if(This->frame_element) This->frame_element->content_window = NULL; - if(This->option_factory) { - This->option_factory->window = NULL; - IHTMLOptionElementFactory_Release(&This->option_factory->IHTMLOptionElementFactory_iface); - } - if(This->image_factory) { This->image_factory->window = NULL; IHTMLImageElementFactory_Release(&This->image_factory->IHTMLImageElementFactory_iface); @@ -233,6 +228,11 @@ static void release_inner_window(HTMLInnerWindow *This) heap_free(This->global_props[i].name); heap_free(This->global_props); + if(This->option_factory) { + This->option_factory->window = NULL; + IHTMLOptionElementFactory_Release(&This->option_factory->IHTMLOptionElementFactory_iface); + } + heap_free(This); } @@ -1083,12 +1083,17 @@ static HRESULT WINAPI HTMLWindow2_get_screen(IHTMLWindow2 *iface, IHTMLScreen ** static HRESULT WINAPI HTMLWindow2_get_Option(IHTMLWindow2 *iface, IHTMLOptionElementFactory **p) { HTMLWindow *This = impl_from_IHTMLWindow2(iface); - HTMLOuterWindow *window = This->outer_window; + HTMLInnerWindow *window = This->inner_window; TRACE("(%p)->(%p)\n", This, p); - if(!window->option_factory) - window->option_factory = HTMLOptionElementFactory_Create(window); + if(!window->option_factory) { + HRESULT hres; + + hres = HTMLOptionElementFactory_Create(window, &window->option_factory); + if(FAILED(hres)) + return hres; + } *p = &window->option_factory->IHTMLOptionElementFactory_iface; IHTMLOptionElementFactory_AddRef(*p); diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 004a4b4..35800d8 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -269,7 +269,7 @@ typedef struct { LONG ref; - HTMLOuterWindow *window; + HTMLInnerWindow *window; } HTMLOptionElementFactory; typedef struct { @@ -338,7 +338,6 @@ struct HTMLOuterWindow { IInternetSecurityManager *secmgr; - HTMLOptionElementFactory *option_factory; HTMLImageElementFactory *image_factory; HTMLLocation *location; IHTMLScreen *screen; @@ -355,6 +354,8 @@ struct HTMLInnerWindow { HTMLDocumentNode *doc; + HTMLOptionElementFactory *option_factory; + global_prop_t *global_props; DWORD global_prop_cnt; DWORD global_prop_size; @@ -660,7 +661,7 @@ HRESULT HTMLOuterWindow_Create(HTMLDocumentObj*,nsIDOMWindow*,HTMLOuterWindow*,H HRESULT update_window_doc(HTMLOuterWindow*) DECLSPEC_HIDDEN; HTMLOuterWindow *nswindow_to_window(const nsIDOMWindow*) DECLSPEC_HIDDEN; void get_top_window(HTMLOuterWindow*,HTMLOuterWindow**) DECLSPEC_HIDDEN; -HTMLOptionElementFactory *HTMLOptionElementFactory_Create(HTMLOuterWindow*) DECLSPEC_HIDDEN; +HRESULT HTMLOptionElementFactory_Create(HTMLInnerWindow*,HTMLOptionElementFactory**) DECLSPEC_HIDDEN; HTMLImageElementFactory *HTMLImageElementFactory_Create(HTMLOuterWindow*) DECLSPEC_HIDDEN; HRESULT HTMLLocation_Create(HTMLOuterWindow*,HTMLLocation**) DECLSPEC_HIDDEN; IOmNavigator *OmNavigator_Create(void) DECLSPEC_HIDDEN;
1
0
0
0
Jacek Caban : mshtml: Moved global_props from HTMLOuterWindow to HTMLInnerWindow.
by Alexandre Julliard
25 Jun '12
25 Jun '12
Module: wine Branch: master Commit: 2698fe0b3fce9dcc18455e753cb44d285bfb6cc9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2698fe0b3fce9dcc18455e753…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Jun 25 14:05:48 2012 +0200 mshtml: Moved global_props from HTMLOuterWindow to HTMLInnerWindow. --- dlls/mshtml/htmlframe.c | 2 +- dlls/mshtml/htmliframe.c | 2 +- dlls/mshtml/htmlwindow.c | 27 ++++++++++++++------------- dlls/mshtml/mshtml_private.h | 10 +++++----- 4 files changed, 21 insertions(+), 20 deletions(-) diff --git a/dlls/mshtml/htmlframe.c b/dlls/mshtml/htmlframe.c index 13f6bd4..749df4b 100644 --- a/dlls/mshtml/htmlframe.c +++ b/dlls/mshtml/htmlframe.c @@ -231,7 +231,7 @@ static HRESULT HTMLFrameElement_get_dispid(HTMLDOMNode *iface, BSTR name, if(!This->framebase.content_window) return DISP_E_UNKNOWNNAME; - return search_window_props(This->framebase.content_window, name, grfdex, pid); + return search_window_props(This->framebase.content_window->base.inner_window, name, grfdex, pid); } static HRESULT HTMLFrameElement_invoke(HTMLDOMNode *iface, DISPID id, LCID lcid, diff --git a/dlls/mshtml/htmliframe.c b/dlls/mshtml/htmliframe.c index 03ebb47..3cae237 100644 --- a/dlls/mshtml/htmliframe.c +++ b/dlls/mshtml/htmliframe.c @@ -202,7 +202,7 @@ static HRESULT HTMLIFrame_get_dispid(HTMLDOMNode *iface, BSTR name, if(!This->framebase.content_window) return DISP_E_UNKNOWNNAME; - return search_window_props(This->framebase.content_window, name, grfdex, pid); + return search_window_props(This->framebase.content_window->base.inner_window, name, grfdex, pid); } static HRESULT HTMLIFrame_invoke(HTMLDOMNode *iface, DISPID id, LCID lcid, diff --git a/dlls/mshtml/htmlwindow.c b/dlls/mshtml/htmlwindow.c index 4a696b7..94731ec 100644 --- a/dlls/mshtml/htmlwindow.c +++ b/dlls/mshtml/htmlwindow.c @@ -180,8 +180,6 @@ static ULONG WINAPI HTMLWindow2_AddRef(IHTMLWindow2 *iface) static void release_outer_window(HTMLOuterWindow *This) { - unsigned i; - remove_target_tasks(This->task_magic); set_window_bscallback(This, NULL); set_current_mon(This, NULL); @@ -212,13 +210,9 @@ static void release_outer_window(HTMLOuterWindow *This) if(This->screen) IHTMLScreen_Release(This->screen); - for(i=0; i < This->global_prop_cnt; i++) - heap_free(This->global_props[i].name); - This->window_ref->window = NULL; windowref_release(This->window_ref); - heap_free(This->global_props); release_script_hosts(This); if(This->nswindow) @@ -230,8 +224,15 @@ static void release_outer_window(HTMLOuterWindow *This) static void release_inner_window(HTMLInnerWindow *This) { + unsigned i; + htmldoc_release(&This->doc->basedoc); release_dispex(&This->dispex); + + for(i=0; i < This->global_prop_cnt; i++) + heap_free(This->global_props[i].name); + heap_free(This->global_props); + heap_free(This); } @@ -2186,7 +2187,7 @@ static HRESULT WINAPI WindowDispEx_Invoke(IDispatchEx *iface, DISPID dispIdMembe pDispParams, pVarResult, pExcepInfo, puArgErr); } -static global_prop_t *alloc_global_prop(HTMLOuterWindow *This, global_prop_type_t type, BSTR name) +static global_prop_t *alloc_global_prop(HTMLInnerWindow *This, global_prop_type_t type, BSTR name) { if(This->global_prop_cnt == This->global_prop_size) { global_prop_t *new_props; @@ -2213,12 +2214,12 @@ static global_prop_t *alloc_global_prop(HTMLOuterWindow *This, global_prop_type_ return This->global_props + This->global_prop_cnt++; } -static inline DWORD prop_to_dispid(HTMLOuterWindow *This, global_prop_t *prop) +static inline DWORD prop_to_dispid(HTMLInnerWindow *This, global_prop_t *prop) { return MSHTML_DISPID_CUSTOM_MIN + (prop-This->global_props); } -HRESULT search_window_props(HTMLOuterWindow *This, BSTR bstrName, DWORD grfdex, DISPID *pid) +HRESULT search_window_props(HTMLInnerWindow *This, BSTR bstrName, DWORD grfdex, DISPID *pid) { DWORD i; ScriptHost *script_host; @@ -2232,7 +2233,7 @@ HRESULT search_window_props(HTMLOuterWindow *This, BSTR bstrName, DWORD grfdex, } } - if(find_global_prop(This, bstrName, grfdex, &script_host, &id)) { + if(find_global_prop(This->base.outer_window, bstrName, grfdex, &script_host, &id)) { global_prop_t *prop; prop = alloc_global_prop(This, GLOBAL_SCRIPTVAR, bstrName); @@ -2252,7 +2253,7 @@ HRESULT search_window_props(HTMLOuterWindow *This, BSTR bstrName, DWORD grfdex, static HRESULT WINAPI WindowDispEx_GetDispID(IDispatchEx *iface, BSTR bstrName, DWORD grfdex, DISPID *pid) { HTMLWindow *This = impl_from_IDispatchEx(iface); - HTMLOuterWindow *window = This->outer_window; + HTMLInnerWindow *window = This->inner_window; HRESULT hres; TRACE("(%p)->(%s %x %p)\n", This, debugstr_w(bstrName), grfdex, pid); @@ -2450,10 +2451,10 @@ static HRESULT HTMLWindow_invoke(DispatchEx *dispex, DISPID id, LCID lcid, WORD HRESULT hres; idx = id - MSHTML_DISPID_CUSTOM_MIN; - if(idx >= This->base.outer_window->global_prop_cnt) + if(idx >= This->global_prop_cnt) return DISP_E_MEMBERNOTFOUND; - prop = This->base.outer_window->global_props+idx; + prop = This->global_props+idx; switch(prop->type) { case GLOBAL_SCRIPTVAR: { diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 010542e..004a4b4 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -344,10 +344,6 @@ struct HTMLOuterWindow { IHTMLScreen *screen; IOmHistory *history; - global_prop_t *global_props; - DWORD global_prop_cnt; - DWORD global_prop_size; - struct list children; struct list sibling_entry; struct list entry; @@ -358,6 +354,10 @@ struct HTMLInnerWindow { DispatchEx dispex; HTMLDocumentNode *doc; + + global_prop_t *global_props; + DWORD global_prop_cnt; + DWORD global_prop_size; }; typedef enum { @@ -850,7 +850,7 @@ HRESULT exec_script(HTMLOuterWindow*,const WCHAR*,const WCHAR*,VARIANT*) DECLSPE void set_script_mode(HTMLOuterWindow*,SCRIPTMODE) DECLSPEC_HIDDEN; BOOL find_global_prop(HTMLOuterWindow*,BSTR,DWORD,ScriptHost**,DISPID*) DECLSPEC_HIDDEN; IDispatch *get_script_disp(ScriptHost*) DECLSPEC_HIDDEN; -HRESULT search_window_props(HTMLOuterWindow*,BSTR,DWORD,DISPID*) DECLSPEC_HIDDEN; +HRESULT search_window_props(HTMLInnerWindow*,BSTR,DWORD,DISPID*) DECLSPEC_HIDDEN; HRESULT wrap_iface(IUnknown*,IUnknown*,IUnknown**) DECLSPEC_HIDDEN;
1
0
0
0
Jacek Caban : mshtml: Moved DispatchEx instance from HTMLOuterWindow to HTMLInnerWindow.
by Alexandre Julliard
25 Jun '12
25 Jun '12
Module: wine Branch: master Commit: c13bb135ca9e780de6f530c73bf2cd52212eb3ed URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c13bb135ca9e780de6f530c73…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Jun 25 14:05:33 2012 +0200 mshtml: Moved DispatchEx instance from HTMLOuterWindow to HTMLInnerWindow. --- dlls/mshtml/htmlwindow.c | 38 +++++++++++++++++++------------------- dlls/mshtml/mshtml_private.h | 2 +- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/dlls/mshtml/htmlwindow.c b/dlls/mshtml/htmlwindow.c index bb389d1..4a696b7 100644 --- a/dlls/mshtml/htmlwindow.c +++ b/dlls/mshtml/htmlwindow.c @@ -154,7 +154,7 @@ static HRESULT WINAPI HTMLWindow2_QueryInterface(IHTMLWindow2 *iface, REFIID rii }else if(IsEqualGUID(&IID_ITravelLogClient, riid)) { TRACE("(%p)->(IID_ITravelLogClient %p)\n", This, ppv); *ppv = &This->ITravelLogClient_iface; - }else if(dispex_query_interface(&This->outer_window->dispex, riid, ppv)) { + }else if(dispex_query_interface(&This->inner_window->dispex, riid, ppv)) { assert(!*ppv); return E_NOINTERFACE; } @@ -225,13 +225,13 @@ static void release_outer_window(HTMLOuterWindow *This) nsIDOMWindow_Release(This->nswindow); list_remove(&This->entry); - release_dispex(&This->dispex); heap_free(This); } static void release_inner_window(HTMLInnerWindow *This) { htmldoc_release(&This->doc->basedoc); + release_dispex(&This->dispex); heap_free(This); } @@ -2137,7 +2137,7 @@ static HRESULT WINAPI WindowDispEx_GetTypeInfoCount(IDispatchEx *iface, UINT *pc TRACE("(%p)->(%p)\n", This, pctinfo); - return IDispatchEx_GetTypeInfoCount(&This->outer_window->dispex.IDispatchEx_iface, pctinfo); + return IDispatchEx_GetTypeInfoCount(&This->inner_window->dispex.IDispatchEx_iface, pctinfo); } static HRESULT WINAPI WindowDispEx_GetTypeInfo(IDispatchEx *iface, UINT iTInfo, @@ -2147,7 +2147,7 @@ static HRESULT WINAPI WindowDispEx_GetTypeInfo(IDispatchEx *iface, UINT iTInfo, TRACE("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo); - return IDispatchEx_GetTypeInfo(&This->outer_window->dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo); + return IDispatchEx_GetTypeInfo(&This->inner_window->dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo); } static HRESULT WINAPI WindowDispEx_GetIDsOfNames(IDispatchEx *iface, REFIID riid, @@ -2182,7 +2182,7 @@ static HRESULT WINAPI WindowDispEx_Invoke(IDispatchEx *iface, DISPID dispIdMembe /* FIXME: Use script dispatch */ - return IDispatchEx_Invoke(&This->outer_window->dispex.IDispatchEx_iface, dispIdMember, riid, lcid, wFlags, + return IDispatchEx_Invoke(&This->inner_window->dispex.IDispatchEx_iface, dispIdMember, riid, lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); } @@ -2261,7 +2261,7 @@ static HRESULT WINAPI WindowDispEx_GetDispID(IDispatchEx *iface, BSTR bstrName, if(hres != DISP_E_UNKNOWNNAME) return hres; - hres = IDispatchEx_GetDispID(&window->dispex.IDispatchEx_iface, bstrName, grfdex, pid); + hres = IDispatchEx_GetDispID(&window->base.inner_window->dispex.IDispatchEx_iface, bstrName, grfdex, pid); if(hres != DISP_E_UNKNOWNNAME) return hres; @@ -2310,7 +2310,7 @@ static HRESULT WINAPI WindowDispEx_InvokeEx(IDispatchEx *iface, DISPID id, LCID return hres; } - return IDispatchEx_InvokeEx(&window->dispex.IDispatchEx_iface, id, lcid, wFlags, pdp, pvarRes, + return IDispatchEx_InvokeEx(&window->base.inner_window->dispex.IDispatchEx_iface, id, lcid, wFlags, pdp, pvarRes, pei, pspCaller); } @@ -2320,7 +2320,7 @@ static HRESULT WINAPI WindowDispEx_DeleteMemberByName(IDispatchEx *iface, BSTR b TRACE("(%p)->(%s %x)\n", This, debugstr_w(bstrName), grfdex); - return IDispatchEx_DeleteMemberByName(&This->outer_window->dispex.IDispatchEx_iface, bstrName, grfdex); + return IDispatchEx_DeleteMemberByName(&This->inner_window->dispex.IDispatchEx_iface, bstrName, grfdex); } static HRESULT WINAPI WindowDispEx_DeleteMemberByDispID(IDispatchEx *iface, DISPID id) @@ -2329,7 +2329,7 @@ static HRESULT WINAPI WindowDispEx_DeleteMemberByDispID(IDispatchEx *iface, DISP TRACE("(%p)->(%x)\n", This, id); - return IDispatchEx_DeleteMemberByDispID(&This->outer_window->dispex.IDispatchEx_iface, id); + return IDispatchEx_DeleteMemberByDispID(&This->inner_window->dispex.IDispatchEx_iface, id); } static HRESULT WINAPI WindowDispEx_GetMemberProperties(IDispatchEx *iface, DISPID id, DWORD grfdexFetch, DWORD *pgrfdex) @@ -2338,7 +2338,7 @@ static HRESULT WINAPI WindowDispEx_GetMemberProperties(IDispatchEx *iface, DISPI TRACE("(%p)->(%x %x %p)\n", This, id, grfdexFetch, pgrfdex); - return IDispatchEx_GetMemberProperties(&This->outer_window->dispex.IDispatchEx_iface, id, grfdexFetch, + return IDispatchEx_GetMemberProperties(&This->inner_window->dispex.IDispatchEx_iface, id, grfdexFetch, pgrfdex); } @@ -2348,7 +2348,7 @@ static HRESULT WINAPI WindowDispEx_GetMemberName(IDispatchEx *iface, DISPID id, TRACE("(%p)->(%x %p)\n", This, id, pbstrName); - return IDispatchEx_GetMemberName(&This->outer_window->dispex.IDispatchEx_iface, id, pbstrName); + return IDispatchEx_GetMemberName(&This->inner_window->dispex.IDispatchEx_iface, id, pbstrName); } static HRESULT WINAPI WindowDispEx_GetNextDispID(IDispatchEx *iface, DWORD grfdex, DISPID id, DISPID *pid) @@ -2357,7 +2357,7 @@ static HRESULT WINAPI WindowDispEx_GetNextDispID(IDispatchEx *iface, DWORD grfde TRACE("(%p)->(%x %x %p)\n", This, grfdex, id, pid); - return IDispatchEx_GetNextDispID(&This->outer_window->dispex.IDispatchEx_iface, grfdex, id, pid); + return IDispatchEx_GetNextDispID(&This->inner_window->dispex.IDispatchEx_iface, grfdex, id, pid); } static HRESULT WINAPI WindowDispEx_GetNameSpaceParent(IDispatchEx *iface, IUnknown **ppunk) @@ -2436,24 +2436,24 @@ static const IServiceProviderVtbl ServiceProviderVtbl = { HTMLWindowSP_QueryService }; -static inline HTMLOuterWindow *impl_from_DispatchEx(DispatchEx *iface) +static inline HTMLInnerWindow *impl_from_DispatchEx(DispatchEx *iface) { - return CONTAINING_RECORD(iface, HTMLOuterWindow, dispex); + return CONTAINING_RECORD(iface, HTMLInnerWindow, dispex); } static HRESULT HTMLWindow_invoke(DispatchEx *dispex, DISPID id, LCID lcid, WORD flags, DISPPARAMS *params, VARIANT *res, EXCEPINFO *ei, IServiceProvider *caller) { - HTMLOuterWindow *This = impl_from_DispatchEx(dispex); + HTMLInnerWindow *This = impl_from_DispatchEx(dispex); global_prop_t *prop; DWORD idx; HRESULT hres; idx = id - MSHTML_DISPID_CUSTOM_MIN; - if(idx >= This->global_prop_cnt) + if(idx >= This->base.outer_window->global_prop_cnt) return DISP_E_MEMBERNOTFOUND; - prop = This->global_props+idx; + prop = This->base.outer_window->global_props+idx; switch(prop->type) { case GLOBAL_SCRIPTVAR: { @@ -2580,6 +2580,8 @@ static HRESULT create_inner_window(HTMLOuterWindow *outer_window, HTMLDocumentNo htmldoc_addref(&doc_node->basedoc); window->doc = doc_node; + init_dispex(&window->dispex, (IUnknown*)&window->base.IHTMLWindow2_iface, &HTMLWindow_dispex); + *ret = window; return S_OK; } @@ -2608,8 +2610,6 @@ HRESULT HTMLOuterWindow_Create(HTMLDocumentObj *doc_obj, nsIDOMWindow *nswindow, window->window_ref->window = window; window->window_ref->ref = 1; - init_dispex(&window->dispex, (IUnknown*)&window->base.IHTMLWindow2_iface, &HTMLWindow_dispex); - if(nswindow) { nsIDOMWindow_AddRef(nswindow); window->nswindow = nswindow; diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index cfec956..010542e 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -316,7 +316,6 @@ struct HTMLWindow { struct HTMLOuterWindow { HTMLWindow base; - DispatchEx dispex; windowref_t *window_ref; LONG task_magic; @@ -356,6 +355,7 @@ struct HTMLOuterWindow { struct HTMLInnerWindow { HTMLWindow base; + DispatchEx dispex; HTMLDocumentNode *doc; };
1
0
0
0
Jacek Caban : mshtml: Moved document node from HTMLOuterWindow to HTMLInnerWindow.
by Alexandre Julliard
25 Jun '12
25 Jun '12
Module: wine Branch: master Commit: 79356c65c1e681ed46656cd65bb0f63617f37b8b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=79356c65c1e681ed46656cd65…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Jun 25 14:05:17 2012 +0200 mshtml: Moved document node from HTMLOuterWindow to HTMLInnerWindow. --- dlls/mshtml/htmldoc.c | 7 +- dlls/mshtml/htmlevent.c | 2 +- dlls/mshtml/htmlevent.h | 2 +- dlls/mshtml/htmlframe.c | 4 +- dlls/mshtml/htmlframebase.c | 4 +- dlls/mshtml/htmliframe.c | 4 +- dlls/mshtml/htmlimg.c | 9 ++- dlls/mshtml/htmloption.c | 6 +- dlls/mshtml/htmlwindow.c | 172 +++++++++++++++++++++++++++--------------- dlls/mshtml/mshtml_private.h | 5 +- dlls/mshtml/navigate.c | 12 ++-- dlls/mshtml/npplugin.c | 8 +- dlls/mshtml/nsio.c | 8 +- dlls/mshtml/persist.c | 2 +- dlls/mshtml/script.c | 6 +- 15 files changed, 151 insertions(+), 100 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=79356c65c1e681ed46656…
1
0
0
0
← Newer
1
...
19
20
21
22
23
24
25
...
83
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
Results per page:
10
25
50
100
200