ReactOS  0.4.14-dev-41-g31d7680
htmlframebase.c
Go to the documentation of this file.
1 /*
2  * Copyright 2008 Jacek Caban for CodeWeavers
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17  */
18 
19 #include "mshtml_private.h"
20 
21 static const WCHAR autoW[] = {'a','u','t','o',0};
22 static const WCHAR yesW[] = {'y','e','s',0};
23 static const WCHAR noW[] = {'n','o',0};
24 static const WCHAR pxW[] = {'p','x',0};
25 
27 {
28  nsIDOMWindow *nswindow;
30  nsresult nsres;
31  HRESULT hres = S_OK;
32 
33  if(frame->content_window)
34  return S_OK;
35 
36  nsres = nsIDOMDocument_GetDefaultView(nsdoc, &nswindow);
37  if(NS_FAILED(nsres) || !nswindow)
38  return E_FAIL;
39 
40  window = nswindow_to_window(nswindow);
41  if(!window)
43  frame->element.node.doc->basedoc.window, &window);
44  nsIDOMWindow_Release(nswindow);
45  if(FAILED(hres))
46  return hres;
47 
48  frame->content_window = window;
49  window->frame_element = frame;
50  return S_OK;
51 }
52 
53 static inline HTMLFrameBase *impl_from_IHTMLFrameBase(IHTMLFrameBase *iface)
54 {
55  return CONTAINING_RECORD(iface, HTMLFrameBase, IHTMLFrameBase_iface);
56 }
57 
58 static HRESULT WINAPI HTMLFrameBase_QueryInterface(IHTMLFrameBase *iface, REFIID riid, void **ppv)
59 {
61 
62  return IHTMLDOMNode_QueryInterface(&This->element.node.IHTMLDOMNode_iface, riid, ppv);
63 }
64 
65 static ULONG WINAPI HTMLFrameBase_AddRef(IHTMLFrameBase *iface)
66 {
68 
69  return IHTMLDOMNode_AddRef(&This->element.node.IHTMLDOMNode_iface);
70 }
71 
72 static ULONG WINAPI HTMLFrameBase_Release(IHTMLFrameBase *iface)
73 {
75 
76  return IHTMLDOMNode_Release(&This->element.node.IHTMLDOMNode_iface);
77 }
78 
79 static HRESULT WINAPI HTMLFrameBase_GetTypeInfoCount(IHTMLFrameBase *iface, UINT *pctinfo)
80 {
82 
83  return IDispatchEx_GetTypeInfoCount(&This->element.node.event_target.dispex.IDispatchEx_iface, pctinfo);
84 }
85 
86 static HRESULT WINAPI HTMLFrameBase_GetTypeInfo(IHTMLFrameBase *iface, UINT iTInfo,
87  LCID lcid, ITypeInfo **ppTInfo)
88 {
90 
91  return IDispatchEx_GetTypeInfo(&This->element.node.event_target.dispex.IDispatchEx_iface, iTInfo, lcid,
92  ppTInfo);
93 }
94 
95 static HRESULT WINAPI HTMLFrameBase_GetIDsOfNames(IHTMLFrameBase *iface, REFIID riid,
96  LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
97 {
99 
100  return IDispatchEx_GetIDsOfNames(&This->element.node.event_target.dispex.IDispatchEx_iface, riid, rgszNames,
101  cNames, lcid, rgDispId);
102 }
103 
104 static HRESULT WINAPI HTMLFrameBase_Invoke(IHTMLFrameBase *iface, DISPID dispIdMember,
105  REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
106  VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
107 {
109 
110  return IDispatchEx_Invoke(&This->element.node.event_target.dispex.IDispatchEx_iface, dispIdMember, riid,
111  lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
112 }
113 
114 static HRESULT WINAPI HTMLFrameBase_put_src(IHTMLFrameBase *iface, BSTR v)
115 {
117 
118  TRACE("(%p)->(%s)\n", This, debugstr_w(v));
119 
120  if(!This->content_window || !This->element.node.doc || !This->element.node.doc->basedoc.window) {
121  nsAString nsstr;
122  nsresult nsres;
123 
124  nsAString_InitDepend(&nsstr, v);
125  if(This->nsframe)
126  nsres = nsIDOMHTMLFrameElement_SetSrc(This->nsframe, &nsstr);
127  else
128  nsres = nsIDOMHTMLIFrameElement_SetSrc(This->nsiframe, &nsstr);
129  nsAString_Finish(&nsstr);
130  if(NS_FAILED(nsres)) {
131  ERR("SetSrc failed: %08x\n", nsres);
132  return E_FAIL;
133  }
134 
135  return S_OK;
136  }
137 
138  return navigate_url(This->content_window, v, This->element.node.doc->basedoc.window->uri, BINDING_NAVIGATED);
139 }
140 
141 static HRESULT WINAPI HTMLFrameBase_get_src(IHTMLFrameBase *iface, BSTR *p)
142 {
144  nsAString nsstr;
145  nsresult nsres;
146 
147  TRACE("(%p)->(%p)\n", This, p);
148 
149  if(!This->nsframe && !This->nsiframe) {
150  ERR("No attached frame object\n");
151  return E_UNEXPECTED;
152  }
153 
154  nsAString_Init(&nsstr, NULL);
155  if(This->nsframe)
156  nsres = nsIDOMHTMLFrameElement_GetSrc(This->nsframe, &nsstr);
157  else
158  nsres = nsIDOMHTMLIFrameElement_GetSrc(This->nsiframe, &nsstr);
159  return return_nsstr(nsres, &nsstr, p);
160 }
161 
162 static HRESULT WINAPI HTMLFrameBase_put_name(IHTMLFrameBase *iface, BSTR v)
163 {
165  nsAString name_str;
166  nsresult nsres;
167 
168  TRACE("(%p)->(%s)\n", This, debugstr_w(v));
169 
170  if(!This->nsframe && !This->nsiframe) {
171  ERR("No attached ns frame object\n");
172  return E_UNEXPECTED;
173  }
174 
175  nsAString_InitDepend(&name_str, v);
176  if(This->nsframe)
177  nsres = nsIDOMHTMLFrameElement_SetName(This->nsframe, &name_str);
178  else
179  nsres = nsIDOMHTMLIFrameElement_SetName(This->nsiframe, &name_str);
180  nsAString_Finish(&name_str);
181  if(NS_FAILED(nsres)) {
182  ERR("SetName failed: %08x\n", nsres);
183  return E_FAIL;
184  }
185 
186  return S_OK;
187 }
188 
189 static HRESULT WINAPI HTMLFrameBase_get_name(IHTMLFrameBase *iface, BSTR *p)
190 {
192  nsAString nsstr;
193  nsresult nsres;
194 
195  TRACE("(%p)->(%p)\n", This, p);
196 
197  if(!This->nsframe && !This->nsiframe) {
198  ERR("No attached ns frame object\n");
199  return E_UNEXPECTED;
200  }
201 
202  nsAString_Init(&nsstr, NULL);
203  if(This->nsframe)
204  nsres = nsIDOMHTMLFrameElement_GetName(This->nsframe, &nsstr);
205  else
206  nsres = nsIDOMHTMLIFrameElement_GetName(This->nsiframe, &nsstr);
207  return return_nsstr(nsres, &nsstr, p);
208 }
209 
210 static HRESULT WINAPI HTMLFrameBase_put_border(IHTMLFrameBase *iface, VARIANT v)
211 {
213  FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
214  return E_NOTIMPL;
215 }
216 
217 static HRESULT WINAPI HTMLFrameBase_get_border(IHTMLFrameBase *iface, VARIANT *p)
218 {
220  FIXME("(%p)->(%p)\n", This, p);
221  return E_NOTIMPL;
222 }
223 
224 static HRESULT WINAPI HTMLFrameBase_put_frameBorder(IHTMLFrameBase *iface, BSTR v)
225 {
227  nsAString nsstr;
228  nsresult nsres;
229 
230  TRACE("(%p)->(%s)\n", This, debugstr_w(v));
231 
232  if(!This->nsframe && !This->nsiframe) {
233  ERR("No attached ns frame object\n");
234  return E_UNEXPECTED;
235  }
236 
237  nsAString_InitDepend(&nsstr, v);
238  if(This->nsframe)
239  nsres = nsIDOMHTMLFrameElement_SetFrameBorder(This->nsframe, &nsstr);
240  else
241  nsres = nsIDOMHTMLIFrameElement_SetFrameBorder(This->nsiframe, &nsstr);
242  nsAString_Finish(&nsstr);
243  if(NS_FAILED(nsres)) {
244  ERR("SetFrameBorder failed: %08x\n", nsres);
245  return E_FAIL;
246  }
247 
248  return S_OK;
249 }
250 
251 static HRESULT WINAPI HTMLFrameBase_get_frameBorder(IHTMLFrameBase *iface, BSTR *p)
252 {
254  nsAString nsstr;
255  nsresult nsres;
256 
257  TRACE("(%p)->(%p)\n", This, p);
258 
259  if(!This->nsframe && !This->nsiframe) {
260  ERR("No attached ns frame object\n");
261  return E_UNEXPECTED;
262  }
263 
264  nsAString_Init(&nsstr, NULL);
265  if(This->nsframe)
266  nsres = nsIDOMHTMLFrameElement_GetFrameBorder(This->nsframe, &nsstr);
267  else
268  nsres = nsIDOMHTMLIFrameElement_GetFrameBorder(This->nsiframe, &nsstr);
269  return return_nsstr(nsres, &nsstr, p);
270 }
271 
272 static HRESULT WINAPI HTMLFrameBase_put_frameSpacing(IHTMLFrameBase *iface, VARIANT v)
273 {
275  FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
276  return E_NOTIMPL;
277 }
278 
279 static HRESULT WINAPI HTMLFrameBase_get_frameSpacing(IHTMLFrameBase *iface, VARIANT *p)
280 {
282  FIXME("(%p)->(%p)\n", This, p);
283  return E_NOTIMPL;
284 }
285 
286 static HRESULT WINAPI HTMLFrameBase_put_marginWidth(IHTMLFrameBase *iface, VARIANT v)
287 {
289  nsAString nsstr;
290  nsresult nsres;
291 
292  TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
293 
294  if(V_VT(&v) != VT_BSTR) {
295  FIXME("unsupported %s\n", debugstr_variant(&v));
296  return E_NOTIMPL;
297  }
298 
299  nsAString_InitDepend(&nsstr, V_BSTR(&v));
300  if(This->nsframe)
301  nsres = nsIDOMHTMLFrameElement_SetMarginWidth(This->nsframe, &nsstr);
302  else
303  nsres = nsIDOMHTMLIFrameElement_SetMarginWidth(This->nsiframe, &nsstr);
304  nsAString_Finish(&nsstr);
305  return NS_SUCCEEDED(nsres) ? S_OK : E_FAIL;
306 }
307 
308 static HRESULT WINAPI HTMLFrameBase_get_marginWidth(IHTMLFrameBase *iface, VARIANT *p)
309 {
311  nsAString nsstr;
312  nsresult nsres;
313  HRESULT hres = S_OK;
314 
315  TRACE("(%p)->(%p)\n", This, p);
316 
317  nsAString_Init(&nsstr, NULL);
318  if(This->nsframe)
319  nsres = nsIDOMHTMLFrameElement_GetMarginWidth(This->nsframe, &nsstr);
320  else
321  nsres = nsIDOMHTMLIFrameElement_GetMarginWidth(This->nsiframe, &nsstr);
322  if(NS_SUCCEEDED(nsres)) {
323  const PRUnichar *str, *end;
324 
325  nsAString_GetData(&nsstr, &str);
326 
327  if(*str) {
328  BSTR ret;
329 
330  end = strstrW(str, pxW);
331  if(!end)
332  end = str+strlenW(str);
334  if(ret) {
335  V_VT(p) = VT_BSTR;
336  V_BSTR(p) = ret;
337  }else {
339  }
340  }else {
341  V_VT(p) = VT_BSTR;
342  V_BSTR(p) = NULL;
343  }
344  }else {
345  ERR("GetMarginWidth failed: %08x\n", nsres);
346  hres = E_FAIL;
347  }
348 
349  nsAString_Finish(&nsstr);
350  return hres;
351 }
352 
353 static HRESULT WINAPI HTMLFrameBase_put_marginHeight(IHTMLFrameBase *iface, VARIANT v)
354 {
356  nsAString nsstr;
357  nsresult nsres;
358 
359  TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
360 
361  if(V_VT(&v) != VT_BSTR) {
362  FIXME("unsupported %s\n", debugstr_variant(&v));
363  return E_NOTIMPL;
364  }
365 
366  nsAString_InitDepend(&nsstr, V_BSTR(&v));
367  if(This->nsframe)
368  nsres = nsIDOMHTMLFrameElement_SetMarginHeight(This->nsframe, &nsstr);
369  else
370  nsres = nsIDOMHTMLIFrameElement_SetMarginHeight(This->nsiframe, &nsstr);
371  nsAString_Finish(&nsstr);
372  return NS_SUCCEEDED(nsres) ? S_OK : E_FAIL;
373 }
374 
375 static HRESULT WINAPI HTMLFrameBase_get_marginHeight(IHTMLFrameBase *iface, VARIANT *p)
376 {
378  nsAString nsstr;
379  nsresult nsres;
380  HRESULT hres = S_OK;
381 
382  TRACE("(%p)->(%p)\n", This, p);
383 
384  nsAString_Init(&nsstr, NULL);
385  if(This->nsframe)
386  nsres = nsIDOMHTMLFrameElement_GetMarginHeight(This->nsframe, &nsstr);
387  else
388  nsres = nsIDOMHTMLIFrameElement_GetMarginHeight(This->nsiframe, &nsstr);
389  if(NS_SUCCEEDED(nsres)) {
390  const PRUnichar *str, *end;
391 
392  nsAString_GetData(&nsstr, &str);
393 
394  if(*str) {
395  BSTR ret;
396 
397  end = strstrW(str, pxW);
398  if(!end)
399  end = str+strlenW(str);
401  if(ret) {
402  V_VT(p) = VT_BSTR;
403  V_BSTR(p) = ret;
404  }else {
406  }
407  }else {
408  V_VT(p) = VT_BSTR;
409  V_BSTR(p) = NULL;
410  }
411  }else {
412  ERR("SetMarginHeight failed: %08x\n", nsres);
413  hres = E_FAIL;
414  }
415 
416  nsAString_Finish(&nsstr);
417  return hres;
418 }
419 
421 {
423  FIXME("(%p)->(%x)\n", This, v);
424  return E_NOTIMPL;
425 }
426 
427 static HRESULT WINAPI HTMLFrameBase_get_noResize(IHTMLFrameBase *iface, VARIANT_BOOL *p)
428 {
430  FIXME("(%p)->(%p)\n", This, p);
431  return E_NOTIMPL;
432 }
433 
434 static HRESULT WINAPI HTMLFrameBase_put_scrolling(IHTMLFrameBase *iface, BSTR v)
435 {
437  nsAString nsstr;
438  nsresult nsres;
439 
440  TRACE("(%p)->(%s)\n", This, debugstr_w(v));
441 
442  if(!(!strcmpiW(v, yesW) || !strcmpiW(v, noW) || !strcmpiW(v, autoW)))
443  return E_INVALIDARG;
444 
445  if(This->nsframe) {
446  nsAString_InitDepend(&nsstr, v);
447  nsres = nsIDOMHTMLFrameElement_SetScrolling(This->nsframe, &nsstr);
448  }else if(This->nsiframe) {
449  nsAString_InitDepend(&nsstr, v);
450  nsres = nsIDOMHTMLIFrameElement_SetScrolling(This->nsiframe, &nsstr);
451  }else {
452  ERR("No attached ns frame object\n");
453  return E_UNEXPECTED;
454  }
455  nsAString_Finish(&nsstr);
456 
457  if(NS_FAILED(nsres)) {
458  ERR("SetScrolling failed: 0x%08x\n", nsres);
459  return E_FAIL;
460  }
461 
462  return S_OK;
463 }
464 
465 static HRESULT WINAPI HTMLFrameBase_get_scrolling(IHTMLFrameBase *iface, BSTR *p)
466 {
468  nsAString nsstr;
469  const PRUnichar *strdata;
470  nsresult nsres;
471 
472  TRACE("(%p)->(%p)\n", This, p);
473 
474  if(This->nsframe) {
475  nsAString_Init(&nsstr, NULL);
476  nsres = nsIDOMHTMLFrameElement_GetScrolling(This->nsframe, &nsstr);
477  }else if(This->nsiframe) {
478  nsAString_Init(&nsstr, NULL);
479  nsres = nsIDOMHTMLIFrameElement_GetScrolling(This->nsiframe, &nsstr);
480  }else {
481  ERR("No attached ns frame object\n");
482  return E_UNEXPECTED;
483  }
484 
485  if(NS_FAILED(nsres)) {
486  ERR("GetScrolling failed: 0x%08x\n", nsres);
487  nsAString_Finish(&nsstr);
488  return E_FAIL;
489  }
490 
491  nsAString_GetData(&nsstr, &strdata);
492 
493  if(*strdata)
494  *p = SysAllocString(strdata);
495  else
496  *p = SysAllocString(autoW);
497 
498  nsAString_Finish(&nsstr);
499 
500  return *p ? S_OK : E_OUTOFMEMORY;
501 }
502 
503 static const IHTMLFrameBaseVtbl HTMLFrameBaseVtbl = {
529 };
530 
531 static inline HTMLFrameBase *impl_from_IHTMLFrameBase2(IHTMLFrameBase2 *iface)
532 {
533  return CONTAINING_RECORD(iface, HTMLFrameBase, IHTMLFrameBase2_iface);
534 }
535 
536 static HRESULT WINAPI HTMLFrameBase2_QueryInterface(IHTMLFrameBase2 *iface, REFIID riid, void **ppv)
537 {
539 
540  return IHTMLDOMNode_QueryInterface(&This->element.node.IHTMLDOMNode_iface, riid, ppv);
541 }
542 
543 static ULONG WINAPI HTMLFrameBase2_AddRef(IHTMLFrameBase2 *iface)
544 {
546 
547  return IHTMLDOMNode_AddRef(&This->element.node.IHTMLDOMNode_iface);
548 }
549 
550 static ULONG WINAPI HTMLFrameBase2_Release(IHTMLFrameBase2 *iface)
551 {
553 
554  return IHTMLDOMNode_Release(&This->element.node.IHTMLDOMNode_iface);
555 }
556 
557 static HRESULT WINAPI HTMLFrameBase2_GetTypeInfoCount(IHTMLFrameBase2 *iface, UINT *pctinfo)
558 {
560  FIXME("(%p)\n", This);
561  return E_NOTIMPL;
562 }
563 
564 static HRESULT WINAPI HTMLFrameBase2_GetTypeInfo(IHTMLFrameBase2 *iface, UINT iTInfo,
565  LCID lcid, ITypeInfo **ppTInfo)
566 {
568  FIXME("(%p)\n", This);
569  return E_NOTIMPL;
570 }
571 
572 static HRESULT WINAPI HTMLFrameBase2_GetIDsOfNames(IHTMLFrameBase2 *iface, REFIID riid,
573  LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
574 {
576  FIXME("(%p)\n", This);
577  return E_NOTIMPL;
578 }
579 
580 static HRESULT WINAPI HTMLFrameBase2_Invoke(IHTMLFrameBase2 *iface, DISPID dispIdMember,
581  REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
582  VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
583 {
585  FIXME("(%p)\n", This);
586  return E_NOTIMPL;
587 }
588 
590 {
592 
593  TRACE("(%p)->(%p)\n", This, p);
594 
595  if(This->content_window) {
596  IHTMLWindow2_AddRef(&This->content_window->base.IHTMLWindow2_iface);
597  *p = &This->content_window->base.IHTMLWindow2_iface;
598  }else {
599  WARN("NULL content window\n");
600  *p = NULL;
601  }
602  return S_OK;
603 }
604 
605 static HRESULT WINAPI HTMLFrameBase2_put_onload(IHTMLFrameBase2 *iface, VARIANT v)
606 {
608 
609  TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
610 
611  return set_node_event(&This->element.node, EVENTID_LOAD, &v);
612 }
613 
614 static HRESULT WINAPI HTMLFrameBase2_get_onload(IHTMLFrameBase2 *iface, VARIANT *p)
615 {
617 
618  TRACE("(%p)->(%p)\n", This, p);
619 
620  return get_node_event(&This->element.node, EVENTID_LOAD, p);
621 }
622 
624 {
626  FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
627  return E_NOTIMPL;
628 }
629 
631 {
633  FIXME("(%p)->(%p)\n", This, p);
634  return E_NOTIMPL;
635 }
636 
637 static HRESULT WINAPI HTMLFrameBase2_get_readyState(IHTMLFrameBase2 *iface, BSTR *p)
638 {
640 
641  TRACE("(%p)->(%p)\n", This, p);
642 
643  if(!This->content_window || !This->content_window->base.inner_window->doc) {
644  FIXME("no document associated\n");
645  return E_FAIL;
646  }
647 
648  return IHTMLDocument2_get_readyState(&This->content_window->base.inner_window->doc->basedoc.IHTMLDocument2_iface, p);
649 }
650 
652 {
654 
655  FIXME("(%p)->(%x) semi-stub\n", This, v);
656 
657  return S_OK;
658 }
659 
661 {
663 
664  FIXME("(%p)->(%p) semi-stub\n", This, p);
665 
666  *p = VARIANT_TRUE;
667  return S_OK;
668 }
669 
670 static const IHTMLFrameBase2Vtbl HTMLFrameBase2Vtbl = {
686 };
687 
689 {
690  if(IsEqualGUID(&IID_IHTMLFrameBase, riid)) {
691  TRACE("(%p)->(IID_IHTMLFrameBase %p)\n", This, ppv);
692  *ppv = &This->IHTMLFrameBase_iface;
693  }else if(IsEqualGUID(&IID_IHTMLFrameBase2, riid)) {
694  TRACE("(%p)->(IID_IHTMLFrameBase2 %p)\n", This, ppv);
695  *ppv = &This->IHTMLFrameBase2_iface;
696  }else {
697  return HTMLElement_QI(&This->element.node, riid, ppv);
698  }
699 
700  IUnknown_AddRef((IUnknown*)*ppv);
701  return S_OK;
702 }
703 
705 {
706  if(This->content_window)
707  This->content_window->frame_element = NULL;
708 
709  HTMLElement_destructor(&This->element.node);
710 }
711 
713  dispex_static_data_t *dispex_data)
714 {
715  nsresult nsres;
716 
717  This->IHTMLFrameBase_iface.lpVtbl = &HTMLFrameBaseVtbl;
718  This->IHTMLFrameBase2_iface.lpVtbl = &HTMLFrameBase2Vtbl;
719 
720  HTMLElement_Init(&This->element, doc, nselem, dispex_data);
721 
722  nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLFrameElement, (void**)&This->nsframe);
723  if(NS_FAILED(nsres)) {
724  This->nsframe = NULL;
725  nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLIFrameElement, (void**)&This->nsiframe);
726  assert(nsres == NS_OK);
727  }else {
728  This->nsiframe = NULL;
729  }
730 }
static HRESULT WINAPI HTMLFrameBase2_get_readyState(IHTMLFrameBase2 *iface, BSTR *p)
static HRESULT WINAPI HTMLFrameBase2_get_contentWindow(IHTMLFrameBase2 *iface, IHTMLWindow2 **p)
static HRESULT WINAPI HTMLFrameBase2_put_onreadystatechange(IHTMLFrameBase2 *iface, VARIANT v)
static HRESULT WINAPI HTMLFrameBase2_GetTypeInfoCount(IHTMLFrameBase2 *iface, UINT *pctinfo)
static const WCHAR noW[]
Definition: htmlframebase.c:23
#define REFIID
Definition: guiddef.h:118
HTMLDocumentObj * doc_obj
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
Definition: unicode.h:212
static HRESULT WINAPI HTMLFrameBase2_QueryInterface(IHTMLFrameBase2 *iface, REFIID riid, void **ppv)
BSTR WINAPI SysAllocStringLen(const OLECHAR *str, unsigned int len)
Definition: oleaut.c:342
static HRESULT WINAPI HTMLFrameBase_put_noResize(IHTMLFrameBase *iface, VARIANT_BOOL v)
static const WCHAR pxW[]
Definition: htmlframebase.c:24
HRESULT set_frame_doc(HTMLFrameBase *frame, nsIDOMDocument *nsdoc)
Definition: htmlframebase.c:26
static const IHTMLFrameBase2Vtbl HTMLFrameBase2Vtbl
static HRESULT navigate_url(HHInfo *info, LPCWSTR surl)
Definition: help.c:189
REFIID riid
Definition: precomp.h:44
static HRESULT WINAPI HTMLFrameBase_Invoke(IHTMLFrameBase *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
static HTMLFrameBase * impl_from_IHTMLFrameBase2(IHTMLFrameBase2 *iface)
#define WARN(fmt,...)
Definition: debug.h:111
HTMLOuterWindow * window
REFIID LPVOID * ppv
Definition: atlbase.h:39
HRESULT HTMLElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
Definition: htmlelem.c:3738
HTMLOuterWindow * content_window
#define assert(x)
Definition: debug.h:53
static ULONG WINAPI HTMLFrameBase_Release(IHTMLFrameBase *iface)
Definition: htmlframebase.c:72
DWORD LCID
Definition: nls.h:13
static HRESULT set_node_event(HTMLDOMNode *node, eventid_t eid, VARIANT *var)
Definition: htmlevent.h:80
GLuint GLuint end
Definition: gl.h:1545
OLECHAR * BSTR
Definition: compat.h:1934
__IHTMLWindow2_FWD_DEFINED__ typedef interface IHTMLWindow2 IHTMLWindow2
Definition: mshtmhst.idl:64
static const WCHAR yesW[]
Definition: htmlframebase.c:22
static LPOLESTR
Definition: stg_prop.c:27
HTMLDocument basedoc
#define E_FAIL
Definition: ddrawi.h:102
static HRESULT WINAPI HTMLFrameBase_put_frameSpacing(IHTMLFrameBase *iface, VARIANT v)
short VARIANT_BOOL
Definition: compat.h:1931
HRESULT HTMLFrameBase_QI(HTMLFrameBase *This, REFIID riid, void **ppv)
static HRESULT WINAPI HTMLFrameBase_put_name(IHTMLFrameBase *iface, BSTR v)
#define NS_OK
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
static HRESULT WINAPI HTMLFrameBase_get_noResize(IHTMLFrameBase *iface, VARIANT_BOOL *p)
#define debugstr_w
Definition: kernel32.h:32
static HRESULT get_node_event(HTMLDOMNode *node, eventid_t eid, VARIANT *var)
Definition: htmlevent.h:85
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_INVALIDARG
Definition: ddrawi.h:101
const WCHAR * str
#define strstrW(d, s)
Definition: unicode.h:32
smooth NULL
Definition: ftsmooth.c:416
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:241
HTMLOuterWindow * nswindow_to_window(const nsIDOMWindow *nswindow)
Definition: htmlwindow.c:3099
static HRESULT WINAPI HTMLFrameBase_get_border(IHTMLFrameBase *iface, VARIANT *p)
static HRESULT WINAPI HTMLFrameBase_get_marginHeight(IHTMLFrameBase *iface, VARIANT *p)
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560
#define NS_FAILED(res)
static HRESULT WINAPI HTMLFrameBase_put_marginHeight(IHTMLFrameBase *iface, VARIANT v)
static HRESULT WINAPI HTMLFrameBase_QueryInterface(IHTMLFrameBase *iface, REFIID riid, void **ppv)
Definition: htmlframebase.c:58
HRESULT return_nsstr(nsresult, nsAString *, BSTR *) DECLSPEC_HIDDEN
Definition: nsembed.c:841
static HRESULT WINAPI HTMLFrameBase_GetTypeInfo(IHTMLFrameBase *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: htmlframebase.c:86
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT hres
Definition: protocol.c:465
static const IHTMLFrameBaseVtbl HTMLFrameBaseVtbl
static const WCHAR autoW[]
Definition: htmlframebase.c:21
static HTMLFrameBase * impl_from_IHTMLFrameBase(IHTMLFrameBase *iface)
Definition: htmlframebase.c:53
__wchar_t WCHAR
Definition: xmlstorage.h:180
static HRESULT WINAPI HTMLFrameBase_get_scrolling(IHTMLFrameBase *iface, BSTR *p)
static HRESULT WINAPI HTMLFrameBase_GetTypeInfoCount(IHTMLFrameBase *iface, UINT *pctinfo)
Definition: htmlframebase.c:79
static HRESULT WINAPI HTMLFrameBase_put_frameBorder(IHTMLFrameBase *iface, BSTR v)
LONG HRESULT
Definition: typedefs.h:77
static HRESULT WINAPI HTMLFrameBase_get_frameSpacing(IHTMLFrameBase *iface, VARIANT *p)
#define WINAPI
Definition: msvc.h:8
unsigned short WORD
Definition: ntddk_ex.h:93
void HTMLElement_destructor(HTMLDOMNode *iface)
Definition: htmlelem.c:3764
static HRESULT WINAPI HTMLFrameBase2_Invoke(IHTMLFrameBase2 *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
#define NS_SUCCEEDED(res)
int ret
static HRESULT WINAPI HTMLFrameBase2_get_allowTransparency(IHTMLFrameBase2 *iface, VARIANT_BOOL *p)
static HRESULT WINAPI HTMLFrameBase_put_src(IHTMLFrameBase *iface, BSTR v)
#define V_VT(A)
Definition: oleauto.h:211
void HTMLFrameBase_destructor(HTMLFrameBase *This)
void HTMLElement_Init(HTMLElement *This, HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, dispex_static_data_t *dispex_data)
Definition: htmlelem.c:4008
HTMLElement element
UINT32 nsAString_GetData(const nsAString *, const PRUnichar **) DECLSPEC_HIDDEN
Definition: nsembed.c:831
static HRESULT WINAPI HTMLFrameBase_put_marginWidth(IHTMLFrameBase *iface, VARIANT v)
static HRESULT WINAPI HTMLFrameBase_get_marginWidth(IHTMLFrameBase *iface, VARIANT *p)
static IHTMLWindow2 * window
Definition: events.c:77
#define V_BSTR(A)
Definition: oleauto.h:226
#define strcmpiW(s1, s2)
Definition: unicode.h:39
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:519
#define ERR(fmt,...)
Definition: debug.h:109
static ULONG WINAPI HTMLFrameBase2_Release(IHTMLFrameBase2 *iface)
struct stdole::EXCEPINFO EXCEPINFO
static const char * debugstr_variant(const VARIANT *var)
Definition: container.c:46
static VARIANTARG static DISPID
Definition: ordinal.c:49
#define S_OK
Definition: intsafe.h:59
static ULONG WINAPI HTMLFrameBase_AddRef(IHTMLFrameBase *iface)
Definition: htmlframebase.c:65
static HRESULT WINAPI HTMLFrameBase2_get_onreadystatechange(IHTMLFrameBase2 *iface, VARIANT *p)
const GLdouble * v
Definition: gl.h:2040
static HRESULT WINAPI HTMLFrameBase_GetIDsOfNames(IHTMLFrameBase *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: htmlframebase.c:95
static HRESULT WINAPI HTMLFrameBase_get_src(IHTMLFrameBase *iface, BSTR *p)
#define E_NOTIMPL
Definition: ddrawi.h:99
static HRESULT WINAPI HTMLFrameBase2_GetTypeInfo(IHTMLFrameBase2 *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
#define BINDING_NAVIGATED
Definition: binding.h:127
void nsAString_InitDepend(nsAString *, const PRUnichar *) DECLSPEC_HIDDEN
Definition: nsembed.c:826
static HRESULT WINAPI HTMLFrameBase_get_name(IHTMLFrameBase *iface, BSTR *p)
HTMLDocumentNode * doc
unsigned int UINT
Definition: ndis.h:50
HTMLDOMNode node
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4021
BOOL nsAString_Init(nsAString *, const PRUnichar *) DECLSPEC_HIDDEN
Definition: nsembed.c:817
#define E_UNEXPECTED
Definition: winerror.h:2456
void nsAString_Finish(nsAString *) DECLSPEC_HIDDEN
Definition: nsembed.c:836
struct stdole::DISPPARAMS DISPPARAMS
HRESULT nsresult
Definition: nsiface.idl:39
WCHAR PRUnichar
Definition: nsiface.idl:48
unsigned int ULONG
Definition: retypes.h:1
static ULONG WINAPI HTMLFrameBase2_AddRef(IHTMLFrameBase2 *iface)
GLfloat GLfloat p
Definition: glext.h:8902
static HRESULT WINAPI HTMLFrameBase2_put_allowTransparency(IHTMLFrameBase2 *iface, VARIANT_BOOL v)
void HTMLFrameBase_Init(HTMLFrameBase *This, HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, dispex_static_data_t *dispex_data)
static HRESULT WINAPI HTMLFrameBase2_put_onload(IHTMLFrameBase2 *iface, VARIANT v)
static HRESULT WINAPI HTMLFrameBase2_get_onload(IHTMLFrameBase2 *iface, VARIANT *p)
static HRESULT WINAPI HTMLFrameBase_get_frameBorder(IHTMLFrameBase *iface, BSTR *p)
static HRESULT WINAPI HTMLFrameBase_put_scrolling(IHTMLFrameBase *iface, BSTR v)
static HRESULT WINAPI HTMLFrameBase2_GetIDsOfNames(IHTMLFrameBase2 *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
static HRESULT WINAPI HTMLFrameBase_put_border(IHTMLFrameBase *iface, VARIANT v)
HRESULT HTMLOuterWindow_Create(HTMLDocumentObj *doc_obj, nsIDOMWindow *nswindow, HTMLOuterWindow *parent, HTMLOuterWindow **ret)
Definition: htmlwindow.c:2945