Skip to content

Commit

Permalink
Update to Chromium 56.0.2924.76 (#276)...
Browse files Browse the repository at this point in the history
CEF version 3.2924.1571.gcdcdfa9.
Mac: deployment target 10.9+.
Fix --fast flag in build.py.
Add --clean flag in build.py - clean c++ projects files.
  • Loading branch information
cztomczak committed Feb 27, 2017
1 parent eeef09a commit 8ffac63
Show file tree
Hide file tree
Showing 11 changed files with 110 additions and 62 deletions.
18 changes: 16 additions & 2 deletions api/ApplicationSettings.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,12 @@ in a known order. Equivalent to the `SkColor` type.

(string)
The path to a separate executable that will be launched for sub-processes.
By default the browser process executable is used. See the comments on
CefExecuteProcess() for details. Also configurable using the --browser-subprocess-path switch.
If this value is empty on Windows or Linux then the main process executable
will be used. If this value is empty on macOS then a helper executable must
exist at "Contents/Frameworks/<app> Helper.app/Contents/MacOS/<app> Helper"
in the top-level app bundle. See the comments on CefExecuteProcess() for
details. Also configurable using the "browser-subprocess-path" command-line
switch.


### cache_path
Expand Down Expand Up @@ -177,6 +181,16 @@ Description from upstream CEF:
> CefRunMessageLoop() function or multi_threaded_message_loop if possible.

### framework_dir_path

The path to the CEF framework directory on macOS. If this value is empty
then the framework must exist at "Contents/Frameworks/Chromium Embedded
Framework.framework" in the top-level app bundle. Also configurable using
the "framework-dir-path" command-line switch.

See also Issue #304.


### ignore_certificate_errors

(bool)
Expand Down
5 changes: 0 additions & 5 deletions api/BrowserSettings.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,6 @@ of the specified value will be used. The alpha component must greater than
0 to enable use of the background color but will be otherwise ignored.


### caret_browsing_enabled

(bool) Controls whether the caret position will be drawn. Also configurable using the --enable-caret-browsing switch.


### databases_disabled

(bool) Controls whether databases can be used. Also configurable using the --disable-databases switch.
Expand Down
2 changes: 1 addition & 1 deletion src/extern/cef/cef_types.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ cdef extern from "include/internal/cef_types.h":
int windowless_rendering_enabled
int no_sandbox
int external_message_pump
cef_string_t framework_dir_path

ctypedef struct CefBrowserSettings:
cef_string_t accept_language_list
Expand All @@ -77,7 +78,6 @@ cdef extern from "include/internal/cef_types.h":
cef_state_t javascript_close_windows
cef_state_t javascript_access_clipboard
cef_state_t javascript_dom_paste
cef_state_t caret_browsing
cef_state_t plugins
cef_state_t universal_access_from_file_urls
cef_state_t file_access_from_file_urls
Expand Down
11 changes: 10 additions & 1 deletion src/include/cef_crash_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@
// information; default to "CEF">
// ExternalHandler=<Windows only; Name of the external handler exe to use
// instead of re-launching the main exe; default to empty>
// BrowserCrashForwardingEnabled=<macOS only; True if browser process crashes
// should be forwarded to the system crash
// reporter; default to false>
// ServerURL=<crash server URL; default to empty>
// RateLimitEnabled=<True if uploads should be rate limited; default to true>
// MaxUploadsPerDay=<Max uploads per 24 hours, used if rate limit is enabled;
Expand Down Expand Up @@ -85,6 +88,12 @@
// directory. On Linux the CefSettings.browser_subprocess_path value will be
// used. On macOS the existing subprocess app bundle will be used.
//
// If "BrowserCrashForwardingEnabled" is set to true on macOS then browser
// process crashes will be forwarded to the system crash reporter. This results
// in the crash UI dialog being displayed to the user and crash reports being
// logged under "~/Library/Logs/DiagnosticReports". Forwarding of crash reports
// from non-browser processes and Debug builds is always disabled.
//
// If "ServerURL" is set then crashes will be uploaded as a multi-part POST
// request to the specified URL. Otherwise, reports will only be stored locally
// on disk.
Expand Down Expand Up @@ -129,7 +138,7 @@ bool CefCrashReportingEnabled();
///
// Sets or clears a specific key-value pair from the crash metadata.
///
/*--cef()--*/
/*--cef(optional_param=value)--*/
void CefSetCrashKeyValue(const CefString& key, const CefString& value);

#endif // CEF_INCLUDE_CEF_CRASH_UTIL_H_
44 changes: 28 additions & 16 deletions src/include/cef_response_filter.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,22 +57,34 @@ class CefResponseFilter : public virtual CefBase {
virtual bool InitFilter() =0;

///
// Called to filter a chunk of data. |data_in| is the input buffer containing
// |data_in_size| bytes of pre-filter data (|data_in| will be NULL if
// |data_in_size| is zero). |data_out| is the output buffer that can accept up
// to |data_out_size| bytes of filtered output data. Set |data_in_read| to the
// number of bytes that were read from |data_in|. Set |data_out_written| to
// the number of bytes that were written into |data_out|. If some or all of
// the pre-filter data was read successfully but more data is needed in order
// to continue filtering (filtered output is pending) return
// RESPONSE_FILTER_NEED_MORE_DATA. If some or all of the pre-filter data was
// read successfully and all available filtered output has been written return
// RESPONSE_FILTER_DONE. If an error occurs during filtering return
// RESPONSE_FILTER_ERROR. This method will be called repeatedly until there is
// no more data to filter (resource response is complete), |data_in_read|
// matches |data_in_size| (all available pre-filter bytes have been read), and
// the method returns RESPONSE_FILTER_DONE or RESPONSE_FILTER_ERROR. Do not
// keep a reference to the buffers passed to this method.
// Called to filter a chunk of data. Expected usage is as follows:
//
// A. Read input data from |data_in| and set |data_in_read| to the number of
// bytes that were read up to a maximum of |data_in_size|. |data_in| will
// be NULL if |data_in_size| is zero.
// B. Write filtered output data to |data_out| and set |data_out_written| to
// the number of bytes that were written up to a maximum of
// |data_out_size|. If no output data was written then all data must be
// read from |data_in| (user must set |data_in_read| = |data_in_size|).
// C. Return RESPONSE_FILTER_DONE if all output data was written or
// RESPONSE_FILTER_NEED_MORE_DATA if output data is still pending.
//
// This method will be called repeatedly until the input buffer has been
// fully read (user sets |data_in_read| = |data_in_size|) and there is no
// more input data to filter (the resource response is complete). This method
// may then be called an additional time with an empty input buffer if the
// user filled the output buffer (set |data_out_written| = |data_out_size|)
// and returned RESPONSE_FILTER_NEED_MORE_DATA to indicate that output data is
// still pending.
//
// Calls to this method will stop when one of the following conditions is met:
//
// A. There is no more input data to filter (the resource response is
// complete) and the user sets |data_out_written| = 0 or returns
// RESPONSE_FILTER_DONE to indicate that all data has been written, or;
// B. The user returns RESPONSE_FILTER_ERROR to indicate an error.
//
// Do not keep a reference to the buffers passed to this method.
///
/*--cef(optional_param=data_in,default_retval=RESPONSE_FILTER_ERROR)--*/
virtual FilterStatus Filter(void* data_in,
Expand Down
23 changes: 14 additions & 9 deletions src/include/internal/cef_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,23 @@ typedef struct _cef_settings_t {

///
// The path to a separate executable that will be launched for sub-processes.
// By default the browser process executable is used. See the comments on
// CefExecuteProcess() for details. Also configurable using the
// "browser-subprocess-path" command-line switch.
// If this value is empty on Windows or Linux then the main process executable
// will be used. If this value is empty on macOS then a helper executable must
// exist at "Contents/Frameworks/<app> Helper.app/Contents/MacOS/<app> Helper"
// in the top-level app bundle. See the comments on CefExecuteProcess() for
// details. Also configurable using the "browser-subprocess-path" command-line
// switch.
///
cef_string_t browser_subprocess_path;

///
// The path to the CEF framework directory on macOS. If this value is empty
// then the framework must exist at "Contents/Frameworks/Chromium Embedded
// Framework.framework" in the top-level app bundle. Also configurable using
// the "framework-dir-path" command-line switch.
///
cef_string_t framework_dir_path;

///
// Set to true (1) to have the browser process message loop run in a separate
// thread. If false (0) than the CefDoMessageLoopWork() function must be
Expand Down Expand Up @@ -563,12 +574,6 @@ typedef struct _cef_browser_settings_t {
///
cef_state_t javascript_dom_paste;

///
// Controls whether the caret position will be drawn. Also configurable using
// the "enable-caret-browsing" command-line switch.
///
cef_state_t caret_browsing;

///
// Controls whether any plugins will be loaded. Also configurable using the
// "disable-plugins" command-line switch.
Expand Down
1 change: 0 additions & 1 deletion src/include/internal/cef_types_wrappers.h
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,6 @@ struct CefBrowserSettingsTraits {
target->javascript_close_windows = src->javascript_close_windows;
target->javascript_access_clipboard = src->javascript_access_clipboard;
target->javascript_dom_paste = src->javascript_dom_paste;
target->caret_browsing = src->caret_browsing;
target->plugins = src->plugins;
target->universal_access_from_file_urls =
src->universal_access_from_file_urls;
Expand Down
14 changes: 7 additions & 7 deletions src/settings.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ cdef void SetApplicationSettings(
elif key == "external_message_pump":
cefAppSettings.external_message_pump = \
int(appSettings[key])
elif key == "framework_dir_path":
cefString = new CefString(&cefAppSettings.framework_dir_path)
PyToCefStringPointer(appSettings[key], cefString)
del cefString
else:
raise Exception("Invalid appSettings key: %s" % key)

Expand Down Expand Up @@ -214,14 +218,10 @@ cdef void SetBrowserSettings(
cefBrowserSettings.javascript_dom_paste = (
cef_types.STATE_ENABLED)
elif key == "caret_browsing_enabled":
if browserSettings[key]:
cefBrowserSettings.caret_browsing = (
cef_types.STATE_ENABLED)
else:
cefBrowserSettings.caret_browsing = (
cef_types.STATE_DISABLED)
# Keep the key for BC
Debug("DEPRECATED: 'caret_browsing_enabled' setting")
elif key == "java_disabled":
# Keep for BC, just log info - no error
# Keep the key for BC
Debug("DEPRECATED: 'java_disabled' setting")
elif key == "plugins_disabled":
if browserSettings[key]:
Expand Down
20 changes: 10 additions & 10 deletions src/version/cef_version_mac.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,16 @@
#ifndef CEF_INCLUDE_CEF_VERSION_H_
#define CEF_INCLUDE_CEF_VERSION_H_

#define CEF_VERSION "3.2883.1553.g80bd606"
#define CEF_VERSION "3.2924.1571.gcdcdfa9"
#define CEF_VERSION_MAJOR 3
#define CEF_COMMIT_NUMBER 1553
#define CEF_COMMIT_HASH "80bd6062d7ac4c5fd1d7bc7ee78e8e59d4a040aa"
#define CEF_COMMIT_NUMBER 1571
#define CEF_COMMIT_HASH "cdcdfa99913a01f3617a0d25a2e2f2ed145987bd"
#define COPYRIGHT_YEAR 2017

#define CHROME_VERSION_MAJOR 55
#define CHROME_VERSION_MAJOR 56
#define CHROME_VERSION_MINOR 0
#define CHROME_VERSION_BUILD 2883
#define CHROME_VERSION_PATCH 87
#define CHROME_VERSION_BUILD 2924
#define CHROME_VERSION_PATCH 76

#define DO_MAKE_STRING(p) #p
#define MAKE_STRING(p) DO_MAKE_STRING(p)
Expand All @@ -63,13 +63,13 @@ extern "C" {
// universal hash value will change if any platform is affected whereas the
// platform hash values will change only if that particular platform is
// affected.
#define CEF_API_HASH_UNIVERSAL "87b7eefcb86c87b28f86bfd7919f7d7a6cffc0d8"
#define CEF_API_HASH_UNIVERSAL "66de193ba22e1d92a99bb29d60f3107709aeefda"
#if defined(OS_WIN)
#define CEF_API_HASH_PLATFORM "00823905486d7b7222da5654fe35d2d15f65543a"
#define CEF_API_HASH_PLATFORM "8055740cd08db66cefe838a826dc90806fadfb33"
#elif defined(OS_MACOSX)
#define CEF_API_HASH_PLATFORM "f0180f006643782254250f34e858b98110a40e6e"
#define CEF_API_HASH_PLATFORM "12d8ab423df369b68d37c3667123a1812bc0d345"
#elif defined(OS_LINUX)
#define CEF_API_HASH_PLATFORM "14b19454a4231fa10a77b8955954dc95f073af6b"
#define CEF_API_HASH_PLATFORM "86ab23c0d7dafbdff7f66764cf8dac5ec1712af4"
#endif

// Returns CEF version information for the libcef library. The |entry|
Expand Down
26 changes: 23 additions & 3 deletions tools/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
# Command line args variables
DEBUG_FLAG = False
FAST_FLAG = False
CLEAN_FLAG = False
KIVY_FLAG = False
REBUILD_CPP = False
VERSION = ""
Expand All @@ -74,10 +75,10 @@ def main():
sys.exit(1)
print("[build.py] PYVERSION = %s" % PYVERSION)
print("[build.py] OS_POSTFIX2 = %s" % OS_POSTFIX2)
setup_environ()
check_cython_version()
command_line_args()
check_cython_version()
check_directories()
setup_environ()
if os.path.exists(CEFPYTHON_H):
fix_cefpython_h()
if WINDOWS:
Expand Down Expand Up @@ -159,7 +160,7 @@ def setup_environ():
raise Exception("Python 32-bit is not supported on Mac")
os.environ["ARCHFLAGS"] = "-arch x86_64"
os.environ["CEF_CCFLAGS"] += " -arch x86_64"
os.environ["CEF_LINK_FLAGS"] += " -mmacosx-version-min=10.7"
os.environ["CEF_LINK_FLAGS"] += " -mmacosx-version-min=10.9"

# -Wno-return-type-c-linkage to ignore:
# > warning: 'somefunc' has C-linkage specified, but returns
Expand Down Expand Up @@ -236,6 +237,10 @@ def command_line_args():
FAST_FLAG = True
print("[build.py] FAST mode On")

# --clean flag
if len(sys.argv) > 1 and "--clean" in sys.argv:
CLEAN_FLAG = True

# --kivy flag
if len(sys.argv) > 1 and "--kivy" in sys.argv:
KIVY_FLAG = True
Expand Down Expand Up @@ -372,8 +377,23 @@ def compile_ask_to_continue():
sys.exit(1)


def clean_cpp_projects_unix():
delete_files_by_pattern("{0}/*.o".format(CLIENT_HANDLER_DIR))
delete_files_by_pattern("{0}/*.a".format(CLIENT_HANDLER_DIR))

delete_files_by_pattern("{0}/*.o".format(SUBPROCESS_DIR))
delete_files_by_pattern("{0}/*.a".format(SUBPROCESS_DIR))
delete_files_by_pattern("{0}/subprocess".format(SUBPROCESS_DIR))

delete_files_by_pattern("{0}/*.o".format(CPP_UTILS_DIR))
delete_files_by_pattern("{0}/*.a".format(CPP_UTILS_DIR))


def compile_cpp_projects_unix():
print("[build.py] Compile C++ projects")
if CLEAN_FLAG:
print("[build.py] Clean C++ projects (--clean flag passed)")
clean_cpp_projects_unix()

# Need to allow continuing even when make fails, as it may
# fail because the "public" function declaration is not yet
Expand Down
8 changes: 1 addition & 7 deletions tools/build_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,15 +223,9 @@ def set_compiler_options(options):
# "-ffunction-sections",
])

# Build libcef_dll_wrapper:
# cmake -G "Ninja" -DPROJECT_ARCH="x86_64"
# -DCMAKE_CXX_FLAGS="-stdlib=libc++"
# -DCMAKE_BUILD_TYPE=Release ..
# ninja libcef_dll_wrapper

# LINKER ARGS
extra_link_args.extend([
"-mmacosx-version-min=10.7",
"-mmacosx-version-min=10.9",
"-Wl,-search_paths_first",
"-F"+os.path.join(CEF_BINARIES_LIBRARIES, "bin"),
"-framework", "Chromium Embedded Framework",
Expand Down

0 comments on commit 8ffac63

Please sign in to comment.