diff options
author | Michal Klocek <michal.klocek@qt.io> | 2020-01-10 16:36:49 +0100 |
---|---|---|
committer | Michal Klocek <michal.klocek@qt.io> | 2020-01-16 13:18:21 +0000 |
commit | cb8bce9edb276d314087475ac7c244a95cf87379 (patch) | |
tree | 2a8dd3e892800e8dba0a6db7320cb1aa645f69a6 | |
parent | 9f87a1ede7cd8824425c182c2ac77eebf4f7d14d (diff) | |
download | qtwebengine-chromium-cb8bce9edb276d314087475ac7c244a95cf87379.tar.gz |
Fix compile issues for ios
Task-number: QTBUG-77931
Change-Id: I3699ff2b1548818b2142bff2fe5f15a53c881fab
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
9 files changed, 32 insertions, 5 deletions
diff --git a/chromium/BUILD.gn b/chromium/BUILD.gn index e3b719f809a..4e26fa9b735 100644 --- a/chromium/BUILD.gn +++ b/chromium/BUILD.gn @@ -217,7 +217,7 @@ group("gn_all") { "//third_party/catapult/telemetry:bitmaptools($host_toolchain)", "//third_party/smhasher:pmurhash", ] - } else if (is_ios) { + } else if (is_ios && !use_qt) { deps += [ "//ios:all" ] } else if (is_fuchsia) { deps += [ diff --git a/chromium/third_party/BUILD.gn b/chromium/third_party/BUILD.gn index f0a8651e4ea..3c14675691f 100644 --- a/chromium/third_party/BUILD.gn +++ b/chromium/third_party/BUILD.gn @@ -5,8 +5,11 @@ import("//build/config/freetype/freetype.gni") import("//third_party/harfbuzz-ng/harfbuzz.gni") import("//third_party/libjpeg.gni") +import("//build/config/features.gni") +if (!use_qt) { assert(!is_ios, "This is not used on iOS, don't drag it in unintentionally") +} config("system_libjpeg_config") { libs = [ "jpeg" ] diff --git a/chromium/third_party/libjpeg_turbo/BUILD.gn b/chromium/third_party/libjpeg_turbo/BUILD.gn index 217a138bbf8..ac73468452d 100644 --- a/chromium/third_party/libjpeg_turbo/BUILD.gn +++ b/chromium/third_party/libjpeg_turbo/BUILD.gn @@ -6,11 +6,15 @@ # implementation. Use the meta target //third_party:jpeg instead. import("//build/config/sanitizers/sanitizers.gni") +import("//build/config/features.gni") + if (current_cpu == "arm") { import("//build/config/arm.gni") } +if (!use_qt) { assert(!is_ios, "This is not used on iOS, don't drag it in unintentionally") +} source_set("libjpeg_headers") { sources = [ diff --git a/chromium/third_party/pdfium/core/fpdfapi/font/cpdf_type1font.cpp b/chromium/third_party/pdfium/core/fpdfapi/font/cpdf_type1font.cpp index 4660458c93b..874bf7f8f83 100644 --- a/chromium/third_party/pdfium/core/fpdfapi/font/cpdf_type1font.cpp +++ b/chromium/third_party/pdfium/core/fpdfapi/font/cpdf_type1font.cpp @@ -19,6 +19,11 @@ #include "core/fxge/apple/apple_int.h" #endif +#if defined(OS_IOS) +#include <CoreFoundation/CFString.h> +#include <CoreGraphics/CoreGraphics.h> +#endif + namespace { #if defined(OS_MACOSX) diff --git a/chromium/third_party/pdfium/core/fxcrt/fx_system.h b/chromium/third_party/pdfium/core/fxcrt/fx_system.h index 6b113c08440..1e7daa9c6a0 100644 --- a/chromium/third_party/pdfium/core/fxcrt/fx_system.h +++ b/chromium/third_party/pdfium/core/fxcrt/fx_system.h @@ -7,6 +7,7 @@ #ifndef CORE_FXCRT_FX_SYSTEM_H_ #define CORE_FXCRT_FX_SYSTEM_H_ +#include "build/build_config.h" #include <assert.h> #include <math.h> #include <stdarg.h> @@ -48,7 +49,9 @@ #endif // _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_ #if _FX_PLATFORM_ == _FX_PLATFORM_APPLE_ +#if !defined(OS_IOS) #include <Carbon/Carbon.h> +#endif #include <libkern/OSAtomic.h> #endif // _FX_PLATFORM_ == _FX_PLATFORM_APPLE_ diff --git a/chromium/third_party/pdfium/core/fxge/BUILD.gn b/chromium/third_party/pdfium/core/fxge/BUILD.gn index 962362facd9..bf690405afb 100644 --- a/chromium/third_party/pdfium/core/fxge/BUILD.gn +++ b/chromium/third_party/pdfium/core/fxge/BUILD.gn @@ -167,7 +167,7 @@ jumbo_source_set("fxge") { sources += [ "fx_ge_linux.cpp" ] } - if (is_mac) { + if (is_mac || is_ios) { sources += [ "apple/apple_int.h", "apple/fx_apple_platform.cpp", diff --git a/chromium/third_party/pdfium/core/fxge/apple/apple_int.h b/chromium/third_party/pdfium/core/fxge/apple/apple_int.h index c58e75cccdc..0886bb15c25 100644 --- a/chromium/third_party/pdfium/core/fxge/apple/apple_int.h +++ b/chromium/third_party/pdfium/core/fxge/apple/apple_int.h @@ -8,15 +8,18 @@ #define CORE_FXGE_APPLE_APPLE_INT_H_ #include "core/fxcrt/fx_system.h" - -#include <Carbon/Carbon.h> - #include "core/fxge/cfx_gemodule.h" #include "core/fxge/cfx_graphstatedata.h" #include "core/fxge/cfx_pathdata.h" #include "core/fxge/fx_dib.h" #include "core/fxge/renderdevicedriver_iface.h" +#if !defined(OS_IOS) +#include <Carbon/Carbon.h> +#else +class CGPoint; +#endif + class CQuartz2D { public: void* CreateGraphics(const RetainPtr<CFX_DIBitmap>& bitmap); diff --git a/chromium/third_party/pdfium/core/fxge/apple/fx_apple_platform.cpp b/chromium/third_party/pdfium/core/fxge/apple/fx_apple_platform.cpp index 96adc88189a..2908c3dd60e 100644 --- a/chromium/third_party/pdfium/core/fxge/apple/fx_apple_platform.cpp +++ b/chromium/third_party/pdfium/core/fxge/apple/fx_apple_platform.cpp @@ -28,6 +28,10 @@ #ifndef _SKIA_SUPPORT_ +#if defined(OS_IOS) +#include <CoreGraphics/CoreGraphics.h> +#endif + namespace { void DoNothing(void* info, const void* data, size_t size) {} diff --git a/chromium/third_party/pdfium/core/fxge/apple/fx_quartz_device.cpp b/chromium/third_party/pdfium/core/fxge/apple/fx_quartz_device.cpp index 2281ba5ca1d..7eb76029098 100644 --- a/chromium/third_party/pdfium/core/fxge/apple/fx_quartz_device.cpp +++ b/chromium/third_party/pdfium/core/fxge/apple/fx_quartz_device.cpp @@ -17,6 +17,11 @@ #include "core/fxge/fx_freetype.h" #include "core/fxge/apple/apple_int.h" + +#if defined(OS_IOS) +#include <CoreGraphics/CoreGraphics.h> +#endif + #ifndef CGFLOAT_IS_DOUBLE #error Expected CGFLOAT_IS_DOUBLE to be defined by CoreGraphics headers #endif |