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
81cdfc61
Commit
81cdfc61
authored
Oct 24, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 24, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLFrameBase::marginWidth property implementation.
parent
00d3126c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
91 additions
and
4 deletions
+91
-4
htmlframebase.c
dlls/mshtml/htmlframebase.c
+57
-4
dom.c
dlls/mshtml/tests/dom.c
+34
-0
No files found.
dlls/mshtml/htmlframebase.c
View file @
81cdfc61
...
...
@@ -273,15 +273,68 @@ static HRESULT WINAPI HTMLFrameBase_get_frameSpacing(IHTMLFrameBase *iface, VARI
static
HRESULT
WINAPI
HTMLFrameBase_put_marginWidth
(
IHTMLFrameBase
*
iface
,
VARIANT
v
)
{
HTMLFrameBase
*
This
=
impl_from_IHTMLFrameBase
(
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
));
if
(
This
->
nsframe
)
nsres
=
nsIDOMHTMLFrameElement_SetMarginWidth
(
This
->
nsframe
,
&
nsstr
);
else
nsres
=
nsIDOMHTMLIFrameElement_SetMarginWidth
(
This
->
nsiframe
,
&
nsstr
);
nsAString_Finish
(
&
nsstr
);
return
NS_SUCCEEDED
(
nsres
)
?
S_OK
:
E_FAIL
;
}
static
HRESULT
WINAPI
HTMLFrameBase_get_marginWidth
(
IHTMLFrameBase
*
iface
,
VARIANT
*
p
)
{
HTMLFrameBase
*
This
=
impl_from_IHTMLFrameBase
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
nsAString
nsstr
;
nsresult
nsres
;
HRESULT
hres
=
S_OK
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
nsAString_Init
(
&
nsstr
,
NULL
);
if
(
This
->
nsframe
)
nsres
=
nsIDOMHTMLFrameElement_GetMarginWidth
(
This
->
nsframe
,
&
nsstr
);
else
nsres
=
nsIDOMHTMLIFrameElement_GetMarginWidth
(
This
->
nsiframe
,
&
nsstr
);
if
(
NS_SUCCEEDED
(
nsres
))
{
const
PRUnichar
*
str
,
*
end
;
nsAString_GetData
(
&
nsstr
,
&
str
);
if
(
*
str
)
{
BSTR
ret
;
end
=
strstrW
(
str
,
pxW
);
if
(
!
end
)
end
=
str
+
strlenW
(
str
);
ret
=
SysAllocStringLen
(
str
,
end
-
str
);
if
(
ret
)
{
V_VT
(
p
)
=
VT_BSTR
;
V_BSTR
(
p
)
=
ret
;
}
else
{
hres
=
E_OUTOFMEMORY
;
}
}
else
{
V_VT
(
p
)
=
VT_BSTR
;
V_BSTR
(
p
)
=
NULL
;
}
}
else
{
ERR
(
"GetMarginWidth failed: %08x
\n
"
,
nsres
);
hres
=
E_FAIL
;
}
nsAString_Finish
(
&
nsstr
);
return
hres
;
}
static
HRESULT
WINAPI
HTMLFrameBase_put_marginHeight
(
IHTMLFrameBase
*
iface
,
VARIANT
v
)
...
...
dlls/mshtml/tests/dom.c
View file @
81cdfc61
...
...
@@ -4476,6 +4476,36 @@ static void _set_framebase_marginheight(unsigned line, IHTMLFrameBase *framebase
ok_
(
__FILE__
,
line
)(
hres
==
S_OK
,
"put_marginHeight failed: %08x
\n
"
,
hres
);
VariantClear
(
&
v
);
}
#define test_framebase_marginwidth(a,b) _test_framebase_marginwidth(__LINE__,a,b)
static
void
_test_framebase_marginwidth
(
unsigned
line
,
IHTMLFrameBase
*
framebase
,
const
char
*
exval
)
{
VARIANT
v
;
HRESULT
hres
;
hres
=
IHTMLFrameBase_get_marginWidth
(
framebase
,
&
v
);
ok_
(
__FILE__
,
line
)(
hres
==
S_OK
,
"get_marginWidth failed: %08x
\n
"
,
hres
);
ok_
(
__FILE__
,
line
)(
V_VT
(
&
v
)
==
VT_BSTR
,
"V_VT(marginWidth) = %d
\n
"
,
V_VT
(
&
v
));
if
(
exval
)
ok_
(
__FILE__
,
line
)(
!
strcmp_wa
(
V_BSTR
(
&
v
),
exval
),
"marginWidth = %s, expected %s
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
v
)),
exval
);
else
ok_
(
__FILE__
,
line
)(
!
V_BSTR
(
&
v
),
"marginWidth = %s, expected NULL
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
v
)));
VariantClear
(
&
v
);
}
#define set_framebase_marginwidth(a,b) _set_framebase_marginwidth(__LINE__,a,b)
static
void
_set_framebase_marginwidth
(
unsigned
line
,
IHTMLFrameBase
*
framebase
,
const
char
*
val
)
{
VARIANT
v
;
HRESULT
hres
;
V_VT
(
&
v
)
=
VT_BSTR
;
V_BSTR
(
&
v
)
=
a2bstr
(
val
);
hres
=
IHTMLFrameBase_put_marginWidth
(
framebase
,
v
);
ok_
(
__FILE__
,
line
)(
hres
==
S_OK
,
"put_marginWidth failed: %08x
\n
"
,
hres
);
VariantClear
(
&
v
);
}
static
void
test_framebase
(
IUnknown
*
unk
)
{
IHTMLFrameBase
*
fbase
;
...
...
@@ -4529,6 +4559,10 @@ static void test_framebase(IUnknown *unk)
set_framebase_marginheight
(
fbase
,
"1px"
);
test_framebase_marginheight
(
fbase
,
"1"
);
test_framebase_marginwidth
(
fbase
,
NULL
);
set_framebase_marginwidth
(
fbase
,
"2px"
);
test_framebase_marginwidth
(
fbase
,
"2"
);
IHTMLFrameBase_Release
(
fbase
);
}
...
...
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