From 4f195e3b634b2cb96e6f74d8b9d90f77a44830f5 Mon Sep 17 00:00:00 2001 From: Andras Becsi Date: Thu, 22 May 2014 20:43:17 +0200 Subject: Remove separately maintained patches from repository We maintain them on top of the Chromium snapshot. A new script tools/scripts/patch_upstream.py replaced patches/patch-chromium.sh with the recent snapshot update. The patches that we have on top of the baseline version are prepared from the chromium snapshot and applied on the upstream chromium checkout. A consequence of this is that init-repository.py -u from now on requires a snapshot checkout as well. Change-Id: I639c45904b72952804e5227ebc948a8859cf74dd Reviewed-by: Zeno Albisser --- ...Add-WebEngineContext-to-RunLoop-s-friends.patch | 30 - .../0002-Mac-Use-libc-instead-of-stdlibc.patch | 161 ------ ...does-not-support-incomplete-types-in-temp.patch | 612 --------------------- .../0004-Do-not-modify-the-child-path.patch | 26 - .../0005-Do-not-warn-for-header-hygiene.patch | 26 - ...ld-files-necessary-for-touch-and-gestures.patch | 80 --- ...-Wno-deprecated-register-from-common.gypi.patch | 35 -- ...icts-when-including-both-QtOpenGL-headers.patch | 192 ------- ...ard-declare-UIResourceRequest-Identity-an.patch | 133 ----- ...Fix-the-build-with-a-GL-ES2-configured-Qt.patch | 161 ------ ...finition-of-MessagePumpX11-GetDefaultXDis.patch | 33 -- ...rs-for-the-Qt-delegated-renderer-integrat.patch | 81 --- ...to-setup-GL-contexts-sharing-with-QtQuick.patch | 106 ---- .../0014-Declare-a-Qt-IPC-message-class.patch | 25 - .../0015-Blacklist-the-skypebuttons-plugin.patch | 32 -- ...Running-without-renderer-sandbox-error-me.patch | 26 - ...board.h-to-allow-building-clipboard_qt.cp.patch | 55 -- ...Get-rid-of-the-gtk-pango-cairo-dependency.patch | 86 --- ...-https-codereview.chromium.org-137433002-.patch | 34 -- patches/chromium/0020-fixup-select-elements.patch | 52 -- ...ctly-override-libc-symbols-from-the-libra.patch | 129 ----- .../0022-Adjust-gyp-defines-for-eLinux.patch | 134 ----- ...3-Fix-Renderer-and-GPU-threads-on-windows.patch | 78 --- ...move-leftovers-from-WebKitSystemInterface.patch | 28 - ...verrideable-path-for-perl-gperf-and-bison.patch | 26 - ...Add-missing-dependency-to-khronos_headers.patch | 32 -- .../0004-Disable-rubber-banding-on-Mac.patch | 24 - .../0005-Use-compositor-with-select-popups.patch | 238 -------- .../0006-Use-compositor-for-page-popups.patch | 190 ------- .../icu/0001-Do-not-use-icu-config-on-eLinux.patch | 32 -- ...ot-forward-declare-WebRtcVoiceChannelInfo.patch | 63 --- ...path-for-QtWebEngine-build-in-Windows-spe.patch | 29 - ...a_vec.c-to-avoid-hard-soft-float-mismatch.patch | 45 -- ...-grd-files-outside-of-chromium-source-dir.patch | 43 -- .../gyp/0001-Fix-build-with-toplevel-dir.patch | 28 - ...dd-support-for-libc-to-xcode_emulation.py.patch | 23 - ...0003-Allow-letting-qmake-do-the-link-step.patch | 70 --- ...from-overridding-the-RuntimeLibrary-cflag.patch | 55 -- patches/patch-chromium.sh | 69 --- patches/update-patches.sh | 72 --- tools/scripts/clean_gitformatpatch_patchid.py | 53 -- 41 files changed, 3447 deletions(-) delete mode 100644 patches/chromium/0001-Add-WebEngineContext-to-RunLoop-s-friends.patch delete mode 100644 patches/chromium/0002-Mac-Use-libc-instead-of-stdlibc.patch delete mode 100644 patches/chromium/0003-Clang-libc-does-not-support-incomplete-types-in-temp.patch delete mode 100644 patches/chromium/0004-Do-not-modify-the-child-path.patch delete mode 100644 patches/chromium/0005-Do-not-warn-for-header-hygiene.patch delete mode 100644 patches/chromium/0006-Build-files-necessary-for-touch-and-gestures.patch delete mode 100644 patches/chromium/0007-remove-Wno-deprecated-register-from-common.gypi.patch delete mode 100644 patches/chromium/0008-Solve-conflicts-when-including-both-QtOpenGL-headers.patch delete mode 100644 patches/chromium/0009-Do-not-forward-declare-UIResourceRequest-Identity-an.patch delete mode 100644 patches/chromium/0010-Fix-the-build-with-a-GL-ES2-configured-Qt.patch delete mode 100644 patches/chromium/0011-Hide-the-definition-of-MessagePumpX11-GetDefaultXDis.patch delete mode 100644 patches/chromium/0012-Add-accessors-for-the-Qt-delegated-renderer-integrat.patch delete mode 100644 patches/chromium/0013-Add-seams-to-setup-GL-contexts-sharing-with-QtQuick.patch delete mode 100644 patches/chromium/0014-Declare-a-Qt-IPC-message-class.patch delete mode 100644 patches/chromium/0015-Blacklist-the-skypebuttons-plugin.patch delete mode 100644 patches/chromium/0016-Remove-the-Running-without-renderer-sandbox-error-me.patch delete mode 100644 patches/chromium/0017-Update-clipboard.h-to-allow-building-clipboard_qt.cp.patch delete mode 100644 patches/chromium/0018-Get-rid-of-the-gtk-pango-cairo-dependency.patch delete mode 100644 patches/chromium/0019-Cherry-pick-https-codereview.chromium.org-137433002-.patch delete mode 100644 patches/chromium/0020-fixup-select-elements.patch delete mode 100644 patches/chromium/0021-Do-not-directly-override-libc-symbols-from-the-libra.patch delete mode 100644 patches/chromium/0022-Adjust-gyp-defines-for-eLinux.patch delete mode 100644 patches/chromium/0023-Fix-Renderer-and-GPU-threads-on-windows.patch delete mode 100644 patches/chromium/third_party/WebKit/0001-Remove-leftovers-from-WebKitSystemInterface.patch delete mode 100644 patches/chromium/third_party/WebKit/0002-Overrideable-path-for-perl-gperf-and-bison.patch delete mode 100644 patches/chromium/third_party/WebKit/0003-Add-missing-dependency-to-khronos_headers.patch delete mode 100644 patches/chromium/third_party/WebKit/0004-Disable-rubber-banding-on-Mac.patch delete mode 100644 patches/chromium/third_party/WebKit/0005-Use-compositor-with-select-popups.patch delete mode 100644 patches/chromium/third_party/WebKit/0006-Use-compositor-for-page-popups.patch delete mode 100644 patches/chromium/third_party/icu/0001-Do-not-use-icu-config-on-eLinux.patch delete mode 100644 patches/chromium/third_party/libjingle/source/talk/0001-Do-not-forward-declare-WebRtcVoiceChannelInfo.patch delete mode 100644 patches/chromium/third_party/libvpx/0001-LIBVPX-Add-path-for-QtWebEngine-build-in-Windows-spe.patch delete mode 100644 patches/chromium/third_party/openssl/0001-Use-chacha_vec.c-to-avoid-hard-soft-float-mismatch.patch delete mode 100644 patches/chromium/tools/grit/0001-GRIT-Allow-grd-files-outside-of-chromium-source-dir.patch delete mode 100644 patches/chromium/tools/gyp/0001-Fix-build-with-toplevel-dir.patch delete mode 100644 patches/chromium/tools/gyp/0002-Add-support-for-libc-to-xcode_emulation.py.patch delete mode 100644 patches/chromium/tools/gyp/0003-Allow-letting-qmake-do-the-link-step.patch delete mode 100644 patches/chromium/v8/0001-Prevent-V8-from-overridding-the-RuntimeLibrary-cflag.patch delete mode 100755 patches/patch-chromium.sh delete mode 100755 patches/update-patches.sh delete mode 100755 tools/scripts/clean_gitformatpatch_patchid.py diff --git a/patches/chromium/0001-Add-WebEngineContext-to-RunLoop-s-friends.patch b/patches/chromium/0001-Add-WebEngineContext-to-RunLoop-s-friends.patch deleted file mode 100644 index 7d6fadb24..000000000 --- a/patches/chromium/0001-Add-WebEngineContext-to-RunLoop-s-friends.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Jocelyn Turcotte -Date: Tue, 11 Jun 2013 15:44:26 +0200 -Subject: Add WebEngineContext to RunLoop's friends. - ---- - base/run_loop.h | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/base/run_loop.h b/base/run_loop.h -index 0dce634..055b1b8 100644 ---- a/base/run_loop.h -+++ b/base/run_loop.h -@@ -10,6 +10,8 @@ - #include "base/memory/weak_ptr.h" - #include "base/message_loop/message_loop.h" - -+class WebEngineContext; -+ - namespace base { - #if defined(OS_ANDROID) - class MessagePumpForUI; -@@ -76,6 +78,7 @@ class BASE_EXPORT RunLoop { - - private: - friend class MessageLoop; -+ friend class ::WebEngineContext; - #if defined(OS_ANDROID) - // Android doesn't support the blocking MessageLoop::Run, so it calls - // BeforeRun and AfterRun directly. diff --git a/patches/chromium/0002-Mac-Use-libc-instead-of-stdlibc.patch b/patches/chromium/0002-Mac-Use-libc-instead-of-stdlibc.patch deleted file mode 100644 index 3ff182bca..000000000 --- a/patches/chromium/0002-Mac-Use-libc-instead-of-stdlibc.patch +++ /dev/null @@ -1,161 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Zeno Albisser -Date: Thu, 27 Jun 2013 15:51:43 +0200 -Subject: Mac: Use libc++ instead of stdlibc++. - -- Add a missing include file to process_iterator_mac.cc. -- Disable Chromium clang plugins. -- Add a use_libcpp variable to common.gypi that can be used - to build with libc++ instead of libstdc++. - In this case several warnings also must be disabled, - And the mac deployment target must be bumped to 10.7. -- ext/hash_map and ext/hash_set are deprecated. - Use unordered containers as a replacement. ---- - base/process/process_iterator_mac.cc | 1 + - build/common.gypi | 32 +++++++++++++++++++++++++++++--- - third_party/protobuf/config.h | 27 ++++++++++++++------------- - 3 files changed, 44 insertions(+), 16 deletions(-) - -diff --git a/base/process/process_iterator_mac.cc b/base/process/process_iterator_mac.cc -index 29daa2d..e35c2ae 100644 ---- a/base/process/process_iterator_mac.cc -+++ b/base/process/process_iterator_mac.cc -@@ -7,6 +7,7 @@ - #include - #include - #include -+#include - - #include "base/logging.h" - #include "base/strings/string_util.h" -diff --git a/build/common.gypi b/build/common.gypi -index d7b385c..89f86bb 100644 ---- a/build/common.gypi -+++ b/build/common.gypi -@@ -343,7 +343,7 @@ - # Run tools/clang/scripts/update.sh to make sure they are compiled. - # This causes 'clang_chrome_plugins_flags' to be set. - # Has no effect if 'clang' is not set as well. -- 'clang_use_chrome_plugins%': 1, -+ 'clang_use_chrome_plugins%': 0, - - # Enable building with ASAN (Clang's -fsanitize=address option). - # -fsanitize=address only works with clang, but asan=1 implies clang=1 -@@ -1232,6 +1232,9 @@ - # rlz codes for searches but do not use the library. - 'enable_rlz%': 0, - -+ # Compile with libc++ instead of libstdc++. -+ 'use_libcpp%' : 0, -+ - # Turns on the i18n support in V8. - 'v8_enable_i18n_support': 1, - -@@ -1512,10 +1515,10 @@ - # someplace that Xcode doesn't know about, set mac_sdk_path to the - # path to the SDK; when set to a non-empty string, SDK detection - # based on mac_sdk_min will be bypassed entirely. -- 'mac_sdk_min%': '10.6', -+ 'mac_sdk_min%': '10.7', - 'mac_sdk_path%': '', - -- 'mac_deployment_target%': '10.6', -+ 'mac_deployment_target%': '10.7', - }, - - 'mac_sdk_min': '<(mac_sdk_min)', -@@ -1525,6 +1528,7 @@ - # Compile in Breakpad support by default so that it can be - # tested, even if it is not enabled by default at runtime. - 'mac_breakpad_compiled_in%': 1, -+ - 'conditions': [ - # mac_product_name is set to the name of the .app bundle as it should - # appear on disk. This duplicates data from -@@ -2134,6 +2138,17 @@ - ['use_clipboard_aurax11==1', { - 'defines': ['USE_CLIPBOARD_AURAX11=1'], - }], -+ ['use_libcpp==1', { -+ 'defines': ['USE_UNORDERED_CONTAINERS=1'], -+ 'cflags_cc': [ -+ '-Wno-deprecated-declarations', -+ '-Wno-newline-eof', -+ '-Wno-unused-value', -+ '-Wno-unused-variable', -+ '-Wno-unused-function', -+ '-stdlib=libc++' -+ ], -+ }], - ['enable_one_click_signin==1', { - 'defines': ['ENABLE_ONE_CLICK_SIGNIN'], - }], -@@ -4046,6 +4061,17 @@ - '-Wno-deprecated-register', - ], - }], -+ ['use_libcpp==1', { -+ 'OTHER_CPLUSPLUSFLAGS': ['-stdlib=libc++'], -+ 'USE_LIBCPP': 'YES', -+ 'WARNING_CFLAGS': [ -+ '-Wno-deprecated-declarations', -+ '-Wno-newline-eof', -+ '-Wno-unused-value', -+ '-Wno-unused-variable', -+ '-Wno-unused-function', -+ ], -+ }], - ['clang==1 and clang_use_chrome_plugins==1', { - 'OTHER_CFLAGS': [ - '<@(clang_chrome_plugins_flags)', -diff --git a/third_party/protobuf/config.h b/third_party/protobuf/config.h -index dcc0041..affcf55 100644 ---- a/third_party/protobuf/config.h -+++ b/third_party/protobuf/config.h -@@ -1,31 +1,32 @@ - /* config.h. Generated from config.h.in by configure. */ - /* config.h.in. Generated from configure.ac by autoheader. */ - --/* the name of */ --#define HASH_MAP_CLASS hash_map -+#if defined(USE_UNORDERED_CONTAINERS) -+ -+#define HASH_MAP_H -+#define HASH_SET_H -+#define HASH_NAMESPACE std -+#define HASH_MAP_CLASS unordered_map -+#define HASH_SET_CLASS unordered_set - --/* the location of */ --#if defined(USE_STLPORT) --#define HASH_MAP_H - #else --#define HASH_MAP_H --#endif - --/* the namespace of hash_map/hash_set */ - #if defined(USE_STLPORT) -+#define HASH_MAP_H -+#define HASH_SET_H - #define HASH_NAMESPACE std - #else -+#define HASH_MAP_H -+#define HASH_SET_H - #define HASH_NAMESPACE __gnu_cxx - #endif - - /* the name of */ -+#define HASH_MAP_CLASS hash_map -+ -+/* the name of */ - #define HASH_SET_CLASS hash_set - --/* the location of */ --#if defined(USE_STLPORT) --#define HASH_SET_H --#else --#define HASH_SET_H - #endif - - /* Define to 1 if you have the header file. */ diff --git a/patches/chromium/0003-Clang-libc-does-not-support-incomplete-types-in-temp.patch b/patches/chromium/0003-Clang-libc-does-not-support-incomplete-types-in-temp.patch deleted file mode 100644 index 66e8feb4f..000000000 --- a/patches/chromium/0003-Clang-libc-does-not-support-incomplete-types-in-temp.patch +++ /dev/null @@ -1,612 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Zeno Albisser -Date: Thu, 27 Jun 2013 15:58:32 +0200 -Subject: Clang / libc++ does not support incomplete types in templates. See: - http://clang.llvm.org/compatibility.html#undep_incomplete - -Therefore forward declarations must be removed in several places: -- AudioBus::QueuedAudioBuffer -- base::Callback -- GURL -- HttpAuthCache::Entry -- ImageFamily::MapKey -- MediaStreamDispatcher::Request -- MediaStreamDispatcher::Stream -- MediaStreamDispatcherHost::StreamRequest -- MessagePortService::MessagePort -- MockCertVerifier::Rule -- PepperRendererInstanceData -- RuleBasedHostResolverProc::Rule -- WebURLError -- WebURLLoaderMockFactory::ResponseInfo -- WorkerDevToolsManager::InspectedWorker -- WorkerDevToolsManager::TerminatedInspectedWorker ---- - base/callback_forward.h | 9 +----- - .../browser/devtools/worker_devtools_manager.cc | 26 ------------------ - content/browser/devtools/worker_devtools_manager.h | 26 ++++++++++++++++-- - content/browser/message_port_service.cc | 22 --------------- - content/browser/message_port_service.h | 23 +++++++++++++++- - content/common/gpu/gpu_messages.h | 4 ++- - content/renderer/media/media_stream_dispatcher.cc | 31 --------------------- - content/renderer/media/media_stream_dispatcher.h | 31 +++++++++++++++++++-- - content/renderer/pepper/message_channel.cc | 12 -------- - content/renderer/pepper/message_channel.h | 18 ++++++++---- - gpu/config/dx_diag_node.cc | 4 +++ - gpu/config/dx_diag_node.h | 6 ++++ - media/filters/ffmpeg_audio_decoder.cc | 6 ---- - media/filters/ffmpeg_audio_decoder.h | 7 ++++- - net/cert/mock_cert_verifier.cc | 19 ------------- - net/cert/mock_cert_verifier.h | 20 +++++++++++++- - net/dns/mock_host_resolver.cc | 31 --------------------- - net/dns/mock_host_resolver.h | 32 +++++++++++++++++++++- - 18 files changed, 158 insertions(+), 169 deletions(-) - -diff --git a/base/callback_forward.h b/base/callback_forward.h -index 7983248..8538bb2 100644 ---- a/base/callback_forward.h -+++ b/base/callback_forward.h -@@ -5,13 +5,6 @@ - #ifndef BASE_CALLBACK_FORWARD_H_ - #define BASE_CALLBACK_FORWARD_H_ - --namespace base { -- --template --class Callback; -- --typedef Callback Closure; -- --} // namespace base -+#include "base/callback.h" - - #endif // BASE_CALLBACK_FORWARD_H -diff --git a/content/browser/devtools/worker_devtools_manager.cc b/content/browser/devtools/worker_devtools_manager.cc -index f060881..983c55c 100644 ---- a/content/browser/devtools/worker_devtools_manager.cc -+++ b/content/browser/devtools/worker_devtools_manager.cc -@@ -51,19 +51,6 @@ base::LazyInstance::Leaky g_orphan_map = LAZY_INSTANCE_INITIALIZER; - - } // namespace - --struct WorkerDevToolsManager::TerminatedInspectedWorker { -- TerminatedInspectedWorker(WorkerId id, -- const GURL& url, -- const base::string16& name) -- : old_worker_id(id), -- worker_url(url), -- worker_name(name) {} -- WorkerId old_worker_id; -- GURL worker_url; -- base::string16 worker_name; --}; -- -- - class WorkerDevToolsManager::WorkerDevToolsAgentHost - : public IPCDevToolsAgentHost { - public: -@@ -202,19 +189,6 @@ class WorkerDevToolsManager::DetachedClientHosts { - } - }; - --struct WorkerDevToolsManager::InspectedWorker { -- InspectedWorker(WorkerProcessHost* host, int route_id, const GURL& url, -- const base::string16& name) -- : host(host), -- route_id(route_id), -- worker_url(url), -- worker_name(name) {} -- WorkerProcessHost* const host; -- int const route_id; -- GURL worker_url; -- base::string16 worker_name; --}; -- - // static - WorkerDevToolsManager* WorkerDevToolsManager::GetInstance() { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); -diff --git a/content/browser/devtools/worker_devtools_manager.h b/content/browser/devtools/worker_devtools_manager.h -index 8a9a708..955b1db 100644 ---- a/content/browser/devtools/worker_devtools_manager.h -+++ b/content/browser/devtools/worker_devtools_manager.h -@@ -54,7 +54,20 @@ class WorkerDevToolsManager { - private: - friend struct DefaultSingletonTraits; - class DetachedClientHosts; -- struct InspectedWorker; -+ -+ struct InspectedWorker { -+ InspectedWorker(WorkerProcessHost* host, int route_id, const GURL& url, -+ const base::string16& name) -+ : host(host), -+ route_id(route_id), -+ worker_url(url), -+ worker_name(name) {} -+ WorkerProcessHost* const host; -+ int const route_id; -+ GURL worker_url; -+ base::string16 worker_name; -+ }; -+ - typedef std::list InspectedWorkersList; - - WorkerDevToolsManager(); -@@ -84,7 +97,16 @@ class WorkerDevToolsManager { - - InspectedWorkersList inspected_workers_; - -- struct TerminatedInspectedWorker; -+ struct TerminatedInspectedWorker { -+ TerminatedInspectedWorker(WorkerId id, const GURL& url, const base::string16& name) -+ : old_worker_id(id), -+ worker_url(url), -+ worker_name(name) {} -+ WorkerId old_worker_id; -+ GURL worker_url; -+ base::string16 worker_name; -+ }; -+ - typedef std::list TerminatedInspectedWorkers; - // List of terminated workers for which there may be a devtools client on - // the UI thread. Worker entry is added into this list when inspected worker -diff --git a/content/browser/message_port_service.cc b/content/browser/message_port_service.cc -index 0d9f608..25c2b44 100644 ---- a/content/browser/message_port_service.cc -+++ b/content/browser/message_port_service.cc -@@ -9,28 +9,6 @@ - - namespace content { - --struct MessagePortService::MessagePort { -- // |filter| and |route_id| are what we need to send messages to the port. -- // |filter| is just a weak pointer since we get notified when its process has -- // gone away and remove it. -- MessagePortMessageFilter* filter; -- int route_id; -- // A globally unique id for this message port. -- int message_port_id; -- // The globally unique id of the entangled message port. -- int entangled_message_port_id; -- // If true, all messages to this message port are queued and not delivered. -- // This is needed so that when a message port is sent between processes all -- // pending message get transferred. There are two possibilities for pending -- // messages: either they are already received by the child process, or they're -- // in-flight. This flag ensures that the latter type get flushed through the -- // system. -- // This flag should only be set to true in response to -- // MessagePortHostMsg_QueueMessages. -- bool queue_messages; -- QueuedMessages queued_messages; --}; -- - MessagePortService* MessagePortService::GetInstance() { - return Singleton::get(); - } -diff --git a/content/browser/message_port_service.h b/content/browser/message_port_service.h -index 6689591..3e197a4 100644 ---- a/content/browser/message_port_service.h -+++ b/content/browser/message_port_service.h -@@ -64,7 +64,28 @@ class MessagePortService { - // verify that the message port id exists. - void Erase(int message_port_id); - -- struct MessagePort; -+ struct MessagePort { -+ // |filter| and |route_id| are what we need to send messages to the port. -+ // |filter| is just a weak pointer since we get notified when its process has -+ // gone away and remove it. -+ MessagePortMessageFilter* filter; -+ int route_id; -+ // A globally unique id for this message port. -+ int message_port_id; -+ // The globally unique id of the entangled message port. -+ int entangled_message_port_id; -+ // If true, all messages to this message port are queued and not delivered. -+ // This is needed so that when a message port is sent between processes all -+ // pending message get transferred. There are two possibilities for pending -+ // messages: either they are already received by the child process, or they're -+ // in-flight. This flag ensures that the latter type get flushed through the -+ // system. -+ // This flag should only be set to true in response to -+ // MessagePortHostMsg_QueueMessages. -+ bool queue_messages; -+ QueuedMessages queued_messages; -+ }; -+ - typedef std::map MessagePorts; - MessagePorts message_ports_; - -diff --git a/content/common/gpu/gpu_messages.h b/content/common/gpu/gpu_messages.h -index 936a8a0..084b2d8 100644 ---- a/content/common/gpu/gpu_messages.h -+++ b/content/common/gpu/gpu_messages.h -@@ -116,10 +116,12 @@ IPC_STRUCT_BEGIN(GpuStreamTextureMsg_MatrixChanged_Params) - IPC_STRUCT_END() - #endif - -- IPC_STRUCT_TRAITS_BEGIN(gpu::DxDiagNode) -+#if defined(OS_WIN) -+IPC_STRUCT_TRAITS_BEGIN(gpu::DxDiagNode) - IPC_STRUCT_TRAITS_MEMBER(values) - IPC_STRUCT_TRAITS_MEMBER(children) - IPC_STRUCT_TRAITS_END() -+#endif - - IPC_STRUCT_TRAITS_BEGIN(gpu::GpuPerformanceStats) - IPC_STRUCT_TRAITS_MEMBER(graphics) -diff --git a/content/renderer/media/media_stream_dispatcher.cc b/content/renderer/media/media_stream_dispatcher.cc -index 6890ffc..96f92fb 100644 ---- a/content/renderer/media/media_stream_dispatcher.cc -+++ b/content/renderer/media/media_stream_dispatcher.cc -@@ -30,37 +30,6 @@ bool RemoveStreamDeviceFromArray(const StreamDeviceInfo device_info, - - } // namespace - --// A request is identified by pair (request_id, handler), or ipc_request. --// There could be multiple clients making requests and each has its own --// request_id sequence. --// The ipc_request is garanteed to be unique when it's created in --// MediaStreamDispatcher. --struct MediaStreamDispatcher::Request { -- Request(const base::WeakPtr& handler, -- int request_id, -- int ipc_request) -- : handler(handler), -- request_id(request_id), -- ipc_request(ipc_request) { -- } -- bool IsThisRequest( -- int request_id1, -- const base::WeakPtr& handler1) { -- return (request_id1 == request_id && handler1.get() == handler.get()); -- } -- base::WeakPtr handler; -- int request_id; -- int ipc_request; --}; -- --struct MediaStreamDispatcher::Stream { -- Stream() {} -- ~Stream() {} -- base::WeakPtr handler; -- StreamDeviceInfoArray audio_array; -- StreamDeviceInfoArray video_array; --}; -- - MediaStreamDispatcher::MediaStreamDispatcher(RenderViewImpl* render_view) - : RenderViewObserver(render_view), - main_loop_(base::MessageLoopProxy::current()), -diff --git a/content/renderer/media/media_stream_dispatcher.h b/content/renderer/media/media_stream_dispatcher.h -index 89d7c0d..4c08958 100644 ---- a/content/renderer/media/media_stream_dispatcher.h -+++ b/content/renderer/media/media_stream_dispatcher.h -@@ -99,11 +99,38 @@ class CONTENT_EXPORT MediaStreamDispatcher - FRIEND_TEST_ALL_PREFIXES(MediaStreamDispatcherTest, TestFailure); - FRIEND_TEST_ALL_PREFIXES(MediaStreamDispatcherTest, CancelGenerateStream); - -- struct Request; -+ // A request is identified by pair (request_id, handler), or ipc_request. -+ // There could be multiple clients making requests and each has its own -+ // request_id sequence. -+ // The ipc_request is garanteed to be unique when it's created in -+ // MediaStreamDispatcher. -+ struct Request { -+ Request(const base::WeakPtr& handler, -+ int request_id, -+ int ipc_request) -+ : handler(handler), -+ request_id(request_id), -+ ipc_request(ipc_request) { -+ } -+ bool IsThisRequest( -+ int request_id1, -+ const base::WeakPtr& handler1) { -+ return (request_id1 == request_id && handler1.get() == handler.get()); -+ } -+ base::WeakPtr handler; -+ int request_id; -+ int ipc_request; -+ }; - - // Private class for keeping track of opened devices and who have - // opened it. -- struct Stream; -+ struct Stream { -+ Stream() {} -+ ~Stream() {} -+ base::WeakPtr handler; -+ StreamDeviceInfoArray audio_array; -+ StreamDeviceInfoArray video_array; -+ }; - - // RenderViewObserver OVERRIDE. - virtual bool Send(IPC::Message* message) OVERRIDE; -diff --git a/content/renderer/pepper/message_channel.cc b/content/renderer/pepper/message_channel.cc -index 51132a6..7c5961c 100644 ---- a/content/renderer/pepper/message_channel.cc -+++ b/content/renderer/pepper/message_channel.cc -@@ -292,18 +292,6 @@ NPClass message_channel_class = { - } // namespace - - // MessageChannel -------------------------------------------------------------- --struct MessageChannel::VarConversionResult { -- VarConversionResult(const ppapi::ScopedPPVar& r, bool s) -- : result(r), -- success(s), -- conversion_completed(true) {} -- VarConversionResult() -- : success(false), -- conversion_completed(false) {} -- ppapi::ScopedPPVar result; -- bool success; -- bool conversion_completed; --}; - - MessageChannel::MessageChannelNPObject::MessageChannelNPObject() { - } -diff --git a/content/renderer/pepper/message_channel.h b/content/renderer/pepper/message_channel.h -index e0020e6..43aa0f9 100644 ---- a/content/renderer/pepper/message_channel.h -+++ b/content/renderer/pepper/message_channel.h -@@ -11,15 +11,12 @@ - - #include "base/memory/weak_ptr.h" - #include "ppapi/shared_impl/resource.h" -+#include "ppapi/shared_impl/scoped_pp_var.h" - #include "third_party/WebKit/public/web/WebSerializedScriptValue.h" - #include "third_party/npapi/bindings/npruntime.h" - - struct PP_Var; - --namespace ppapi { --class ScopedPPVar; --} -- - namespace content { - - class PepperPluginInstanceImpl; -@@ -90,7 +87,18 @@ class MessageChannel { - - private: - // Struct for storing the result of a NPVariant being converted to a PP_Var. -- struct VarConversionResult; -+ struct VarConversionResult { -+ VarConversionResult(const ppapi::ScopedPPVar& r, bool s) -+ : result(r), -+ success(s), -+ conversion_completed(true) {} -+ VarConversionResult() -+ : success(false), -+ conversion_completed(false) {} -+ ppapi::ScopedPPVar result; -+ bool success; -+ bool conversion_completed; -+ }; - - // This is called when an NPVariant is finished being converted. - // |result_iteartor| is an iterator into |converted_var_queue_| where the -diff --git a/gpu/config/dx_diag_node.cc b/gpu/config/dx_diag_node.cc -index e0902ca..c1e84ae 100644 ---- a/gpu/config/dx_diag_node.cc -+++ b/gpu/config/dx_diag_node.cc -@@ -4,6 +4,8 @@ - - #include "gpu/config/dx_diag_node.h" - -+#if defined(OS_WIN) -+ - namespace gpu { - - DxDiagNode::DxDiagNode() {} -@@ -11,3 +13,5 @@ DxDiagNode::DxDiagNode() {} - DxDiagNode::~DxDiagNode() {} - - } // namespace gpu -+ -+#endif // defined(OS_WIN) -diff --git a/gpu/config/dx_diag_node.h b/gpu/config/dx_diag_node.h -index 33d29b3..7f77362 100644 ---- a/gpu/config/dx_diag_node.h -+++ b/gpu/config/dx_diag_node.h -@@ -8,6 +8,10 @@ - #ifndef GPU_CONFIG_DX_DIAG_NODE_H_ - #define GPU_CONFIG_DX_DIAG_NODE_H_ - -+#include "build/build_config.h" -+ -+#if defined(OS_WIN) -+ - #include - #include - -@@ -24,4 +28,6 @@ struct GPU_EXPORT DxDiagNode { - - } // namespace gpu - -+#endif // defined(OS_WIN) -+ - #endif // GPU_CONFIG_DX_DIAG_NODE_H_ -diff --git a/media/filters/ffmpeg_audio_decoder.cc b/media/filters/ffmpeg_audio_decoder.cc -index 00f7566..bb64c36 100644 ---- a/media/filters/ffmpeg_audio_decoder.cc -+++ b/media/filters/ffmpeg_audio_decoder.cc -@@ -23,12 +23,6 @@ - - namespace media { - --// Helper structure for managing multiple decoded audio frames per packet. --struct QueuedAudioBuffer { -- AudioDecoder::Status status; -- scoped_refptr buffer; --}; -- - // Returns true if the decode result was end of stream. - static inline bool IsEndOfStream(int result, - int decoded_size, -diff --git a/media/filters/ffmpeg_audio_decoder.h b/media/filters/ffmpeg_audio_decoder.h -index 40103b8..2963847 100644 ---- a/media/filters/ffmpeg_audio_decoder.h -+++ b/media/filters/ffmpeg_audio_decoder.h -@@ -26,10 +26,15 @@ namespace media { - - class AudioTimestampHelper; - class DecoderBuffer; --struct QueuedAudioBuffer; - class ScopedPtrAVFreeContext; - class ScopedPtrAVFreeFrame; - -+// Helper structure for managing multiple decoded audio frames per packet. -+struct QueuedAudioBuffer { -+ AudioDecoder::Status status; -+ scoped_refptr buffer; -+}; -+ - class MEDIA_EXPORT FFmpegAudioDecoder : public AudioDecoder { - public: - explicit FFmpegAudioDecoder( -diff --git a/net/cert/mock_cert_verifier.cc b/net/cert/mock_cert_verifier.cc -index ea5538e..a30e3d5 100644 ---- a/net/cert/mock_cert_verifier.cc -+++ b/net/cert/mock_cert_verifier.cc -@@ -13,25 +13,6 @@ - - namespace net { - --struct MockCertVerifier::Rule { -- Rule(X509Certificate* cert, -- const std::string& hostname, -- const CertVerifyResult& result, -- int rv) -- : cert(cert), -- hostname(hostname), -- result(result), -- rv(rv) { -- DCHECK(cert); -- DCHECK(result.verified_cert.get()); -- } -- -- scoped_refptr cert; -- std::string hostname; -- CertVerifyResult result; -- int rv; --}; -- - MockCertVerifier::MockCertVerifier() : default_result_(ERR_CERT_INVALID) {} - - MockCertVerifier::~MockCertVerifier() {} -diff --git a/net/cert/mock_cert_verifier.h b/net/cert/mock_cert_verifier.h -index 5af7b7e..704c66b 100644 ---- a/net/cert/mock_cert_verifier.h -+++ b/net/cert/mock_cert_verifier.h -@@ -57,7 +57,25 @@ class MockCertVerifier : public CertVerifier { - int rv); - - private: -- struct Rule; -+ struct Rule { -+ Rule(X509Certificate* cert, -+ const std::string& hostname, -+ const CertVerifyResult& result, -+ int rv) -+ : cert(cert), -+ hostname(hostname), -+ result(result), -+ rv(rv) { -+ DCHECK(cert); -+ DCHECK(result.verified_cert.get()); -+ } -+ -+ scoped_refptr cert; -+ std::string hostname; -+ CertVerifyResult result; -+ int rv; -+ }; -+ - typedef std::list RuleList; - - int default_result_; -diff --git a/net/dns/mock_host_resolver.cc b/net/dns/mock_host_resolver.cc -index ff5ffbc..25918ba 100644 ---- a/net/dns/mock_host_resolver.cc -+++ b/net/dns/mock_host_resolver.cc -@@ -212,37 +212,6 @@ void MockHostResolverBase::ResolveNow(size_t id) { - - //----------------------------------------------------------------------------- - --struct RuleBasedHostResolverProc::Rule { -- enum ResolverType { -- kResolverTypeFail, -- kResolverTypeSystem, -- kResolverTypeIPLiteral, -- }; -- -- ResolverType resolver_type; -- std::string host_pattern; -- AddressFamily address_family; -- HostResolverFlags host_resolver_flags; -- std::string replacement; -- std::string canonical_name; -- int latency_ms; // In milliseconds. -- -- Rule(ResolverType resolver_type, -- const std::string& host_pattern, -- AddressFamily address_family, -- HostResolverFlags host_resolver_flags, -- const std::string& replacement, -- const std::string& canonical_name, -- int latency_ms) -- : resolver_type(resolver_type), -- host_pattern(host_pattern), -- address_family(address_family), -- host_resolver_flags(host_resolver_flags), -- replacement(replacement), -- canonical_name(canonical_name), -- latency_ms(latency_ms) {} --}; -- - RuleBasedHostResolverProc::RuleBasedHostResolverProc(HostResolverProc* previous) - : HostResolverProc(previous) { - } -diff --git a/net/dns/mock_host_resolver.h b/net/dns/mock_host_resolver.h -index 3593fbd..f8a4240 100644 ---- a/net/dns/mock_host_resolver.h -+++ b/net/dns/mock_host_resolver.h -@@ -209,7 +209,37 @@ class RuleBasedHostResolverProc : public HostResolverProc { - int* os_error) OVERRIDE; - - private: -- struct Rule; -+ struct Rule { -+ enum ResolverType { -+ kResolverTypeFail, -+ kResolverTypeSystem, -+ kResolverTypeIPLiteral, -+ }; -+ -+ ResolverType resolver_type; -+ std::string host_pattern; -+ AddressFamily address_family; -+ HostResolverFlags host_resolver_flags; -+ std::string replacement; -+ std::string canonical_name; -+ int latency_ms; // In milliseconds. -+ -+ Rule(ResolverType resolver_type, -+ const std::string& host_pattern, -+ AddressFamily address_family, -+ HostResolverFlags host_resolver_flags, -+ const std::string& replacement, -+ const std::string& canonical_name, -+ int latency_ms) -+ : resolver_type(resolver_type), -+ host_pattern(host_pattern), -+ address_family(address_family), -+ host_resolver_flags(host_resolver_flags), -+ replacement(replacement), -+ canonical_name(canonical_name), -+ latency_ms(latency_ms) {} -+ }; -+ - typedef std::list RuleList; - - virtual ~RuleBasedHostResolverProc(); diff --git a/patches/chromium/0004-Do-not-modify-the-child-path.patch b/patches/chromium/0004-Do-not-modify-the-child-path.patch deleted file mode 100644 index b6f598204..000000000 --- a/patches/chromium/0004-Do-not-modify-the-child-path.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Zeno Albisser -Date: Sat, 29 Jun 2013 22:39:29 +0200 -Subject: Do not modify the child path. - -We currently only have a single process binary for Qt. -Therefore we should not choose a different binary based on required privileges. -However, this patch can only be a preliminary solution. -May be we should instead implement our own ChildProcessHost. ---- - content/common/child_process_host_impl.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/content/common/child_process_host_impl.cc b/content/common/child_process_host_impl.cc -index 1467536..2607496 100644 ---- a/content/common/child_process_host_impl.cc -+++ b/content/common/child_process_host_impl.cc -@@ -107,7 +107,7 @@ base::FilePath ChildProcessHost::GetChildPath(int flags) { - if (child_path.empty()) - PathService::Get(CHILD_PROCESS_EXE, &child_path); - --#if defined(OS_MACOSX) -+#if defined(OS_MACOSX) && 0 - DCHECK(!(flags & CHILD_NO_PIE && flags & CHILD_ALLOW_HEAP_EXECUTION)); - - // If needed, choose an executable with special flags set that inform the diff --git a/patches/chromium/0005-Do-not-warn-for-header-hygiene.patch b/patches/chromium/0005-Do-not-warn-for-header-hygiene.patch deleted file mode 100644 index 14247a280..000000000 --- a/patches/chromium/0005-Do-not-warn-for-header-hygiene.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Zeno Albisser -Date: Wed, 3 Jul 2013 11:16:56 +0200 -Subject: Do not warn for header-hygiene. - -QtDeclarative is consciously leaking the namespace QtQml. -Therefore clang would warn about header hygiene. -Unfortunately this cannot be fixed in QtDeclarative, -unless we accept not to be able to use QtQuick1 and QtQuick2 -in the same application. ---- - build/common.gypi | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/build/common.gypi b/build/common.gypi -index 89f86bb..eff4b61 100644 ---- a/build/common.gypi -+++ b/build/common.gypi -@@ -4070,6 +4070,7 @@ - '-Wno-unused-value', - '-Wno-unused-variable', - '-Wno-unused-function', -+ '-Wno-header-hygiene', - ], - }], - ['clang==1 and clang_use_chrome_plugins==1', { diff --git a/patches/chromium/0006-Build-files-necessary-for-touch-and-gestures.patch b/patches/chromium/0006-Build-files-necessary-for-touch-and-gestures.patch deleted file mode 100644 index 7f9900e99..000000000 --- a/patches/chromium/0006-Build-files-necessary-for-touch-and-gestures.patch +++ /dev/null @@ -1,80 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Jocelyn Turcotte -Date: Thu, 25 Jul 2013 17:25:47 +0200 -Subject: Build files necessary for touch and gestures. - -Also guard the use of MessagePumpAuraX11 in events_x.cc. We need to -build it to get symbols depending on base::NativeEvent. - -Change-Id: Ib7bb4fb1fc8692df1b8151c3d159de3d0f73c76f ---- - content/content_browser.gypi | 2 +- - ui/events/event.cc | 14 ++++++++++++-- - ui/ui.gyp | 2 +- - 3 files changed, 14 insertions(+), 4 deletions(-) - -diff --git a/content/content_browser.gypi b/content/content_browser.gypi -index 99cc728..b0f963c 100644 ---- a/content/content_browser.gypi -+++ b/content/content_browser.gypi -@@ -1547,7 +1547,7 @@ - ['exclude', '^browser/gamepad/gamepad_platform_data_fetcher_linux\\.cc$'], - ], - }], -- ['use_aura!=1 and OS!="win"', { -+ ['use_aura!=1 and use_qt!=1 and OS!="win"', { - 'sources!': [ - 'browser/renderer_host/ui_events_helper.cc', - 'browser/renderer_host/ui_events_helper.h', -diff --git a/ui/events/event.cc b/ui/events/event.cc -index 246e397..39d2b9a 100644 ---- a/ui/events/event.cc -+++ b/ui/events/event.cc -@@ -273,7 +273,13 @@ void LocatedEvent::UpdateForRootTransform( - MouseEvent::MouseEvent(const base::NativeEvent& native_event) - : LocatedEvent(native_event), - changed_button_flags_( -- GetChangedMouseButtonFlagsFromNative(native_event)) { -+// GetChangedMouseButtonFlagsFromNative isn't implemented on Mac. MouseEvent shouldn't be used. -+#if !defined(OS_MACOSX) -+ GetChangedMouseButtonFlagsFromNative(native_event) -+#else -+ 0 -+#endif -+ ) { - if (type() == ET_MOUSE_PRESSED || type() == ET_MOUSE_RELEASED) - SetClickCount(GetRepeatCount(*this)); - } -@@ -638,6 +644,8 @@ void TranslatedKeyEvent::ConvertToKeyEvent() { - - ScrollEvent::ScrollEvent(const base::NativeEvent& native_event) - : MouseEvent(native_event) { -+// GetScrollOffsets and GetFlingData aren't implemented on Mac. ScrollEvent shouldn't be used. -+#if !defined(OS_MACOSX) - if (type() == ET_SCROLL) { - GetScrollOffsets(native_event, - &x_offset_, &y_offset_, -@@ -649,7 +657,9 @@ ScrollEvent::ScrollEvent(const base::NativeEvent& native_event) - &x_offset_, &y_offset_, - &x_offset_ordinal_, &y_offset_ordinal_, - NULL); -- } else { -+ } else -+#endif -+ { - NOTREACHED() << "Unexpected event type " << type() - << " when constructing a ScrollEvent."; - } -diff --git a/ui/ui.gyp b/ui/ui.gyp -index 5d61dc4..aa0f3be 100644 ---- a/ui/ui.gyp -+++ b/ui/ui.gyp -@@ -350,7 +350,7 @@ - ], - }, - }], -- ['toolkit_views==1', { -+ ['toolkit_views==1 or use_qt==1', { - 'dependencies': [ - 'events/events.gyp:events', - ], diff --git a/patches/chromium/0007-remove-Wno-deprecated-register-from-common.gypi.patch b/patches/chromium/0007-remove-Wno-deprecated-register-from-common.gypi.patch deleted file mode 100644 index 94d9e6b30..000000000 --- a/patches/chromium/0007-remove-Wno-deprecated-register-from-common.gypi.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Zeno Albisser -Date: Thu, 1 Aug 2013 14:03:14 +0200 -Subject: remove -Wno-deprecated-register from common.gypi. - -This warning is not supported by recent clang versions -shipping with XCode. Therefore replacing it with -Wno-deprecated. -This is a bit a too broad fix, but the best we can do for now. -It seems that the flag is still supported in upstream clang. ---- - build/common.gypi | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/build/common.gypi b/build/common.gypi -index eff4b61..e975a96 100644 ---- a/build/common.gypi -+++ b/build/common.gypi -@@ -3350,7 +3350,7 @@ - # Clang considers the `register` keyword as deprecated, but e.g. - # code generated by flex (used in angle) contains that keyword. - # http://crbug.com/255186 -- '-Wno-deprecated-register', -+ '-Wno-deprecated', - ], - 'cflags!': [ - # Clang doesn't seem to know know this flag. -@@ -4058,7 +4058,7 @@ - # Clang considers the `register` keyword as deprecated, but e.g. - # code generated by flex (used in angle) contains that keyword. - # http://crbug.com/255186 -- '-Wno-deprecated-register', -+ '-Wno-deprecated', - ], - }], - ['use_libcpp==1', { diff --git a/patches/chromium/0008-Solve-conflicts-when-including-both-QtOpenGL-headers.patch b/patches/chromium/0008-Solve-conflicts-when-including-both-QtOpenGL-headers.patch deleted file mode 100644 index 5203645d1..000000000 --- a/patches/chromium/0008-Solve-conflicts-when-including-both-QtOpenGL-headers.patch +++ /dev/null @@ -1,192 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Jocelyn Turcotte -Date: Fri, 6 Sep 2013 17:08:45 +0200 -Subject: Solve conflicts when including both QtOpenGL headers and - resource_provider.h - -If resource_provider.h is going to be used to integrate delegated frame -to external compositors, it should avoid conflicting with the system's gl.h. - -Change-Id: Ie37d6cde263157e6717cc006a9896f0b9ebdaa5d ---- - cc/base/util.h | 33 ++++++++++++++++++++++++ - cc/layers/texture_layer.cc | 2 ++ - cc/output/delegating_renderer.cc | 1 + - cc/output/gl_renderer.cc | 1 + - cc/quads/content_draw_quad_base.h | 1 - - cc/resources/resource_provider.h | 35 +++----------------------- - content/renderer/gpu/mailbox_output_surface.cc | 1 + - 7 files changed, 41 insertions(+), 33 deletions(-) - -diff --git a/cc/base/util.h b/cc/base/util.h -index 1d716ae..bd51178 100644 ---- a/cc/base/util.h -+++ b/cc/base/util.h -@@ -8,6 +8,9 @@ - #include - - #include "base/basictypes.h" -+#include "cc/resources/resource_provider.h" -+#include "third_party/khronos/GLES2/gl2.h" -+#include "third_party/khronos/GLES2/gl2ext.h" - - namespace cc { - -@@ -24,6 +27,36 @@ template T RoundDown(T n, T mul) { - : ((n - mul + 1) / mul) * mul; - } - -+inline GLenum GLDataType(ResourceFormat format) { -+ DCHECK_LE(format, RESOURCE_FORMAT_MAX); -+ static const unsigned format_gl_data_type[RESOURCE_FORMAT_MAX + 1] = { -+ GL_UNSIGNED_BYTE, // RGBA_8888 -+ GL_UNSIGNED_SHORT_4_4_4_4, // RGBA_4444 -+ GL_UNSIGNED_BYTE, // BGRA_8888 -+ GL_UNSIGNED_BYTE, // LUMINANCE_8 -+ GL_UNSIGNED_SHORT_5_6_5, // RGB_565, -+ GL_UNSIGNED_BYTE // ETC1 -+ }; -+ return format_gl_data_type[format]; -+} -+ -+inline GLenum GLDataFormat(ResourceFormat format) { -+ DCHECK_LE(format, RESOURCE_FORMAT_MAX); -+ static const unsigned format_gl_data_format[RESOURCE_FORMAT_MAX + 1] = { -+ GL_RGBA, // RGBA_8888 -+ GL_RGBA, // RGBA_4444 -+ GL_BGRA_EXT, // BGRA_8888 -+ GL_LUMINANCE, // LUMINANCE_8 -+ GL_RGB, // RGB_565 -+ GL_ETC1_RGB8_OES // ETC1 -+ }; -+ return format_gl_data_format[format]; -+} -+ -+inline GLenum GLInternalFormat(ResourceFormat format) { -+ return GLDataFormat(format); -+} -+ - } // namespace cc - - #endif // CC_BASE_UTIL_H_ -diff --git a/cc/layers/texture_layer.cc b/cc/layers/texture_layer.cc -index 195d05d..5c954c1 100644 ---- a/cc/layers/texture_layer.cc -+++ b/cc/layers/texture_layer.cc -@@ -13,6 +13,8 @@ - #include "cc/resources/single_release_callback.h" - #include "cc/trees/blocking_task_runner.h" - #include "cc/trees/layer_tree_host.h" -+#include "third_party/khronos/GLES2/gl2.h" -+#include "third_party/khronos/GLES2/gl2ext.h" - - namespace cc { - -diff --git a/cc/output/delegating_renderer.cc b/cc/output/delegating_renderer.cc -index c76f250..1b57161 100644 ---- a/cc/output/delegating_renderer.cc -+++ b/cc/output/delegating_renderer.cc -@@ -25,6 +25,7 @@ - #include "gpu/command_buffer/client/context_support.h" - #include "gpu/command_buffer/common/gpu_memory_allocation.h" - #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h" -+#include "third_party/khronos/GLES2/gl2.h" - #include "third_party/khronos/GLES2/gl2ext.h" - - using blink::WebGraphicsContext3D; -diff --git a/cc/output/gl_renderer.cc b/cc/output/gl_renderer.cc -index 04db7b0..f0e32f4 100644 ---- a/cc/output/gl_renderer.cc -+++ b/cc/output/gl_renderer.cc -@@ -16,6 +16,7 @@ - #include "base/strings/string_util.h" - #include "base/strings/stringprintf.h" - #include "build/build_config.h" -+#include "cc/base/util.h" - #include "cc/base/math_util.h" - #include "cc/layers/video_layer_impl.h" - #include "cc/output/compositor_frame.h" -diff --git a/cc/quads/content_draw_quad_base.h b/cc/quads/content_draw_quad_base.h -index cbf18ca..6229d61 100644 ---- a/cc/quads/content_draw_quad_base.h -+++ b/cc/quads/content_draw_quad_base.h -@@ -8,7 +8,6 @@ - #include "base/memory/scoped_ptr.h" - #include "cc/base/cc_export.h" - #include "cc/quads/draw_quad.h" --#include "third_party/khronos/GLES2/gl2.h" - #include "ui/gfx/point.h" - #include "ui/gfx/size.h" - -diff --git a/cc/resources/resource_provider.h b/cc/resources/resource_provider.h -index 6e5c61a..2478661 100644 ---- a/cc/resources/resource_provider.h -+++ b/cc/resources/resource_provider.h -@@ -25,8 +25,6 @@ - #include "cc/resources/single_release_callback.h" - #include "cc/resources/texture_mailbox.h" - #include "cc/resources/transferable_resource.h" --#include "third_party/khronos/GLES2/gl2.h" --#include "third_party/khronos/GLES2/gl2ext.h" - #include "third_party/skia/include/core/SkBitmap.h" - #include "third_party/skia/include/core/SkCanvas.h" - #include "ui/gfx/size.h" -@@ -36,6 +34,9 @@ namespace gles { - class GLES2Interface; - } - } -+// A correct fix would be not to use GL types in this interal API file. -+typedef unsigned int GLenum; -+typedef int GLint; - - namespace gfx { - class Rect; -@@ -525,36 +526,6 @@ inline unsigned BitsPerPixel(ResourceFormat format) { - return format_bits_per_pixel[format]; - } - --inline GLenum GLDataType(ResourceFormat format) { -- DCHECK_LE(format, RESOURCE_FORMAT_MAX); -- static const unsigned format_gl_data_type[RESOURCE_FORMAT_MAX + 1] = { -- GL_UNSIGNED_BYTE, // RGBA_8888 -- GL_UNSIGNED_SHORT_4_4_4_4, // RGBA_4444 -- GL_UNSIGNED_BYTE, // BGRA_8888 -- GL_UNSIGNED_BYTE, // LUMINANCE_8 -- GL_UNSIGNED_SHORT_5_6_5, // RGB_565, -- GL_UNSIGNED_BYTE // ETC1 -- }; -- return format_gl_data_type[format]; --} -- --inline GLenum GLDataFormat(ResourceFormat format) { -- DCHECK_LE(format, RESOURCE_FORMAT_MAX); -- static const unsigned format_gl_data_format[RESOURCE_FORMAT_MAX + 1] = { -- GL_RGBA, // RGBA_8888 -- GL_RGBA, // RGBA_4444 -- GL_BGRA_EXT, // BGRA_8888 -- GL_LUMINANCE, // LUMINANCE_8 -- GL_RGB, // RGB_565 -- GL_ETC1_RGB8_OES // ETC1 -- }; -- return format_gl_data_format[format]; --} -- --inline GLenum GLInternalFormat(ResourceFormat format) { -- return GLDataFormat(format); --} -- - } // namespace cc - - #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ -diff --git a/content/renderer/gpu/mailbox_output_surface.cc b/content/renderer/gpu/mailbox_output_surface.cc -index 09e1ec0..b23575d 100644 ---- a/content/renderer/gpu/mailbox_output_surface.cc -+++ b/content/renderer/gpu/mailbox_output_surface.cc -@@ -5,6 +5,7 @@ - #include "content/renderer/gpu/mailbox_output_surface.h" - - #include "base/logging.h" -+#include "cc/base/util.h" - #include "cc/output/compositor_frame.h" - #include "cc/output/compositor_frame_ack.h" - #include "cc/output/gl_frame_data.h" diff --git a/patches/chromium/0009-Do-not-forward-declare-UIResourceRequest-Identity-an.patch b/patches/chromium/0009-Do-not-forward-declare-UIResourceRequest-Identity-an.patch deleted file mode 100644 index a5ae49a28..000000000 --- a/patches/chromium/0009-Do-not-forward-declare-UIResourceRequest-Identity-an.patch +++ /dev/null @@ -1,133 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Zeno Albisser -Date: Tue, 29 Oct 2013 11:30:28 +0100 -Subject: Do not forward declare UIResourceRequest, Identity and IdentityKey. - -Clang / libc++ does not support incomplete types in templates. -See: http://clang.llvm.org/compatibility.html#undep_incomplete ---- - cc/trees/layer_tree_impl.h | 1 + - .../browser/media/webrtc_identity_store_backend.cc | 37 ------------------- - .../browser/media/webrtc_identity_store_backend.h | 42 ++++++++++++++++++++-- - 3 files changed, 40 insertions(+), 40 deletions(-) - -diff --git a/cc/trees/layer_tree_impl.h b/cc/trees/layer_tree_impl.h -index 2f27460..85a71f5c 100644 ---- a/cc/trees/layer_tree_impl.h -+++ b/cc/trees/layer_tree_impl.h -@@ -14,6 +14,7 @@ - #include "cc/base/scoped_ptr_vector.h" - #include "cc/base/swap_promise.h" - #include "cc/layers/layer_impl.h" -+#include "cc/trees/layer_tree_host.h" - #include "cc/resources/ui_resource_client.h" - - #if defined(COMPILER_GCC) -diff --git a/content/browser/media/webrtc_identity_store_backend.cc b/content/browser/media/webrtc_identity_store_backend.cc -index d599dcd..697de93 100644 ---- a/content/browser/media/webrtc_identity_store_backend.cc -+++ b/content/browser/media/webrtc_identity_store_backend.cc -@@ -46,43 +46,6 @@ static bool InitDB(sql::Connection* db) { - "creation_time INTEGER)"); - } - --struct WebRTCIdentityStoreBackend::IdentityKey { -- IdentityKey(const GURL& origin, const std::string& identity_name) -- : origin(origin), identity_name(identity_name) {} -- -- bool operator<(const IdentityKey& other) const { -- return origin < other.origin || -- (origin == other.origin && identity_name < other.identity_name); -- } -- -- GURL origin; -- std::string identity_name; --}; -- --struct WebRTCIdentityStoreBackend::Identity { -- Identity(const std::string& common_name, -- const std::string& certificate, -- const std::string& private_key) -- : common_name(common_name), -- certificate(certificate), -- private_key(private_key), -- creation_time(base::Time::Now().ToInternalValue()) {} -- -- Identity(const std::string& common_name, -- const std::string& certificate, -- const std::string& private_key, -- int64 creation_time) -- : common_name(common_name), -- certificate(certificate), -- private_key(private_key), -- creation_time(creation_time) {} -- -- std::string common_name; -- std::string certificate; -- std::string private_key; -- int64 creation_time; --}; -- - struct WebRTCIdentityStoreBackend::PendingFindRequest { - PendingFindRequest(const GURL& origin, - const std::string& identity_name, -diff --git a/content/browser/media/webrtc_identity_store_backend.h b/content/browser/media/webrtc_identity_store_backend.h -index 92b68b6..9be3fc2 100644 ---- a/content/browser/media/webrtc_identity_store_backend.h -+++ b/content/browser/media/webrtc_identity_store_backend.h -@@ -11,8 +11,7 @@ - #include "base/time/time.h" - #include "sql/connection.h" - #include "sql/meta_table.h" -- --class GURL; -+#include "url/gurl.h" - - namespace base { - class FilePath; -@@ -94,7 +93,44 @@ class WebRTCIdentityStoreBackend - }; - struct PendingFindRequest; - struct IdentityKey; -- struct Identity; -+ -+ struct IdentityKey { -+ IdentityKey(const GURL& origin, const std::string& identity_name) -+ : origin(origin), identity_name(identity_name) {} -+ -+ bool operator<(const IdentityKey& other) const { -+ return origin < other.origin || -+ (origin == other.origin && identity_name < other.identity_name); -+ } -+ -+ GURL origin; -+ std::string identity_name; -+ }; -+ -+ struct Identity { -+ Identity(const std::string& common_name, -+ const std::string& certificate, -+ const std::string& private_key) -+ : common_name(common_name), -+ certificate(certificate), -+ private_key(private_key), -+ creation_time(base::Time::Now().ToInternalValue()) {} -+ -+ Identity(const std::string& common_name, -+ const std::string& certificate, -+ const std::string& private_key, -+ int64 creation_time) -+ : common_name(common_name), -+ certificate(certificate), -+ private_key(private_key), -+ creation_time(creation_time) {} -+ -+ std::string common_name; -+ std::string certificate; -+ std::string private_key; -+ int64 creation_time; -+ }; -+ - typedef std::map IdentityMap; - - ~WebRTCIdentityStoreBackend(); diff --git a/patches/chromium/0010-Fix-the-build-with-a-GL-ES2-configured-Qt.patch b/patches/chromium/0010-Fix-the-build-with-a-GL-ES2-configured-Qt.patch deleted file mode 100644 index 24f6bedf2..000000000 --- a/patches/chromium/0010-Fix-the-build-with-a-GL-ES2-configured-Qt.patch +++ /dev/null @@ -1,161 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Jocelyn Turcotte -Date: Wed, 30 Oct 2013 14:27:28 +0100 -Subject: Fix the build with a GL ES2 configured Qt. - -GLES/gl2.h is included through Qt public headers and the copy of -Chromium is used since its include path comes before /usr/include. -The problem is that this header is incompatible for some reasons, -one of them being that it converts all GL function symbols from -gl* to GLES2*. - -Qt layer code should always need to go through GL directly, -so make sure that only GYP targets that depend directly on gpu.gyp, -khronos.gyp or webkit_gpu.gyp will have an include path -pointing to those headers. - -Replace all_dependent_settings with direct_dependent_settings and -control which target inherits this include_dirs from its dependencies -by using export_dependent_settings. - -Change-Id: Id4d98fe22ef8b778b5ba8da300dad28e69507732 ---- - content/content_browser.gypi | 1 + - gpu/command_buffer_client.gypi | 3 +++ - gpu/command_buffer_common.gypi | 3 +++ - gpu/gpu.gyp | 18 ++++++++++++++++++ - third_party/khronos/khronos.gyp | 2 +- - webkit/common/gpu/webkit_gpu.gyp | 3 +++ - 6 files changed, 29 insertions(+), 1 deletion(-) - -diff --git a/content/content_browser.gypi b/content/content_browser.gypi -index b0f963c..28878f7 100644 ---- a/content/content_browser.gypi -+++ b/content/content_browser.gypi -@@ -1323,6 +1323,7 @@ - 'dependencies': [ - 'browser/devtools/devtools_resources.gyp:devtools_resources', - '../cc/cc.gyp:cc', -+ '../gpu/gpu.gyp:gpu_ipc', - '../net/net.gyp:http_server', - '../third_party/leveldatabase/leveldatabase.gyp:leveldatabase', - '../ui/surface/surface.gyp:surface', -diff --git a/gpu/command_buffer_client.gypi b/gpu/command_buffer_client.gypi -index cb52ee7..827474c 100644 ---- a/gpu/command_buffer_client.gypi -+++ b/gpu/command_buffer_client.gypi -@@ -14,6 +14,9 @@ - 'dependencies': [ - '../third_party/khronos/khronos.gyp:khronos_headers', - ], -+ 'export_dependent_settings': [ -+ '../third_party/khronos/khronos.gyp:khronos_headers', -+ ], - 'sources': [ - 'command_buffer/client/cmd_buffer_helper.cc', - 'command_buffer/client/cmd_buffer_helper.h', -diff --git a/gpu/command_buffer_common.gypi b/gpu/command_buffer_common.gypi -index 87eeb5b..ab9a635 100644 ---- a/gpu/command_buffer_common.gypi -+++ b/gpu/command_buffer_common.gypi -@@ -6,6 +6,9 @@ - 'dependencies': [ - '../third_party/khronos/khronos.gyp:khronos_headers', - ], -+ 'export_dependent_settings': [ -+ '../third_party/khronos/khronos.gyp:khronos_headers', -+ ], - 'sources': [ - 'command_buffer/common/bitfield_helpers.h', - 'command_buffer/common/buffer.h', -diff --git a/gpu/gpu.gyp b/gpu/gpu.gyp -index 46831ee..c3c9502 100644 ---- a/gpu/gpu.gyp -+++ b/gpu/gpu.gyp -@@ -23,6 +23,9 @@ - 'command_buffer/command_buffer.gyp:gles2_utils', - 'gles2_cmd_helper', - ], -+ 'export_dependent_settings': [ -+ '../third_party/khronos/khronos.gyp:khronos_headers', -+ ], - 'defines': [ - 'GLES2_IMPL_IMPLEMENTATION', - ], -@@ -90,6 +93,9 @@ - 'command_buffer_client', - 'gles2_implementation', - ], -+ 'export_dependent_settings': [ -+ 'command_buffer_client', -+ ], - 'defines': [ - 'GLES2_C_LIB_IMPLEMENTATION', - ], -@@ -115,6 +121,9 @@ - 'command_buffer_client', - 'gles2_implementation_client_side_arrays_no_check', - ], -+ 'export_dependent_settings': [ -+ 'command_buffer_client', -+ ], - 'sources': [ - '<@(gles2_c_lib_source_files)', - ], -@@ -378,6 +387,9 @@ - 'gpu_config', - 'gpu_ipc', - ], -+ 'export_dependent_settings': [ -+ 'command_buffer_common', -+ ], - 'sources': [ - 'gpu_export.h', - ], -@@ -420,6 +432,9 @@ - 'dependencies': [ - 'command_buffer_common', - ], -+ 'export_dependent_settings': [ -+ 'command_buffer_common', -+ ], - # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. - 'msvs_disabled_warnings': [4267, ], - }, -@@ -445,6 +460,9 @@ - 'dependencies': [ - 'command_buffer_common', - ], -+ 'export_dependent_settings': [ -+ 'command_buffer_common', -+ ], - }, - { - 'target_name': 'gpu_config', -diff --git a/third_party/khronos/khronos.gyp b/third_party/khronos/khronos.gyp -index 8a85572..88130d2 100644 ---- a/third_party/khronos/khronos.gyp -+++ b/third_party/khronos/khronos.gyp -@@ -7,7 +7,7 @@ - { - 'target_name': 'khronos_headers', - 'type': 'none', -- 'all_dependent_settings': { -+ 'direct_dependent_settings': { - 'include_dirs': [ - '.', - '../../gpu', # Contains GLES2/gl2chromium.h -diff --git a/webkit/common/gpu/webkit_gpu.gyp b/webkit/common/gpu/webkit_gpu.gyp -index a28e4e8..1a0190c 100644 ---- a/webkit/common/gpu/webkit_gpu.gyp -+++ b/webkit/common/gpu/webkit_gpu.gyp -@@ -28,6 +28,9 @@ - '<(DEPTH)/ui/gl/gl.gyp:gl', - '<(DEPTH)/ui/gfx/gfx.gyp:gfx', - ], -+ 'export_dependent_settings': [ -+ '<(DEPTH)/gpu/gpu.gyp:gles2_implementation', -+ ], - 'sources': [ - # This list contains all .h and .cc in gpu except for test code. - 'context_provider_in_process.cc', diff --git a/patches/chromium/0011-Hide-the-definition-of-MessagePumpX11-GetDefaultXDis.patch b/patches/chromium/0011-Hide-the-definition-of-MessagePumpX11-GetDefaultXDis.patch deleted file mode 100644 index a9ab410dd..000000000 --- a/patches/chromium/0011-Hide-the-definition-of-MessagePumpX11-GetDefaultXDis.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Andras Becsi -Date: Mon, 24 Mar 2014 18:36:43 +0100 -Subject: Hide the definition of MessagePumpX11::GetDefaultXDisplay - -This should replace patch 0011 since we do not build GTK code any more. - -Change-Id: I156f164128b04eee6d5956a576adef3b9d2d18ea -Reviewed-by: Jocelyn Turcotte ---- - base/message_loop/message_pump_x11.cc | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/base/message_loop/message_pump_x11.cc b/base/message_loop/message_pump_x11.cc -index 35dcc04..001775c 100644 ---- a/base/message_loop/message_pump_x11.cc -+++ b/base/message_loop/message_pump_x11.cc -@@ -141,12 +141,15 @@ MessagePumpX11::~MessagePumpX11() { - g_xdisplay = NULL; - } - -+#if !defined(TOOLKIT_QT) -+// Qt uses it's own version. - // static - Display* MessagePumpX11::GetDefaultXDisplay() { - if (!g_xdisplay) - g_xdisplay = XOpenDisplay(NULL); - return g_xdisplay; - } -+#endif - - #if defined(TOOLKIT_GTK) - // static diff --git a/patches/chromium/0012-Add-accessors-for-the-Qt-delegated-renderer-integrat.patch b/patches/chromium/0012-Add-accessors-for-the-Qt-delegated-renderer-integrat.patch deleted file mode 100644 index f6fb05d79..000000000 --- a/patches/chromium/0012-Add-accessors-for-the-Qt-delegated-renderer-integrat.patch +++ /dev/null @@ -1,81 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Jocelyn Turcotte -Date: Fri, 20 Sep 2013 15:00:47 +0200 -Subject: Add accessors for the Qt delegated renderer integration. - -This is needed to fetch the MessageLoop, the MailboxManager and the -SyncPointManager of the GPU in-process host. ---- - content/common/gpu/gpu_channel_manager.h | 2 ++ - content/gpu/gpu_child_thread.cc | 6 ++++++ - content/gpu/gpu_child_thread.h | 6 ++++++ - 3 files changed, 14 insertions(+) - -diff --git a/content/common/gpu/gpu_channel_manager.h b/content/common/gpu/gpu_channel_manager.h -index eb4d224..1ab04d9 100644 ---- a/content/common/gpu/gpu_channel_manager.h -+++ b/content/common/gpu/gpu_channel_manager.h -@@ -90,6 +90,8 @@ class GpuChannelManager : public IPC::Listener, - - gpu::gles2::ProgramCache* program_cache(); - -+ gpu::gles2::MailboxManager* mailbox_manager() { return mailbox_manager_.get(); } -+ - GpuMemoryManager* gpu_memory_manager() { return &gpu_memory_manager_; } - - GpuEventsDispatcher* gpu_devtools_events_dispatcher() { -diff --git a/content/gpu/gpu_child_thread.cc b/content/gpu/gpu_child_thread.cc -index 170b364..a84a9e0 100644 ---- a/content/gpu/gpu_child_thread.cc -+++ b/content/gpu/gpu_child_thread.cc -@@ -40,6 +40,8 @@ bool GpuProcessLogMessageHandler(int severity, - - } // namespace - -+GpuChildThread* GpuChildThread::instance_ = 0; -+ - GpuChildThread::GpuChildThread(GpuWatchdogThread* watchdog_thread, - bool dead_on_arrival, - const gpu::GPUInfo& gpu_info, -@@ -53,6 +55,8 @@ GpuChildThread::GpuChildThread(GpuWatchdogThread* watchdog_thread, - target_services_ = NULL; - #endif - g_thread_safe_sender.Get() = thread_safe_sender(); -+ -+ instance_ = this; - } - - GpuChildThread::GpuChildThread(const std::string& channel_id) -@@ -71,6 +75,8 @@ GpuChildThread::GpuChildThread(const std::string& channel_id) - VLOG(1) << "gfx::GLSurface::InitializeOneOff()"; - } - g_thread_safe_sender.Get() = thread_safe_sender(); -+ -+ instance_ = this; - } - - GpuChildThread::~GpuChildThread() { -diff --git a/content/gpu/gpu_child_thread.h b/content/gpu/gpu_child_thread.h -index ff0c925..82bb32a 100644 ---- a/content/gpu/gpu_child_thread.h -+++ b/content/gpu/gpu_child_thread.h -@@ -56,6 +56,10 @@ class GpuChildThread : public ChildThread { - virtual bool Send(IPC::Message* msg) OVERRIDE; - virtual bool OnControlMessageReceived(const IPC::Message& msg) OVERRIDE; - -+ GpuChannelManager* ChannelManager() const { return gpu_channel_manager_.get(); } -+ -+ static GpuChildThread* instance() { return instance_; } -+ - private: - // Message handlers. - void OnInitialize(); -@@ -94,6 +98,8 @@ class GpuChildThread : public ChildThread { - // Whether the GPU thread is running in the browser process. - bool in_browser_process_; - -+ static GpuChildThread* instance_; -+ - DISALLOW_COPY_AND_ASSIGN(GpuChildThread); - }; - diff --git a/patches/chromium/0013-Add-seams-to-setup-GL-contexts-sharing-with-QtQuick.patch b/patches/chromium/0013-Add-seams-to-setup-GL-contexts-sharing-with-QtQuick.patch deleted file mode 100644 index febdf6aab..000000000 --- a/patches/chromium/0013-Add-seams-to-setup-GL-contexts-sharing-with-QtQuick.patch +++ /dev/null @@ -1,106 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Jocelyn Turcotte -Date: Thu, 24 Oct 2013 18:26:59 +0200 -Subject: Add seams to setup GL contexts sharing with QtQuick. - -This will allow us to know right before the first GL context is -instantiated by Chromium so that we can install those contexts to -be shared with QtQuick GL contexts as well. ---- - content/common/gpu/gpu_channel_manager.cc | 8 +++++++- - content/public/browser/content_browser_client.h | 5 +++++ - ui/gl/gl_share_group.cc | 3 +++ - ui/gl/gl_share_group.h | 7 +++++-- - 4 files changed, 20 insertions(+), 3 deletions(-) - -diff --git a/content/common/gpu/gpu_channel_manager.cc b/content/common/gpu/gpu_channel_manager.cc -index 8b466bd..fe3f7b3 100644 ---- a/content/common/gpu/gpu_channel_manager.cc -+++ b/content/common/gpu/gpu_channel_manager.cc -@@ -11,6 +11,7 @@ - #include "content/common/gpu/gpu_memory_manager.h" - #include "content/common/gpu/gpu_messages.h" - #include "content/common/gpu/sync_point_manager.h" -+#include "content/public/browser/content_browser_client.h" - #include "gpu/command_buffer/service/feature_info.h" - #include "gpu/command_buffer/service/gpu_switches.h" - #include "gpu/command_buffer/service/mailbox_manager.h" -@@ -124,7 +125,12 @@ void GpuChannelManager::OnEstablishChannel(int client_id, bool share_context) { - DCHECK(!mailbox_manager_.get()); - mailbox_manager_ = new gpu::gles2::MailboxManager; - } -- share_group = share_group_.get(); -+ // Qt: Ask the browser client at the top to manage the context sharing. -+ // This can only work with --in-process-gpu or --single-process. -+ if (GetContentClient()->browser() && GetContentClient()->browser()->GetInProcessGpuShareGroup()) -+ share_group = GetContentClient()->browser()->GetInProcessGpuShareGroup(); -+ else -+ share_group = share_group_.get(); - mailbox_manager = mailbox_manager_.get(); - } - -diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h -index 8633105..639998f 100644 ---- a/content/public/browser/content_browser_client.h -+++ b/content/public/browser/content_browser_client.h -@@ -45,6 +45,7 @@ class FilePath; - } - - namespace gfx { -+class GLShareGroup; - class ImageSkia; - } - -@@ -582,6 +583,10 @@ class CONTENT_EXPORT ContentBrowserClient { - // information. - virtual VibrationProvider* OverrideVibrationProvider(); - -+ // Allow an embedder to provide a share group reimplementation to connect renderer -+ // GL contexts with the root compositor. -+ virtual gfx::GLShareGroup* GetInProcessGpuShareGroup() { return 0; } -+ - #if defined(OS_POSIX) && !defined(OS_MACOSX) - // Populates |mappings| with all files that need to be mapped before launching - // a child process. -diff --git a/ui/gl/gl_share_group.cc b/ui/gl/gl_share_group.cc -index 8e8958b..347873d 100644 ---- a/ui/gl/gl_share_group.cc -+++ b/ui/gl/gl_share_group.cc -@@ -18,6 +18,9 @@ GLShareGroup::GLShareGroup() - } - - void GLShareGroup::AddContext(GLContext* context) { -+ if (contexts_.empty()) -+ AboutToAddFirstContext(); -+ - contexts_.insert(context); - } - -diff --git a/ui/gl/gl_share_group.h b/ui/gl/gl_share_group.h -index 1deed63..f1b0369 100644 ---- a/ui/gl/gl_share_group.h -+++ b/ui/gl/gl_share_group.h -@@ -31,7 +31,7 @@ class GL_EXPORT GLShareGroup : public base::RefCounted { - - // Returns a pointer to any initialized context in the share group - // or NULL if there are no initialized contexts in the share group. -- GLContext* GetContext(); -+ virtual GLContext* GetContext(); - - // Sets and returns the unique shared GL context. Used for context - // virtualization. -@@ -45,10 +45,13 @@ class GL_EXPORT GLShareGroup : public base::RefCounted { - int GetRendererID(); - #endif - -+ protected: -+ virtual ~GLShareGroup(); -+ virtual void AboutToAddFirstContext() { } -+ - private: - friend class base::RefCounted; - -- ~GLShareGroup(); - - // References to GLContext are by raw pointer to avoid a reference count - // cycle. diff --git a/patches/chromium/0014-Declare-a-Qt-IPC-message-class.patch b/patches/chromium/0014-Declare-a-Qt-IPC-message-class.patch deleted file mode 100644 index 15f98cc13..000000000 --- a/patches/chromium/0014-Declare-a-Qt-IPC-message-class.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Jocelyn Turcotte -Date: Wed, 15 Jan 2014 17:22:44 +0100 -Subject: Declare a Qt IPC message class - -This allows Qt-specific IPC messages to be declared in QtWebEngine. - -Change-Id: Id6af79becf14c8c621df6752c6183ff550524859 -Reviewed-by: Pierre Rossi ---- - ipc/ipc_message_start.h | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/ipc/ipc_message_start.h b/ipc/ipc_message_start.h -index 7ce2bdd..3016f5d 100644 ---- a/ipc/ipc_message_start.h -+++ b/ipc/ipc_message_start.h -@@ -10,6 +10,7 @@ - // code to figure out the message class from its ID. - enum IPCMessageStart { - AutomationMsgStart = 0, -+ QtMsgStart, - FrameMsgStart, - ViewMsgStart, - InputMsgStart, diff --git a/patches/chromium/0015-Blacklist-the-skypebuttons-plugin.patch b/patches/chromium/0015-Blacklist-the-skypebuttons-plugin.patch deleted file mode 100644 index 8ebd56a93..000000000 --- a/patches/chromium/0015-Blacklist-the-skypebuttons-plugin.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Jocelyn Turcotte -Date: Wed, 27 Nov 2013 13:31:28 +0100 -Subject: Blacklist the skypebuttons plugin - -Even though plugins are disabled it happens that the libraries are -loaded and cause a crash since skypebuttons pulls Qt4 with it on -Linux and creates a dynamic linking error conflicting with Qt5 -symbols. - -Add the plugin library name to the blacklist to avoid it being -loaded altogether. -We have a similar fix in QtWebKit doing the same thing. - -Change-Id: I6706d45d1f19252d3b60af7b97c0a3a729dfe8b7 -Reviewed-by: Andras Becsi ---- - content/common/plugin_list_posix.cc | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/content/common/plugin_list_posix.cc b/content/common/plugin_list_posix.cc -index acd7830..0e82276 100644 ---- a/content/common/plugin_list_posix.cc -+++ b/content/common/plugin_list_posix.cc -@@ -151,6 +151,7 @@ bool IsUndesirablePlugin(const WebPluginInfo& info) { - // http://code.google.com/p/chromium/issues/detail?id=38229 - bool IsBlacklistedPlugin(const base::FilePath& path) { - const char* kBlackListedPlugins[] = { -+ "skypebuttons.so", // Crash on dlopen since it uses Qt4 - "nppdf.so", // Adobe PDF - }; - std::string filename = path.BaseName().value(); diff --git a/patches/chromium/0016-Remove-the-Running-without-renderer-sandbox-error-me.patch b/patches/chromium/0016-Remove-the-Running-without-renderer-sandbox-error-me.patch deleted file mode 100644 index 3ab1002fb..000000000 --- a/patches/chromium/0016-Remove-the-Running-without-renderer-sandbox-error-me.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Jocelyn Turcotte -Date: Thu, 30 Jan 2014 18:09:32 +0100 -Subject: Remove the Running without renderer sandbox error message - -We are currently not planing to enable the sandbox and the error -pollutes the auto tests output. - -Change-Id: Idd2e7eeea8f890f55dd6b6d513a7a43890e7d5b4 -Reviewed-by: Andras Becsi ---- - content/renderer/renderer_main.cc | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/content/renderer/renderer_main.cc b/content/renderer/renderer_main.cc -index 63c72ae..f0c16d2 100644 ---- a/content/renderer/renderer_main.cc -+++ b/content/renderer/renderer_main.cc -@@ -223,7 +223,6 @@ int RendererMain(const MainFunctionParams& parameters) { - if (!no_sandbox) { - run_loop = platform.EnableSandbox(); - } else { -- LOG(ERROR) << "Running without renderer sandbox"; - #ifndef NDEBUG - // For convenience, we print the stack trace for crashes. We can't get - // symbols when the sandbox is enabled, so only try when the sandbox is diff --git a/patches/chromium/0017-Update-clipboard.h-to-allow-building-clipboard_qt.cp.patch b/patches/chromium/0017-Update-clipboard.h-to-allow-building-clipboard_qt.cp.patch deleted file mode 100644 index 6a39ffec2..000000000 --- a/patches/chromium/0017-Update-clipboard.h-to-allow-building-clipboard_qt.cp.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Jocelyn Turcotte -Date: Tue, 18 Feb 2014 14:49:48 +0100 -Subject: Update clipboard.h to allow building clipboard_qt.cpp on all - platforms - -Change-Id: Ife754b2fcb1c1a535565facdbab615c07b8c4935 -Reviewed-by: Simon Hausmann ---- - ui/base/clipboard/clipboard.h | 11 +++++++++-- - 1 file changed, 9 insertions(+), 2 deletions(-) - -diff --git a/ui/base/clipboard/clipboard.h b/ui/base/clipboard/clipboard.h -index f41ac7a..5cf936c 100644 ---- a/ui/base/clipboard/clipboard.h -+++ b/ui/base/clipboard/clipboard.h -@@ -88,6 +88,7 @@ class UI_EXPORT Clipboard : NON_EXPORTED_BASE(public base::ThreadChecker) { - bool operator<(const FormatType& other) const; - #endif - -+#if !defined(TOOLKIT_QT) - #if defined(OS_WIN) - const FORMATETC& ToFormatEtc() const { return data_; } - #elif defined(OS_MACOSX) -@@ -97,6 +98,9 @@ class UI_EXPORT Clipboard : NON_EXPORTED_BASE(public base::ThreadChecker) { - #elif defined(USE_AURA) - const std::string& ToString() const { return data_; } - #endif -+#else -+ const std::string& ToString() const { return data_; } -+#endif // !defined(TOOLKIT_QT) - - private: - friend class Clipboard; -@@ -111,7 +115,10 @@ class UI_EXPORT Clipboard : NON_EXPORTED_BASE(public base::ThreadChecker) { - // - // Note that in some cases, the accessor for the wrapped descriptor may be - // public, as these format types can be used by drag and drop code as well. --#if defined(OS_WIN) -+#if defined(TOOLKIT_QT) -+ explicit FormatType(const std::string& native_format); -+ std::string data_; -+#elif defined(OS_WIN) - explicit FormatType(UINT native_format); - FormatType(UINT native_format, LONG index); - UINT ToUINT() const { return data_.cfFormat; } -@@ -339,7 +346,7 @@ class UI_EXPORT Clipboard : NON_EXPORTED_BASE(public base::ThreadChecker) { - void WriteData(const FormatType& format, - const char* data_data, - size_t data_len); --#if defined(OS_WIN) -+#if !defined(TOOLKIT_QT) && defined(OS_WIN) - void WriteBitmapFromHandle(HBITMAP source_hbitmap, - const gfx::Size& size); - diff --git a/patches/chromium/0018-Get-rid-of-the-gtk-pango-cairo-dependency.patch b/patches/chromium/0018-Get-rid-of-the-gtk-pango-cairo-dependency.patch deleted file mode 100644 index 295959fdb..000000000 --- a/patches/chromium/0018-Get-rid-of-the-gtk-pango-cairo-dependency.patch +++ /dev/null @@ -1,86 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Andras Becsi -Date: Mon, 24 Mar 2014 18:41:20 +0100 -Subject: Get rid of the gtk/pango/cairo dependency - -This also removes the aura dependency to chrome resources -since we repack the needed resources ourselves. - -Change-Id: I8180d5668334540cfd88ade449f3f0c966b989ce -Reviewed-by: Zeno Albisser ---- - build/linux/system.gyp | 6 +++++- - content/browser/renderer_host/render_sandbox_host_linux.cc | 2 +- - content/renderer/npapi/webplugin_delegate_proxy.cc | 2 +- - ui/aura/aura.gyp | 1 - - 4 files changed, 7 insertions(+), 4 deletions(-) - -diff --git a/build/linux/system.gyp b/build/linux/system.gyp -index 4a7e857..1451afb 100644 ---- a/build/linux/system.gyp -+++ b/build/linux/system.gyp -@@ -29,7 +29,7 @@ - 'use_system_ssl%': 1, - }, - }], -- [ 'chromeos==0', { -+ [ 'chromeos==0 and use_qt==0', { - # Hide GTK and related dependencies for Chrome OS, so they won't get - # added back to Chrome OS. Don't try to use GTK on Chrome OS. - 'targets': [ -@@ -660,6 +660,8 @@ - 'type': 'none', - 'toolsets': ['host', 'target'], - 'conditions': [ -+ ['use_pango==1', { -+ 'conditions': [ - ['_toolset=="target"', { - 'direct_dependent_settings': { - 'cflags': [ -@@ -690,6 +692,8 @@ - }, - }], - ], -+ }], -+ ], - }, - { - 'target_name': 'ssl', -diff --git a/content/browser/renderer_host/render_sandbox_host_linux.cc b/content/browser/renderer_host/render_sandbox_host_linux.cc -index 19cbc5b..f4e1cfc 100644 ---- a/content/browser/renderer_host/render_sandbox_host_linux.cc -+++ b/content/browser/renderer_host/render_sandbox_host_linux.cc -@@ -709,7 +709,7 @@ void RenderSandboxHostLinux::Init(const std::string& sandbox_path) { - childs_lifeline_fd_ = pipefds[1]; - - // We need to be monothreaded before we fork(). --#if !defined(TOOLKIT_GTK) -+#if !defined(TOOLKIT_GTK) && !defined(TOOLKIT_QT) - // Exclude gtk port as TestSuite in base/tests/test_suite.cc is calling - // gtk_init. - // TODO(oshima): Remove ifdef when above issues are resolved. -diff --git a/content/renderer/npapi/webplugin_delegate_proxy.cc b/content/renderer/npapi/webplugin_delegate_proxy.cc -index d7f8472..a6418fb 100644 ---- a/content/renderer/npapi/webplugin_delegate_proxy.cc -+++ b/content/renderer/npapi/webplugin_delegate_proxy.cc -@@ -6,7 +6,7 @@ - - #if defined(TOOLKIT_GTK) - #include --#elif defined(USE_X11) -+#elif defined(USE_CAIRO) - #include - #endif - -diff --git a/ui/aura/aura.gyp b/ui/aura/aura.gyp -index 68164d4..139e046 100644 ---- a/ui/aura/aura.gyp -+++ b/ui/aura/aura.gyp -@@ -243,7 +243,6 @@ - 'type': 'executable', - 'dependencies': [ - '../../base/base.gyp:test_support_base', -- '../../chrome/chrome_resources.gyp:packed_resources', - '../../skia/skia.gyp:skia', - '../../testing/gtest.gyp:gtest', - '../compositor/compositor.gyp:compositor', diff --git a/patches/chromium/0019-Cherry-pick-https-codereview.chromium.org-137433002-.patch b/patches/chromium/0019-Cherry-pick-https-codereview.chromium.org-137433002-.patch deleted file mode 100644 index fa6e8fbf4..000000000 --- a/patches/chromium/0019-Cherry-pick-https-codereview.chromium.org-137433002-.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Andras Becsi -Date: Fri, 14 Mar 2014 18:37:44 +0100 -Subject: Cherry-pick https://codereview.chromium.org/137433002 from upstream - -This fixes the build with a cross compiler toolchain. -We do not require the functionality of this script but -gyp tries to run it and fails if the specified file -does not exist. - -As the upstream issue mentions, this script is "going -away soonish", until then we can keep this patch around. - -Change-Id: Ib9084103cd95aad3c48541e13351ebee2c9279ea -Reviewed-by: Pierre Rossi ---- - build/linux/python_arch.sh | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/build/linux/python_arch.sh b/build/linux/python_arch.sh -index 3a41f94..e0f63bc 100755 ---- a/build/linux/python_arch.sh -+++ b/build/linux/python_arch.sh -@@ -11,7 +11,9 @@ - # - - file_out=$(file --dereference "$1") --if [ $? -ne 0 ]; then -+# The POSIX spec says that `file` should not exit(1) if the file does not -+# exist, so do our own -e check to catch things. -+if [ $? -ne 0 ] || [ ! -e "$1" ] ; then - echo unknown - exit 0 - fi diff --git a/patches/chromium/0020-fixup-select-elements.patch b/patches/chromium/0020-fixup-select-elements.patch deleted file mode 100644 index 47e94a03a..000000000 --- a/patches/chromium/0020-fixup-select-elements.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Pierre Rossi -Date: Thu, 3 Apr 2014 12:18:16 +0200 -Subject: fixup select elements. - -We use RenderWidgetHostViewQt, not RWHVMac, even on Mac. -Since some platform decisions seem to have transpired all the way to -the content layer, we should simply use the web ui for select elements -on mac for the time being. - -Change-Id: Iefe1dd3b246fc210ac18ff9eb0e7ad498c061eac -Reviewed-by: Jocelyn Turcotte ---- - content/browser/web_contents/web_contents_impl.cc | 4 ++-- - content/renderer/render_thread_impl.cc | 2 +- - 2 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 6b6cf00..ee5b901d 100644 ---- a/content/browser/web_contents/web_contents_impl.cc -+++ b/content/browser/web_contents/web_contents_impl.cc -@@ -1464,7 +1464,7 @@ void WebContentsImpl::CreateNewWidget(int render_process_id, - // Save the created widget associated with the route so we can show it later. - pending_widget_views_[route_id] = widget_view; - --#if defined(OS_MACOSX) -+#if defined(OS_MACOSX) && !defined(TOOLKIT_QT) - // A RenderWidgetHostViewMac has lifetime scoped to the view. We'll retain it - // to allow it to survive the trip without being hosted. - base::mac::NSObjectRetain(widget_view->GetNativeView()); -@@ -1529,7 +1529,7 @@ void WebContentsImpl::ShowCreatedWidget(int route_id, - // used to implement Pepper Flash fullscreen. - render_widget_host_impl->set_allow_privileged_mouse_lock(is_fullscreen); - --#if defined(OS_MACOSX) -+#if defined(OS_MACOSX) && !defined(TOOLKIT_QT) - // A RenderWidgetHostViewMac has lifetime scoped to the view. Now that it's - // properly embedded (or purposefully ignored) we can release the retain we - // took in CreateNewWidget(). -diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc -index e910b8b..609b965 100644 ---- a/content/renderer/render_thread_impl.cc -+++ b/content/renderer/render_thread_impl.cc -@@ -314,7 +314,7 @@ void RenderThreadImpl::Init() { - v8::V8::SetCreateHistogramFunction(CreateHistogram); - v8::V8::SetAddHistogramSampleFunction(AddHistogramSample); - --#if defined(OS_MACOSX) || defined(OS_ANDROID) -+#if (defined(OS_MACOSX) || defined(OS_ANDROID)) && !defined(TOOLKIT_QT) - // On Mac and Android, the select popups are rendered by the browser. - blink::WebView::setUseExternalPopupMenus(true); - #endif diff --git a/patches/chromium/0021-Do-not-directly-override-libc-symbols-from-the-libra.patch b/patches/chromium/0021-Do-not-directly-override-libc-symbols-from-the-libra.patch deleted file mode 100644 index aa27eb92b..000000000 --- a/patches/chromium/0021-Do-not-directly-override-libc-symbols-from-the-libra.patch +++ /dev/null @@ -1,129 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Zeno Albisser -Date: Wed, 23 Apr 2014 16:54:47 +0200 -Subject: Do not directly override libc symbols from the library. - -Instead we export _override symbols and add the symbol -renaming directly into the QtWebEngineProcess source. - -Change-Id: I209a7dcf42772bb993e966f253dd2d1c7013dceb -Reviewed-by: Andras Becsi ---- - content/zygote/zygote_main_linux.cc | 14 -------------- - sandbox/linux/services/libc_urandom_override.cc | 22 +--------------------- - 2 files changed, 1 insertion(+), 35 deletions(-) - -diff --git a/content/zygote/zygote_main_linux.cc b/content/zygote/zygote_main_linux.cc -index 8e91c2f..2e5cc7e 100644 ---- a/content/zygote/zygote_main_linux.cc -+++ b/content/zygote/zygote_main_linux.cc -@@ -181,8 +181,6 @@ static void InitLibcLocaltimeFunctions() { - // references to localtime() will resolve to this function. Notice that we need - // to set visibility attribute to "default" to export the symbol, as it is set - // to "hidden" by default in chrome per build/common.gypi. --__attribute__ ((__visibility__("default"))) --struct tm* localtime_override(const time_t* timep) __asm__ ("localtime"); - - __attribute__ ((__visibility__("default"))) - struct tm* localtime_override(const time_t* timep) { -@@ -199,10 +197,6 @@ struct tm* localtime_override(const time_t* timep) { - } - } - --// Use same trick to override localtime64(), localtime_r() and localtime64_r(). --__attribute__ ((__visibility__("default"))) --struct tm* localtime64_override(const time_t* timep) __asm__ ("localtime64"); -- - __attribute__ ((__visibility__("default"))) - struct tm* localtime64_override(const time_t* timep) { - if (g_am_zygote_or_renderer) { -@@ -219,10 +213,6 @@ struct tm* localtime64_override(const time_t* timep) { - } - - __attribute__ ((__visibility__("default"))) --struct tm* localtime_r_override(const time_t* timep, -- struct tm* result) __asm__ ("localtime_r"); -- --__attribute__ ((__visibility__("default"))) - struct tm* localtime_r_override(const time_t* timep, struct tm* result) { - if (g_am_zygote_or_renderer) { - ProxyLocaltimeCallToBrowser(*timep, result, NULL, 0); -@@ -235,10 +225,6 @@ struct tm* localtime_r_override(const time_t* timep, struct tm* result) { - } - - __attribute__ ((__visibility__("default"))) --struct tm* localtime64_r_override(const time_t* timep, -- struct tm* result) __asm__ ("localtime64_r"); -- --__attribute__ ((__visibility__("default"))) - struct tm* localtime64_r_override(const time_t* timep, struct tm* result) { - if (g_am_zygote_or_renderer) { - ProxyLocaltimeCallToBrowser(*timep, result, NULL, 0); -diff --git a/sandbox/linux/services/libc_urandom_override.cc b/sandbox/linux/services/libc_urandom_override.cc -index c5c49ba..6e8e129 100644 ---- a/sandbox/linux/services/libc_urandom_override.cc -+++ b/sandbox/linux/services/libc_urandom_override.cc -@@ -121,8 +121,6 @@ static void InitLibcFileIOFunctions() { - // the code below defines fopen_override() function with asm name - // "fopen", so that all references to fopen() will resolve to this - // function. --__attribute__ ((__visibility__("default"))) --FILE* fopen_override(const char* path, const char* mode) __asm__ ("fopen"); - - __attribute__ ((__visibility__("default"))) - FILE* fopen_override(const char* path, const char* mode) { -@@ -141,7 +139,7 @@ FILE* fopen_override(const char* path, const char* mode) { - } - - __attribute__ ((__visibility__("default"))) --FILE* fopen64(const char* path, const char* mode) { -+FILE* fopen64_override(const char* path, const char* mode) { - if (g_override_urandom && strcmp(path, kUrandomDevPath) == 0) { - int fd = HANDLE_EINTR(dup(base::GetUrandomFD())); - if (fd < 0) { -@@ -162,11 +160,6 @@ FILE* fopen64(const char* path, const char* mode) { - #if HAVE_XSTAT - - __attribute__ ((__visibility__("default"))) --int xstat_override(int version, -- const char *path, -- struct stat *buf) __asm__ ("__xstat"); -- --__attribute__ ((__visibility__("default"))) - int xstat_override(int version, const char *path, struct stat *buf) { - if (g_override_urandom && strcmp(path, kUrandomDevPath) == 0) { - int result = __fxstat(version, base::GetUrandomFD(), buf); -@@ -179,11 +172,6 @@ int xstat_override(int version, const char *path, struct stat *buf) { - } - - __attribute__ ((__visibility__("default"))) --int xstat64_override(int version, -- const char *path, -- struct stat64 *buf) __asm__ ("__xstat64"); -- --__attribute__ ((__visibility__("default"))) - int xstat64_override(int version, const char *path, struct stat64 *buf) { - if (g_override_urandom && strcmp(path, kUrandomDevPath) == 0) { - int result = __fxstat64(version, base::GetUrandomFD(), buf); -@@ -198,10 +186,6 @@ int xstat64_override(int version, const char *path, struct stat64 *buf) { - #else - - __attribute__ ((__visibility__("default"))) --int stat_override(const char *path, -- struct stat *buf) __asm__ ("stat"); -- --__attribute__ ((__visibility__("default"))) - int stat_override(const char *path, struct stat *buf) { - if (g_override_urandom && strcmp(path, kUrandomDevPath) == 0) { - int result = fstat(base::GetUrandomFD(), buf); -@@ -214,10 +198,6 @@ int stat_override(const char *path, struct stat *buf) { - } - - __attribute__ ((__visibility__("default"))) --int stat64_override(const char *path, -- struct stat64 *buf) __asm__ ("stat64"); -- --__attribute__ ((__visibility__("default"))) - int stat64_override(const char *path, struct stat64 *buf) { - if (g_override_urandom && strcmp(path, kUrandomDevPath) == 0) { - int result = fstat64(base::GetUrandomFD(), buf); diff --git a/patches/chromium/0022-Adjust-gyp-defines-for-eLinux.patch b/patches/chromium/0022-Adjust-gyp-defines-for-eLinux.patch deleted file mode 100644 index 5be896da0..000000000 --- a/patches/chromium/0022-Adjust-gyp-defines-for-eLinux.patch +++ /dev/null @@ -1,134 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Zeno Albisser -Date: Wed, 23 Apr 2014 17:01:18 +0200 -Subject: Adjust gyp defines for eLinux. - -- Add Raspberry PI chipset to list of defined platforms. -- Make sure to include sources for xdg support. -- Do not use pkg-config-wrapper, as our sysroot pkg-config - already returns absolute paths. -- Use openssl for eLinux. -- Use fontconfig and freetype2 for eLinux. - -Change-Id: I8dd21c480922f32ac7111ea5582d82c249414caa -Reviewed-by: Pierre Rossi ---- - base/atomicops_internals_arm_gcc.h | 2 +- - base/base.gyp | 2 +- - base/base.gypi | 12 ++++++++++++ - build/linux/system.gyp | 6 +++++- - net/net.gyp | 2 +- - skia/skia_chrome.gypi | 2 +- - skia/skia_library.gypi | 2 +- - 7 files changed, 22 insertions(+), 6 deletions(-) - -diff --git a/base/atomicops_internals_arm_gcc.h b/base/atomicops_internals_arm_gcc.h -index 9f4fe2e..1964041 100644 ---- a/base/atomicops_internals_arm_gcc.h -+++ b/base/atomicops_internals_arm_gcc.h -@@ -53,7 +53,7 @@ inline void MemoryBarrier() { - #if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || \ - defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || \ - defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || \ -- defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6Z__) || \ -+ defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) || \ - defined(__ARM_ARCH_6KZ__) || defined(__ARM_ARCH_6T2__) - - inline Atomic32 NoBarrier_CompareAndSwap(volatile Atomic32* ptr, -diff --git a/base/base.gyp b/base/base.gyp -index 407d49d..b5af9d7 100644 ---- a/base/base.gyp -+++ b/base/base.gyp -@@ -35,7 +35,7 @@ - ], - }, - 'conditions': [ -- ['desktop_linux == 1 or chromeos == 1', { -+ ['desktop_linux == 1 or chromeos == 1 or qt_os == "embedded_linux"', { - 'conditions': [ - ['chromeos==1', { - 'sources/': [ ['include', '_chromeos\\.cc$'] ] -diff --git a/base/base.gypi b/base/base.gypi -index 11edab0..45d7180 100644 ---- a/base/base.gypi -+++ b/base/base.gypi -@@ -722,6 +722,18 @@ - 'atomicops_internals_x86_gcc.cc', - ], - }], -+ # We need to include xdg for embedded linux, -+ # but we indeed do not want atomicops for x86. -+ ['qt_os == "embedded_linux"', { -+ 'sources/': [ -+ ['include', '^nix/'], -+ ], -+ }], -+ ['use_qt==1 and target_arch=="ia32"', { -+ 'sources/': [ -+ ['include', 'atomicops_internals_x86_gcc.cc'], -+ ], -+ }], - ['<(use_glib)==0 or >(nacl_untrusted_build)==1', { - 'sources!': [ - 'message_loop/message_pump_glib.cc', -diff --git a/build/linux/system.gyp b/build/linux/system.gyp -index 1451afb..2a2c8bd 100644 ---- a/build/linux/system.gyp -+++ b/build/linux/system.gyp -@@ -506,6 +506,8 @@ - { - 'target_name': 'libpci', - 'type': 'static_library', -+ 'conditions': [ -+ ['use_x11==1', { - 'cflags': [ - ' -Date: Fri, 16 May 2014 13:34:31 +0200 -Subject: Fix Renderer and GPU threads on windows - -These threads are using the UI message loop on Windows per default. This -won't work since the UI message loop is handled by Qt and the Renderer -and GPU threads won't work with it properly. -Force these threads for using the default message loop as they use it on -Linux platform. - -Change-Id: Ie3582583e5d1644faa2875e015a0908ba148d91f -Reviewed-by: Andras Becsi -Reviewed-by: Jocelyn Turcotte ---- - content/browser/browser_main_loop.cc | 2 +- - content/browser/gpu/gpu_process_host.cc | 6 ++++++ - content/browser/renderer_host/render_process_host_impl.cc | 2 +- - content/renderer/renderer_main.cc | 2 ++ - 4 files changed, 10 insertions(+), 2 deletions(-) - -diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc -index 1930bc0..c2787e0 100644 ---- a/content/browser/browser_main_loop.cc -+++ b/content/browser/browser_main_loop.cc -@@ -654,7 +654,7 @@ int BrowserMainLoop::CreateThreads() { - "BrowserMainLoop::CreateThreads:start", - "Thread", "BrowserThread::FILE"); - thread_to_start = &file_thread_; --#if defined(OS_WIN) -+#if defined(OS_WIN) && !defined(TOOLKIT_QT) - // On Windows, the FILE thread needs to be have a UI message loop - // which pumps messages in such a way that Google Update can - // communicate back to us. -diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc -index 1b7da1c..c28ba8b 100644 ---- a/content/browser/gpu/gpu_process_host.cc -+++ b/content/browser/gpu/gpu_process_host.cc -@@ -577,7 +577,13 @@ bool GpuProcessHost::Init() { - switches::kDisableGpuWatchdog); - - in_process_gpu_thread_.reset(g_gpu_main_thread_factory(channel_id)); -+#if defined(OS_WIN) && defined(TOOLKIT_QT) -+ base::Thread::Options options; -+ options.message_loop_type = base::MessageLoop::TYPE_DEFAULT; -+ in_process_gpu_thread_->StartWithOptions(options); -+#else - in_process_gpu_thread_->Start(); -+#endif - - OnProcessLaunched(); // Fake a callback that the process is ready. - } else if (!LaunchGpuProcess(channel_id)) { -diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc -index 5d975e9..b5a5c49 100644 ---- a/content/browser/renderer_host/render_process_host_impl.cc -+++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -512,7 +512,7 @@ bool RenderProcessHostImpl::Init() { - in_process_renderer_.reset(g_renderer_main_thread_factory(channel_id)); - - base::Thread::Options options; --#if defined(OS_WIN) && !defined(OS_MACOSX) -+#if defined(OS_WIN) && !defined(OS_MACOSX) && !defined(TOOLKIT_QT) - // In-process plugins require this to be a UI message loop. - options.message_loop_type = base::MessageLoop::TYPE_UI; - #else -diff --git a/content/renderer/renderer_main.cc b/content/renderer/renderer_main.cc -index f0c16d2..5330d21 100644 ---- a/content/renderer/renderer_main.cc -+++ b/content/renderer/renderer_main.cc -@@ -161,6 +161,8 @@ int RendererMain(const MainFunctionParams& parameters) { - // As long as we use Cocoa in the renderer (for the forseeable future as of - // now; see http://crbug.com/306348 for info) we need to have a UI loop. - base::MessageLoop main_message_loop(base::MessageLoop::TYPE_UI); -+#elif defined(OS_WIN) && defined(TOOLKIT_QT) -+ base::MessageLoop main_message_loop(base::MessageLoop::TYPE_DEFAULT); - #else - // The main message loop of the renderer services doesn't have IO or UI tasks, - // unless in-process-plugins is used. diff --git a/patches/chromium/third_party/WebKit/0001-Remove-leftovers-from-WebKitSystemInterface.patch b/patches/chromium/third_party/WebKit/0001-Remove-leftovers-from-WebKitSystemInterface.patch deleted file mode 100644 index 43eb24883..000000000 --- a/patches/chromium/third_party/WebKit/0001-Remove-leftovers-from-WebKitSystemInterface.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Zeno Albisser -Date: Thu, 27 Jun 2013 19:21:34 +0200 -Subject: Remove leftovers from WebKitSystemInterface - ---- - Source/platform/fonts/mac/ComplexTextControllerCoreText.mm | 5 ----- - 1 file changed, 5 deletions(-) - -diff --git a/Source/platform/fonts/mac/ComplexTextControllerCoreText.mm b/Source/platform/fonts/mac/ComplexTextControllerCoreText.mm -index 822aa8c..42cdbed 100644 ---- a/Source/platform/fonts/mac/ComplexTextControllerCoreText.mm -+++ b/Source/platform/fonts/mac/ComplexTextControllerCoreText.mm -@@ -223,14 +223,9 @@ void ComplexTextController::collectComplexTextRunsForCharacters(const UChar* cp, - static CFDictionaryRef ltrTypesetterOptions = CFDictionaryCreate(kCFAllocatorDefault, optionKeys, ltrOptionValues, WTF_ARRAY_LENGTH(optionKeys), &kCFCopyStringDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); - static CFDictionaryRef rtlTypesetterOptions = CFDictionaryCreate(kCFAllocatorDefault, optionKeys, rtlOptionValues, WTF_ARRAY_LENGTH(optionKeys), &kCFCopyStringDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); - --#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070 -- ProviderInfo info = { cp, length, stringAttributes.get() }; -- RetainPtr typesetter(AdoptCF, WKCreateCTTypesetterWithUniCharProviderAndOptions(&provideStringAndAttributes, 0, &info, m_run.ltr() ? ltrTypesetterOptions : rtlTypesetterOptions)); --#else - RetainPtr string(AdoptCF, CFStringCreateWithCharactersNoCopy(kCFAllocatorDefault, cp, length, kCFAllocatorNull)); - RetainPtr attributedString(AdoptCF, CFAttributedStringCreate(kCFAllocatorDefault, string.get(), stringAttributes.get())); - RetainPtr typesetter(AdoptCF, CTTypesetterCreateWithAttributedStringAndOptions(attributedString.get(), m_run.ltr() ? ltrTypesetterOptions : rtlTypesetterOptions)); --#endif - - line.adoptCF(CTTypesetterCreateLine(typesetter.get(), CFRangeMake(0, 0))); - } else { diff --git a/patches/chromium/third_party/WebKit/0002-Overrideable-path-for-perl-gperf-and-bison.patch b/patches/chromium/third_party/WebKit/0002-Overrideable-path-for-perl-gperf-and-bison.patch deleted file mode 100644 index af3f6b494..000000000 --- a/patches/chromium/third_party/WebKit/0002-Overrideable-path-for-perl-gperf-and-bison.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Zoltan Arvai -Date: Mon, 3 Mar 2014 14:18:12 +0100 -Subject: Overrideable path for perl, gperf and bison. - ---- - Source/build/scripts/scripts.gypi | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/Source/build/scripts/scripts.gypi b/Source/build/scripts/scripts.gypi -index 2cf0a34..c7bdc4f 100644 ---- a/Source/build/scripts/scripts.gypi -+++ b/Source/build/scripts/scripts.gypi -@@ -43,9 +43,9 @@ - ['OS=="win"', { - # Using native perl rather than cygwin perl cuts execution time - # of idl preprocessing rules by a bit more than 50%. -- 'perl_exe': '<(DEPTH)/third_party/perl/perl/bin/perl.exe', -- 'gperf_exe': '<(DEPTH)/third_party/gperf/bin/gperf.exe', -- 'bison_exe': '<(DEPTH)/third_party/bison/bin/bison.exe', -+ 'perl_exe%': '<(DEPTH)/third_party/perl/perl/bin/perl.exe', -+ 'gperf_exe%': '<(DEPTH)/third_party/gperf/bin/gperf.exe', -+ 'bison_exe%': '<(DEPTH)/third_party/bison/bin/bison.exe', - # Using cl instead of cygwin gcc cuts the processing time from - # 1m58s to 0m52s. - 'preprocessor': '--preprocessor "cl.exe -nologo -EP -TP"', diff --git a/patches/chromium/third_party/WebKit/0003-Add-missing-dependency-to-khronos_headers.patch b/patches/chromium/third_party/WebKit/0003-Add-missing-dependency-to-khronos_headers.patch deleted file mode 100644 index e2796a22f..000000000 --- a/patches/chromium/third_party/WebKit/0003-Add-missing-dependency-to-khronos_headers.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Andras Becsi -Date: Thu, 13 Mar 2014 16:11:59 +0100 -Subject: Add missing dependency to khronos_headers - -This is needed since https://codereview.chromium.org/106503003 -and because of our chromium patch that fixes the build with a -GL ES2 configured Qt. ---- - Source/core/core.gyp | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/Source/core/core.gyp b/Source/core/core.gyp -index 882565d..8b8a8b5 100644 ---- a/Source/core/core.gyp -+++ b/Source/core/core.gyp -@@ -821,6 +821,7 @@ - 'webcore_derived', - '../wtf/wtf.gyp:wtf', - '<(DEPTH)/skia/skia.gyp:skia', -+ '<(DEPTH)/third_party/khronos/khronos.gyp:khronos_headers', - '<(DEPTH)/third_party/npapi/npapi.gyp:npapi', - '<(DEPTH)/third_party/qcms/qcms.gyp:qcms', - '<(DEPTH)/url/url.gyp:url_lib', -@@ -830,6 +831,7 @@ - '../wtf/wtf.gyp:wtf', - 'webcore_derived', - '<(DEPTH)/skia/skia.gyp:skia', -+ '<(DEPTH)/third_party/khronos/khronos.gyp:khronos_headers', - '<(DEPTH)/third_party/npapi/npapi.gyp:npapi', - '<(DEPTH)/third_party/qcms/qcms.gyp:qcms', - '<(DEPTH)/url/url.gyp:url_lib', diff --git a/patches/chromium/third_party/WebKit/0004-Disable-rubber-banding-on-Mac.patch b/patches/chromium/third_party/WebKit/0004-Disable-rubber-banding-on-Mac.patch deleted file mode 100644 index ffcaad441..000000000 --- a/patches/chromium/third_party/WebKit/0004-Disable-rubber-banding-on-Mac.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Andras Becsi -Date: Thu, 20 Mar 2014 11:27:56 +0100 -Subject: Disable "rubber-banding" on Mac - -Rubber-banding is the scrolling effect on Mac when overscrolling -which does not work with Qt and also causes a crash with branch 1750. -Disable the feature for now. ---- - Source/config.h | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/Source/config.h b/Source/config.h -index e556d5b..d7501db 100644 ---- a/Source/config.h -+++ b/Source/config.h -@@ -97,7 +97,6 @@ - - #if OS(MACOSX) - #define WTF_USE_CF 1 --#define WTF_USE_RUBBER_BANDING 1 - - /* We can't override the global operator new and delete on OS(MACOSX) because - * some object are allocated by WebKit and deallocated by the embedder. */ diff --git a/patches/chromium/third_party/WebKit/0005-Use-compositor-with-select-popups.patch b/patches/chromium/third_party/WebKit/0005-Use-compositor-with-select-popups.patch deleted file mode 100644 index d84001ce0..000000000 --- a/patches/chromium/third_party/WebKit/0005-Use-compositor-with-select-popups.patch +++ /dev/null @@ -1,238 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: "jbauman@chromium.org" -Date: Wed, 29 Jan 2014 00:14:45 +0000 -Subject: Use compositor with select popups. - -BUG=271575 - -Review URL: https://codereview.chromium.org/132173005 - -git-svn-id: svn://svn.chromium.org/blink/trunk@165977 bbb929c8-8fbe-4397-9dbb-9b2b20218538 - -Change-Id: I78b3354b1040b193c984b82db51c90b8183ebd24 -Reviewed-by: Jocelyn Turcotte ---- - Source/web/WebPopupMenuImpl.cpp | 69 +++++++++++++++++++++++++++++++++++++++++ - Source/web/WebPopupMenuImpl.h | 59 +++++++++++++++++++++-------------- - 2 files changed, 104 insertions(+), 24 deletions(-) - -diff --git a/Source/web/WebPopupMenuImpl.cpp b/Source/web/WebPopupMenuImpl.cpp -index 05c1d05..e8adfd7 100644 ---- a/Source/web/WebPopupMenuImpl.cpp -+++ b/Source/web/WebPopupMenuImpl.cpp -@@ -49,6 +49,10 @@ - #include "platform/graphics/GraphicsContext.h" - #include "platform/graphics/skia/SkiaUtils.h" - #include "platform/scroll/FramelessScrollView.h" -+#include "public/platform/Platform.h" -+#include "public/platform/WebCompositorSupport.h" -+#include "public/platform/WebContentLayer.h" -+#include "public/platform/WebLayerTreeView.h" - #include "public/platform/WebRect.h" - #include - -@@ -68,6 +72,10 @@ WebPopupMenu* WebPopupMenu::create(WebWidgetClient* client) - - WebPopupMenuImpl::WebPopupMenuImpl(WebWidgetClient* client) - : m_client(client) -+ , m_layerTreeView(0) -+ , m_isAcceleratedCompositingActive(false) -+ // Set to impossible point so we always get the first mouse position. -+ , m_lastMousePosition(WebPoint(-1, -1)) - , m_widget(0) - { - // Set to impossible point so we always get the first mouse position. -@@ -80,6 +88,12 @@ WebPopupMenuImpl::~WebPopupMenuImpl() - m_widget->setClient(0); - } - -+void WebPopupMenuImpl::willCloseLayerTreeView() -+{ -+ enterForceCompositingMode(false); -+ m_layerTreeView = 0; -+} -+ - void WebPopupMenuImpl::initialize(FramelessScrollView* widget, const WebRect& bounds) - { - m_widget = widget; -@@ -174,6 +188,9 @@ void WebPopupMenuImpl::resize(const WebSize& newSize) - WebRect damagedRect(0, 0, m_size.width, m_size.height); - m_client->didInvalidateRect(damagedRect); - } -+ -+ if (m_rootLayer) -+ m_rootLayer->layer()->setBounds(newSize); - } - - void WebPopupMenuImpl::willEndLiveResize() -@@ -188,6 +205,54 @@ void WebPopupMenuImpl::layout() - { - } - -+void WebPopupMenuImpl::enterForceCompositingMode(bool enter) -+{ -+ if (m_isAcceleratedCompositingActive == enter) -+ return; -+ -+ if (!enter) { -+ m_isAcceleratedCompositingActive = false; -+ m_client->didDeactivateCompositor(); -+ } else if (m_layerTreeView) { -+ m_isAcceleratedCompositingActive = true; -+ m_client->didActivateCompositor(0); -+ } else { -+ TRACE_EVENT0("webkit", "WebPopupMenuImpl::enterForceCompositingMode(true)"); -+ -+ m_client->initializeLayerTreeView(); -+ m_layerTreeView = m_client->layerTreeView(); -+ if (m_layerTreeView) { -+ m_layerTreeView->setVisible(true); -+ m_client->didActivateCompositor(0); -+ m_isAcceleratedCompositingActive = true; -+ m_layerTreeView->setDeviceScaleFactor(m_client->deviceScaleFactor()); -+ m_rootLayer = adoptPtr(Platform::current()->compositorSupport()->createContentLayer(this)); -+ m_rootLayer->layer()->setBounds(m_size); -+ m_layerTreeView->setRootLayer(*m_rootLayer->layer()); -+ } else { -+ m_isAcceleratedCompositingActive = false; -+ m_client->didDeactivateCompositor(); -+ } -+ } -+} -+ -+void WebPopupMenuImpl::didExitCompositingMode() -+{ -+ enterForceCompositingMode(false); -+ m_client->didInvalidateRect(IntRect(0, 0, m_size.width, m_size.height)); -+} -+ -+void WebPopupMenuImpl::paintContents(WebCanvas* canvas, const WebRect& rect, bool, WebFloatRect&) -+{ -+ if (!m_widget) -+ return; -+ -+ if (!rect.isEmpty()) { -+ GraphicsContext context(canvas); -+ m_widget->paint(&context, rect); -+ } -+} -+ - void WebPopupMenuImpl::paint(WebCanvas* canvas, const WebRect& rect, PaintOptions) - { - if (!m_widget) -@@ -343,6 +408,8 @@ void WebPopupMenuImpl::invalidateContentsAndRootView(const IntRect& paintRect) - return; - if (m_client) - m_client->didInvalidateRect(paintRect); -+ if (m_rootLayer) -+ m_rootLayer->layer()->invalidateRect(FloatRect(paintRect)); - } - - void WebPopupMenuImpl::invalidateContentsForSlowScroll(const IntRect& updateRect) -@@ -361,6 +428,8 @@ void WebPopupMenuImpl::scroll(const IntSize& scrollDelta, const IntRect& scrollR - int dy = scrollDelta.height(); - m_client->didScrollRect(dx, dy, clipRect); - } -+ if (m_rootLayer) -+ m_rootLayer->layer()->invalidateRect(FloatRect(clipRect)); - } - - IntPoint WebPopupMenuImpl::screenToRootView(const IntPoint& point) const -diff --git a/Source/web/WebPopupMenuImpl.h b/Source/web/WebPopupMenuImpl.h -index e5777be..0384675 100644 ---- a/Source/web/WebPopupMenuImpl.h -+++ b/Source/web/WebPopupMenuImpl.h -@@ -33,6 +33,7 @@ - - #include "WebPopupMenu.h" - #include "platform/scroll/FramelessScrollViewClient.h" -+#include "public/platform/WebContentLayerClient.h" - #include "public/platform/WebPoint.h" - #include "public/platform/WebSize.h" - #include "wtf/OwnPtr.h" -@@ -49,44 +50,50 @@ class Widget; - } - - namespace blink { -+class WebContentLayer; - class WebGestureEvent; - class WebKeyboardEvent; -+class WebLayerTreeView; - class WebMouseEvent; - class WebMouseWheelEvent; - class WebRange; - struct WebRect; - class WebTouchEvent; - --class WebPopupMenuImpl : public WebPopupMenu, -- public WebCore::FramelessScrollViewClient, -- public RefCounted { -+class WebPopupMenuImpl : public WebPopupMenu, public WebCore::FramelessScrollViewClient, public WebContentLayerClient, public RefCounted { - WTF_MAKE_FAST_ALLOCATED; - public: - // WebWidget functions: -- virtual void close() OVERRIDE; -- virtual WebSize size() OVERRIDE { return m_size; } -- virtual void willStartLiveResize() OVERRIDE; -- virtual void resize(const WebSize&) OVERRIDE; -- virtual void willEndLiveResize() OVERRIDE; -- virtual void animate(double frameBeginTime) OVERRIDE; -- virtual void layout() OVERRIDE; -- virtual void paint(WebCanvas*, const WebRect&, PaintOptions = ReadbackFromCompositorIfAvailable) OVERRIDE; -- virtual void themeChanged() OVERRIDE; -- virtual bool handleInputEvent(const WebInputEvent&) OVERRIDE; -- virtual void mouseCaptureLost() OVERRIDE; -- virtual void setFocus(bool enable) OVERRIDE; -+ virtual void close() OVERRIDE FINAL; -+ virtual WebSize size() OVERRIDE FINAL { return m_size; } -+ virtual void willStartLiveResize() OVERRIDE FINAL; -+ virtual void resize(const WebSize&) OVERRIDE FINAL; -+ virtual void willEndLiveResize() OVERRIDE FINAL; -+ virtual void animate(double frameBeginTime) OVERRIDE FINAL; -+ virtual void layout() OVERRIDE FINAL; -+ virtual void enterForceCompositingMode(bool enable) OVERRIDE FINAL; -+ virtual void didExitCompositingMode() OVERRIDE FINAL; -+ virtual void paint(WebCanvas*, const WebRect&, PaintOptions = ReadbackFromCompositorIfAvailable) OVERRIDE FINAL; -+ virtual void themeChanged() OVERRIDE FINAL; -+ virtual bool handleInputEvent(const WebInputEvent&) OVERRIDE FINAL; -+ virtual void mouseCaptureLost() OVERRIDE FINAL; -+ virtual void setFocus(bool enable) OVERRIDE FINAL; - virtual bool setComposition( - const WebString& text, - const WebVector& underlines, -- int selectionStart, int selectionEnd) OVERRIDE; -- virtual bool confirmComposition() OVERRIDE; -- virtual bool confirmComposition(ConfirmCompositionBehavior selectionBehavior) OVERRIDE; -- virtual bool confirmComposition(const WebString& text) OVERRIDE; -- virtual bool compositionRange(size_t* location, size_t* length) OVERRIDE; -- virtual bool caretOrSelectionRange(size_t* location, size_t* length) OVERRIDE; -- virtual void setTextDirection(WebTextDirection) OVERRIDE; -- virtual bool isAcceleratedCompositingActive() const OVERRIDE { return false; } -- virtual bool isPopupMenu() const OVERRIDE { return true; } -+ int selectionStart, int selectionEnd) OVERRIDE FINAL; -+ virtual bool confirmComposition() OVERRIDE FINAL; -+ virtual bool confirmComposition(ConfirmCompositionBehavior selectionBehavior) OVERRIDE FINAL; -+ virtual bool confirmComposition(const WebString& text) OVERRIDE FINAL; -+ virtual bool compositionRange(size_t* location, size_t* length) OVERRIDE FINAL; -+ virtual bool caretOrSelectionRange(size_t* location, size_t* length) OVERRIDE FINAL; -+ virtual void setTextDirection(WebTextDirection) OVERRIDE FINAL; -+ virtual bool isAcceleratedCompositingActive() const OVERRIDE FINAL { return false; } -+ virtual bool isPopupMenu() const OVERRIDE FINAL { return true; } -+ virtual void willCloseLayerTreeView() OVERRIDE FINAL; -+ -+ // WebContentLayerClient -+ virtual void paintContents(WebCanvas*, const WebRect& clip, bool canPaintLCDTest, WebFloatRect& opaque) OVERRIDE FINAL; - - // WebPopupMenuImpl - void initialize(WebCore::FramelessScrollView* widget, const WebRect& bounds); -@@ -127,6 +134,10 @@ public: - WebWidgetClient* m_client; - WebSize m_size; - -+ WebLayerTreeView* m_layerTreeView; -+ OwnPtr m_rootLayer; -+ bool m_isAcceleratedCompositingActive; -+ - WebPoint m_lastMousePosition; - - // This is a non-owning ref. The popup will notify us via popupClosed() diff --git a/patches/chromium/third_party/WebKit/0006-Use-compositor-for-page-popups.patch b/patches/chromium/third_party/WebKit/0006-Use-compositor-for-page-popups.patch deleted file mode 100644 index 3b260a8dc..000000000 --- a/patches/chromium/third_party/WebKit/0006-Use-compositor-for-page-popups.patch +++ /dev/null @@ -1,190 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: "jbauman@chromium.org" -Date: Fri, 21 Feb 2014 00:46:34 +0000 -Subject: Use compositor for page popups. - -This is essentially the last user of the legacy 2d path. - -BUG=271140 - -Review URL: https://codereview.chromium.org/171343003 - -Change-Id: I64911d0d83b9d1d4782dff9b09db1bbcc439da24 -git-svn-id: svn://svn.chromium.org/blink/trunk@167552 bbb929c8-8fbe-4397-9dbb-9b2b20218538 -Reviewed-by: Jocelyn Turcotte ---- - Source/web/WebPagePopupImpl.cpp | 87 +++++++++++++++++++++++++++++++++++++++++ - Source/web/WebPagePopupImpl.h | 13 ++++++ - 2 files changed, 100 insertions(+) - -diff --git a/Source/web/WebPagePopupImpl.cpp b/Source/web/WebPagePopupImpl.cpp -index b129dc6..cadbc14 100644 ---- a/Source/web/WebPagePopupImpl.cpp -+++ b/Source/web/WebPagePopupImpl.cpp -@@ -138,6 +138,16 @@ private: - m_popup->widgetClient()->hasTouchEventHandlers(needsTouchEvents); - } - -+ virtual GraphicsLayerFactory* graphicsLayerFactory() const OVERRIDE -+ { -+ return m_popup->m_webView->graphicsLayerFactory(); -+ } -+ -+ virtual void attachRootGraphicsLayer(Frame*, GraphicsLayer* graphicsLayer) OVERRIDE -+ { -+ m_popup->setRootGraphicsLayer(graphicsLayer); -+ } -+ - WebPagePopupImpl* m_popup; - }; - -@@ -157,6 +167,10 @@ bool PagePopupFeaturesClient::isEnabled(Document*, ContextFeatures::FeatureType - WebPagePopupImpl::WebPagePopupImpl(WebWidgetClient* client) - : m_widgetClient(client) - , m_closing(false) -+ , m_layerTreeView(0) -+ , m_rootLayer(0) -+ , m_rootGraphicsLayer(0) -+ , m_isAcceleratedCompositingActive(false) - { - ASSERT(client); - } -@@ -224,6 +238,49 @@ void WebPagePopupImpl::destroyPage() - m_page.clear(); - } - -+void WebPagePopupImpl::setRootGraphicsLayer(GraphicsLayer* layer) -+{ -+ m_rootGraphicsLayer = layer; -+ m_rootLayer = layer ? layer->platformLayer() : 0; -+ -+ setIsAcceleratedCompositingActive(layer); -+ if (m_layerTreeView) { -+ if (m_rootLayer) { -+ m_layerTreeView->setRootLayer(*m_rootLayer); -+ } else { -+ m_layerTreeView->clearRootLayer(); -+ } -+ } -+} -+ -+void WebPagePopupImpl::setIsAcceleratedCompositingActive(bool enter) -+{ -+ if (m_isAcceleratedCompositingActive == enter) -+ return; -+ -+ if (!enter) { -+ m_isAcceleratedCompositingActive = false; -+ m_widgetClient->didDeactivateCompositor(); -+ } else if (m_layerTreeView) { -+ m_isAcceleratedCompositingActive = true; -+ m_widgetClient->didActivateCompositor(0); -+ } else { -+ TRACE_EVENT0("webkit", "WebPagePopupImpl::setIsAcceleratedCompositingActive(true)"); -+ -+ m_widgetClient->initializeLayerTreeView(); -+ m_layerTreeView = m_widgetClient->layerTreeView(); -+ if (m_layerTreeView) { -+ m_layerTreeView->setVisible(true); -+ m_widgetClient->didActivateCompositor(0); -+ m_isAcceleratedCompositingActive = true; -+ m_layerTreeView->setDeviceScaleFactor(m_widgetClient->deviceScaleFactor()); -+ } else { -+ m_isAcceleratedCompositingActive = false; -+ m_widgetClient->didDeactivateCompositor(); -+ } -+ } -+} -+ - WebSize WebPagePopupImpl::size() - { - return m_popupClient->contentSize(); -@@ -234,6 +291,36 @@ void WebPagePopupImpl::animate(double) - PageWidgetDelegate::animate(m_page.get(), monotonicallyIncreasingTime()); - } - -+void WebPagePopupImpl::enterForceCompositingMode(bool enter) -+{ -+ if (m_page->settings().forceCompositingMode() == enter) -+ return; -+ -+ TRACE_EVENT1("webkit", "WebPagePopupImpl::enterForceCompositingMode", "enter", enter); -+ m_page->settings().setForceCompositingMode(enter); -+ if (enter) { -+ if (!m_page) -+ return; -+ Frame* mainFrame = m_page->mainFrame(); -+ if (!mainFrame) -+ return; -+ mainFrame->view()->updateCompositingLayersAfterStyleChange(); -+ } -+} -+ -+void WebPagePopupImpl::didExitCompositingMode() -+{ -+ setIsAcceleratedCompositingActive(false); -+ m_widgetClient->didInvalidateRect(IntRect(0, 0, size().width, size().height)); -+ m_page->mainFrame()->document()->setNeedsStyleRecalc(SubtreeStyleChange); -+} -+ -+void WebPagePopupImpl::willCloseLayerTreeView() -+{ -+ setIsAcceleratedCompositingActive(false); -+ m_layerTreeView = 0; -+} -+ - void WebPagePopupImpl::layout() - { - PageWidgetDelegate::layout(m_page.get()); -diff --git a/Source/web/WebPagePopupImpl.h b/Source/web/WebPagePopupImpl.h -index 660c47f..050f3ae 100644 ---- a/Source/web/WebPagePopupImpl.h -+++ b/Source/web/WebPagePopupImpl.h -@@ -38,6 +38,7 @@ - #include "wtf/RefCounted.h" - - namespace WebCore { -+class GraphicsLayer; - class Page; - class PagePopupClient; - class PlatformKeyboardEvent; -@@ -46,6 +47,8 @@ class PlatformKeyboardEvent; - namespace blink { - - class PagePopupChromeClient; -+class WebLayerTreeView; -+class WebLayer; - class WebViewImpl; - - class WebPagePopupImpl : public WebPagePopup, -@@ -68,6 +71,9 @@ private: - virtual WebSize size() OVERRIDE; - virtual void animate(double) OVERRIDE; - virtual void layout() OVERRIDE; -+ virtual void enterForceCompositingMode(bool enter) OVERRIDE; -+ virtual void didExitCompositingMode() OVERRIDE; -+ virtual void willCloseLayerTreeView() OVERRIDE; - virtual void paint(WebCanvas*, const WebRect&, PaintOptions = ReadbackFromCompositorIfAvailable) OVERRIDE; - virtual void resize(const WebSize&) OVERRIDE; - virtual void close() OVERRIDE; -@@ -83,6 +89,8 @@ private: - explicit WebPagePopupImpl(WebWidgetClient*); - bool initializePage(); - void destroyPage(); -+ void setRootGraphicsLayer(WebCore::GraphicsLayer*); -+ void setIsAcceleratedCompositingActive(bool enter); - - WebWidgetClient* m_widgetClient; - WebRect m_windowRectInScreen; -@@ -92,6 +100,11 @@ private: - WebCore::PagePopupClient* m_popupClient; - bool m_closing; - -+ WebLayerTreeView* m_layerTreeView; -+ WebLayer* m_rootLayer; -+ WebCore::GraphicsLayer* m_rootGraphicsLayer; -+ bool m_isAcceleratedCompositingActive; -+ - friend class WebPagePopup; - friend class PagePopupChromeClient; - }; diff --git a/patches/chromium/third_party/icu/0001-Do-not-use-icu-config-on-eLinux.patch b/patches/chromium/third_party/icu/0001-Do-not-use-icu-config-on-eLinux.patch deleted file mode 100644 index c330325a7..000000000 --- a/patches/chromium/third_party/icu/0001-Do-not-use-icu-config-on-eLinux.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Andras Becsi -Date: Tue, 6 May 2014 17:05:55 +0200 -Subject: Do not use icu-config on eLinux - -We require that the icu libs are in the default library seach path. ---- - icu.gyp | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/icu.gyp b/icu.gyp -index 4d8259a..416050d 100644 ---- a/icu.gyp -+++ b/icu.gyp -@@ -642,6 +642,8 @@ - ], - }, - },{ # OS!="android" -+ 'conditions': [ -+ ['qt_os!="embedded_linux"', { - 'link_settings': { - 'ldflags': [ - ' -Date: Wed, 16 Oct 2013 10:17:11 +0200 -Subject: Do not forward declare WebRtcVoiceChannelInfo. - -Clang / libc++ does not support incomplete types in -templates. See: -http://clang.llvm.org/compatibility.html#undep_incomplete - -This fixes the fixes the "error: field has incomplete type" compiler error. ---- - media/webrtc/webrtcvoiceengine.cc | 13 ------------- - media/webrtc/webrtcvoiceengine.h | 13 ++++++++++++- - 2 files changed, 12 insertions(+), 14 deletions(-) - -diff --git a/media/webrtc/webrtcvoiceengine.cc b/media/webrtc/webrtcvoiceengine.cc -index 51da9ac..3bdc403 100644 ---- a/media/webrtc/webrtcvoiceengine.cc -+++ b/media/webrtc/webrtcvoiceengine.cc -@@ -1620,19 +1620,6 @@ int WebRtcVoiceEngine::CreateSoundclipVoiceChannel() { - return CreateVoiceChannel(voe_wrapper_sc_.get()); - } - --// This struct relies on the generated copy constructor and assignment operator --// since it is used in an stl::map. --struct WebRtcVoiceMediaChannel::WebRtcVoiceChannelInfo { -- WebRtcVoiceChannelInfo() : channel(-1), renderer(NULL) {} -- WebRtcVoiceChannelInfo(int ch, AudioRenderer* r) -- : channel(ch), -- renderer(r) {} -- ~WebRtcVoiceChannelInfo() {} -- -- int channel; -- AudioRenderer* renderer; --}; -- - // WebRtcVoiceMediaChannel - WebRtcVoiceMediaChannel::WebRtcVoiceMediaChannel(WebRtcVoiceEngine *engine) - : WebRtcMediaChannel( -diff --git a/media/webrtc/webrtcvoiceengine.h b/media/webrtc/webrtcvoiceengine.h -index 23d97f5..6a2c6d8 100644 ---- a/media/webrtc/webrtcvoiceengine.h -+++ b/media/webrtc/webrtcvoiceengine.h -@@ -388,7 +388,18 @@ class WebRtcVoiceMediaChannel - static Error WebRtcErrorToChannelError(int err_code); - - private: -- struct WebRtcVoiceChannelInfo; -+ // This struct relies on the generated copy constructor and assignment operator -+ // since it is used in an stl::map. -+ struct WebRtcVoiceChannelInfo { -+ WebRtcVoiceChannelInfo() : channel(-1), renderer(NULL) {} -+ WebRtcVoiceChannelInfo(int ch, AudioRenderer* r) -+ : channel(ch), -+ renderer(r) {} -+ ~WebRtcVoiceChannelInfo() {} -+ -+ int channel; -+ AudioRenderer* renderer; -+ }; - typedef std::map ChannelMap; - - void SetNack(int channel, bool nack_enabled); diff --git a/patches/chromium/third_party/libvpx/0001-LIBVPX-Add-path-for-QtWebEngine-build-in-Windows-spe.patch b/patches/chromium/third_party/libvpx/0001-LIBVPX-Add-path-for-QtWebEngine-build-in-Windows-spe.patch deleted file mode 100644 index 425e94c45..000000000 --- a/patches/chromium/third_party/libvpx/0001-LIBVPX-Add-path-for-QtWebEngine-build-in-Windows-spe.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Zoltan Arvai -Date: Mon, 24 Feb 2014 07:29:32 -0800 -Subject: LIBVPX: Add path for QtWebEngine build in Windows specific actions - ---- - libvpx.gyp | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/libvpx.gyp b/libvpx.gyp -index 3f668df..32a4bb1 100644 ---- a/libvpx.gyp -+++ b/libvpx.gyp -@@ -404,6 +404,7 @@ - '-s', '<(PRODUCT_DIR)/obj/libvpx_asm_offsets_vp8/vp8_asm_enc_offsets.obj', - '-s', '<(ninja_obj_dir)/encoder/libvpx_asm_offsets_vp8.vp8_asm_enc_offsets.obj', - '-s', '<(PRODUCT_DIR)/obj/Source/WebKit/chromium/third_party/libvpx/<(libvpx_source)/vp8/encoder/libvpx_asm_offsets_vp8.vp8_asm_enc_offsets.obj', -+ '-s', '<(qtwe_chromium_obj_dir)/third_party/libvpx/<(libvpx_source)/vp8/encoder/libvpx_asm_offsets_vp8.vp8_asm_enc_offsets.obj', - ], - 'process_output_as_sources': 1, - 'msvs_cygwin_shell': 1, -@@ -502,6 +503,7 @@ - '-s', '<(PRODUCT_DIR)/obj/libvpx_asm_offsets_vpx_scale/vpx_scale_asm_offsets.obj', - '-s', '<(ninja_obj_dir)/encoder/libvpx_asm_offsets_vpx_scale.vpx_scale_asm_offsets.obj', - '-s', '<(PRODUCT_DIR)/obj/Source/WebKit/chromium/third_party/libvpx/<(libvpx_source)/vpx_scale/libvpx_asm_offsets_vpx_scale.vpx_scale_asm_offsets.obj', -+ '-s', '<(qtwe_chromium_obj_dir)/third_party/libvpx/<(libvpx_source)/vpx_scale/libvpx_asm_offsets_vpx_scale.vpx_scale_asm_offsets.obj', - ], - 'process_output_as_sources': 1, - 'msvs_cygwin_shell': 1, diff --git a/patches/chromium/third_party/openssl/0001-Use-chacha_vec.c-to-avoid-hard-soft-float-mismatch.patch b/patches/chromium/third_party/openssl/0001-Use-chacha_vec.c-to-avoid-hard-soft-float-mismatch.patch deleted file mode 100644 index 43dfa8b75..000000000 --- a/patches/chromium/third_party/openssl/0001-Use-chacha_vec.c-to-avoid-hard-soft-float-mismatch.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Zeno Albisser -Date: Wed, 23 Apr 2014 17:03:10 +0200 -Subject: Use chacha_vec.c to avoid hard/soft float mismatch. - -But fall back to chacha_vec_arm.S when arm_neon_optional -is used. - -Change-Id: I8dd21c480922f32ac7111ea5582d82c249414caa -Reviewed-by: Pierre Rossi ---- - openssl.gypi | 13 ++++++++++++- - 1 file changed, 12 insertions(+), 1 deletion(-) - -diff --git a/openssl.gypi b/openssl.gypi -index 856b72e..d9cf5d8 100644 ---- a/openssl.gypi -+++ b/openssl.gypi -@@ -566,7 +566,6 @@ - 'openssl/crypto/aes/asm/aes-armv4.S', - 'openssl/crypto/bn/asm/armv4-gf2m.S', - 'openssl/crypto/bn/asm/armv4-mont.S', -- 'openssl/crypto/chacha/chacha_vec_arm.S', - 'openssl/crypto/modes/asm/ghash-armv4.S', - 'openssl/crypto/poly1305/poly1305_arm.c', - 'openssl/crypto/poly1305/poly1305_arm_asm.S', -@@ -574,6 +573,18 @@ - 'openssl/crypto/sha/asm/sha256-armv4.S', - 'openssl/crypto/sha/asm/sha512-armv4.S', - ], -+ 'conditions': [ -+ ['arm_float_abi=="hard"', { -+ 'openssl_arm_sources+': [ -+ 'openssl/crypto/chacha/chacha_vec.c', -+ ], -+ }, -+ { -+ 'openssl_arm_sources+': [ -+ 'openssl/crypto/chacha/chacha_vec_arm.S', -+ ], -+ }], -+ ], - 'openssl_arm_defines': [ - 'OPENSSL_BN_ASM_GF2m', - 'OPENSSL_BN_ASM_MONT', diff --git a/patches/chromium/tools/grit/0001-GRIT-Allow-grd-files-outside-of-chromium-source-dir.patch b/patches/chromium/tools/grit/0001-GRIT-Allow-grd-files-outside-of-chromium-source-dir.patch deleted file mode 100644 index 67188c051..000000000 --- a/patches/chromium/tools/grit/0001-GRIT-Allow-grd-files-outside-of-chromium-source-dir.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Zeno Albisser -Date: Wed, 24 Jul 2013 15:54:50 +0200 -Subject: GRIT: Allow grd files outside of chromium source dir. - -When replacing substrings with values from a dictionary, -the replacements should not be truncated to the length of src_root_dir. - -If the basename does not exist as a key in the resource_ids file, -then fall back to an absolute path. - -The precedence is like: -file in chromium > file basename > absolute file name. - -THIS SHOULD BE UPSTREAMABLE. ---- - grit/node/misc.py | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/grit/node/misc.py b/grit/node/misc.py -index 345081f..3daf89c 100755 ---- a/grit/node/misc.py -+++ b/grit/node/misc.py -@@ -49,6 +49,7 @@ def _ReadFirstIdsFromFile(filename, defines): - def ReplaceVariable(matchobj): - for key, value in defines.iteritems(): - if matchobj.group(1) == key: -+ value = os.path.abspath(value) - return value - return '' - -@@ -431,6 +432,11 @@ class GritNode(base.Node): - abs_filename = os.path.abspath(filename_or_stream) - if abs_filename[:len(src_root_dir)] != src_root_dir: - filename = os.path.basename(filename_or_stream) -+ # If the file is not within src_root_dir and the basename is not -+ # found as a key, fall back to using the absolute file name. -+ if not filename in first_ids: -+ filename = abs_filename -+ filename = filename.replace('\\', '/') - else: - filename = abs_filename[len(src_root_dir) + 1:] - filename = filename.replace('\\', '/') diff --git a/patches/chromium/tools/gyp/0001-Fix-build-with-toplevel-dir.patch b/patches/chromium/tools/gyp/0001-Fix-build-with-toplevel-dir.patch deleted file mode 100644 index d3680ac3a..000000000 --- a/patches/chromium/tools/gyp/0001-Fix-build-with-toplevel-dir.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Pierre Rossi -Date: Mon, 13 May 2013 16:25:46 +0200 -Subject: Fix build with toplevel-dir - ---- - pylib/gyp/generator/ninja.py | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/pylib/gyp/generator/ninja.py b/pylib/gyp/generator/ninja.py -index a40c7fe..a169234 100644 ---- a/pylib/gyp/generator/ninja.py -+++ b/pylib/gyp/generator/ninja.py -@@ -1473,8 +1473,13 @@ def CalculateVariables(default_variables, params): - default_variables.setdefault('SHARED_LIB_SUFFIX', '.so') - default_variables.setdefault('SHARED_LIB_DIR', - os.path.join('$!PRODUCT_DIR', 'lib')) -+ # Take into account the fact that toplevel_dir might not be equal to depth -+ toplevel_offset = '' -+ if 'options' in params: -+ options = params['options'] -+ toplevel_offset = os.path.relpath(options.depth, options.toplevel_dir) - default_variables.setdefault('LIB_DIR', -- os.path.join('$!PRODUCT_DIR', 'obj')) -+ os.path.join('$!PRODUCT_DIR', 'obj', toplevel_offset)) - - def ComputeOutputDir(params): - """Returns the path from the toplevel_dir to the build output directory.""" diff --git a/patches/chromium/tools/gyp/0002-Add-support-for-libc-to-xcode_emulation.py.patch b/patches/chromium/tools/gyp/0002-Add-support-for-libc-to-xcode_emulation.py.patch deleted file mode 100644 index b4a39a42f..000000000 --- a/patches/chromium/tools/gyp/0002-Add-support-for-libc-to-xcode_emulation.py.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Zeno Albisser -Date: Thu, 27 Jun 2013 20:04:51 +0200 -Subject: Add support for libc++ to xcode_emulation.py - ---- - pylib/gyp/xcode_emulation.py | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/pylib/gyp/xcode_emulation.py b/pylib/gyp/xcode_emulation.py -index 5e50f10..31191da 100644 ---- a/pylib/gyp/xcode_emulation.py -+++ b/pylib/gyp/xcode_emulation.py -@@ -609,6 +609,9 @@ class XcodeSettings(object): - for ldflag in self._Settings().get('OTHER_LDFLAGS', []): - ldflags.append(self._MapLinkerFlagFilename(ldflag, gyp_to_build_path)) - -+ if self._Test('USE_LIBCPP', 'YES', default='NO'): -+ ldflags.append('-stdlib=libc++') -+ - if self._Test('DEAD_CODE_STRIPPING', 'YES', default='NO'): - ldflags.append('-Wl,-dead_strip') - diff --git a/patches/chromium/tools/gyp/0003-Allow-letting-qmake-do-the-link-step.patch b/patches/chromium/tools/gyp/0003-Allow-letting-qmake-do-the-link-step.patch deleted file mode 100644 index 88d1a83c8..000000000 --- a/patches/chromium/tools/gyp/0003-Allow-letting-qmake-do-the-link-step.patch +++ /dev/null @@ -1,70 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Jocelyn Turcotte -Date: Thu, 27 Feb 2014 17:42:48 +0100 -Subject: Allow letting qmake do the link step - -This adds a let_qmake_do_the_linking target variable to tell ninja -not to link but rather dump the linking information from gyp in a -file that we'll parse with qmake. - -Change-Id: Icfaadae7ce4e9895f76b5fe06e05124e9b980e8b -Reviewed-by: Zoltan Arvai -Reviewed-by: Andras Becsi ---- - pylib/gyp/generator/ninja.py | 43 +++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 43 insertions(+) - -diff --git a/pylib/gyp/generator/ninja.py b/pylib/gyp/generator/ninja.py -index a169234..909c8d8 100644 ---- a/pylib/gyp/generator/ninja.py -+++ b/pylib/gyp/generator/ninja.py -@@ -1101,6 +1101,49 @@ class NinjaWriter: - else: - command = command + '_notoc' - -+ if config.get('let_qmake_do_the_linking', 0): -+ def toAbsPaths(paths): -+ return [os.path.relpath(path, self.toplevel_build) if os.path.isabs(path) else path -+ for path in paths] -+ def qmakeLiteral(s): -+ return s.replace('"', '\\"') -+ -+ # Generate this file for all solink targets, this assumes that -+ # a .pro file will pick up this pri file and do the rest of the work. -+ pri_file = open(os.path.join(self.toplevel_build, self.name + "_linking.pri"), 'w') -+ -+ if self.flavor == 'win': -+ # qmake will take care of the manifest -+ ldflags = filter(lambda x: not x.lower().startswith('/manifest'), ldflags) -+ -+ # Replace "$!PRODUCT_DIR" with "$$PWD" in link flags (which might contain some -L directives). -+ prefixed_lflags = [self.ExpandSpecial(f, '$$PWD') for f in ldflags] -+ prefixed_library_dirs = ['-L' + self.ExpandSpecial(f, '$$PWD') for f in config.get('library_dirs', [])] -+ prefixed_libraries = gyp.common.uniquer([self.ExpandSpecial(f, '$$PWD') for f in spec.get('libraries', [])]) -+ if self.flavor == 'mac': -+ prefixed_libraries = self.xcode_settings.AdjustLibraries(prefixed_libraries) -+ elif self.flavor == 'win': -+ prefixed_libraries = self.msvs_settings.AdjustLibraries(prefixed_libraries) -+ -+ # Make sure that we have relative paths to our out/(Release|Debug), where we generate our .pri file, and then prepend $$PWD to them. -+ prefixed_object_and_archives = ['$$PWD/' + o for o in toAbsPaths(link_deps)] -+ -+ pri_file.write("QMAKE_LFLAGS += %s\n" % qmakeLiteral(' '.join(prefixed_lflags))) -+ # Follow the logic of the solink rule. -+ if self.flavor != 'mac' and self.flavor != 'win': -+ pri_file.write("LIBS_PRIVATE += -Wl,--whole-archive %s -Wl,--no-whole-archive\n" % qmakeLiteral(' '.join(prefixed_object_and_archives))) -+ else: -+ pri_file.write("LIBS_PRIVATE += %s\n" % qmakeLiteral(' '.join(prefixed_object_and_archives))) -+ # External libs have to come after objects/archives, the linker resolve them in order. -+ pri_file.write("LIBS_PRIVATE += %s\n" % qmakeLiteral(' '.join(prefixed_library_dirs + prefixed_libraries))) -+ # Make sure that if ninja modifies one of the inputs, qmake/make will link again. -+ pri_file.write("POST_TARGETDEPS += %s\n" % qmakeLiteral(' '.join(prefixed_object_and_archives))) -+ pri_file.close() -+ -+ # In this mode we prevent letting ninja link at all. -+ command = 'phony' -+ command_suffix = '' -+ - if len(solibs): - extra_bindings.append(('solibs', gyp.common.EncodePOSIXShellList(solibs))) - diff --git a/patches/chromium/v8/0001-Prevent-V8-from-overridding-the-RuntimeLibrary-cflag.patch b/patches/chromium/v8/0001-Prevent-V8-from-overridding-the-RuntimeLibrary-cflag.patch deleted file mode 100644 index 0911d3abd..000000000 --- a/patches/chromium/v8/0001-Prevent-V8-from-overridding-the-RuntimeLibrary-cflag.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Jocelyn Turcotte -Date: Tue, 15 Apr 2014 14:22:52 +0200 -Subject: Prevent V8 from overridding the RuntimeLibrary cflags - -Since we're never going to statically link to the runtime library on -Windows (unlink Chromium when built as a monolitic chrome.exe), make -sure that our /M flag setting is also properly set for V8. - -Change-Id: Ia17073f6811f43aa264d08c270b1ab841a09408f -Reviewed-by: Michael Bruning ---- - build/toolchain.gypi | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/build/toolchain.gypi b/build/toolchain.gypi -index 99f357a..2dc3c04 100644 ---- a/build/toolchain.gypi -+++ b/build/toolchain.gypi -@@ -444,7 +444,7 @@ - ['v8_optimized_debug==0', { - 'Optimization': '0', - 'conditions': [ -- ['component=="shared_library"', { -+ ['component=="shared_library" or use_qt==1', { - 'RuntimeLibrary': '3', # /MDd - }, { - 'RuntimeLibrary': '1', # /MTd -@@ -459,7 +459,7 @@ - 'StringPooling': 'true', - 'BasicRuntimeChecks': '0', - 'conditions': [ -- ['component=="shared_library"', { -+ ['component=="shared_library" or use_qt==1', { - 'RuntimeLibrary': '3', # /MDd - }, { - 'RuntimeLibrary': '1', # /MTd -@@ -474,7 +474,7 @@ - 'StringPooling': 'true', - 'BasicRuntimeChecks': '0', - 'conditions': [ -- ['component=="shared_library"', { -+ ['component=="shared_library" or use_qt==1', { - 'RuntimeLibrary': '3', #/MDd - }, { - 'RuntimeLibrary': '1', #/MTd -@@ -666,7 +666,7 @@ - 'FavorSizeOrSpeed': '0', - 'StringPooling': 'true', - 'conditions': [ -- ['component=="shared_library"', { -+ ['component=="shared_library" or use_qt==1', { - 'RuntimeLibrary': '2', #/MD - }, { - 'RuntimeLibrary': '0', #/MT diff --git a/patches/patch-chromium.sh b/patches/patch-chromium.sh deleted file mode 100755 index 9c672ebf9..000000000 --- a/patches/patch-chromium.sh +++ /dev/null @@ -1,69 +0,0 @@ -#!/bin/sh -############################################################################# -## -## Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -## Contact: http://www.qt-project.org/legal -## -## This file is part of the QtWebEngine of the Qt Toolkit. -## -## $QT_BEGIN_LICENSE:LGPL$ -## Commercial License Usage -## Licensees holding valid commercial Qt licenses may use this file in -## accordance with the commercial license agreement provided with the -## Software or, alternatively, in accordance with the terms contained in -## a written agreement between you and Digia. For licensing terms and -## conditions see http://qt.digia.com/licensing. For further information -## use the contact form at http://qt.digia.com/contact-us. -## -## GNU Lesser General Public License Usage -## Alternatively, this file may be used under the terms of the GNU Lesser -## General Public License version 2.1 as published by the Free Software -## Foundation and appearing in the file LICENSE.LGPL included in the -## packaging of this file. Please review the following information to -## ensure the GNU Lesser General Public License version 2.1 requirements -## will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -## -## In addition, as a special exception, Digia gives you certain additional -## rights. These rights are described in the Digia Qt LGPL Exception -## version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -## -## GNU General Public License Usage -## Alternatively, this file may be used under the terms of the GNU -## General Public License version 3.0 as published by the Free Software -## Foundation and appearing in the file LICENSE.GPL included in the -## packaging of this file. Please review the following information to -## ensure the GNU General Public License version 3.0 requirements will be -## met: http://www.gnu.org/copyleft/gpl.html. -## -## -## $QT_END_LICENSE$ -## -############################################################################# - -PATCH_DIR="$( cd "$( dirname "$0" )"/chromium && pwd )" - -if [ -z "$CHROMIUM_SRC_DIR" ]; then - CHROMIUM_SRC_DIR="$( cd `git config qtwebengine.chromiumsrcdir` && pwd )" -fi - -if [ ! -d "$CHROMIUM_SRC_DIR" ]; then - echo "CHROMIUM_SRC_DIR pointing to a non existing directory. $CHROMIUM_SRC_DIR" - exit 1; -fi - -for MODULE in \ - / \ - /third_party/WebKit \ - /third_party/libjingle/source/talk \ - /third_party/libvpx \ - /third_party/openssl \ - /third_party/icu \ - /tools/gyp \ - /tools/grit \ - /v8 -do - cd $CHROMIUM_SRC_DIR$MODULE - echo "Entering $PWD" - git tag -f first-parent - git am $PATCH_DIR$MODULE/0* -done diff --git a/patches/update-patches.sh b/patches/update-patches.sh deleted file mode 100755 index bb9e76bb8..000000000 --- a/patches/update-patches.sh +++ /dev/null @@ -1,72 +0,0 @@ -#!/bin/sh -############################################################################# -## -## Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -## Contact: http://www.qt-project.org/legal -## -## This file is part of the QtWebEngine of the Qt Toolkit. -## -## $QT_BEGIN_LICENSE:LGPL$ -## Commercial License Usage -## Licensees holding valid commercial Qt licenses may use this file in -## accordance with the commercial license agreement provided with the -## Software or, alternatively, in accordance with the terms contained in -## a written agreement between you and Digia. For licensing terms and -## conditions see http://qt.digia.com/licensing. For further information -## use the contact form at http://qt.digia.com/contact-us. -## -## GNU Lesser General Public License Usage -## Alternatively, this file may be used under the terms of the GNU Lesser -## General Public License version 2.1 as published by the Free Software -## Foundation and appearing in the file LICENSE.LGPL included in the -## packaging of this file. Please review the following information to -## ensure the GNU Lesser General Public License version 2.1 requirements -## will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -## -## In addition, as a special exception, Digia gives you certain additional -## rights. These rights are described in the Digia Qt LGPL Exception -## version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -## -## GNU General Public License Usage -## Alternatively, this file may be used under the terms of the GNU -## General Public License version 3.0 as published by the Free Software -## Foundation and appearing in the file LICENSE.GPL included in the -## packaging of this file. Please review the following information to -## ensure the GNU General Public License version 3.0 requirements will be -## met: http://www.gnu.org/copyleft/gpl.html. -## -## -## $QT_END_LICENSE$ -## -############################################################################# - -THIRDPARTY_UPSTREAM_CHROMIUM_DIR="$( cd "$( dirname "$0" )"/../src/3rdparty_upstream/chromium && pwd )" -SCRIPTS_DIR="$( cd "$( dirname "$0" )"/../tools/scripts && pwd )" -PATCH_DIR="$( cd "$( dirname "$0" )"/chromium && pwd )" - -for MODULE in \ - / \ - /third_party/WebKit \ - /third_party/libjingle/source/talk \ - /third_party/libvpx \ - /third_party/openssl \ - /third_party/icu \ - /tools/gyp \ - /tools/grit \ - /v8 -do - cd $THIRDPARTY_UPSTREAM_CHROMIUM_DIR$MODULE - echo "Entering $PWD" - git rev-parse first-parent > /dev/null - if [ $? -ne 0 ]; then - echo "ERROR: Can't find the 'first-parent' git tag pointing where to start, you might have to re-run init-repository.py and re-apply your modifications." - exit 1 - fi - - rm $PATCH_DIR$MODULE/0* - git format-patch --no-signature -k -o $PATCH_DIR$MODULE first-parent - $SCRIPTS_DIR/clean_gitformatpatch_patchid.py $PATCH_DIR$MODULE/0* - cd $PATCH_DIR - git add --all $PATCH_DIR$MODULE -done - diff --git a/tools/scripts/clean_gitformatpatch_patchid.py b/tools/scripts/clean_gitformatpatch_patchid.py deleted file mode 100755 index 930e2af4e..000000000 --- a/tools/scripts/clean_gitformatpatch_patchid.py +++ /dev/null @@ -1,53 +0,0 @@ -#!/usr/bin/env python -############################################################################# -## -## Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -## Contact: http://www.qt-project.org/legal -## -## This file is part of the QtWebEngine of the Qt Toolkit. -## -## $QT_BEGIN_LICENSE:LGPL$ -## Commercial License Usage -## Licensees holding valid commercial Qt licenses may use this file in -## accordance with the commercial license agreement provided with the -## Software or, alternatively, in accordance with the terms contained in -## a written agreement between you and Digia. For licensing terms and -## conditions see http://qt.digia.com/licensing. For further information -## use the contact form at http://qt.digia.com/contact-us. -## -## GNU Lesser General Public License Usage -## Alternatively, this file may be used under the terms of the GNU Lesser -## General Public License version 2.1 as published by the Free Software -## Foundation and appearing in the file LICENSE.LGPL included in the -## packaging of this file. Please review the following information to -## ensure the GNU Lesser General Public License version 2.1 requirements -## will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -## -## In addition, as a special exception, Digia gives you certain additional -## rights. These rights are described in the Digia Qt LGPL Exception -## version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -## -## GNU General Public License Usage -## Alternatively, this file may be used under the terms of the GNU -## General Public License version 3.0 as published by the Free Software -## Foundation and appearing in the file LICENSE.GPL included in the -## packaging of this file. Please review the following information to -## ensure the GNU General Public License version 3.0 requirements will be -## met: http://www.gnu.org/copyleft/gpl.html. -## -## -## $QT_END_LICENSE$ -## -############################################################################# - -import re -import sys - -for fileName in sys.argv[1:]: - input = open(fileName) - # Replace the SHA1 in the from-line of the mbox with a dummy SHA1 to prevent unneeded changes to the patch file. - lines = [re.sub('^From \w*', 'From 0000000000000000000000000000000000000000', l) for l in input] - input.close() - output = open(fileName, 'w') - output.writelines(lines) - output.close() -- cgit v1.2.3