ReactOS 0.4.15-dev-5667-ged97270
htmlframebase.c File Reference
#include "mshtml_private.h"
Include dependency graph for htmlframebase.c:

Go to the source code of this file.

Functions

HRESULT set_frame_doc (HTMLFrameBase *frame, nsIDOMDocument *nsdoc)
 
static HTMLFrameBaseimpl_from_IHTMLFrameBase (IHTMLFrameBase *iface)
 
static HRESULT WINAPI HTMLFrameBase_QueryInterface (IHTMLFrameBase *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI HTMLFrameBase_AddRef (IHTMLFrameBase *iface)
 
static ULONG WINAPI HTMLFrameBase_Release (IHTMLFrameBase *iface)
 
static HRESULT WINAPI HTMLFrameBase_GetTypeInfoCount (IHTMLFrameBase *iface, UINT *pctinfo)
 
static HRESULT WINAPI HTMLFrameBase_GetTypeInfo (IHTMLFrameBase *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
static HRESULT WINAPI HTMLFrameBase_GetIDsOfNames (IHTMLFrameBase *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
static HRESULT WINAPI HTMLFrameBase_Invoke (IHTMLFrameBase *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
 
static HRESULT WINAPI HTMLFrameBase_put_src (IHTMLFrameBase *iface, BSTR v)
 
static HRESULT WINAPI HTMLFrameBase_get_src (IHTMLFrameBase *iface, BSTR *p)
 
static HRESULT WINAPI HTMLFrameBase_put_name (IHTMLFrameBase *iface, BSTR v)
 
static HRESULT WINAPI HTMLFrameBase_get_name (IHTMLFrameBase *iface, BSTR *p)
 
static HRESULT WINAPI HTMLFrameBase_put_border (IHTMLFrameBase *iface, VARIANT v)
 
static HRESULT WINAPI HTMLFrameBase_get_border (IHTMLFrameBase *iface, VARIANT *p)
 
static HRESULT WINAPI HTMLFrameBase_put_frameBorder (IHTMLFrameBase *iface, BSTR v)
 
static HRESULT WINAPI HTMLFrameBase_get_frameBorder (IHTMLFrameBase *iface, BSTR *p)
 
static HRESULT WINAPI HTMLFrameBase_put_frameSpacing (IHTMLFrameBase *iface, VARIANT v)
 
static HRESULT WINAPI HTMLFrameBase_get_frameSpacing (IHTMLFrameBase *iface, VARIANT *p)
 
static HRESULT WINAPI HTMLFrameBase_put_marginWidth (IHTMLFrameBase *iface, VARIANT v)
 
static HRESULT WINAPI HTMLFrameBase_get_marginWidth (IHTMLFrameBase *iface, VARIANT *p)
 
static HRESULT WINAPI HTMLFrameBase_put_marginHeight (IHTMLFrameBase *iface, VARIANT v)
 
static HRESULT WINAPI HTMLFrameBase_get_marginHeight (IHTMLFrameBase *iface, VARIANT *p)
 
static HRESULT WINAPI HTMLFrameBase_put_noResize (IHTMLFrameBase *iface, VARIANT_BOOL v)
 
static HRESULT WINAPI HTMLFrameBase_get_noResize (IHTMLFrameBase *iface, VARIANT_BOOL *p)
 
static HRESULT WINAPI HTMLFrameBase_put_scrolling (IHTMLFrameBase *iface, BSTR v)
 
static HRESULT WINAPI HTMLFrameBase_get_scrolling (IHTMLFrameBase *iface, BSTR *p)
 
static HTMLFrameBaseimpl_from_IHTMLFrameBase2 (IHTMLFrameBase2 *iface)
 
static HRESULT WINAPI HTMLFrameBase2_QueryInterface (IHTMLFrameBase2 *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI HTMLFrameBase2_AddRef (IHTMLFrameBase2 *iface)
 
static ULONG WINAPI HTMLFrameBase2_Release (IHTMLFrameBase2 *iface)
 
static HRESULT WINAPI HTMLFrameBase2_GetTypeInfoCount (IHTMLFrameBase2 *iface, UINT *pctinfo)
 
static HRESULT WINAPI HTMLFrameBase2_GetTypeInfo (IHTMLFrameBase2 *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
static HRESULT WINAPI HTMLFrameBase2_GetIDsOfNames (IHTMLFrameBase2 *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
static HRESULT WINAPI HTMLFrameBase2_Invoke (IHTMLFrameBase2 *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
 
static HRESULT WINAPI HTMLFrameBase2_get_contentWindow (IHTMLFrameBase2 *iface, IHTMLWindow2 **p)
 
static HRESULT WINAPI HTMLFrameBase2_put_onload (IHTMLFrameBase2 *iface, VARIANT v)
 
static HRESULT WINAPI HTMLFrameBase2_get_onload (IHTMLFrameBase2 *iface, VARIANT *p)
 
static HRESULT WINAPI HTMLFrameBase2_put_onreadystatechange (IHTMLFrameBase2 *iface, VARIANT v)
 
static HRESULT WINAPI HTMLFrameBase2_get_onreadystatechange (IHTMLFrameBase2 *iface, VARIANT *p)
 
static HRESULT WINAPI HTMLFrameBase2_get_readyState (IHTMLFrameBase2 *iface, BSTR *p)
 
static HRESULT WINAPI HTMLFrameBase2_put_allowTransparency (IHTMLFrameBase2 *iface, VARIANT_BOOL v)
 
static HRESULT WINAPI HTMLFrameBase2_get_allowTransparency (IHTMLFrameBase2 *iface, VARIANT_BOOL *p)
 
HRESULT HTMLFrameBase_QI (HTMLFrameBase *This, REFIID riid, void **ppv)
 
void HTMLFrameBase_destructor (HTMLFrameBase *This)
 
void HTMLFrameBase_Init (HTMLFrameBase *This, HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, dispex_static_data_t *dispex_data)
 

Variables

static const WCHAR autoW [] = {'a','u','t','o',0}
 
static const WCHAR yesW [] = {'y','e','s',0}
 
static const WCHAR noW [] = {'n','o',0}
 
static const WCHAR pxW [] = {'p','x',0}
 
static const IHTMLFrameBaseVtbl HTMLFrameBaseVtbl
 
static const IHTMLFrameBase2Vtbl HTMLFrameBase2Vtbl
 

Function Documentation

◆ HTMLFrameBase2_AddRef()

static ULONG WINAPI HTMLFrameBase2_AddRef ( IHTMLFrameBase2 *  iface)
static

Definition at line 543 of file htmlframebase.c.

544{
546
547 return IHTMLDOMNode_AddRef(&This->element.node.IHTMLDOMNode_iface);
548}
static HTMLFrameBase * impl_from_IHTMLFrameBase2(IHTMLFrameBase2 *iface)

◆ HTMLFrameBase2_get_allowTransparency()

static HRESULT WINAPI HTMLFrameBase2_get_allowTransparency ( IHTMLFrameBase2 *  iface,
VARIANT_BOOL p 
)
static

Definition at line 660 of file htmlframebase.c.

661{
663
664 FIXME("(%p)->(%p) semi-stub\n", This, p);
665
666 *p = VARIANT_TRUE;
667 return S_OK;
668}
#define FIXME(fmt,...)
Definition: debug.h:111
GLfloat GLfloat p
Definition: glext.h:8902
#define S_OK
Definition: intsafe.h:52

◆ HTMLFrameBase2_get_contentWindow()

static HRESULT WINAPI HTMLFrameBase2_get_contentWindow ( IHTMLFrameBase2 *  iface,
IHTMLWindow2 **  p 
)
static

Definition at line 589 of file htmlframebase.c.

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}
#define WARN(fmt,...)
Definition: debug.h:112
#define NULL
Definition: types.h:112
#define TRACE(s)
Definition: solgame.cpp:4

◆ HTMLFrameBase2_get_onload()

static HRESULT WINAPI HTMLFrameBase2_get_onload ( IHTMLFrameBase2 *  iface,
VARIANT p 
)
static

Definition at line 614 of file htmlframebase.c.

615{
617
618 TRACE("(%p)->(%p)\n", This, p);
619
620 return get_node_event(&This->element.node, EVENTID_LOAD, p);
621}
@ EVENTID_LOAD
Definition: htmlevent.h:39
static HRESULT get_node_event(HTMLDOMNode *node, eventid_t eid, VARIANT *var)
Definition: htmlevent.h:85

◆ HTMLFrameBase2_get_onreadystatechange()

static HRESULT WINAPI HTMLFrameBase2_get_onreadystatechange ( IHTMLFrameBase2 *  iface,
VARIANT p 
)
static

Definition at line 630 of file htmlframebase.c.

631{
633 FIXME("(%p)->(%p)\n", This, p);
634 return E_NOTIMPL;
635}
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ HTMLFrameBase2_get_readyState()

static HRESULT WINAPI HTMLFrameBase2_get_readyState ( IHTMLFrameBase2 *  iface,
BSTR p 
)
static

Definition at line 637 of file htmlframebase.c.

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}
#define E_FAIL
Definition: ddrawi.h:102

◆ HTMLFrameBase2_GetIDsOfNames()

static HRESULT WINAPI HTMLFrameBase2_GetIDsOfNames ( IHTMLFrameBase2 *  iface,
REFIID  riid,
LPOLESTR rgszNames,
UINT  cNames,
LCID  lcid,
DISPID rgDispId 
)
static

Definition at line 572 of file htmlframebase.c.

574{
576 FIXME("(%p)\n", This);
577 return E_NOTIMPL;
578}

◆ HTMLFrameBase2_GetTypeInfo()

static HRESULT WINAPI HTMLFrameBase2_GetTypeInfo ( IHTMLFrameBase2 *  iface,
UINT  iTInfo,
LCID  lcid,
ITypeInfo **  ppTInfo 
)
static

Definition at line 564 of file htmlframebase.c.

566{
568 FIXME("(%p)\n", This);
569 return E_NOTIMPL;
570}

◆ HTMLFrameBase2_GetTypeInfoCount()

static HRESULT WINAPI HTMLFrameBase2_GetTypeInfoCount ( IHTMLFrameBase2 *  iface,
UINT pctinfo 
)
static

Definition at line 557 of file htmlframebase.c.

558{
560 FIXME("(%p)\n", This);
561 return E_NOTIMPL;
562}

◆ HTMLFrameBase2_Invoke()

static HRESULT WINAPI HTMLFrameBase2_Invoke ( IHTMLFrameBase2 *  iface,
DISPID  dispIdMember,
REFIID  riid,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pDispParams,
VARIANT pVarResult,
EXCEPINFO *  pExcepInfo,
UINT puArgErr 
)
static

Definition at line 580 of file htmlframebase.c.

583{
585 FIXME("(%p)\n", This);
586 return E_NOTIMPL;
587}

◆ HTMLFrameBase2_put_allowTransparency()

static HRESULT WINAPI HTMLFrameBase2_put_allowTransparency ( IHTMLFrameBase2 *  iface,
VARIANT_BOOL  v 
)
static

Definition at line 651 of file htmlframebase.c.

652{
654
655 FIXME("(%p)->(%x) semi-stub\n", This, v);
656
657 return S_OK;
658}
const GLdouble * v
Definition: gl.h:2040

◆ HTMLFrameBase2_put_onload()

static HRESULT WINAPI HTMLFrameBase2_put_onload ( IHTMLFrameBase2 *  iface,
VARIANT  v 
)
static

Definition at line 605 of file htmlframebase.c.

606{
608
609 TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
610
611 return set_node_event(&This->element.node, EVENTID_LOAD, &v);
612}
static HRESULT set_node_event(HTMLDOMNode *node, eventid_t eid, VARIANT *var)
Definition: htmlevent.h:80
static const char * debugstr_variant(const VARIANT *var)
Definition: container.c:46

◆ HTMLFrameBase2_put_onreadystatechange()

static HRESULT WINAPI HTMLFrameBase2_put_onreadystatechange ( IHTMLFrameBase2 *  iface,
VARIANT  v 
)
static

Definition at line 623 of file htmlframebase.c.

624{
626 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
627 return E_NOTIMPL;
628}

◆ HTMLFrameBase2_QueryInterface()

static HRESULT WINAPI HTMLFrameBase2_QueryInterface ( IHTMLFrameBase2 *  iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 536 of file htmlframebase.c.

537{
539
540 return IHTMLDOMNode_QueryInterface(&This->element.node.IHTMLDOMNode_iface, riid, ppv);
541}
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39

◆ HTMLFrameBase2_Release()

static ULONG WINAPI HTMLFrameBase2_Release ( IHTMLFrameBase2 *  iface)
static

Definition at line 550 of file htmlframebase.c.

551{
553
554 return IHTMLDOMNode_Release(&This->element.node.IHTMLDOMNode_iface);
555}

◆ HTMLFrameBase_AddRef()

static ULONG WINAPI HTMLFrameBase_AddRef ( IHTMLFrameBase *  iface)
static

Definition at line 65 of file htmlframebase.c.

66{
68
69 return IHTMLDOMNode_AddRef(&This->element.node.IHTMLDOMNode_iface);
70}
static HTMLFrameBase * impl_from_IHTMLFrameBase(IHTMLFrameBase *iface)
Definition: htmlframebase.c:53

◆ HTMLFrameBase_destructor()

void HTMLFrameBase_destructor ( HTMLFrameBase This)

Definition at line 704 of file htmlframebase.c.

705{
706 if(This->content_window)
707 This->content_window->frame_element = NULL;
708
709 HTMLElement_destructor(&This->element.node);
710}
void HTMLElement_destructor(HTMLDOMNode *iface)
Definition: htmlelem.c:3764

Referenced by HTMLFrameElement_destructor(), and HTMLIFrame_destructor().

◆ HTMLFrameBase_get_border()

static HRESULT WINAPI HTMLFrameBase_get_border ( IHTMLFrameBase *  iface,
VARIANT p 
)
static

Definition at line 217 of file htmlframebase.c.

218{
220 FIXME("(%p)->(%p)\n", This, p);
221 return E_NOTIMPL;
222}

◆ HTMLFrameBase_get_frameBorder()

static HRESULT WINAPI HTMLFrameBase_get_frameBorder ( IHTMLFrameBase *  iface,
BSTR p 
)
static

Definition at line 251 of file htmlframebase.c.

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}
#define ERR(fmt,...)
Definition: debug.h:110
BOOL nsAString_Init(nsAString *, const PRUnichar *) DECLSPEC_HIDDEN
Definition: nsembed.c:817
HRESULT return_nsstr(nsresult, nsAString *, BSTR *) DECLSPEC_HIDDEN
Definition: nsembed.c:841
#define E_UNEXPECTED
Definition: winerror.h:2456

◆ HTMLFrameBase_get_frameSpacing()

static HRESULT WINAPI HTMLFrameBase_get_frameSpacing ( IHTMLFrameBase *  iface,
VARIANT p 
)
static

Definition at line 279 of file htmlframebase.c.

280{
282 FIXME("(%p)->(%p)\n", This, p);
283 return E_NOTIMPL;
284}

◆ HTMLFrameBase_get_marginHeight()

static HRESULT WINAPI HTMLFrameBase_get_marginHeight ( IHTMLFrameBase *  iface,
VARIANT p 
)
static

Definition at line 375 of file htmlframebase.c.

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}
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
OLECHAR * BSTR
Definition: compat.h:2293
@ VT_BSTR
Definition: compat.h:2303
GLuint GLuint end
Definition: gl.h:1545
static const WCHAR pxW[]
Definition: htmlframebase.c:24
HRESULT hres
Definition: protocol.c:465
void nsAString_Finish(nsAString *) DECLSPEC_HIDDEN
Definition: nsembed.c:836
UINT32 nsAString_GetData(const nsAString *, const PRUnichar **) DECLSPEC_HIDDEN
Definition: nsembed.c:831
#define NS_SUCCEEDED(res)
WCHAR PRUnichar
Definition: nsiface.idl:48
BSTR WINAPI SysAllocStringLen(const OLECHAR *str, unsigned int len)
Definition: oleaut.c:339
#define V_VT(A)
Definition: oleauto.h:211
#define V_BSTR(A)
Definition: oleauto.h:226
#define strstrW(d, s)
Definition: unicode.h:32
#define strlenW(s)
Definition: unicode.h:28
const WCHAR * str
int ret

◆ HTMLFrameBase_get_marginWidth()

static HRESULT WINAPI HTMLFrameBase_get_marginWidth ( IHTMLFrameBase *  iface,
VARIANT p 
)
static

Definition at line 308 of file htmlframebase.c.

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}

◆ HTMLFrameBase_get_name()

static HRESULT WINAPI HTMLFrameBase_get_name ( IHTMLFrameBase *  iface,
BSTR p 
)
static

Definition at line 189 of file htmlframebase.c.

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}

◆ HTMLFrameBase_get_noResize()

static HRESULT WINAPI HTMLFrameBase_get_noResize ( IHTMLFrameBase *  iface,
VARIANT_BOOL p 
)
static

Definition at line 427 of file htmlframebase.c.

428{
430 FIXME("(%p)->(%p)\n", This, p);
431 return E_NOTIMPL;
432}

◆ HTMLFrameBase_get_scrolling()

static HRESULT WINAPI HTMLFrameBase_get_scrolling ( IHTMLFrameBase *  iface,
BSTR p 
)
static

Definition at line 465 of file htmlframebase.c.

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
497
498 nsAString_Finish(&nsstr);
499
500 return *p ? S_OK : E_OUTOFMEMORY;
501}
static const WCHAR autoW[]
Definition: htmlframebase.c:21
#define NS_FAILED(res)
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:238

◆ HTMLFrameBase_get_src()

static HRESULT WINAPI HTMLFrameBase_get_src ( IHTMLFrameBase *  iface,
BSTR p 
)
static

Definition at line 141 of file htmlframebase.c.

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}

◆ HTMLFrameBase_GetIDsOfNames()

static HRESULT WINAPI HTMLFrameBase_GetIDsOfNames ( IHTMLFrameBase *  iface,
REFIID  riid,
LPOLESTR rgszNames,
UINT  cNames,
LCID  lcid,
DISPID rgDispId 
)
static

Definition at line 95 of file htmlframebase.c.

97{
99
100 return IDispatchEx_GetIDsOfNames(&This->element.node.event_target.dispex.IDispatchEx_iface, riid, rgszNames,
101 cNames, lcid, rgDispId);
102}

◆ HTMLFrameBase_GetTypeInfo()

static HRESULT WINAPI HTMLFrameBase_GetTypeInfo ( IHTMLFrameBase *  iface,
UINT  iTInfo,
LCID  lcid,
ITypeInfo **  ppTInfo 
)
static

Definition at line 86 of file htmlframebase.c.

88{
90
91 return IDispatchEx_GetTypeInfo(&This->element.node.event_target.dispex.IDispatchEx_iface, iTInfo, lcid,
92 ppTInfo);
93}

◆ HTMLFrameBase_GetTypeInfoCount()

static HRESULT WINAPI HTMLFrameBase_GetTypeInfoCount ( IHTMLFrameBase *  iface,
UINT pctinfo 
)
static

Definition at line 79 of file htmlframebase.c.

80{
82
83 return IDispatchEx_GetTypeInfoCount(&This->element.node.event_target.dispex.IDispatchEx_iface, pctinfo);
84}

◆ HTMLFrameBase_Init()

void HTMLFrameBase_Init ( HTMLFrameBase This,
HTMLDocumentNode doc,
nsIDOMHTMLElement nselem,
dispex_static_data_t dispex_data 
)

Definition at line 712 of file htmlframebase.c.

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}
#define assert(x)
Definition: debug.h:53
void HTMLElement_Init(HTMLElement *This, HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, dispex_static_data_t *dispex_data)
Definition: htmlelem.c:4008
static const IHTMLFrameBase2Vtbl HTMLFrameBase2Vtbl
static const IHTMLFrameBaseVtbl HTMLFrameBaseVtbl
#define NS_OK

Referenced by HTMLFrameElement_Create(), and HTMLIFrame_Create().

◆ HTMLFrameBase_Invoke()

static HRESULT WINAPI HTMLFrameBase_Invoke ( IHTMLFrameBase *  iface,
DISPID  dispIdMember,
REFIID  riid,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pDispParams,
VARIANT pVarResult,
EXCEPINFO *  pExcepInfo,
UINT puArgErr 
)
static

Definition at line 104 of file htmlframebase.c.

107{
109
110 return IDispatchEx_Invoke(&This->element.node.event_target.dispex.IDispatchEx_iface, dispIdMember, riid,
111 lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
112}
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:531

◆ HTMLFrameBase_put_border()

static HRESULT WINAPI HTMLFrameBase_put_border ( IHTMLFrameBase *  iface,
VARIANT  v 
)
static

Definition at line 210 of file htmlframebase.c.

211{
213 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
214 return E_NOTIMPL;
215}

◆ HTMLFrameBase_put_frameBorder()

static HRESULT WINAPI HTMLFrameBase_put_frameBorder ( IHTMLFrameBase *  iface,
BSTR  v 
)
static

Definition at line 224 of file htmlframebase.c.

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}
#define debugstr_w
Definition: kernel32.h:32
void nsAString_InitDepend(nsAString *, const PRUnichar *) DECLSPEC_HIDDEN
Definition: nsembed.c:826

◆ HTMLFrameBase_put_frameSpacing()

static HRESULT WINAPI HTMLFrameBase_put_frameSpacing ( IHTMLFrameBase *  iface,
VARIANT  v 
)
static

Definition at line 272 of file htmlframebase.c.

273{
275 FIXME("(%p)->(%s)\n", This, debugstr_variant(&v));
276 return E_NOTIMPL;
277}

◆ HTMLFrameBase_put_marginHeight()

static HRESULT WINAPI HTMLFrameBase_put_marginHeight ( IHTMLFrameBase *  iface,
VARIANT  v 
)
static

Definition at line 353 of file htmlframebase.c.

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}

◆ HTMLFrameBase_put_marginWidth()

static HRESULT WINAPI HTMLFrameBase_put_marginWidth ( IHTMLFrameBase *  iface,
VARIANT  v 
)
static

Definition at line 286 of file htmlframebase.c.

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}

◆ HTMLFrameBase_put_name()

static HRESULT WINAPI HTMLFrameBase_put_name ( IHTMLFrameBase *  iface,
BSTR  v 
)
static

Definition at line 162 of file htmlframebase.c.

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}

◆ HTMLFrameBase_put_noResize()

static HRESULT WINAPI HTMLFrameBase_put_noResize ( IHTMLFrameBase *  iface,
VARIANT_BOOL  v 
)
static

Definition at line 420 of file htmlframebase.c.

421{
423 FIXME("(%p)->(%x)\n", This, v);
424 return E_NOTIMPL;
425}

◆ HTMLFrameBase_put_scrolling()

static HRESULT WINAPI HTMLFrameBase_put_scrolling ( IHTMLFrameBase *  iface,
BSTR  v 
)
static

Definition at line 434 of file htmlframebase.c.

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}
#define E_INVALIDARG
Definition: ddrawi.h:101
static const WCHAR yesW[]
Definition: htmlframebase.c:22
static const WCHAR noW[]
Definition: htmlframebase.c:23
#define strcmpiW(s1, s2)
Definition: unicode.h:39

◆ HTMLFrameBase_put_src()

static HRESULT WINAPI HTMLFrameBase_put_src ( IHTMLFrameBase *  iface,
BSTR  v 
)
static

Definition at line 114 of file htmlframebase.c.

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}
#define BINDING_NAVIGATED
Definition: binding.h:127
static HRESULT navigate_url(HHInfo *info, LPCWSTR surl)
Definition: help.c:206

◆ HTMLFrameBase_QI()

HRESULT HTMLFrameBase_QI ( HTMLFrameBase This,
REFIID  riid,
void **  ppv 
)

Definition at line 688 of file htmlframebase.c.

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}
HRESULT HTMLElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
Definition: htmlelem.c:3738
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147

Referenced by HTMLFrameElement_QI(), and HTMLIFrame_QI().

◆ HTMLFrameBase_QueryInterface()

static HRESULT WINAPI HTMLFrameBase_QueryInterface ( IHTMLFrameBase *  iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 58 of file htmlframebase.c.

59{
61
62 return IHTMLDOMNode_QueryInterface(&This->element.node.IHTMLDOMNode_iface, riid, ppv);
63}

◆ HTMLFrameBase_Release()

static ULONG WINAPI HTMLFrameBase_Release ( IHTMLFrameBase *  iface)
static

Definition at line 72 of file htmlframebase.c.

73{
75
76 return IHTMLDOMNode_Release(&This->element.node.IHTMLDOMNode_iface);
77}

◆ impl_from_IHTMLFrameBase()

◆ impl_from_IHTMLFrameBase2()

◆ set_frame_doc()

HRESULT set_frame_doc ( HTMLFrameBase frame,
nsIDOMDocument nsdoc 
)

Definition at line 26 of file htmlframebase.c.

27{
28 nsIDOMWindow *nswindow;
30 nsresult nsres;
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)
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}
HRESULT HTMLOuterWindow_Create(HTMLDocumentObj *doc_obj, nsIDOMWindow *nswindow, HTMLOuterWindow *parent, HTMLOuterWindow **ret)
Definition: htmlwindow.c:2945
HTMLOuterWindow * nswindow_to_window(const nsIDOMWindow *nswindow)
Definition: htmlwindow.c:3099
#define FAILED(hr)
Definition: intsafe.h:51
static IHTMLWindow2 * window
Definition: events.c:77
HTMLDocumentNode * doc
HTMLDocument basedoc
HTMLOuterWindow * window
HTMLDocumentObj * doc_obj
HTMLDOMNode node
HTMLElement element
HTMLOuterWindow * content_window

Referenced by HTMLFrameElement_bind_to_tree(), and HTMLIFrame_bind_to_tree().

Variable Documentation

◆ autoW

const WCHAR autoW[] = {'a','u','t','o',0}
static

Definition at line 21 of file htmlframebase.c.

Referenced by HTMLFrameBase_get_scrolling(), and HTMLFrameBase_put_scrolling().

◆ HTMLFrameBase2Vtbl

const IHTMLFrameBase2Vtbl HTMLFrameBase2Vtbl
static
Initial value:
= {
}
static HRESULT WINAPI HTMLFrameBase2_get_onload(IHTMLFrameBase2 *iface, VARIANT *p)
static HRESULT WINAPI HTMLFrameBase2_Invoke(IHTMLFrameBase2 *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
static HRESULT WINAPI HTMLFrameBase2_get_readyState(IHTMLFrameBase2 *iface, BSTR *p)
static HRESULT WINAPI HTMLFrameBase2_put_onload(IHTMLFrameBase2 *iface, VARIANT v)
static HRESULT WINAPI HTMLFrameBase2_QueryInterface(IHTMLFrameBase2 *iface, REFIID riid, void **ppv)
static ULONG WINAPI HTMLFrameBase2_AddRef(IHTMLFrameBase2 *iface)
static HRESULT WINAPI HTMLFrameBase2_get_contentWindow(IHTMLFrameBase2 *iface, IHTMLWindow2 **p)
static ULONG WINAPI HTMLFrameBase2_Release(IHTMLFrameBase2 *iface)
static HRESULT WINAPI HTMLFrameBase2_GetTypeInfoCount(IHTMLFrameBase2 *iface, UINT *pctinfo)
static HRESULT WINAPI HTMLFrameBase2_GetTypeInfo(IHTMLFrameBase2 *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
static HRESULT WINAPI HTMLFrameBase2_GetIDsOfNames(IHTMLFrameBase2 *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
static HRESULT WINAPI HTMLFrameBase2_get_allowTransparency(IHTMLFrameBase2 *iface, VARIANT_BOOL *p)
static HRESULT WINAPI HTMLFrameBase2_put_onreadystatechange(IHTMLFrameBase2 *iface, VARIANT v)
static HRESULT WINAPI HTMLFrameBase2_put_allowTransparency(IHTMLFrameBase2 *iface, VARIANT_BOOL v)
static HRESULT WINAPI HTMLFrameBase2_get_onreadystatechange(IHTMLFrameBase2 *iface, VARIANT *p)

Definition at line 670 of file htmlframebase.c.

Referenced by HTMLFrameBase_Init().

◆ HTMLFrameBaseVtbl

const IHTMLFrameBaseVtbl HTMLFrameBaseVtbl
static
Initial value:
= {
}
static HRESULT WINAPI HTMLFrameBase_put_src(IHTMLFrameBase *iface, BSTR v)
static HRESULT WINAPI HTMLFrameBase_get_border(IHTMLFrameBase *iface, VARIANT *p)
static HRESULT WINAPI HTMLFrameBase_get_scrolling(IHTMLFrameBase *iface, BSTR *p)
static HRESULT WINAPI HTMLFrameBase_put_frameSpacing(IHTMLFrameBase *iface, VARIANT v)
static HRESULT WINAPI HTMLFrameBase_put_marginWidth(IHTMLFrameBase *iface, VARIANT v)
static HRESULT WINAPI HTMLFrameBase_get_frameSpacing(IHTMLFrameBase *iface, VARIANT *p)
static HRESULT WINAPI HTMLFrameBase_get_marginHeight(IHTMLFrameBase *iface, VARIANT *p)
static HRESULT WINAPI HTMLFrameBase_put_marginHeight(IHTMLFrameBase *iface, VARIANT v)
static HRESULT WINAPI HTMLFrameBase_get_marginWidth(IHTMLFrameBase *iface, VARIANT *p)
static HRESULT WINAPI HTMLFrameBase_put_scrolling(IHTMLFrameBase *iface, BSTR v)
static HRESULT WINAPI HTMLFrameBase_get_name(IHTMLFrameBase *iface, BSTR *p)
static HRESULT WINAPI HTMLFrameBase_put_name(IHTMLFrameBase *iface, BSTR v)
static HRESULT WINAPI HTMLFrameBase_Invoke(IHTMLFrameBase *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
static HRESULT WINAPI HTMLFrameBase_GetTypeInfoCount(IHTMLFrameBase *iface, UINT *pctinfo)
Definition: htmlframebase.c:79
static ULONG WINAPI HTMLFrameBase_AddRef(IHTMLFrameBase *iface)
Definition: htmlframebase.c:65
static HRESULT WINAPI HTMLFrameBase_get_src(IHTMLFrameBase *iface, BSTR *p)
static HRESULT WINAPI HTMLFrameBase_put_frameBorder(IHTMLFrameBase *iface, BSTR v)
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_noResize(IHTMLFrameBase *iface, VARIANT_BOOL *p)
static HRESULT WINAPI HTMLFrameBase_put_noResize(IHTMLFrameBase *iface, VARIANT_BOOL v)
static HRESULT WINAPI HTMLFrameBase_get_frameBorder(IHTMLFrameBase *iface, BSTR *p)
static ULONG WINAPI HTMLFrameBase_Release(IHTMLFrameBase *iface)
Definition: htmlframebase.c:72
static HRESULT WINAPI HTMLFrameBase_GetTypeInfo(IHTMLFrameBase *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: htmlframebase.c:86
static HRESULT WINAPI HTMLFrameBase_put_border(IHTMLFrameBase *iface, VARIANT v)
static HRESULT WINAPI HTMLFrameBase_QueryInterface(IHTMLFrameBase *iface, REFIID riid, void **ppv)
Definition: htmlframebase.c:58

Definition at line 503 of file htmlframebase.c.

Referenced by HTMLFrameBase_Init().

◆ noW

const WCHAR noW[] = {'n','o',0}
static

Definition at line 23 of file htmlframebase.c.

Referenced by HTMLFrameBase_put_scrolling().

◆ pxW

const WCHAR pxW[] = {'p','x',0}
static

◆ yesW

const WCHAR yesW[] = {'y','e','s',0}
static

Definition at line 22 of file htmlframebase.c.

Referenced by HTMLFrameBase_put_scrolling().