diff options
-rw-r--r-- | base/base_lib.scons | 8 | ||||
-rw-r--r-- | base/base_unittests.scons | 1 | ||||
-rw-r--r-- | build/SConscript.main | 2 | ||||
-rw-r--r-- | skia/SConscript | 3 | ||||
-rw-r--r-- | webkit/SConscript | 20 | ||||
-rw-r--r-- | webkit/SConscript.port | 1 | ||||
-rw-r--r-- | webkit/glue/event_conversion.cc | 3 | ||||
-rw-r--r-- | webkit/glue/plugins/plugin_instance.cc | 2 | ||||
-rw-r--r-- | webkit/port/platform/image-decoders/gif/GIFImageReader.h | 10 | ||||
-rw-r--r-- | webkit/port/platform/image-decoders/png/PNGImageDecoder.cpp | 2 | ||||
-rw-r--r-- | webkit/tools/test_shell/SConscript | 7 |
11 files changed, 43 insertions, 16 deletions
diff --git a/base/base_lib.scons b/base/base_lib.scons index 50e7b99..e2bb18d 100644 --- a/base/base_lib.scons +++ b/base/base_lib.scons @@ -92,9 +92,11 @@ if env_dmg_fp['PLATFORM'] == 'win32': '/wd4554', ], ) -elif env_dmg_fp['PLATFORM'] == 'posix': - env_dmg_fp['CXXFLAGS'].remove('-Wall') - env_dmg_fp['CXXFLAGS'].append('-Wno-write-strings') +elif env_dmg_fp['PLATFORM'] in ('darwin', 'posix'): + for var in ['CCFLAGS', 'CXXFLAGS']: + if '-Wall' in env_dmg_fp[var]: + env_dmg_fp[var].remove('-Wall') + env_dmg_fp[var].append('-Wno-write-strings') input_files.extend([ env_dmg_fp.Object('third_party/dmg_fp/dtoa.cc'), diff --git a/base/base_unittests.scons b/base/base_unittests.scons index 169d8ebb..433fdcce 100644 --- a/base/base_unittests.scons +++ b/base/base_unittests.scons @@ -139,7 +139,6 @@ if env['PLATFORM'] == 'darwin': # Mac-specific tests. input_files.extend([ 'mac_util_unittest.cc', - 'platform_test_mac.mm', ]) env.ChromeTestProgram('base_unittests', input_files) diff --git a/build/SConscript.main b/build/SConscript.main index cca1aff..22c7352 100644 --- a/build/SConscript.main +++ b/build/SConscript.main @@ -539,6 +539,8 @@ mac_env.Replace( CXX = 'g++-4.2', LINK = '$CXX', ) +mac_env.FilterOut(SHCCFLAGS = ['-fPIC']) +mac_env.FilterOut(SHLINKFLAGS = ['-fPIC']) mac_env.FilterOut( BUILD_SCONSCRIPTS = [ diff --git a/skia/SConscript b/skia/SConscript index ae26b3e..22a3e3d 100644 --- a/skia/SConscript +++ b/skia/SConscript @@ -37,8 +37,7 @@ if env['PLATFORM'] == 'win32': ], ) elif env['PLATFORM'] in ('posix', 'darwin'): - # Because images/SkStream.cpp has len asserts. - env.Append(CCFLAGS = ['-Wno-unused-variable']) + env.Append(CCFLAGS = ['-Wno-unused']) input_files = [ 'animator/SkTime.cpp', diff --git a/webkit/SConscript b/webkit/SConscript index e748b1a..5867657 100644 --- a/webkit/SConscript +++ b/webkit/SConscript @@ -44,17 +44,33 @@ if env['PLATFORM'] == 'win32': env['WEBKIT_PLATFORM_SUBDIR'] = 'win' elif env['PLATFORM'] == 'darwin': env['WEBKIT_PLATFORM_SUBDIR'] = 'mac' -elif env['PLATFORM'] == 'posix': env.Append( CCFLAGS = [ - '-Wno-parentheses', + '-Wno-reorder', + '-Wno-unused', ], + ) + env.Prepend( + CPPPATH = [env.subst(x) for x in [ + '$CHROME_SRC_DIR/third_party/WebKit/WebCore/platform/graphics/cg', + '$CHROME_SRC_DIR/third_party/WebKit/WebCore/loader/archive/cf', + ]] + ) +elif env['PLATFORM'] == 'posix': + env.Append( CPPDEFINES = [ # We want webkit to use pthreads rather than gthread. 'WTF_USE_PTHREADS=1', ], ) +if env['PLATFORM'] in ('darwin', 'posix'): + env.Append( + CCFLAGS = [ + '-Wno-parentheses', + ], + ) + env.Append( WEBCORE_DIR = '$THIRD_PARTY_WEBKIT_DIR/WebCore', PENDING_DIR = "$WEBKIT_DIR/pending", diff --git a/webkit/SConscript.port b/webkit/SConscript.port index 3d3d5ed..3d7b5c4 100644 --- a/webkit/SConscript.port +++ b/webkit/SConscript.port @@ -167,7 +167,6 @@ if env['PLATFORM'] == 'darwin': '$PORT_DIR/platform/GKURLMac.mm', '$PORT_DIR/platform/PluginStubsMac.cpp', '$PORT_DIR/platform/mac/DragDataMac.mm', - '$PORT_DIR/platform/mac/IntRectMac.mm', '$PORT_DIR/platform/graphics/mac/FontCacheMacPending.cpp', '$PORT_DIR/rendering/RenderThemeMac.mm', ]) diff --git a/webkit/glue/event_conversion.cc b/webkit/glue/event_conversion.cc index fb8d1fb..ea89652 100644 --- a/webkit/glue/event_conversion.cc +++ b/webkit/glue/event_conversion.cc @@ -151,6 +151,8 @@ static inline String ToSingleCharacterString(UChar c) { return String(&c, 1); } +#if !defined(OS_MACOSX) +// This function is not used on Mac OS X, and gcc complains. static String GetKeyIdentifierForWindowsKeyCode(unsigned short keyCode) { switch (keyCode) { case VKEY_MENU: @@ -253,6 +255,7 @@ static String GetKeyIdentifierForWindowsKeyCode(unsigned short keyCode) { return String::format("U+%04X", toupper(keyCode)); } } +#endif // !defined(OS_MACOSX) MakePlatformKeyboardEvent::MakePlatformKeyboardEvent(const WebKeyboardEvent& e) { diff --git a/webkit/glue/plugins/plugin_instance.cc b/webkit/glue/plugins/plugin_instance.cc index 54711b7..364274d6 100644 --- a/webkit/glue/plugins/plugin_instance.cc +++ b/webkit/glue/plugins/plugin_instance.cc @@ -282,7 +282,7 @@ void PluginInstance::NPP_StreamAsFile(NPStream *stream, const char *fname) { // Creating a temporary FilePath instance on the stack as the explicit // FilePath constructor with StringType as an argument causes a compiler // error when invoked via vector push back. - FilePath file_name(UTF8ToWide(fname)); + FilePath file_name = FilePath::FromWStringHack(UTF8ToWide(fname)); files_created_.push_back(file_name); } diff --git a/webkit/port/platform/image-decoders/gif/GIFImageReader.h b/webkit/port/platform/image-decoders/gif/GIFImageReader.h index faa08d2..c05c80b 100644 --- a/webkit/port/platform/image-decoders/gif/GIFImageReader.h +++ b/webkit/port/platform/image-decoders/gif/GIFImageReader.h @@ -165,11 +165,11 @@ struct GIFImageReader { int version; /* Either 89 for GIF89 or 87 for GIF87 */ unsigned screen_width; /* Logical screen width & height */ unsigned screen_height; - int global_colormap_size; /* Size of global colormap array. */ - int images_decoded; /* Counts completed frames for animated GIFs */ - int images_count; /* Counted all frames seen so far (including incomplete frames) */ - int loop_count; /* Netscape specific extension block to control - the number of animation loops a GIF renders. */ + int global_colormap_size; /* Size of global colormap array. */ + unsigned int images_decoded; /* Counts completed frames for animated GIFs */ + int images_count; /* Counted all frames seen so far (including incomplete frames) */ + int loop_count; /* Netscape specific extension block to control + the number of animation loops a GIF renders. */ // Not really global, but convenient to locate here. int count; /* Remaining # bytes in sub-block */ diff --git a/webkit/port/platform/image-decoders/png/PNGImageDecoder.cpp b/webkit/port/platform/image-decoders/png/PNGImageDecoder.cpp index 7f62f63..dbfbac6 100644 --- a/webkit/port/platform/image-decoders/png/PNGImageDecoder.cpp +++ b/webkit/port/platform/image-decoders/png/PNGImageDecoder.cpp @@ -48,7 +48,7 @@ const double cDefaultGamma = 2.2; const double cInverseGamma = 0.45455; // Protect against large PNGs. See Mozilla's bug #251381 for more info. -const long cMaxPNGSize = 1000000L; +const unsigned long cMaxPNGSize = 1000000UL; // Called if the decoding of the image fails. static void PNGAPI decodingFailed(png_structp png_ptr, png_const_charp error_msg); diff --git a/webkit/tools/test_shell/SConscript b/webkit/tools/test_shell/SConscript index 7715207..a0adcaf 100644 --- a/webkit/tools/test_shell/SConscript +++ b/webkit/tools/test_shell/SConscript @@ -97,6 +97,13 @@ elif env['PLATFORM'] in ('posix', 'darwin'): ] ) +if env['PLATFORM'] == 'darwin': + env.Append( + CPPPATH = [ + '$THIRD_PARTY_DIR/WebKit/WebKit/mac/WebCoreSupport', + ], + ) + input_files = [ 'event_sending_controller.cc', 'layout_test_controller.cc', |