Skip to content

Commit 460ce99

Browse files
committed
Update to Chromium v58 on Linux (cztomczak#354).
CEF version: 3.3029.1602.g19201cd Chromium version: 58.0.3029.33 Only Linux src/versions/ was updated. Following update instructions from Issue cztomczak#264. Update patches. Update docs. Fix PaintBuffer deprecated methods. Add --make-distrib flag in automate.py to re-make CEF binary distrib. Update run_examples.py to run gtk3.py example.
1 parent 6261d4c commit 460ce99

File tree

12 files changed

+174
-82
lines changed

12 files changed

+174
-82
lines changed

api/LoadHandler.md

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -45,23 +45,24 @@ calls to OnLoadError and/or OnLoadEnd.
4545
| frame | [Frame](Frame.md) |
4646
| __Return__ | void |
4747

48+
Description from upstream CEF:
49+
> Called after a navigation has been committed and before the browser begins
50+
> loading contents in the frame. The |frame| value will never be empty --
51+
> call the IsMain() method to check if this frame is the main frame.
52+
> |transition_type| provides information about the source of the navigation
53+
> and an accurate value is only available in the browser process. Multiple
54+
> frames may be loading at the same time. Sub-frames may start or continue
55+
> loading after the main frame load has ended. This method will not be called
56+
> for same page navigations (fragments, history state, etc.) or for
57+
> navigations that fail or are canceled before commit. For notification of
58+
> overall browser load status use OnLoadingStateChange instead.
59+
4860
This callback is called for a number of different reasons, including when
4961
history.pushState or history.replaceState changes the reference fragment
5062
for the currently loaded page. In most cases you want to use
5163
OnLoadingStateChange. In newer CEF there is |transition_type| arg that
5264
provides information about the source of the navigation.
5365

54-
Description from upstream CEF:
55-
> Called when the browser begins loading a frame. The |frame| value will
56-
> never be empty -- call the IsMain() method to check if this frame is the
57-
> main frame. |transition_type| provides information about the source of the
58-
> navigation and an accurate value is only available in the browser process.
59-
> Multiple frames may be loading at the same time. Sub-frames may
60-
> start or continue loading after the main frame load has ended. This method
61-
> will always be called for all frames irrespective of whether the request
62-
> completes successfully. For notification of overall browser load status use
63-
> [DisplayHandler](DisplayHandler.md).`OnLoadingStateChange` instead.
64-
6566

6667
### OnDomReady
6768

@@ -81,13 +82,15 @@ Not yet implemented. See [Issue #32](../issues/32).
8182
| http_code | int |
8283
| __Return__ | void |
8384

84-
Called when the browser is done loading a frame. The |frame| value will
85-
never be empty -- call the IsMain() method to check if this frame is the
86-
main frame. Multiple frames may be loading at the same time. Sub-frames may
87-
start or continue loading after the main frame load has ended. This method
88-
will always be called for all frames irrespective of whether the request
89-
completes successfully. For notification of overall browser load status use
90-
OnLoadingStateChange instead.
85+
Description from upstream CEF:
86+
> Called when the browser is done loading a frame. The |frame| value will
87+
> never be empty -- call the IsMain() method to check if this frame is the
88+
> main frame. Multiple frames may be loading at the same time. Sub-frames may
89+
> start or continue loading after the main frame load has ended. This method
90+
> will not be called for same page navigations (fragments, history state,
91+
> etc.) or for navigations that fail or are canceled before commit. For
92+
> notification of overall browser load status use OnLoadingStateChange
93+
> instead.
9194
9295
This event behaves like window.onload, it waits for all the content
9396
to load (e.g. images), there is currently no callback for
@@ -108,10 +111,12 @@ topic: http://www.magpcss.org/ceforum/viewtopic.php?f=6&t=10906
108111
| failed_url | string |
109112
| __Return__ | void |
110113

111-
Called when the resource load for a navigation fails or is canceled.
112-
|errorCode| is the error code number, |error_text_out[0]| is the error
113-
text and |failed_url| is the URL that failed to load. See
114-
net\base\net_error_list.h for complete descriptions of the error codes.
114+
Description from upstream CEF:
115+
> Called when a navigation fails or is canceled. This method may be called
116+
> by itself if before commit or in combination with OnLoadStart/OnLoadEnd if
117+
> after commit. |errorCode| is the error code number, |errorText| is the
118+
> error text and |failedUrl| is the URL that failed to load.
119+
> See net\base\net_error_list.h for complete descriptions of the error codes.
115120
116121
This callback may get called when [Browser](Browser.md).`StopLoad`
117122
is called, or when file download is aborted (see DownloadHandler).

patches/issue125.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
diff --git http_cache_transaction.cc http_cache_transaction.cc
2-
index 24002d75215d..2a44a6368558 100644
2+
index ede3541aa401..138977424d02 100644
33
--- http_cache_transaction.cc
44
+++ http_cache_transaction.cc
5-
@@ -2601,7 +2601,8 @@ int HttpCache::Transaction::WriteResponseInfoToEntry(bool truncated) {
5+
@@ -2609,7 +2609,8 @@ int HttpCache::Transaction::WriteResponseInfoToEntry(bool truncated) {
66
// blocking page is shown. An alternative would be to reverse-map the cert
77
// status to a net error and replay the net error.
88
if ((response_.headers->HasHeaderValue("cache-control", "no-store")) ||

patches/issue251.patch

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ index 29b85e84..e3c9c2df 100644
7171

7272
#endif // CEF_INCLUDE_CEF_DRAG_DATA_H_
7373
diff --git libcef/browser/osr/browser_platform_delegate_osr.cc libcef/browser/osr/browser_platform_delegate_osr.cc
74-
index 2cf44f6d..2e6b8c32 100644
74+
index 148ef49c..59cfae97 100644
7575
--- libcef/browser/osr/browser_platform_delegate_osr.cc
7676
+++ libcef/browser/osr/browser_platform_delegate_osr.cc
7777
@@ -7,6 +7,7 @@
@@ -82,7 +82,7 @@ index 2cf44f6d..2e6b8c32 100644
8282
#include "libcef/browser/osr/render_widget_host_view_osr.h"
8383
#include "libcef/browser/osr/web_contents_view_osr.h"
8484
#include "libcef/common/drag_data_impl.h"
85-
@@ -393,7 +394,9 @@ void CefBrowserPlatformDelegateOsr::StartDragging(
85+
@@ -432,7 +433,9 @@ void CefBrowserPlatformDelegateOsr::StartDragging(
8686
CefRefPtr<CefRenderHandler> handler =
8787
browser_->GetClient()->GetRenderHandler();
8888
if (handler.get()) {
@@ -94,10 +94,10 @@ index 2cf44f6d..2e6b8c32 100644
9494
base::MessageLoop::ScopedNestableTaskAllower allow(
9595
base::MessageLoop::current());
9696
diff --git libcef/common/drag_data_impl.cc libcef/common/drag_data_impl.cc
97-
index 6b632ab2..2f12b928 100644
97+
index a8e2c8e1..b0c47e8e 100644
9898
--- libcef/common/drag_data_impl.cc
9999
+++ libcef/common/drag_data_impl.cc
100-
@@ -20,6 +20,13 @@ CefDragDataImpl::CefDragDataImpl(const content::DropData& data)
100+
@@ -19,6 +19,13 @@ CefDragDataImpl::CefDragDataImpl(const content::DropData& data)
101101
read_only_(false) {
102102
}
103103

@@ -111,7 +111,7 @@ index 6b632ab2..2f12b928 100644
111111
CefDragDataImpl::CefDragDataImpl()
112112
: read_only_(false) {
113113
}
114-
@@ -32,7 +39,7 @@ CefRefPtr<CefDragData> CefDragDataImpl::Clone() {
114+
@@ -31,7 +38,7 @@ CefRefPtr<CefDragData> CefDragDataImpl::Clone() {
115115
CefDragDataImpl* drag_data = NULL;
116116
{
117117
base::AutoLock lock_scope(lock_);
@@ -120,7 +120,7 @@ index 6b632ab2..2f12b928 100644
120120
}
121121
return drag_data;
122122
}
123-
@@ -191,3 +198,20 @@ void CefDragDataImpl::SetReadOnly(bool read_only) {
123+
@@ -187,3 +194,20 @@ void CefDragDataImpl::SetReadOnly(bool read_only) {
124124

125125
read_only_ = read_only;
126126
}

src/include/cef_load_handler.h

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,16 @@ class CefLoadHandler : public virtual CefBaseRefCounted {
6767
bool canGoForward) {}
6868

6969
///
70-
// Called when the browser begins loading a frame. The |frame| value will
71-
// never be empty -- call the IsMain() method to check if this frame is the
72-
// main frame. |transition_type| provides information about the source of the
73-
// navigation and an accurate value is only available in the browser process.
74-
// Multiple frames may be loading at the same time. Sub-frames may start or
75-
// continue loading after the main frame load has ended. This method will
76-
// always be called for all frames irrespective of whether the request
77-
// completes successfully. For notification of overall browser load status use
78-
// OnLoadingStateChange instead.
70+
// Called after a navigation has been committed and before the browser begins
71+
// loading contents in the frame. The |frame| value will never be empty --
72+
// call the IsMain() method to check if this frame is the main frame.
73+
// |transition_type| provides information about the source of the navigation
74+
// and an accurate value is only available in the browser process. Multiple
75+
// frames may be loading at the same time. Sub-frames may start or continue
76+
// loading after the main frame load has ended. This method will not be called
77+
// for same page navigations (fragments, history state, etc.) or for
78+
// navigations that fail or are canceled before commit. For notification of
79+
// overall browser load status use OnLoadingStateChange instead.
7980
///
8081
/*--cef()--*/
8182
virtual void OnLoadStart(CefRefPtr<CefBrowser> browser,
@@ -87,20 +88,22 @@ class CefLoadHandler : public virtual CefBaseRefCounted {
8788
// never be empty -- call the IsMain() method to check if this frame is the
8889
// main frame. Multiple frames may be loading at the same time. Sub-frames may
8990
// start or continue loading after the main frame load has ended. This method
90-
// will always be called for all frames irrespective of whether the request
91-
// completes successfully. For notification of overall browser load status use
92-
// OnLoadingStateChange instead.
91+
// will not be called for same page navigations (fragments, history state,
92+
// etc.) or for navigations that fail or are canceled before commit. For
93+
// notification of overall browser load status use OnLoadingStateChange
94+
// instead.
9395
///
9496
/*--cef()--*/
9597
virtual void OnLoadEnd(CefRefPtr<CefBrowser> browser,
9698
CefRefPtr<CefFrame> frame,
9799
int httpStatusCode) {}
98100

99101
///
100-
// Called when the resource load for a navigation fails or is canceled.
101-
// |errorCode| is the error code number, |errorText| is the error text and
102-
// |failedUrl| is the URL that failed to load. See net\base\net_error_list.h
103-
// for complete descriptions of the error codes.
102+
// Called when a navigation fails or is canceled. This method may be called
103+
// by itself if before commit or in combination with OnLoadStart/OnLoadEnd if
104+
// after commit. |errorCode| is the error code number, |errorText| is the
105+
// error text and |failedUrl| is the URL that failed to load.
106+
// See net\base\net_error_list.h for complete descriptions of the error codes.
104107
///
105108
/*--cef(optional_param=errorText)--*/
106109
virtual void OnLoadError(CefRefPtr<CefBrowser> browser,

src/include/cef_scheme.h

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,12 @@ class CefSchemeRegistrar : public CefBaseScoped {
132132
// rules as those applied to "https" URLs. For example, loading this scheme
133133
// from other secure schemes will not trigger mixed content warnings.
134134
//
135-
// If |is_cors_enabled| is true the scheme that can be sent CORS requests.
136-
// This value should be true in most cases where |is_standard| is true.
135+
// If |is_cors_enabled| is true the scheme can be sent CORS requests. This
136+
// value should be true in most cases where |is_standard| is true.
137+
//
138+
// If |is_csp_bypassing| is true the scheme can bypass Content-Security-Policy
139+
// (CSP) checks. This value should be false in most cases where |is_standard|
140+
// is true.
137141
//
138142
// This function may be called on any thread. It should only be called once
139143
// per unique |scheme_name| value. If |scheme_name| is already registered or
@@ -145,7 +149,8 @@ class CefSchemeRegistrar : public CefBaseScoped {
145149
bool is_local,
146150
bool is_display_isolated,
147151
bool is_secure,
148-
bool is_cors_enabled) =0;
152+
bool is_cors_enabled,
153+
bool is_csp_bypassing) =0;
149154
};
150155

151156

src/include/internal/cef_types.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1947,7 +1947,6 @@ typedef struct _cef_popup_features_t {
19471947

19481948
int fullscreen;
19491949
int dialog;
1950-
cef_string_list_t additionalFeatures;
19511950
} cef_popup_features_t;
19521951

19531952
///

src/include/internal/cef_types_wrappers.h

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -509,18 +509,10 @@ struct CefPopupFeaturesTraits {
509509
s->resizable = true;
510510
}
511511

512-
static inline void clear(struct_type* s) {
513-
if (s->additionalFeatures)
514-
cef_string_list_free(s->additionalFeatures);
515-
}
512+
static inline void clear(struct_type* s) {}
516513

517514
static inline void set(const struct_type* src, struct_type* target,
518515
bool copy) {
519-
if (target->additionalFeatures)
520-
cef_string_list_free(target->additionalFeatures);
521-
target->additionalFeatures = src->additionalFeatures ?
522-
cef_string_list_copy(src->additionalFeatures) : NULL;
523-
524516
target->x = src->x;
525517
target->xSet = src->xSet;
526518
target->y = src->y;

src/linux/binaries_64bit/kivy_.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,9 @@ def start_cef(self):
174174

175175
# Initialize CEF
176176

177+
# To shutdown all CEF processes on error
178+
sys.excepthook = cef.ExceptHook
179+
177180
# noinspection PyArgumentList
178181
cef.WindowUtils.InstallX11ErrorHandlers()
179182

src/paint_buffer.pyx

Lines changed: 48 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,58 @@ cdef class PaintBuffer:
1818
cdef int height
1919
cdef Py_ssize_t length
2020

21-
def __init__(self):
22-
# TODO: Remove deprecated methods below from API reference
23-
# and update examples during next release
24-
self.GetIntPointer = self.GetPointer
25-
self.GetString = self.GetBytes
26-
2721
cpdef uintptr_t GetPointer(self) except *:
22+
# BEFORE MODIFYING CODE:
23+
# There is an exact copy of this method named "GetIntPointer"
24+
# (deprecated).
2825
return <uintptr_t>self.buffer
2926

3027
cpdef object GetBytes(self, str mode="bgra", str origin="top-left"):
28+
# BEFORE MODIFYING CODE:
29+
# There is an exact copy of this method named "GetString" (deprecated).
30+
cdef void* dest
31+
cdef py_bool dest_alloced = False
32+
cdef object ret
33+
34+
origin = origin.lower()
35+
mode = mode.lower()
36+
assert origin in ("top-left", "bottom-left"), "Invalid origin"
37+
assert mode in ("bgra", "rgba"), "Invalid mode"
38+
39+
# To get rid of a Cython warning:
40+
# | '__pyx_v_dest' may be used uninitialized in this function
41+
dest = <void*>malloc(0)
42+
43+
if mode == "rgba":
44+
if not dest_alloced:
45+
dest = <void*>malloc(self.length)
46+
dest_alloced = True
47+
SwapBufferFromBgraToRgba(dest, self.buffer, self.width,
48+
self.height)
49+
50+
if origin == "bottom-left":
51+
if not dest_alloced:
52+
dest = <void*>malloc(self.length)
53+
dest_alloced = True
54+
FlipBufferUpsideDown(dest, self.buffer, self.width, self.height)
55+
56+
if dest_alloced:
57+
ret = (<char*>dest)[:self.length]
58+
free(dest)
59+
return ret
60+
else:
61+
return (<char*>self.buffer)[:self.length]
62+
63+
# ---- DEPRECATED ---------------------------------------------------------
64+
# TODO: remove deprecated methods from API reference during next release.
65+
# TODO: remove deprecated methods after users had time to update code.
66+
67+
cpdef uintptr_t GetIntPointer(self) except *:
68+
"""@deprecated."""
69+
return <uintptr_t>self.buffer
70+
71+
cpdef object GetString(self, str mode="bgra", str origin="top-left"):
72+
"""@deprecated."""
3173
cdef void* dest
3274
cdef py_bool dest_alloced = False
3375
cdef object ret

src/version/cef_version_linux.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,16 @@
3535
#ifndef CEF_INCLUDE_CEF_VERSION_H_
3636
#define CEF_INCLUDE_CEF_VERSION_H_
3737

38-
#define CEF_VERSION "3.2987.1601.gf035232"
38+
#define CEF_VERSION "3.3029.1602.g19201cd"
3939
#define CEF_VERSION_MAJOR 3
40-
#define CEF_COMMIT_NUMBER 1601
41-
#define CEF_COMMIT_HASH "f035232c082f837d2b85bd7821a93a54fc742775"
40+
#define CEF_COMMIT_NUMBER 1602
41+
#define CEF_COMMIT_HASH "19201cdc7f399be63eca2ddd0ff1343f92389d82"
4242
#define COPYRIGHT_YEAR 2017
4343

44-
#define CHROME_VERSION_MAJOR 57
44+
#define CHROME_VERSION_MAJOR 58
4545
#define CHROME_VERSION_MINOR 0
46-
#define CHROME_VERSION_BUILD 2987
47-
#define CHROME_VERSION_PATCH 133
46+
#define CHROME_VERSION_BUILD 3029
47+
#define CHROME_VERSION_PATCH 33
4848

4949
#define DO_MAKE_STRING(p) #p
5050
#define MAKE_STRING(p) DO_MAKE_STRING(p)
@@ -63,13 +63,13 @@ extern "C" {
6363
// universal hash value will change if any platform is affected whereas the
6464
// platform hash values will change only if that particular platform is
6565
// affected.
66-
#define CEF_API_HASH_UNIVERSAL "b0a24e3e202f3d8b72f2fbc1ebc5864f96ec16ae"
66+
#define CEF_API_HASH_UNIVERSAL "f0e835273a00acd02a699af272fc8f6ff9c5645c"
6767
#if defined(OS_WIN)
68-
#define CEF_API_HASH_PLATFORM "1c6a27f840ac87c8c971350c907edbe2c5fa0387"
68+
#define CEF_API_HASH_PLATFORM "3cf7ac2b9aa61adfb9e5decdf0d32fbf78813355"
6969
#elif defined(OS_MACOSX)
70-
#define CEF_API_HASH_PLATFORM "1567db600ee83cc2a59bb8c17ca416d11a7c9b8a"
70+
#define CEF_API_HASH_PLATFORM "f1d2ed00ab93e03a215fd787e6da9127e2949fd8"
7171
#elif defined(OS_LINUX)
72-
#define CEF_API_HASH_PLATFORM "1f9f9e15bf7cf13de2557ddd411dfc9f694503b0"
72+
#define CEF_API_HASH_PLATFORM "698e69c4297cc63b9893558a8591e7bd7aeeb0d4"
7373
#endif
7474

7575
// Returns CEF version information for the libcef library. The |entry|

0 commit comments

Comments
 (0)