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
2d5a8763
Commit
2d5a8763
authored
Aug 02, 2009
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 03, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Always return hex string in IHTMLBodyElement::get_bgColor.
parent
3858e354
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
56 additions
and
1 deletion
+56
-1
htmlbody.c
dlls/mshtml/htmlbody.c
+56
-1
No files found.
dlls/mshtml/htmlbody.c
View file @
2d5a8763
...
...
@@ -44,6 +44,61 @@ typedef struct {
#define HTMLBODY(x) (&(x)->lpHTMLBodyElementVtbl)
static
const
WCHAR
aquaW
[]
=
{
'a'
,
'q'
,
'u'
,
'a'
,
0
};
static
const
WCHAR
blackW
[]
=
{
'b'
,
'l'
,
'a'
,
'c'
,
'k'
,
0
};
static
const
WCHAR
blueW
[]
=
{
'b'
,
'l'
,
'u'
,
'e'
,
0
};
static
const
WCHAR
fuchsiaW
[]
=
{
'f'
,
'u'
,
's'
,
'h'
,
's'
,
'i'
,
'a'
,
0
};
static
const
WCHAR
grayW
[]
=
{
'g'
,
'r'
,
'a'
,
'y'
,
0
};
static
const
WCHAR
greenW
[]
=
{
'g'
,
'r'
,
'e'
,
'e'
,
'n'
,
0
};
static
const
WCHAR
limeW
[]
=
{
'l'
,
'i'
,
'm'
,
'e'
,
0
};
static
const
WCHAR
maroonW
[]
=
{
'm'
,
'a'
,
'r'
,
'o'
,
'o'
,
'n'
,
0
};
static
const
WCHAR
navyW
[]
=
{
'n'
,
'a'
,
'v'
,
'y'
,
0
};
static
const
WCHAR
oliveW
[]
=
{
'o'
,
'l'
,
'i'
,
'v'
,
'e'
,
0
};
static
const
WCHAR
purpleW
[]
=
{
'p'
,
'u'
,
'r'
,
'p'
,
'l'
,
'e'
,
0
};
static
const
WCHAR
redW
[]
=
{
'r'
,
'e'
,
'd'
,
0
};
static
const
WCHAR
silverW
[]
=
{
's'
,
'i'
,
'l'
,
'v'
,
'e'
,
'r'
,
0
};
static
const
WCHAR
tealW
[]
=
{
't'
,
'e'
,
'a'
,
'l'
,
0
};
static
const
WCHAR
whiteW
[]
=
{
'w'
,
'h'
,
'i'
,
't'
,
'e'
,
0
};
static
const
WCHAR
yellowW
[]
=
{
'y'
,
'e'
,
'l'
,
'l'
,
'o'
,
'w'
,
0
};
static
const
struct
{
LPCWSTR
keyword
;
const
WCHAR
hexstr
[
8
];
}
keyword_table
[]
=
{
{
aquaW
,
{
'#'
,
'0'
,
'0'
,
'f'
,
'f'
,
'f'
,
'f'
,
0
}},
{
blackW
,
{
'#'
,
'0'
,
'0'
,
'0'
,
'0'
,
'0'
,
'0'
,
0
}},
{
blueW
,
{
'#'
,
'0'
,
'0'
,
'0'
,
'0'
,
'f'
,
'f'
,
0
}},
{
fuchsiaW
,
{
'#'
,
'f'
,
'f'
,
'0'
,
'0'
,
'f'
,
'f'
,
0
}},
{
grayW
,
{
'#'
,
'8'
,
'0'
,
'8'
,
'0'
,
'8'
,
'0'
,
0
}},
{
greenW
,
{
'#'
,
'0'
,
'0'
,
'8'
,
'0'
,
'0'
,
'0'
,
0
}},
{
limeW
,
{
'#'
,
'0'
,
'0'
,
'f'
,
'f'
,
'0'
,
'0'
,
0
}},
{
maroonW
,
{
'#'
,
'8'
,
'0'
,
'0'
,
'0'
,
'0'
,
'0'
,
0
}},
{
navyW
,
{
'#'
,
'0'
,
'0'
,
'0'
,
'0'
,
'8'
,
'0'
,
0
}},
{
oliveW
,
{
'#'
,
'8'
,
'0'
,
'8'
,
'0'
,
'0'
,
'0'
,
0
}},
{
purpleW
,
{
'#'
,
'8'
,
'0'
,
'0'
,
'0'
,
'8'
,
'0'
,
0
}},
{
redW
,
{
'#'
,
'f'
,
'f'
,
'0'
,
'0'
,
'0'
,
'0'
,
0
}},
{
silverW
,
{
'#'
,
'c'
,
'0'
,
'c'
,
'0'
,
'c'
,
'0'
,
0
}},
{
tealW
,
{
'#'
,
'0'
,
'0'
,
'8'
,
'0'
,
'8'
,
'0'
,
0
}},
{
whiteW
,
{
'#'
,
'f'
,
'f'
,
'f'
,
'f'
,
'f'
,
'f'
,
0
}},
{
yellowW
,
{
'#'
,
'f'
,
'f'
,
'f'
,
'f'
,
'0'
,
'0'
,
0
}}
};
static
BSTR
nscolor_to_str
(
LPCWSTR
color
)
{
int
i
;
if
(
!
color
||
*
color
==
'#'
)
return
SysAllocString
(
color
);
for
(
i
=
0
;
i
<
sizeof
(
keyword_table
)
/
sizeof
(
keyword_table
[
0
]);
i
++
)
{
if
(
!
strcmpiW
(
color
,
keyword_table
[
i
].
keyword
))
return
SysAllocString
(
keyword_table
[
i
].
hexstr
);
}
WARN
(
"unknown color %s
\n
"
,
debugstr_w
(
color
));
return
SysAllocString
(
color
);
}
static
BOOL
variant_to_nscolor
(
const
VARIANT
*
v
,
nsAString
*
nsstr
)
{
switch
(
V_VT
(
v
))
{
...
...
@@ -305,7 +360,7 @@ static HRESULT WINAPI HTMLBodyElement_get_bgColor(IHTMLBodyElement *iface, VARIA
nsAString_GetData
(
&
strColor
,
&
color
);
V_VT
(
p
)
=
VT_BSTR
;
V_BSTR
(
p
)
=
SysAllocString
(
color
);
V_BSTR
(
p
)
=
nscolor_to_str
(
color
);
nsAString_Finish
(
&
strColor
);
...
...
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