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
3e0fa120
Commit
3e0fa120
authored
Oct 13, 2009
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 13, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLWindow2::get_length implementation.
parent
2d4236bf
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
3 deletions
+49
-3
htmlwindow.c
dlls/mshtml/htmlwindow.c
+21
-2
nsiface.idl
dlls/mshtml/nsiface.idl
+14
-1
dom.c
dlls/mshtml/tests/dom.c
+14
-0
No files found.
dlls/mshtml/htmlwindow.c
View file @
3e0fa120
...
@@ -177,8 +177,27 @@ static HRESULT WINAPI HTMLWindow2_item(IHTMLWindow2 *iface, VARIANT *pvarIndex,
...
@@ -177,8 +177,27 @@ static HRESULT WINAPI HTMLWindow2_item(IHTMLWindow2 *iface, VARIANT *pvarIndex,
static
HRESULT
WINAPI
HTMLWindow2_get_length
(
IHTMLWindow2
*
iface
,
LONG
*
p
)
static
HRESULT
WINAPI
HTMLWindow2_get_length
(
IHTMLWindow2
*
iface
,
LONG
*
p
)
{
{
HTMLWindow
*
This
=
HTMLWINDOW2_THIS
(
iface
);
HTMLWindow
*
This
=
HTMLWINDOW2_THIS
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
nsIDOMWindowCollection
*
nscollection
;
return
E_NOTIMPL
;
PRUint32
length
;
nsresult
nsres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
nsres
=
nsIDOMWindow_GetFrames
(
This
->
nswindow
,
&
nscollection
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"GetFrames failed: %08x
\n
"
,
nsres
);
return
E_FAIL
;
}
nsres
=
nsIDOMWindowCollection_GetLength
(
nscollection
,
&
length
);
nsIDOMWindowCollection_Release
(
nscollection
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"GetLength failed: %08x
\n
"
,
nsres
);
return
E_FAIL
;
}
*
p
=
length
;
return
S_OK
;
}
}
static
HRESULT
WINAPI
HTMLWindow2_get_frames
(
IHTMLWindow2
*
iface
,
IHTMLFramesCollection2
**
p
)
static
HRESULT
WINAPI
HTMLWindow2_get_frames
(
IHTMLWindow2
*
iface
,
IHTMLFramesCollection2
**
p
)
...
...
dlls/mshtml/nsiface.idl
View file @
3e0fa120
...
@@ -89,6 +89,7 @@ interface nsIDocumentStateListener;
...
@@ -89,6 +89,7 @@ interface nsIDocumentStateListener;
interface
nsIDOMCSSStyleSheet
;
interface
nsIDOMCSSStyleSheet
;
interface
nsIDOMDocumentView
;
interface
nsIDOMDocumentView
;
interface
nsIDocumentObserver
;
interface
nsIDocumentObserver
;
interface
nsIDOMWindow
;
interface
IMoniker
;
interface
IMoniker
;
...
@@ -109,7 +110,6 @@ typedef nsISupports nsISHistory;
...
@@ -109,7 +110,6 @@ typedef nsISupports nsISHistory;
typedef nsISupports nsIWidget;
typedef nsISupports nsIWidget;
typedef nsISupports nsIHttpHeaderVisitor;
typedef nsISupports nsIHttpHeaderVisitor;
typedef nsISupports nsIDOMBarProp;
typedef nsISupports nsIDOMBarProp;
typedef nsISupports nsIDOMWindowCollection;
typedef nsISupports nsIPrompt;
typedef nsISupports nsIPrompt;
typedef nsISupports nsIAuthPrompt;
typedef nsISupports nsIAuthPrompt;
typedef nsISupports nsIDOMNamedNodeMap;
typedef nsISupports nsIDOMNamedNodeMap;
...
@@ -1108,6 +1108,19 @@ interface nsISelection : nsISupports
...
@@ -1108,6 +1108,19 @@ interface nsISelection : nsISupports
[
[
object,
object,
uuid(a6cf906f-15b3-11d2-932e-00805f8add32),
local
/* FROZEN */
]
interface nsIDOMWindowCollection : nsISupports
{
nsresult GetLength(PRUint32 *aLength);
nsresult Item(PRUint32 index, nsIDOMWindow **_retval);
nsresult NamedItem(const nsAString *name, nsIDOMWindow **_retval);
}
[
object,
uuid(a6cf906b-15b3-11d2-932e-00805f8add32),
uuid(a6cf906b-15b3-11d2-932e-00805f8add32),
local
local
/* FROZEN */
/* FROZEN */
...
...
dlls/mshtml/tests/dom.c
View file @
3e0fa120
...
@@ -851,6 +851,16 @@ static void _set_window_name(unsigned line, IHTMLWindow2 *window, const char *na
...
@@ -851,6 +851,16 @@ static void _set_window_name(unsigned line, IHTMLWindow2 *window, const char *na
_test_window_name
(
line
,
window
,
name
);
_test_window_name
(
line
,
window
,
name
);
}
}
#define test_window_length(w,l) _test_window_length(__LINE__,w,l)
static
void
_test_window_length
(
unsigned
line
,
IHTMLWindow2
*
window
,
LONG
exlen
)
{
LONG
length
=
-
1
;
HRESULT
hres
;
hres
=
IHTMLWindow2_get_length
(
window
,
&
length
);
ok_
(
__FILE__
,
line
)(
hres
==
S_OK
,
"get_length failed: %08x
\n
"
,
hres
);
ok_
(
__FILE__
,
line
)(
length
==
exlen
,
"length = %d, expected %d
\n
"
,
length
,
exlen
);
}
static
void
test_get_set_attr
(
IHTMLDocument2
*
doc
)
static
void
test_get_set_attr
(
IHTMLDocument2
*
doc
)
{
{
...
@@ -4414,6 +4424,7 @@ static void test_window(IHTMLDocument2 *doc)
...
@@ -4414,6 +4424,7 @@ static void test_window(IHTMLDocument2 *doc)
test_window_name
(
window
,
NULL
);
test_window_name
(
window
,
NULL
);
set_window_name
(
window
,
"test"
);
set_window_name
(
window
,
"test"
);
test_window_length
(
window
,
0
);
IHTMLWindow2_Release
(
window
);
IHTMLWindow2_Release
(
window
);
}
}
...
@@ -4648,6 +4659,8 @@ static void test_iframe_elem(IHTMLElement *elem)
...
@@ -4648,6 +4659,8 @@ static void test_iframe_elem(IHTMLElement *elem)
ok
(
hres
==
S_OK
,
"get_contentWindow failed: %08x
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"get_contentWindow failed: %08x
\n
"
,
hres
);
ok
(
content_window
!=
NULL
,
"contentWindow = NULL
\n
"
);
ok
(
content_window
!=
NULL
,
"contentWindow = NULL
\n
"
);
test_window_length
(
content_window
,
0
);
content_doc
=
NULL
;
content_doc
=
NULL
;
hres
=
IHTMLWindow2_get_document
(
content_window
,
&
content_doc
);
hres
=
IHTMLWindow2_get_document
(
content_window
,
&
content_doc
);
IHTMLWindow2_Release
(
content_window
);
IHTMLWindow2_Release
(
content_window
);
...
@@ -5202,6 +5215,7 @@ static void test_elems(IHTMLDocument2 *doc)
...
@@ -5202,6 +5215,7 @@ static void test_elems(IHTMLDocument2 *doc)
window
=
get_doc_window
(
doc
);
window
=
get_doc_window
(
doc
);
test_window_name
(
window
,
NULL
);
test_window_name
(
window
,
NULL
);
set_window_name
(
window
,
"test name"
);
set_window_name
(
window
,
"test name"
);
test_window_length
(
window
,
1
);
IHTMLWindow2_Release
(
window
);
IHTMLWindow2_Release
(
window
);
}
}
...
...
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