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
ea7666a0
Commit
ea7666a0
authored
Jun 18, 2008
by
Jacek Caban
Committed by
Alexandre Julliard
Jun 18, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Change backslashes to shashes in URLs passed to IHTMLStyle::put_backgroundImage.
parent
cc021a86
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
1 deletion
+23
-1
htmlstyle.c
dlls/mshtml/htmlstyle.c
+23
-1
No files found.
dlls/mshtml/htmlstyle.c
View file @
ea7666a0
...
...
@@ -116,7 +116,27 @@ static LPWSTR fix_px_value(LPCWSTR val)
return
NULL
;
}
static
LPWSTR
fix_url_value
(
LPCWSTR
val
)
{
WCHAR
*
ret
,
*
ptr
;
static
const
WCHAR
urlW
[]
=
{
'u'
,
'r'
,
'l'
,
'('
};
if
(
strncmpW
(
val
,
urlW
,
sizeof
(
urlW
)
/
sizeof
(
WCHAR
))
||
!
strchrW
(
val
,
'\\'
))
return
NULL
;
ret
=
heap_strdupW
(
val
);
for
(
ptr
=
ret
;
*
ptr
;
ptr
++
)
{
if
(
*
ptr
==
'\\'
)
*
ptr
=
'/'
;
}
return
ret
;
}
#define ATTR_FIX_PX 1
#define ATTR_FIX_URL 2
static
HRESULT
set_style_attr
(
HTMLStyle
*
This
,
LPCWSTR
name
,
LPCWSTR
value
,
DWORD
flags
)
{
...
...
@@ -130,6 +150,8 @@ static HRESULT set_style_attr(HTMLStyle *This, LPCWSTR name, LPCWSTR value, DWOR
if
(
flags
&
ATTR_FIX_PX
)
val
=
fix_px_value
(
value
);
if
(
flags
&
ATTR_FIX_URL
)
val
=
fix_url_value
(
value
);
nsAString_Init
(
&
str_name
,
name
);
nsAString_Init
(
&
str_value
,
val
?
val
:
value
);
...
...
@@ -460,7 +482,7 @@ static HRESULT WINAPI HTMLStyle_put_backgroundImage(IHTMLStyle *iface, BSTR v)
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
return
set_style_attr
(
This
,
attrBackgroundImage
,
v
,
0
);
return
set_style_attr
(
This
,
attrBackgroundImage
,
v
,
ATTR_FIX_URL
);
}
static
HRESULT
WINAPI
HTMLStyle_get_backgroundImage
(
IHTMLStyle
*
iface
,
BSTR
*
p
)
...
...
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