diff options
-rw-r--r-- | webkit/api/src/WebBindings.cpp | 4 | ||||
-rwxr-xr-x | webkit/build/action_jsconfig.py | 45 | ||||
-rw-r--r-- | webkit/config.h.in | 212 | ||||
-rw-r--r-- | webkit/webkit.gyp | 42 |
4 files changed, 3 insertions, 300 deletions
diff --git a/webkit/api/src/WebBindings.cpp b/webkit/api/src/WebBindings.cpp index f4567d4..6dac134 100644 --- a/webkit/api/src/WebBindings.cpp +++ b/webkit/api/src/WebBindings.cpp @@ -35,7 +35,7 @@ #include "npruntime_priv.h" #include "webkit/api/public/WebDragData.h" -#if USE(V8_BINDING) +#if USE(V8) #include "ChromiumDataObject.h" #include "ClipboardChromium.h" #include "EventNames.h" @@ -43,7 +43,7 @@ #include "NPV8Object.h" // for PrivateIdentifier #include "V8Helpers.h" #include "V8Proxy.h" -#elif USE(JAVASCRIPTCORE_BINDINGS) +#elif USE(JSC) #include "bridge/c/c_utility.h" #endif diff --git a/webkit/build/action_jsconfig.py b/webkit/build/action_jsconfig.py deleted file mode 100755 index 7ddc12a..0000000 --- a/webkit/build/action_jsconfig.py +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/python - -# Copyright (c) 2009 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -# usage: action_jsconfig.py JS_ENGINE OUTPUT_DIR CONFIG_H_IN FILES_TO_COPY -# JS_ENGINE may be v8 at present. jsc will be added in the future. -# OUTPUT_DIR is the directory to put files in. -# CONFIG_H_IN is the path to config.h.in upon which config.h will be based. -# FILES_TO_COPY is a list of additional headers to be copied. It may be empty. - -import errno -import os -import os.path -import shutil -import sys - -assert len(sys.argv) >= 4 -js_engine = sys.argv[1] -output_dir = sys.argv[2] -config_h_in_path = sys.argv[3] -files_to_copy = sys.argv[4:] - -config_h_path = os.path.join(output_dir, 'config.h') - -assert js_engine == 'v8' - -config_h_in_file = open(config_h_in_path) -config_h_in_contents = config_h_in_file.read() -config_h_in_file.close() - -config_h_file = open(config_h_path, 'w') -print >>config_h_file, config_h_in_contents -if js_engine == 'v8': - print >>config_h_file, '#define WTF_USE_V8_BINDING 1' - print >>config_h_file, '#define WTF_USE_NPOBJECT 1' -config_h_file.close() - -for file in files_to_copy: - # This is not strictly right for jsc headers, which will want to be in one - # more subdirectory named JavaScriptCore. - basename = os.path.basename(file) - destination = os.path.join(output_dir, basename) - shutil.copy(file, destination) diff --git a/webkit/config.h.in b/webkit/config.h.in deleted file mode 100644 index 158eb18..0000000 --- a/webkit/config.h.in +++ /dev/null @@ -1,212 +0,0 @@ -/* - * Copyright (C) 2004, 2005, 2006 Apple Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - * - */ - -#if defined(HAVE_CONFIG_H) && HAVE_CONFIG_H -#include "autotoolsconfig.h" -#endif - -#include <wtf/Platform.h> - -#if PLATFORM(WIN_OS) && !defined(BUILDING_WX__) && !COMPILER(GCC) -#if defined(BUILDING_JavaScriptCore) || defined(BUILDING_WTF) -#define JS_EXPORTDATA __declspec(dllexport) -#else -#define JS_EXPORTDATA __declspec(dllimport) -#endif -#if defined(BUILDING_WebCore) || defined(BUILDING_WebKit) -#define WEBKIT_EXPORTDATA __declspec(dllexport) -#else -#define WEBKIT_EXPORTDATA __declspec(dllimport) -#endif -#else -#define JS_EXPORTDATA -#define WEBKIT_EXPORTDATA -#endif - -#define MOBILE 0 - -#ifdef __APPLE__ -#define HAVE_FUNC_USLEEP 1 -#endif /* __APPLE__ */ - -#if PLATFORM(WIN_OS) - -#ifndef _WIN32_WINNT -#define _WIN32_WINNT 0x0500 -#endif - -#ifndef WINVER -#define WINVER 0x0500 -#endif - -// If we don't define these, they get defined in windef.h. -// We want to use std::min and std::max. -#ifndef max -#define max max -#endif -#ifndef min -#define min min -#endif - -// CURL needs winsock, so don't prevent inclusion of it -#if !USE(CURL) -#ifndef _WINSOCKAPI_ -#define _WINSOCKAPI_ // Prevent inclusion of winsock.h in windows.h -#endif -#endif - -#endif /* PLATFORM(WIN_OS) */ - -#ifdef __cplusplus - -// These undefs match up with defines in WebCorePrefix.h for Mac OS X. -// Helps us catch if anyone uses new or delete by accident in code and doesn't include "config.h". -#undef new -#undef delete -#include <wtf/FastMalloc.h> - -#endif - -// On MSW, wx headers need to be included before windows.h is. -// The only way we can always ensure this is if we include wx here. -#if PLATFORM(WX) -// The defines in KeyboardCodes.h conflict with Windows as well, and the only way I've found -// to address the problem is include KeyboarddCodes.h before windows.h, so do it here. -#include "KeyboardCodes.h" -#include <wx/defs.h> -#endif - -// this breaks compilation of <QFontDatabase>, at least, so turn it off for now -// Also generates errors on wx on Windows, presumably because these functions -// are used from wx headers. -#if !PLATFORM(QT) && !PLATFORM(WX) && !PLATFORM(CHROMIUM) -#include <wtf/DisallowCType.h> -#endif - -#if COMPILER(MSVC) -#define SKIP_STATIC_CONSTRUCTORS_ON_MSVC 1 -#else -#define SKIP_STATIC_CONSTRUCTORS_ON_GCC 1 -#endif - -#if PLATFORM(WIN) -#if defined(WIN_CAIRO) -#undef WTF_PLATFORM_CG -#define WTF_PLATFORM_CAIRO 1 -#undef WTF_USE_CFNETWORK -#define WTF_USE_CURL 1 -#ifndef _WINSOCKAPI_ -#define _WINSOCKAPI_ // Prevent inclusion of winsock.h in windows.h -#endif -#else -#define WTF_PLATFORM_CG 1 -#undef WTF_PLATFORM_CAIRO -#define WTF_USE_CFNETWORK 1 -#undef WTF_USE_CURL -#endif -#undef WTF_USE_WININET -#define WTF_PLATFORM_CF 1 -#define WTF_USE_PTHREADS 0 -#endif - -#if PLATFORM(MAC) -// ATSUI vs. CoreText -#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) -#define WTF_USE_ATSUI 0 -#define WTF_USE_CORE_TEXT 1 -#else -#define WTF_USE_ATSUI 1 -#define WTF_USE_CORE_TEXT 0 -#endif - -// New theme -#define WTF_USE_NEW_THEME 1 -#endif // PLATFORM(MAC) - -#if PLATFORM(SYMBIAN) -#undef WIN32 -#undef _WIN32 -#undef SKIP_STATIC_CONSTRUCTORS_ON_GCC -#define USE_SYSTEM_MALLOC 1 -#define U_HAVE_INT8_T 0 -#define U_HAVE_INT16_T 0 -#define U_HAVE_INT32_T 0 -#define U_HAVE_INT64_T 0 -#define U_HAVE_INTTYPES_H 0 - -#include <stdio.h> -#include <limits.h> -#include <wtf/MathExtras.h> -#endif - -#if PLATFORM(CHROMIUM) - -#if !PLATFORM(DARWIN) -// Define SKIA on non-Mac. -#define WTF_PLATFORM_SKIA 1 -#endif // !PLATFORM(DARWIN) - -// WebCore should compile with WTF_CHANGES as WTF does. -#define WTF_CHANGES 1 - -// Use the Googleurl library. -#define WTF_USE_GOOGLEURL 1 - -/* Chromium uses V8 by default */ -#if !defined(WTF_USE_V8) -#define WTF_USE_V8 1 -#endif - -// Chromium doesn't use CFNetwork -#undef WTF_USE_CFNETWORK - -// Upstream Platform.h's #ifdef check for other graphics libraries doesn't -// check SKIA, so it falls back on defining CAIRO. Undo that here. -// TODO(yaar): clean this up once config.h.in is upstreamed back to webkit. -#undef WTF_PLATFORM_CAIRO - -#endif // if PLATFORM(CHROMIUM) - -#if !defined(WTF_USE_V8) -#define WTF_USE_V8 0 -#endif - -/* Using V8 implies not using JSC and vice versa */ -#define WTF_USE_JSC !WTF_USE_V8 - -#if PLATFORM(CG) -#ifndef CGFLOAT_DEFINED -#ifdef __LP64__ -typedef double CGFloat; -#else -typedef float CGFloat; -#endif -#define CGFLOAT_DEFINED 1 -#endif -#endif /* PLATFORM(CG) */ - -#ifdef BUILDING_ON_TIGER -#undef ENABLE_FTPDIR -#define ENABLE_FTPDIR 0 -#endif - -#if PLATFORM(WIN) && PLATFORM(CG) -#define WTF_USE_SAFARI_THEME 1 -#endif diff --git a/webkit/webkit.gyp b/webkit/webkit.gyp index 9a8e479..170e167 100644 --- a/webkit/webkit.gyp +++ b/webkit/webkit.gyp @@ -34,6 +34,7 @@ 'WEBCORE_NAVIGATOR_VENDOR="Google Inc."', ], 'webcore_include_dirs': [ + '../third_party/WebKit/WebCore', '../third_party/WebKit/WebCore/accessibility', '../third_party/WebKit/WebCore/accessibility/chromium', '../third_party/WebKit/WebCore/bindings/v8', @@ -188,52 +189,11 @@ 'target_name': 'config', 'type': 'none', 'msvs_guid': '2E2D3301-2EC4-4C0F-B889-87073B30F673', - 'actions': [ - { - 'action_name': 'config.h', - 'inputs': [ - 'config.h.in', - ], - 'outputs': [ - '<(SHARED_INTERMEDIATE_DIR)/webkit/config.h', - ], - # TODO(bradnelson): npapi.h, npruntime.h, npruntime_priv.h, and - # stdint.h shouldn't be in the SHARED_INTERMEDIATE_DIR, it's very - # global. - 'action': ['python', 'build/action_jsconfig.py', 'v8', '<(SHARED_INTERMEDIATE_DIR)/webkit', '<@(_inputs)'], - - 'conditions': [ - ['OS=="win"', { - 'inputs': [ - '../third_party/WebKit/WebCore/bridge/npapi.h', - '../third_party/WebKit/WebCore/bridge/npruntime.h', - '../third_party/WebKit/WebCore/bindings/v8/npruntime_priv.h', - '../third_party/WebKit/JavaScriptCore/os-win32/stdint.h', - ], - }], - ], - }, - ], 'direct_dependent_settings': { 'defines': [ '<@(feature_defines)', '<@(non_feature_defines)', ], - # Always prepend the directory containing config.h. This is important, - # because WebKit/JavaScriptCore has a config.h in it too. The JSC - # config.h shouldn't be used, and its directory winds up in - # include_dirs in wtf and its dependents. If the directory containing - # the real config.h weren't prepended, other targets might wind up - # picking up the wrong config.h, which can result in build failures or - # even random runtime problems due to different components being built - # with different configurations. - # - # The rightmost + is present because this direct_dependent_settings - # section gets merged into the (nonexistent) target_defaults one, - # eating the rightmost +. - 'include_dirs++': [ - '<(SHARED_INTERMEDIATE_DIR)/webkit', - ], }, 'conditions': [ ['OS=="win"', { |