- cefclient: Add background-color command-line argument (issue #1161).

- Rename cef_url.h to cef_parser.h.
- Add new CefParseCSSColor function.
This commit is contained in:
Marshall Greenblatt
2015-04-09 16:59:34 +02:00
parent 2c03492160
commit ae91d8f4e5
33 changed files with 645 additions and 434 deletions

View File

@@ -34,8 +34,8 @@
// more information.
//
#ifndef CEF_INCLUDE_CAPI_CEF_URL_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_URL_CAPI_H_
#ifndef CEF_INCLUDE_CAPI_CEF_PARSER_CAPI_H_
#define CEF_INCLUDE_CAPI_CEF_PARSER_CAPI_H_
#pragma once
#include "include/capi/cef_base_capi.h"
@@ -113,8 +113,17 @@ CEF_EXPORT cef_string_userfree_t cef_uriencode(const cef_string_t* text,
CEF_EXPORT cef_string_userfree_t cef_uridecode(const cef_string_t* text,
int convert_to_utf8, cef_uri_unescape_rule_t unescape_rule);
///
// Parses |string| which represents a CSS color value. If |strict| is true (1)
// strict parsing rules will be applied. Returns true (1) on success or false
// (0) on error. If parsing succeeds |color| will be set to the color value
// otherwise |color| will remain unchanged.
///
CEF_EXPORT int cef_parse_csscolor(const cef_string_t* string, int strict,
cef_color_t* color);
#ifdef __cplusplus
}
#endif
#endif // CEF_INCLUDE_CAPI_CEF_URL_CAPI_H_
#endif // CEF_INCLUDE_CAPI_CEF_PARSER_CAPI_H_

View File

@@ -34,8 +34,8 @@
// tools directory for more information.
//
#ifndef CEF_INCLUDE_CEF_URL_H_
#define CEF_INCLUDE_CEF_URL_H_
#ifndef CEF_INCLUDE_CEF_PARSER_H_
#define CEF_INCLUDE_CEF_PARSER_H_
#pragma once
#include <vector>
@@ -112,4 +112,15 @@ CefString CefURIDecode(const CefString& text,
bool convert_to_utf8,
cef_uri_unescape_rule_t unescape_rule);
#endif // CEF_INCLUDE_CEF_URL_H_
///
// Parses |string| which represents a CSS color value. If |strict| is true
// strict parsing rules will be applied. Returns true on success or false on
// error. If parsing succeeds |color| will be set to the color value otherwise
// |color| will remain unchanged.
///
/*--cef()--*/
bool CefParseCSSColor(const CefString& string,
bool strict,
cef_color_t& color);
#endif // CEF_INCLUDE_CEF_PARSER_H_