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
2710d14c
Commit
2710d14c
authored
Dec 07, 2009
by
Andrew Eikum
Committed by
Alexandre Julliard
Dec 08, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Implement IHTMLFrameBase::{get,put}_scrolling.
parent
6e3e7c9f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
97 additions
and
4 deletions
+97
-4
htmlframebase.c
dlls/mshtml/htmlframebase.c
+63
-4
dom.c
dlls/mshtml/tests/dom.c
+34
-0
No files found.
dlls/mshtml/htmlframebase.c
View file @
2710d14c
...
...
@@ -31,6 +31,10 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
mshtml
);
static
const
WCHAR
autoW
[]
=
{
'a'
,
'u'
,
't'
,
'o'
,
0
};
static
const
WCHAR
yesW
[]
=
{
'y'
,
'e'
,
's'
,
0
};
static
const
WCHAR
noW
[]
=
{
'n'
,
'o'
,
0
};
HRESULT
set_frame_doc
(
HTMLFrameBase
*
frame
,
nsIDOMDocument
*
nsdoc
)
{
nsIDOMWindow
*
nswindow
;
...
...
@@ -236,15 +240,70 @@ static HRESULT WINAPI HTMLFrameBase_get_noResize(IHTMLFrameBase *iface, VARIANT_
static
HRESULT
WINAPI
HTMLFrameBase_put_scrolling
(
IHTMLFrameBase
*
iface
,
BSTR
v
)
{
HTMLFrameBase
*
This
=
HTMLFRAMEBASE_THIS
(
iface
);
FIXME
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
return
E_NOTIMPL
;
nsAString
nsstr
;
nsresult
nsres
;
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
if
(
!
(
!
strcmpiW
(
v
,
yesW
)
||
!
strcmpiW
(
v
,
noW
)
||
!
strcmpiW
(
v
,
autoW
)))
return
E_INVALIDARG
;
if
(
This
->
nsframe
)
{
nsAString_Init
(
&
nsstr
,
v
);
nsres
=
nsIDOMHTMLFrameElement_SetScrolling
(
This
->
nsframe
,
&
nsstr
);
}
else
if
(
This
->
nsiframe
)
{
nsAString_Init
(
&
nsstr
,
v
);
nsres
=
nsIDOMHTMLIFrameElement_SetScrolling
(
This
->
nsiframe
,
&
nsstr
);
}
else
{
ERR
(
"No attached ns frame object
\n
"
);
return
E_UNEXPECTED
;
}
nsAString_Finish
(
&
nsstr
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"SetScrolling failed: 0x%08x
\n
"
,
nsres
);
return
E_FAIL
;
}
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLFrameBase_get_scrolling
(
IHTMLFrameBase
*
iface
,
BSTR
*
p
)
{
HTMLFrameBase
*
This
=
HTMLFRAMEBASE_THIS
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
nsAString
nsstr
;
const
PRUnichar
*
strdata
;
nsresult
nsres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
if
(
This
->
nsframe
)
{
nsAString_Init
(
&
nsstr
,
NULL
);
nsres
=
nsIDOMHTMLFrameElement_GetScrolling
(
This
->
nsframe
,
&
nsstr
);
}
else
if
(
This
->
nsiframe
)
{
nsAString_Init
(
&
nsstr
,
NULL
);
nsres
=
nsIDOMHTMLIFrameElement_GetScrolling
(
This
->
nsiframe
,
&
nsstr
);
}
else
{
ERR
(
"No attached ns frame object
\n
"
);
return
E_UNEXPECTED
;
}
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"GetScrolling failed: 0x%08x
\n
"
,
nsres
);
nsAString_Finish
(
&
nsstr
);
return
E_FAIL
;
}
nsAString_GetData
(
&
nsstr
,
&
strdata
);
if
(
*
strdata
)
*
p
=
SysAllocString
(
strdata
);
else
*
p
=
SysAllocString
(
autoW
);
nsAString_Finish
(
&
nsstr
);
return
*
p
?
S_OK
:
E_OUTOFMEMORY
;
}
static
const
IHTMLFrameBaseVtbl
HTMLFrameBaseVtbl
=
{
...
...
dlls/mshtml/tests/dom.c
View file @
2710d14c
...
...
@@ -5899,8 +5899,10 @@ static void test_frameset(IHTMLDocument2 *doc)
IHTMLWindow2
*
window
;
IHTMLFramesCollection2
*
frames
;
IHTMLElement
*
elem
;
IHTMLFrameBase
*
fbase
;
LONG
length
;
VARIANT
index_var
,
result_var
;
BSTR
str
;
HRESULT
hres
;
window
=
get_doc_window
(
doc
);
...
...
@@ -6026,6 +6028,38 @@ static void test_frameset(IHTMLDocument2 *doc)
/* getElementById with node name attributes */
elem
=
get_doc_elem_by_id
(
doc
,
"nm1"
);
test_elem_id
((
IUnknown
*
)
elem
,
"fr1"
);
/* get/put scrolling */
hres
=
IHTMLElement_QueryInterface
(
elem
,
&
IID_IHTMLFrameBase
,
(
void
**
)
&
fbase
);
ok
(
hres
==
S_OK
,
"Could not get IHTMLFrameBase interface: 0x%08x
\n
"
,
hres
);
hres
=
IHTMLFrameBase_get_scrolling
(
fbase
,
&
str
);
ok
(
hres
==
S_OK
,
"IHTMLFrameBase_get_scrolling failed: 0x%08x
\n
"
,
hres
);
ok
(
!
strcmp_wa
(
str
,
"auto"
),
"get_scrolling should have given 'auto', gave: %s
\n
"
,
wine_dbgstr_w
(
str
));
SysFreeString
(
str
);
str
=
a2bstr
(
"no"
);
hres
=
IHTMLFrameBase_put_scrolling
(
fbase
,
str
);
ok
(
hres
==
S_OK
,
"IHTMLFrameBase_put_scrolling failed: 0x%08x
\n
"
,
hres
);
SysFreeString
(
str
);
hres
=
IHTMLFrameBase_get_scrolling
(
fbase
,
&
str
);
ok
(
hres
==
S_OK
,
"IHTMLFrameBase_get_scrolling failed: 0x%08x
\n
"
,
hres
);
ok
(
!
strcmp_wa
(
str
,
"no"
),
"get_scrolling should have given 'no', gave: %s
\n
"
,
wine_dbgstr_w
(
str
));
SysFreeString
(
str
);
str
=
a2bstr
(
"junk"
);
hres
=
IHTMLFrameBase_put_scrolling
(
fbase
,
str
);
ok
(
hres
==
E_INVALIDARG
,
"IHTMLFrameBase_put_scrolling should have failed "
"with E_INVALIDARG, instead: 0x%08x
\n
"
,
hres
);
SysFreeString
(
str
);
hres
=
IHTMLFrameBase_get_scrolling
(
fbase
,
&
str
);
ok
(
hres
==
S_OK
,
"IHTMLFrameBase_get_scrolling failed: 0x%08x
\n
"
,
hres
);
ok
(
!
strcmp_wa
(
str
,
"no"
),
"get_scrolling should have given 'no', gave: %s
\n
"
,
wine_dbgstr_w
(
str
));
SysFreeString
(
str
);
IHTMLFrameBase_Release
(
fbase
);
IHTMLElement_Release
(
elem
);
}
...
...
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