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
23306623
Commit
23306623
authored
Feb 08, 2010
by
Jacek Caban
Committed by
Alexandre Julliard
Feb 09, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Set image size in IHTMLImageElementFactory::create.
parent
bb035638
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
3 deletions
+34
-3
htmlimg.c
dlls/mshtml/htmlimg.c
+34
-3
No files found.
dlls/mshtml/htmlimg.c
View file @
23306623
...
...
@@ -724,12 +724,38 @@ static HRESULT WINAPI HTMLImageElementFactory_Invoke(IHTMLImageElementFactory *i
return
E_NOTIMPL
;
}
static
LONG
var_to_size
(
const
VARIANT
*
v
)
{
switch
(
V_VT
(
v
))
{
case
VT_EMPTY
:
return
0
;
case
VT_I4
:
return
V_I4
(
v
);
case
VT_BSTR
:
{
LONG
ret
;
HRESULT
hres
;
hres
=
VarI4FromStr
(
V_BSTR
(
v
),
0
,
0
,
&
ret
);
if
(
FAILED
(
hres
))
{
FIXME
(
"VarI4FromStr failed: %08x
\n
"
,
hres
);
return
0
;
}
return
ret
;
}
default:
FIXME
(
"unsupported size %s
\n
"
,
debugstr_variant
(
v
));
}
return
0
;
}
static
HRESULT
WINAPI
HTMLImageElementFactory_create
(
IHTMLImageElementFactory
*
iface
,
VARIANT
width
,
VARIANT
height
,
IHTMLImgElement
**
img_elem
)
{
HTMLImageElementFactory
*
This
=
HTMLIMGFACTORY_THIS
(
iface
);
IHTMLImgElement
*
img
;
HTMLElement
*
elem
;
nsIDOMHTMLElement
*
nselem
;
LONG
l
;
HRESULT
hres
;
static
const
PRUnichar
imgW
[]
=
{
'I'
,
'M'
,
'G'
,
0
};
...
...
@@ -754,7 +780,7 @@ static HRESULT WINAPI HTMLImageElementFactory_create(IHTMLImageElementFactory *i
return
E_FAIL
;
}
hres
=
IHTMLElement_QueryInterface
(
HTMLELEM
(
elem
),
&
IID_IHTMLImgElement
,
(
void
**
)
img_elem
);
hres
=
IHTMLElement_QueryInterface
(
HTMLELEM
(
elem
),
&
IID_IHTMLImgElement
,
(
void
**
)
&
img
);
if
(
FAILED
(
hres
))
{
ERR
(
"IHTMLElement_QueryInterface failed: 0x%08x
\n
"
,
hres
);
return
hres
;
...
...
@@ -762,9 +788,14 @@ static HRESULT WINAPI HTMLImageElementFactory_create(IHTMLImageElementFactory *i
nsIDOMHTMLElement_Release
(
nselem
);
if
(
V_VT
(
&
width
)
!=
VT_EMPTY
||
V_VT
(
&
height
)
!=
VT_EMPTY
)
FIXME
(
"Not setting image dimensions
\n
"
);
l
=
var_to_size
(
&
width
);
if
(
l
)
IHTMLImgElement_put_width
(
img
,
l
);
l
=
var_to_size
(
&
height
);
if
(
l
)
IHTMLImgElement_put_height
(
img
,
l
);
*
img_elem
=
img
;
return
S_OK
;
}
...
...
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