Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lorenzo Ferrillo
wine
Commits
a741a3f9
Commit
a741a3f9
authored
12 years ago
by
Jacek Caban
Committed by
Alexandre Julliard
12 years ago
Browse files
Options
Downloads
Patches
Plain Diff
mshtml: Added IHTMLIFrameElement::height property implementation.
parent
04c97d08
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dlls/mshtml/htmliframe.c
+29
-4
29 additions, 4 deletions
dlls/mshtml/htmliframe.c
dlls/mshtml/tests/dom.c
+49
-0
49 additions, 0 deletions
dlls/mshtml/tests/dom.c
with
78 additions
and
4 deletions
dlls/mshtml/htmliframe.c
+
29
−
4
View file @
a741a3f9
...
...
@@ -217,15 +217,40 @@ static HRESULT WINAPI HTMLIFrameElement2_Invoke(IHTMLIFrameElement2 *iface, DISP
static
HRESULT
WINAPI
HTMLIFrameElement2_put_height
(
IHTMLIFrameElement2
*
iface
,
VARIANT
v
)
{
HTMLIFrame
*
This
=
impl_from_IHTMLIFrameElement2
(
iface
);
FIXME
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_variant
(
&
v
));
return
E_NOTIMPL
;
nsAString
nsstr
;
nsresult
nsres
;
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_variant
(
&
v
));
if
(
V_VT
(
&
v
)
!=
VT_BSTR
)
{
FIXME
(
"Unsupported %s
\n
"
,
debugstr_variant
(
&
v
));
return
E_NOTIMPL
;
}
nsAString_InitDepend
(
&
nsstr
,
V_BSTR
(
&
v
));
nsres
=
nsIDOMHTMLIFrameElement_SetHeight
(
This
->
framebase
.
nsiframe
,
&
nsstr
);
nsAString_Finish
(
&
nsstr
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"SetHeight failed: %08x
\n
"
,
nsres
);
return
E_FAIL
;
}
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLIFrameElement2_get_height
(
IHTMLIFrameElement2
*
iface
,
VARIANT
*
p
)
{
HTMLIFrame
*
This
=
impl_from_IHTMLIFrameElement2
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
nsAString
nsstr
;
nsresult
nsres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
nsAString_Init
(
&
nsstr
,
NULL
);
nsres
=
nsIDOMHTMLIFrameElement_GetHeight
(
This
->
framebase
.
nsiframe
,
&
nsstr
);
V_VT
(
p
)
=
VT_BSTR
;
return
return_nsstr
(
nsres
,
&
nsstr
,
&
V_BSTR
(
p
));
}
static
HRESULT
WINAPI
HTMLIFrameElement2_put_width
(
IHTMLIFrameElement2
*
iface
,
VARIANT
v
)
...
...
This diff is collapsed.
Click to expand it.
dlls/mshtml/tests/dom.c
+
49
−
0
View file @
a741a3f9
...
...
@@ -878,6 +878,17 @@ static IHTMLLinkElement *_get_link_iface(unsigned line, IUnknown *unk)
return
ret
;
}
#define get_iframe2_iface(u) _get_iframe2_iface(__LINE__,u)
static
IHTMLIFrameElement2
*
_get_iframe2_iface
(
unsigned
line
,
IUnknown
*
unk
)
{
IHTMLIFrameElement2
*
ret
;
HRESULT
hres
;
hres
=
IUnknown_QueryInterface
(
unk
,
&
IID_IHTMLIFrameElement2
,
(
void
**
)
&
ret
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"Could not get IHTMLIFrameElement: %08x
\n
"
,
hres
);
return
ret
;
}
#define test_node_name(u,n) _test_node_name(__LINE__,u,n)
static
void
_test_node_name
(
unsigned
line
,
IUnknown
*
unk
,
const
char
*
exname
)
{
...
...
@@ -5239,6 +5250,39 @@ static void test_frame_doc(IUnknown *frame_elem, BOOL iframe)
IHTMLDocument2_Release
(
window_doc
);
}
#define test_iframe_height(a,b) _test_iframe_height(__LINE__,a,b)
static
void
_test_iframe_height
(
unsigned
line
,
IHTMLElement
*
elem
,
const
char
*
exval
)
{
IHTMLIFrameElement2
*
iframe
=
_get_iframe2_iface
(
line
,
(
IUnknown
*
)
elem
);
VARIANT
v
;
HRESULT
hres
;
hres
=
IHTMLIFrameElement2_get_height
(
iframe
,
&
v
);
ok_
(
__FILE__
,
line
)(
hres
==
S_OK
,
"get_height failed: %08x
\n
"
,
hres
);
ok_
(
__FILE__
,
line
)(
V_VT
(
&
v
)
==
VT_BSTR
,
"V_VT(height) = %d
\n
"
,
V_VT
(
&
v
));
if
(
exval
)
ok_
(
__FILE__
,
line
)(
!
strcmp_wa
(
V_BSTR
(
&
v
),
exval
),
"height = %s, expected %s
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
v
)),
exval
);
else
ok_
(
__FILE__
,
line
)(
!
V_BSTR
(
&
v
),
"height = %s, expected NULL
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
v
)));
VariantClear
(
&
v
);
IHTMLIFrameElement2_Release
(
iframe
);
}
#define set_iframe_height(a,b) _set_iframe_height(__LINE__,a,b)
static
void
_set_iframe_height
(
unsigned
line
,
IHTMLElement
*
elem
,
const
char
*
val
)
{
IHTMLIFrameElement2
*
iframe
=
_get_iframe2_iface
(
line
,
(
IUnknown
*
)
elem
);
VARIANT
v
;
HRESULT
hres
;
V_VT
(
&
v
)
=
VT_BSTR
;
V_BSTR
(
&
v
)
=
a2bstr
(
val
);
hres
=
IHTMLIFrameElement2_put_height
(
iframe
,
v
);
ok_
(
__FILE__
,
line
)(
hres
==
S_OK
,
"put_height failed: %08x
\n
"
,
hres
);
VariantClear
(
&
v
);
IHTMLIFrameElement2_Release
(
iframe
);
}
static
void
test_iframe_elem
(
IHTMLElement
*
elem
)
{
IHTMLDocument2
*
content_doc
,
*
owner_doc
;
...
...
@@ -5281,6 +5325,11 @@ static void test_iframe_elem(IHTMLElement *elem)
win_skip
(
"IHTMLIFrameElement3 not supported
\n
"
);
}
test_iframe_height
(
elem
,
NULL
);
set_iframe_height
(
elem
,
"100px"
);
set_iframe_height
(
elem
,
"50%"
);
test_iframe_height
(
elem
,
"50%"
);
str
=
a2bstr
(
"text/html"
);
V_VT
(
&
errv
)
=
VT_ERROR
;
disp
=
NULL
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment