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
aae2c59d
Commit
aae2c59d
authored
Oct 13, 2008
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 14, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMImgElement::get_src implementation.
parent
59c66e34
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
55 additions
and
2 deletions
+55
-2
htmlimg.c
dlls/mshtml/htmlimg.c
+19
-2
mshtml_private.h
dlls/mshtml/mshtml_private.h
+2
-0
nsio.c
dlls/mshtml/nsio.c
+17
-0
dom.c
dlls/mshtml/tests/dom.c
+17
-0
No files found.
dlls/mshtml/htmlimg.c
View file @
aae2c59d
...
...
@@ -280,8 +280,25 @@ static HRESULT WINAPI HTMLImgElement_put_src(IHTMLImgElement *iface, BSTR v)
static
HRESULT
WINAPI
HTMLImgElement_get_src
(
IHTMLImgElement
*
iface
,
BSTR
*
p
)
{
HTMLImgElement
*
This
=
HTMLIMG_THIS
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
const
PRUnichar
*
src
;
nsAString
src_str
;
nsresult
nsres
;
HRESULT
hres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
nsAString_Init
(
&
src_str
,
NULL
);
nsres
=
nsIDOMHTMLImageElement_GetSrc
(
This
->
nsimg
,
&
src_str
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"GetSrc failed: %08x
\n
"
,
nsres
);
return
E_FAIL
;
}
nsAString_GetData
(
&
src_str
,
&
src
);
hres
=
nsuri_to_url
(
src
,
p
);
nsAString_Finish
(
&
src_str
);
return
hres
;
}
static
HRESULT
WINAPI
HTMLImgElement_put_lowsrc
(
IHTMLImgElement
*
iface
,
BSTR
v
)
...
...
dlls/mshtml/mshtml_private.h
View file @
aae2c59d
...
...
@@ -502,6 +502,8 @@ void register_nsservice(nsIComponentRegistrar*,nsIServiceManager*);
void
init_nsio
(
nsIComponentManager
*
,
nsIComponentRegistrar
*
);
BOOL
install_wine_gecko
(
BOOL
);
HRESULT
nsuri_to_url
(
LPCWSTR
,
BSTR
*
);
void
hlink_frame_navigate
(
HTMLDocument
*
,
IHlinkFrame
*
,
LPCWSTR
,
nsIInputStream
*
,
DWORD
);
void
call_property_onchanged
(
ConnectionPoint
*
,
DISPID
);
...
...
dlls/mshtml/nsio.c
View file @
aae2c59d
...
...
@@ -67,6 +67,23 @@ typedef struct {
static
nsresult
create_uri
(
nsIURI
*
,
NSContainer
*
,
nsIWineURI
**
);
HRESULT
nsuri_to_url
(
LPCWSTR
nsuri
,
BSTR
*
ret
)
{
const
WCHAR
*
ptr
=
nsuri
;
static
const
WCHAR
wine_prefixW
[]
=
{
'w'
,
'i'
,
'n'
,
'e'
,
':'
};
if
(
!
strncmpW
(
nsuri
,
wine_prefixW
,
sizeof
(
wine_prefixW
)
/
sizeof
(
WCHAR
)))
ptr
+=
sizeof
(
wine_prefixW
)
/
sizeof
(
WCHAR
);
*
ret
=
SysAllocString
(
ptr
);
if
(
!*
ret
)
return
E_OUTOFMEMORY
;
TRACE
(
"%s -> %s
\n
"
,
debugstr_w
(
nsuri
),
debugstr_w
(
*
ret
));
return
S_OK
;
}
static
BOOL
exec_shldocvw_67
(
HTMLDocument
*
doc
,
LPCWSTR
url
)
{
IOleCommandTarget
*
cmdtrg
=
NULL
;
...
...
dlls/mshtml/tests/dom.c
View file @
aae2c59d
...
...
@@ -1316,6 +1316,20 @@ static void _elem_get_scroll_left(unsigned line, IUnknown *unk)
ok
(
l
==
l2
,
"unexpected left %ld, expected %ld
\n
"
,
l2
,
l
);
}
#define test_img_src(i,s) _test_img_src(__LINE__,i,s)
static
void
_test_img_src
(
unsigned
line
,
IUnknown
*
unk
,
const
char
*
exsrc
)
{
IHTMLImgElement
*
img
=
_get_img_iface
(
line
,
unk
);
BSTR
src
;
HRESULT
hres
;
hres
=
IHTMLImgElement_get_src
(
img
,
&
src
);
IHTMLImgElement_Release
(
img
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"get_src failed: %08x
\n
"
,
hres
);
ok_
(
__FILE__
,
line
)
(
!
strcmp_wa
(
src
,
exsrc
),
"get_src returned %s expected %s
\n
"
,
dbgstr_w
(
src
),
exsrc
);
SysFreeString
(
src
);
}
#define test_img_set_src(u,s) _test_img_set_src(__LINE__,u,s)
static
void
_test_img_set_src
(
unsigned
line
,
IUnknown
*
unk
,
const
char
*
src
)
{
...
...
@@ -1328,6 +1342,8 @@ static void _test_img_set_src(unsigned line, IUnknown *unk, const char *src)
IHTMLImgElement_Release
(
img
);
SysFreeString
(
tmp
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"put_src failed: %08x
\n
"
,
hres
);
_test_img_src
(
line
,
unk
,
src
);
}
#define test_img_alt(u,a) _test_img_alt(__LINE__,u,a)
...
...
@@ -3077,6 +3093,7 @@ static void test_elems(IHTMLDocument2 *doc)
elem
=
get_elem_by_id
(
doc
,
imgidW
,
TRUE
);
if
(
elem
)
{
test_img_src
((
IUnknown
*
)
elem
,
""
);
test_img_set_src
((
IUnknown
*
)
elem
,
"about:blank"
);
test_img_alt
((
IUnknown
*
)
elem
,
NULL
);
test_img_set_alt
((
IUnknown
*
)
elem
,
"alt test"
);
...
...
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