Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
2e52c61c
Commit
2e52c61c
authored
Oct 07, 2008
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 08, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added HTMLIFrame stub implementation.
parent
536fac7c
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
284 additions
and
3 deletions
+284
-3
Makefile.in
dlls/mshtml/Makefile.in
+1
-0
htmlelem.c
dlls/mshtml/htmlelem.c
+3
-0
htmliframe.c
dlls/mshtml/htmliframe.c
+229
-0
mshtml_private.h
dlls/mshtml/mshtml_private.h
+1
-0
nsiface.idl
dlls/mshtml/nsiface.idl
+31
-0
dom.c
dlls/mshtml/tests/dom.c
+19
-3
No files found.
dlls/mshtml/Makefile.in
View file @
2e52c61c
...
...
@@ -25,6 +25,7 @@ C_SRCS = \
htmlelemcol.c
\
htmlevent.c
\
htmlgeneric.c
\
htmliframe.c
\
htmlimg.c
\
htmlinput.c
\
htmllocation.c
\
...
...
dlls/mshtml/htmlelem.c
View file @
2e52c61c
...
...
@@ -1410,6 +1410,7 @@ HTMLElement *HTMLElement_Create(HTMLDocument *doc, nsIDOMNode *nsnode, BOOL use_
static
const
WCHAR
wszA
[]
=
{
'A'
,
0
};
static
const
WCHAR
wszBODY
[]
=
{
'B'
,
'O'
,
'D'
,
'Y'
,
0
};
static
const
WCHAR
wszIFRAME
[]
=
{
'I'
,
'F'
,
'R'
,
'A'
,
'M'
,
'E'
,
0
};
static
const
WCHAR
wszIMG
[]
=
{
'I'
,
'M'
,
'G'
,
0
};
static
const
WCHAR
wszINPUT
[]
=
{
'I'
,
'N'
,
'P'
,
'U'
,
'T'
,
0
};
static
const
WCHAR
wszOPTION
[]
=
{
'O'
,
'P'
,
'T'
,
'I'
,
'O'
,
'N'
,
0
};
...
...
@@ -1432,6 +1433,8 @@ HTMLElement *HTMLElement_Create(HTMLDocument *doc, nsIDOMNode *nsnode, BOOL use_
ret
=
HTMLAnchorElement_Create
(
nselem
);
else
if
(
!
strcmpW
(
class_name
,
wszBODY
))
ret
=
HTMLBodyElement_Create
(
nselem
);
else
if
(
!
strcmpW
(
class_name
,
wszIFRAME
))
ret
=
HTMLIFrame_Create
(
nselem
);
else
if
(
!
strcmpW
(
class_name
,
wszIMG
))
ret
=
HTMLImgElement_Create
(
nselem
);
else
if
(
!
strcmpW
(
class_name
,
wszINPUT
))
...
...
dlls/mshtml/htmliframe.c
0 → 100644
View file @
2e52c61c
/*
* Copyright 2008 Jacek Caban for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdarg.h>
#define COBJMACROS
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "ole2.h"
#include "mshtml_private.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
mshtml
);
typedef
struct
{
HTMLElement
element
;
const
IHTMLFrameBase2Vtbl
*
lpIHTMLFrameBase2Vtbl
;
LONG
ref
;
nsIDOMHTMLIFrameElement
*
nsiframe
;
}
HTMLIFrame
;
#define HTMLFRAMEBASE2(x) ((IHTMLFrameBase2*) &(x)->lpIHTMLFrameBase2Vtbl)
#define HTMLFRAMEBASE2_THIS(iface) DEFINE_THIS(HTMLIFrame, IHTMLFrameBase2, iface)
static
HRESULT
WINAPI
HTMLIFrameBase2_QueryInterface
(
IHTMLFrameBase2
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
HTMLIFrame
*
This
=
HTMLFRAMEBASE2_THIS
(
iface
);
return
IHTMLDOMNode_QueryInterface
(
HTMLDOMNODE
(
&
This
->
element
.
node
),
riid
,
ppv
);
}
static
ULONG
WINAPI
HTMLIFrameBase2_AddRef
(
IHTMLFrameBase2
*
iface
)
{
HTMLIFrame
*
This
=
HTMLFRAMEBASE2_THIS
(
iface
);
return
IHTMLDOMNode_AddRef
(
HTMLDOMNODE
(
&
This
->
element
.
node
));
}
static
ULONG
WINAPI
HTMLIFrameBase2_Release
(
IHTMLFrameBase2
*
iface
)
{
HTMLIFrame
*
This
=
HTMLFRAMEBASE2_THIS
(
iface
);
return
IHTMLDOMNode_Release
(
HTMLDOMNODE
(
&
This
->
element
.
node
));
}
static
HRESULT
WINAPI
HTMLIFrameBase2_GetTypeInfoCount
(
IHTMLFrameBase2
*
iface
,
UINT
*
pctinfo
)
{
HTMLIFrame
*
This
=
HTMLFRAMEBASE2_THIS
(
iface
);
FIXME
(
"(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
HTMLIFrameBase2_GetTypeInfo
(
IHTMLFrameBase2
*
iface
,
UINT
iTInfo
,
LCID
lcid
,
ITypeInfo
**
ppTInfo
)
{
HTMLIFrame
*
This
=
HTMLFRAMEBASE2_THIS
(
iface
);
FIXME
(
"(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
HTMLIFrameBase2_GetIDsOfNames
(
IHTMLFrameBase2
*
iface
,
REFIID
riid
,
LPOLESTR
*
rgszNames
,
UINT
cNames
,
LCID
lcid
,
DISPID
*
rgDispId
)
{
HTMLIFrame
*
This
=
HTMLFRAMEBASE2_THIS
(
iface
);
FIXME
(
"(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
HTMLIFrameBase2_Invoke
(
IHTMLFrameBase2
*
iface
,
DISPID
dispIdMember
,
REFIID
riid
,
LCID
lcid
,
WORD
wFlags
,
DISPPARAMS
*
pDispParams
,
VARIANT
*
pVarResult
,
EXCEPINFO
*
pExcepInfo
,
UINT
*
puArgErr
)
{
HTMLIFrame
*
This
=
HTMLFRAMEBASE2_THIS
(
iface
);
FIXME
(
"(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
HTMLIFrameBase2_get_contentWindow
(
IHTMLFrameBase2
*
iface
,
IHTMLWindow2
**
p
)
{
HTMLIFrame
*
This
=
HTMLFRAMEBASE2_THIS
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
HTMLIFrameBase2_put_onload
(
IHTMLFrameBase2
*
iface
,
VARIANT
v
)
{
HTMLIFrame
*
This
=
HTMLFRAMEBASE2_THIS
(
iface
);
FIXME
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_variant
(
&
v
));
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
HTMLIFrameBase2_get_onload
(
IHTMLFrameBase2
*
iface
,
VARIANT
*
p
)
{
HTMLIFrame
*
This
=
HTMLFRAMEBASE2_THIS
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
HTMLIFrameBase2_put_onreadystatechange
(
IHTMLFrameBase2
*
iface
,
VARIANT
v
)
{
HTMLIFrame
*
This
=
HTMLFRAMEBASE2_THIS
(
iface
);
FIXME
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_variant
(
&
v
));
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
HTMLIFrameBase2_get_onreadystatechange
(
IHTMLFrameBase2
*
iface
,
VARIANT
*
p
)
{
HTMLIFrame
*
This
=
HTMLFRAMEBASE2_THIS
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
HTMLIFrameBase2_get_readyState
(
IHTMLFrameBase2
*
iface
,
BSTR
*
p
)
{
HTMLIFrame
*
This
=
HTMLFRAMEBASE2_THIS
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
HTMLIFrameBase2_put_allowTransparency
(
IHTMLFrameBase2
*
iface
,
VARIANT_BOOL
v
)
{
HTMLIFrame
*
This
=
HTMLFRAMEBASE2_THIS
(
iface
);
FIXME
(
"(%p)->(%x)
\n
"
,
This
,
v
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
HTMLIFrameBase2_get_allowTransparency
(
IHTMLFrameBase2
*
iface
,
VARIANT_BOOL
*
p
)
{
HTMLIFrame
*
This
=
HTMLFRAMEBASE2_THIS
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
}
#undef HTMLFRAMEBASE2_THIS
static
const
IHTMLFrameBase2Vtbl
HTMLIFrameBase2Vtbl
=
{
HTMLIFrameBase2_QueryInterface
,
HTMLIFrameBase2_AddRef
,
HTMLIFrameBase2_Release
,
HTMLIFrameBase2_GetTypeInfoCount
,
HTMLIFrameBase2_GetTypeInfo
,
HTMLIFrameBase2_GetIDsOfNames
,
HTMLIFrameBase2_Invoke
,
HTMLIFrameBase2_get_contentWindow
,
HTMLIFrameBase2_put_onload
,
HTMLIFrameBase2_get_onload
,
HTMLIFrameBase2_put_onreadystatechange
,
HTMLIFrameBase2_get_onreadystatechange
,
HTMLIFrameBase2_get_readyState
,
HTMLIFrameBase2_put_allowTransparency
,
HTMLIFrameBase2_get_allowTransparency
};
#define HTMLIFRAME_NODE_THIS(iface) DEFINE_THIS2(HTMLIFrame, element.node, iface)
static
HRESULT
HTMLIFrame_QI
(
HTMLDOMNode
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
HTMLIFrame
*
This
=
HTMLIFRAME_NODE_THIS
(
iface
);
*
ppv
=
NULL
;
if
(
IsEqualGUID
(
&
IID_IHTMLFrameBase2
,
riid
))
{
TRACE
(
"(%p)->(IID_IHTMLFrameBase2 %p)
\n
"
,
This
,
ppv
);
*
ppv
=
HTMLFRAMEBASE2
(
This
);
}
else
{
return
HTMLElement_QI
(
&
This
->
element
.
node
,
riid
,
ppv
);
}
IUnknown_AddRef
((
IUnknown
*
)
*
ppv
);
return
S_OK
;
}
static
void
HTMLIFrame_destructor
(
HTMLDOMNode
*
iface
)
{
HTMLIFrame
*
This
=
HTMLIFRAME_NODE_THIS
(
iface
);
if
(
This
->
nsiframe
)
nsIDOMHTMLIFrameElement_Release
(
This
->
nsiframe
);
HTMLElement_destructor
(
&
This
->
element
.
node
);
}
#undef HTMLIFRAME_NODE_THIS
static
const
NodeImplVtbl
HTMLIFrameImplVtbl
=
{
HTMLIFrame_QI
,
HTMLIFrame_destructor
};
HTMLElement
*
HTMLIFrame_Create
(
nsIDOMHTMLElement
*
nselem
)
{
HTMLIFrame
*
ret
;
nsresult
nsres
;
ret
=
heap_alloc_zero
(
sizeof
(
HTMLIFrame
));
ret
->
lpIHTMLFrameBase2Vtbl
=
&
HTMLIFrameBase2Vtbl
;
ret
->
element
.
node
.
vtbl
=
&
HTMLIFrameImplVtbl
;
HTMLElement_Init
(
&
ret
->
element
);
nsres
=
nsIDOMHTMLElement_QueryInterface
(
nselem
,
&
IID_nsIDOMHTMLIFrameElement
,
(
void
**
)
&
ret
->
nsiframe
);
if
(
NS_FAILED
(
nsres
))
ERR
(
"Could not get nsIDOMHTMLIFrameElement iface: %08x
\n
"
,
nsres
);
return
&
ret
->
element
;
}
dlls/mshtml/mshtml_private.h
View file @
2e52c61c
...
...
@@ -561,6 +561,7 @@ HTMLElement *HTMLElement_Create(HTMLDocument*,nsIDOMNode*,BOOL);
HTMLElement
*
HTMLCommentElement_Create
(
HTMLDocument
*
,
nsIDOMNode
*
);
HTMLElement
*
HTMLAnchorElement_Create
(
nsIDOMHTMLElement
*
);
HTMLElement
*
HTMLBodyElement_Create
(
nsIDOMHTMLElement
*
);
HTMLElement
*
HTMLIFrame_Create
(
nsIDOMHTMLElement
*
);
HTMLElement
*
HTMLImgElement_Create
(
nsIDOMHTMLElement
*
);
HTMLElement
*
HTMLInputElement_Create
(
nsIDOMHTMLElement
*
);
HTMLElement
*
HTMLOptionElement_Create
(
nsIDOMHTMLElement
*
);
...
...
dlls/mshtml/nsiface.idl
View file @
2e52c61c
...
...
@@ -1447,6 +1447,37 @@ interface nsIDOMHTMLTableRowElement : nsIDOMHTMLElement
[
object,
uuid(a6cf90ba-15b3-11d2-932e-00805f8add32),
local
/* FROZEN */
]
interface nsIDOMHTMLIFrameElement : nsIDOMHTMLElement
{
nsresult GetAlign(nsAString *aAlign);
nsresult SetAlign(const nsAString *aAlign);
nsresult GetFrameBorder(nsAString *aFrameBorder);
nsresult SetFrameBorder(const nsAString *aFrameBorder);
nsresult GetHeight(nsAString *aHeight);
nsresult SetHeight(const nsAString *aHeight);
nsresult GetLongDesc(nsAString *aLongDesc);
nsresult SetLongDesc(const nsAString *aLongDesc);
nsresult GetMarginHeight(nsAString *aMarginHeight);
nsresult SetMarginHeight(const nsAString *aMarginHeight);
nsresult GetMarginWidth(nsAString *aMarginWidth);
nsresult SetMarginWidth(const nsAString *aMarginWidth);
nsresult GetName(nsAString *aName);
nsresult SetName(const nsAString *aName);
nsresult GetScrolling(nsAString *aScrolling);
nsresult SetScrolling(const nsAString *aScrolling);
nsresult GetSrc(nsAString *aSrc);
nsresult SetSrc(const nsAString *aSrc);
nsresult GetWidth(nsAString *aWidth);
nsresult SetWidth(const nsAString *aWidth);
nsresult GetContentDocument(nsIDOMDocument **aContentDocument);
}
[
object,
uuid(94928ab3-8b63-11d3-989d-001083010e9b),
local
/* FROZEN */
...
...
dlls/mshtml/tests/dom.c
View file @
2e52c61c
...
...
@@ -49,6 +49,7 @@ static const char elem_test_str[] =
"<script id=
\"
sc
\"
type=
\"
text/javascript
\"
></script>"
"<test />"
"<img id=
\"
imgid
\"
/>"
"<iframe src=
\"
about:blank
\"
></iframe>"
"</body></html>"
;
static
const
char
indent_test_str
[]
=
"<html><head><title>test</title></head><body>abc<br /><a href=
\"
about:blank
\"
>123</a></body></html>"
;
...
...
@@ -86,7 +87,8 @@ typedef enum {
ET_COMMENT
,
ET_IMG
,
ET_TR
,
ET_TD
ET_TD
,
ET_IFRAME
}
elem_type_t
;
static
const
IID
*
const
none_iids
[]
=
{
...
...
@@ -271,6 +273,18 @@ static const IID * const td_iids[] = {
NULL
};
static
const
IID
*
const
iframe_iids
[]
=
{
&
IID_IHTMLDOMNode
,
&
IID_IHTMLDOMNode2
,
&
IID_IHTMLElement
,
&
IID_IHTMLElement2
,
&
IID_IHTMLElement3
,
&
IID_IHTMLFrameBase2
,
&
IID_IDispatchEx
,
&
IID_IConnectionPointContainer
,
NULL
};
static
const
IID
*
const
generic_iids
[]
=
{
&
IID_IHTMLDOMNode
,
&
IID_IHTMLDOMNode2
,
...
...
@@ -329,7 +343,8 @@ static const elem_type_info_t elem_type_infos[] = {
{
"!"
,
comment_iids
,
&
DIID_DispHTMLCommentElement
},
{
"IMG"
,
img_iids
,
&
DIID_DispHTMLImg
},
{
"TR"
,
tr_iids
,
&
DIID_DispHTMLTableRow
},
{
"TD"
,
td_iids
,
NULL
}
{
"TD"
,
td_iids
,
NULL
},
{
"IFRAME"
,
iframe_iids
,
NULL
}
};
static
const
char
*
dbgstr_w
(
LPCWSTR
str
)
...
...
@@ -2642,7 +2657,8 @@ static void test_elems(IHTMLDocument2 *doc)
ET_TD
,
ET_SCRIPT
,
ET_TEST
,
ET_IMG
ET_IMG
,
ET_IFRAME
};
static
const
elem_type_t
item_types
[]
=
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment