Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
d2741776
Commit
d2741776
authored
Oct 23, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 23, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLIFrameElement::width property implementation.
parent
a741a3f9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
67 additions
and
4 deletions
+67
-4
htmliframe.c
dlls/mshtml/htmliframe.c
+29
-4
dom.c
dlls/mshtml/tests/dom.c
+38
-0
No files found.
dlls/mshtml/htmliframe.c
View file @
d2741776
...
...
@@ -256,15 +256,40 @@ static HRESULT WINAPI HTMLIFrameElement2_get_height(IHTMLIFrameElement2 *iface,
static
HRESULT
WINAPI
HTMLIFrameElement2_put_width
(
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_SetWidth
(
This
->
framebase
.
nsiframe
,
&
nsstr
);
nsAString_Finish
(
&
nsstr
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"SetWidth failed: %08x
\n
"
,
nsres
);
return
E_FAIL
;
}
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLIFrameElement2_get_width
(
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_GetWidth
(
This
->
framebase
.
nsiframe
,
&
nsstr
);
V_VT
(
p
)
=
VT_BSTR
;
return
return_nsstr
(
nsres
,
&
nsstr
,
&
V_BSTR
(
p
));
}
static
const
IHTMLIFrameElement2Vtbl
HTMLIFrameElement2Vtbl
=
{
...
...
dlls/mshtml/tests/dom.c
View file @
d2741776
...
...
@@ -5283,6 +5283,39 @@ static void _set_iframe_height(unsigned line, IHTMLElement *elem, const char *va
IHTMLIFrameElement2_Release
(
iframe
);
}
#define test_iframe_width(a,b) _test_iframe_width(__LINE__,a,b)
static
void
_test_iframe_width
(
unsigned
line
,
IHTMLElement
*
elem
,
const
char
*
exval
)
{
IHTMLIFrameElement2
*
iframe
=
_get_iframe2_iface
(
line
,
(
IUnknown
*
)
elem
);
VARIANT
v
;
HRESULT
hres
;
hres
=
IHTMLIFrameElement2_get_width
(
iframe
,
&
v
);
ok_
(
__FILE__
,
line
)(
hres
==
S_OK
,
"get_width failed: %08x
\n
"
,
hres
);
ok_
(
__FILE__
,
line
)(
V_VT
(
&
v
)
==
VT_BSTR
,
"V_VT(width) = %d
\n
"
,
V_VT
(
&
v
));
if
(
exval
)
ok_
(
__FILE__
,
line
)(
!
strcmp_wa
(
V_BSTR
(
&
v
),
exval
),
"width = %s, expected %s
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
v
)),
exval
);
else
ok_
(
__FILE__
,
line
)(
!
V_BSTR
(
&
v
),
"width = %s, expected NULL
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
v
)));
VariantClear
(
&
v
);
IHTMLIFrameElement2_Release
(
iframe
);
}
#define set_iframe_width(a,b) _set_iframe_width(__LINE__,a,b)
static
void
_set_iframe_width
(
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_width
(
iframe
,
v
);
ok_
(
__FILE__
,
line
)(
hres
==
S_OK
,
"put_width failed: %08x
\n
"
,
hres
);
VariantClear
(
&
v
);
IHTMLIFrameElement2_Release
(
iframe
);
}
static
void
test_iframe_elem
(
IHTMLElement
*
elem
)
{
IHTMLDocument2
*
content_doc
,
*
owner_doc
;
...
...
@@ -5330,6 +5363,11 @@ static void test_iframe_elem(IHTMLElement *elem)
set_iframe_height
(
elem
,
"50%"
);
test_iframe_height
(
elem
,
"50%"
);
test_iframe_width
(
elem
,
NULL
);
set_iframe_width
(
elem
,
"150px"
);
set_iframe_width
(
elem
,
"70%"
);
test_iframe_width
(
elem
,
"70%"
);
str
=
a2bstr
(
"text/html"
);
V_VT
(
&
errv
)
=
VT_ERROR
;
disp
=
NULL
;
...
...
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