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
00d3126c
Commit
00d3126c
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::marginHeight property implementation.
parent
bb4a31a8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
90 additions
and
4 deletions
+90
-4
htmlframebase.c
dlls/mshtml/htmlframebase.c
+58
-4
dom.c
dlls/mshtml/tests/dom.c
+32
-0
No files found.
dlls/mshtml/htmlframebase.c
View file @
00d3126c
...
@@ -35,6 +35,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
...
@@ -35,6 +35,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
static
const
WCHAR
autoW
[]
=
{
'a'
,
'u'
,
't'
,
'o'
,
0
};
static
const
WCHAR
autoW
[]
=
{
'a'
,
'u'
,
't'
,
'o'
,
0
};
static
const
WCHAR
yesW
[]
=
{
'y'
,
'e'
,
's'
,
0
};
static
const
WCHAR
yesW
[]
=
{
'y'
,
'e'
,
's'
,
0
};
static
const
WCHAR
noW
[]
=
{
'n'
,
'o'
,
0
};
static
const
WCHAR
noW
[]
=
{
'n'
,
'o'
,
0
};
static
const
WCHAR
pxW
[]
=
{
'p'
,
'x'
,
0
};
HRESULT
set_frame_doc
(
HTMLFrameBase
*
frame
,
nsIDOMDocument
*
nsdoc
)
HRESULT
set_frame_doc
(
HTMLFrameBase
*
frame
,
nsIDOMDocument
*
nsdoc
)
{
{
...
@@ -286,15 +287,68 @@ static HRESULT WINAPI HTMLFrameBase_get_marginWidth(IHTMLFrameBase *iface, VARIA
...
@@ -286,15 +287,68 @@ static HRESULT WINAPI HTMLFrameBase_get_marginWidth(IHTMLFrameBase *iface, VARIA
static
HRESULT
WINAPI
HTMLFrameBase_put_marginHeight
(
IHTMLFrameBase
*
iface
,
VARIANT
v
)
static
HRESULT
WINAPI
HTMLFrameBase_put_marginHeight
(
IHTMLFrameBase
*
iface
,
VARIANT
v
)
{
{
HTMLFrameBase
*
This
=
impl_from_IHTMLFrameBase
(
iface
);
HTMLFrameBase
*
This
=
impl_from_IHTMLFrameBase
(
iface
);
FIXME
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_variant
(
&
v
));
nsAString
nsstr
;
return
E_NOTIMPL
;
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_SetMarginHeight
(
This
->
nsframe
,
&
nsstr
);
else
nsres
=
nsIDOMHTMLIFrameElement_SetMarginHeight
(
This
->
nsiframe
,
&
nsstr
);
nsAString_Finish
(
&
nsstr
);
return
NS_SUCCEEDED
(
nsres
)
?
S_OK
:
E_FAIL
;
}
}
static
HRESULT
WINAPI
HTMLFrameBase_get_marginHeight
(
IHTMLFrameBase
*
iface
,
VARIANT
*
p
)
static
HRESULT
WINAPI
HTMLFrameBase_get_marginHeight
(
IHTMLFrameBase
*
iface
,
VARIANT
*
p
)
{
{
HTMLFrameBase
*
This
=
impl_from_IHTMLFrameBase
(
iface
);
HTMLFrameBase
*
This
=
impl_from_IHTMLFrameBase
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
nsAString
nsstr
;
return
E_NOTIMPL
;
nsresult
nsres
;
HRESULT
hres
=
S_OK
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
nsAString_Init
(
&
nsstr
,
NULL
);
if
(
This
->
nsframe
)
nsres
=
nsIDOMHTMLFrameElement_GetMarginHeight
(
This
->
nsframe
,
&
nsstr
);
else
nsres
=
nsIDOMHTMLIFrameElement_GetMarginHeight
(
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
(
"SetMarginHeight failed: %08x
\n
"
,
nsres
);
hres
=
E_FAIL
;
}
nsAString_Finish
(
&
nsstr
);
return
hres
;
}
}
static
HRESULT
WINAPI
HTMLFrameBase_put_noResize
(
IHTMLFrameBase
*
iface
,
VARIANT_BOOL
v
)
static
HRESULT
WINAPI
HTMLFrameBase_put_noResize
(
IHTMLFrameBase
*
iface
,
VARIANT_BOOL
v
)
...
...
dlls/mshtml/tests/dom.c
View file @
00d3126c
...
@@ -4448,6 +4448,34 @@ static void _test_framebase_put_name(unsigned line, IHTMLElement *elem, const ch
...
@@ -4448,6 +4448,34 @@ static void _test_framebase_put_name(unsigned line, IHTMLElement *elem, const ch
IHTMLFrameBase_Release
(
fbase
);
IHTMLFrameBase_Release
(
fbase
);
}
}
#define test_framebase_marginheight(a,b) _test_framebase_marginheight(__LINE__,a,b)
static
void
_test_framebase_marginheight
(
unsigned
line
,
IHTMLFrameBase
*
framebase
,
const
char
*
exval
)
{
VARIANT
v
;
HRESULT
hres
;
hres
=
IHTMLFrameBase_get_marginHeight
(
framebase
,
&
v
);
ok_
(
__FILE__
,
line
)(
hres
==
S_OK
,
"get_marginHeight failed: %08x
\n
"
,
hres
);
ok_
(
__FILE__
,
line
)(
V_VT
(
&
v
)
==
VT_BSTR
,
"V_VT(marginHeight) = %d
\n
"
,
V_VT
(
&
v
));
if
(
exval
)
ok_
(
__FILE__
,
line
)(
!
strcmp_wa
(
V_BSTR
(
&
v
),
exval
),
"marginHeight = %s, expected %s
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
v
)),
exval
);
else
ok_
(
__FILE__
,
line
)(
!
V_BSTR
(
&
v
),
"marginHeight = %s, expected NULL
\n
"
,
wine_dbgstr_w
(
V_BSTR
(
&
v
)));
VariantClear
(
&
v
);
}
#define set_framebase_marginheight(a,b) _set_framebase_marginheight(__LINE__,a,b)
static
void
_set_framebase_marginheight
(
unsigned
line
,
IHTMLFrameBase
*
framebase
,
const
char
*
val
)
{
VARIANT
v
;
HRESULT
hres
;
V_VT
(
&
v
)
=
VT_BSTR
;
V_BSTR
(
&
v
)
=
a2bstr
(
val
);
hres
=
IHTMLFrameBase_put_marginHeight
(
framebase
,
v
);
ok_
(
__FILE__
,
line
)(
hres
==
S_OK
,
"put_marginHeight failed: %08x
\n
"
,
hres
);
VariantClear
(
&
v
);
}
static
void
test_framebase
(
IUnknown
*
unk
)
static
void
test_framebase
(
IUnknown
*
unk
)
{
{
IHTMLFrameBase
*
fbase
;
IHTMLFrameBase
*
fbase
;
...
@@ -4497,6 +4525,10 @@ static void test_framebase(IUnknown *unk)
...
@@ -4497,6 +4525,10 @@ static void test_framebase(IUnknown *unk)
ok
(
hres
==
S_OK
,
"get_frameBorder failed: %08x
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"get_frameBorder failed: %08x
\n
"
,
hres
);
ok
(
!
strcmp_wa
(
str
,
"1"
),
"frameBorder = %s, expected
\"
1
\"\n
"
,
wine_dbgstr_w
(
str
));
ok
(
!
strcmp_wa
(
str
,
"1"
),
"frameBorder = %s, expected
\"
1
\"\n
"
,
wine_dbgstr_w
(
str
));
test_framebase_marginheight
(
fbase
,
NULL
);
set_framebase_marginheight
(
fbase
,
"1px"
);
test_framebase_marginheight
(
fbase
,
"1"
);
IHTMLFrameBase_Release
(
fbase
);
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