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
3d685993
Commit
3d685993
authored
Mar 06, 2006
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 07, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLElementCollection::tags implementation.
parent
78872852
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
76 additions
and
10 deletions
+76
-10
htmlelem.c
dlls/mshtml/htmlelem.c
+46
-2
mshtml_private.h
dlls/mshtml/mshtml_private.h
+4
-0
nsembed.c
dlls/mshtml/nsembed.c
+19
-7
nsiface.idl
dlls/mshtml/nsiface.idl
+7
-1
No files found.
dlls/mshtml/htmlelem.c
View file @
3d685993
...
...
@@ -1096,8 +1096,52 @@ static HRESULT WINAPI HTMLElementCollection_tags(IHTMLElementCollection *iface,
VARIANT
tagName
,
IDispatch
**
pdisp
)
{
HTMLElementCollection
*
This
=
ELEMCOL_THIS
(
iface
);
FIXME
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_w
(
V_BSTR
(
&
tagName
)),
pdisp
);
return
E_NOTIMPL
;
DWORD
size
=
8
,
len
=
0
,
i
;
HTMLElement
**
elem_list
;
nsAString
tag_str
;
const
PRUnichar
*
tag
;
if
(
V_VT
(
&
tagName
)
!=
VT_BSTR
)
{
WARN
(
"Invalid arg
\n
"
);
return
E_INVALIDARG
;
}
TRACE
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_w
(
V_BSTR
(
&
tagName
)),
pdisp
);
elem_list
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
*
sizeof
(
HTMLElement
*
));
nsAString_Init
(
&
tag_str
,
NULL
);
for
(
i
=
0
;
i
<
This
->
len
;
i
++
)
{
if
(
!
This
->
elems
[
i
]
->
nselem
)
continue
;
nsIDOMElement_GetTagName
(
This
->
elems
[
i
]
->
nselem
,
&
tag_str
);
nsAString_GetData
(
&
tag_str
,
&
tag
,
NULL
);
if
(
CompareStringW
(
LOCALE_SYSTEM_DEFAULT
,
NORM_IGNORECASE
,
tag
,
-
1
,
V_BSTR
(
&
tagName
),
-
1
)
==
CSTR_EQUAL
)
{
if
(
len
==
size
)
{
size
<<=
2
;
elem_list
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
elem_list
,
size
);
}
elem_list
[
len
++
]
=
This
->
elems
[
i
];
}
}
nsAString_Finish
(
&
tag_str
);
TRACE
(
"fount %ld tags
\n
"
,
len
);
if
(
!
len
)
{
HeapFree
(
GetProcessHeap
(),
0
,
elem_list
);
elem_list
=
NULL
;
}
else
if
(
size
>
len
)
{
HeapReAlloc
(
GetProcessHeap
(),
0
,
elem_list
,
len
);
}
return
HTMLElementCollection_Create
(
This
->
ref_unk
,
elem_list
,
len
,
pdisp
);
}
#undef ELEMCOL_THIS
...
...
dlls/mshtml/mshtml_private.h
View file @
3d685993
...
...
@@ -203,6 +203,10 @@ PRUint32 nsACString_GetData(const nsACString*,const char**,PRBool*);
void
nsACString_SetData
(
nsACString
*
,
const
char
*
);
void
nsACString_Destroy
(
nsACString
*
);
void
nsAString_Init
(
nsAString
*
,
const
PRUnichar
*
);
PRUint32
nsAString_GetData
(
const
nsAString
*
,
const
PRUnichar
**
,
PRBool
*
);
void
nsAString_Finish
(
nsAString
*
);
nsIInputStream
*
create_nsstream
(
const
char
*
,
PRInt32
);
IHlink
*
Hlink_Create
(
void
);
...
...
dlls/mshtml/nsembed.c
View file @
3d685993
...
...
@@ -44,13 +44,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
#define PR_UINT32_MAX 0xffffffff
struct
nsStringContainer
{
void
*
v
;
void
*
d1
;
PRUint32
d2
;
void
*
d3
;
};
struct
nsCStringContainer
{
void
*
v
;
void
*
d1
;
...
...
@@ -68,6 +61,7 @@ static nsresult (*NS_CStringContainerFinish)(nsCStringContainer*);
static
nsresult
(
*
NS_StringSetData
)(
nsAString
*
,
const
PRUnichar
*
,
PRUint32
);
static
nsresult
(
*
NS_CStringSetData
)(
nsACString
*
,
const
char
*
,
PRUint32
);
static
nsresult
(
*
NS_NewLocalFile
)(
const
nsAString
*
,
PRBool
,
nsIFile
**
);
static
PRUint32
(
*
NS_StringGetData
)(
const
nsAString
*
,
const
PRUnichar
**
,
PRBool
*
);
static
PRUint32
(
*
NS_CStringGetData
)(
const
nsACString
*
,
const
char
**
,
PRBool
*
);
static
HINSTANCE
hXPCOM
=
NULL
;
...
...
@@ -304,6 +298,7 @@ static BOOL load_gecko(void)
NS_DLSYM
(
NS_StringSetData
);
NS_DLSYM
(
NS_CStringSetData
);
NS_DLSYM
(
NS_NewLocalFile
);
NS_DLSYM
(
NS_StringGetData
);
NS_DLSYM
(
NS_CStringGetData
);
#undef NS_DLSYM
...
...
@@ -390,6 +385,23 @@ void nsACString_Destroy(nsACString *str)
HeapFree
(
GetProcessHeap
(),
0
,
str
);
}
void
nsAString_Init
(
nsAString
*
str
,
const
PRUnichar
*
data
)
{
NS_StringContainerInit
(
str
);
if
(
data
)
NS_StringSetData
(
str
,
data
,
PR_UINT32_MAX
);
}
PRUint32
nsAString_GetData
(
const
nsAString
*
str
,
const
PRUnichar
**
data
,
PRBool
*
termited
)
{
return
NS_StringGetData
(
str
,
data
,
termited
);
}
void
nsAString_Finish
(
nsAString
*
str
)
{
NS_StringContainerFinish
(
str
);
}
nsIInputStream
*
create_nsstream
(
const
char
*
data
,
PRInt32
data_len
)
{
nsIStringInputStream
*
ret
;
...
...
dlls/mshtml/nsiface.idl
View file @
3d685993
...
...
@@ -47,8 +47,14 @@ typedef ULARGE_INTEGER PRUint64;
typedef
PRUint64
DOMTimeStamp
;
typedef
PRUint32
nsLoadFlags
;
typedef
struct
{
void
*
v
;
void
*
d1
;
PRUint32
d2
;
void
*
d3
;
}
nsStringContainer
;
typedef
struct
nsCStringContainer
nsCStringContainer
;
typedef
struct
nsStringContainer
nsStringContainer
;
typedef
nsCStringContainer
nsACString
;
typedef
nsStringContainer
nsAString
;
...
...
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