2011-05-24 Jay Civelli <jcivelli@chromium.org>
[WebKit-https.git] / Source / WebCore / WebCore.gyp / WebCore.gyp
index 4af2e9a..013f044 100644 (file)
@@ -32,7 +32,7 @@
   'includes': [
     # FIXME: Sense whether upstream or downstream build, and
     # include the right features.gypi
   'includes': [
     # FIXME: Sense whether upstream or downstream build, and
     # include the right features.gypi
-    '../../../Source/WebKit/chromium/features.gypi',
+    '../../WebKit/chromium/features.gypi',
     '../WebCore.gypi',
   ],
   # Location of the chromium src directory.
     '../WebCore.gypi',
   ],
   # Location of the chromium src directory.
@@ -40,8 +40,8 @@
     ['inside_chromium_build==0', {
       # Webkit is being built outside of the full chromium project.
       'variables': {
     ['inside_chromium_build==0', {
       # Webkit is being built outside of the full chromium project.
       'variables': {
-        'chromium_src_dir': '../../../Source/WebKit/chromium',
-        'libjpeg_gyp_path': '<(chromium_src_dir)/third_party/libjpeg/libjpeg.gyp',
+        'chromium_src_dir': '../../WebKit/chromium',
+        'libjpeg_gyp_path': '<(chromium_src_dir)/third_party/libjpeg_turbo/libjpeg.gyp',
       },
     },{
       # WebKit is checked out in src/chromium/third_party/WebKit
       },
     },{
       # WebKit is checked out in src/chromium/third_party/WebKit
 
     'webcore_include_dirs': [
       '../',
 
     'webcore_include_dirs': [
       '../',
+      '../..',
       '../accessibility',
       '../accessibility/chromium',
       '../bindings',
       '../accessibility',
       '../accessibility/chromium',
       '../bindings',
       '../bindings/v8',
       '../bindings/v8/custom',
       '../bindings/v8/specialization',
       '../bindings/v8',
       '../bindings/v8/custom',
       '../bindings/v8/specialization',
+      '../bridge',
+      '../bridge/jni',
+      '../bridge/jni/v8',
       '../css',
       '../dom',
       '../dom/default',
       '../css',
       '../dom',
       '../dom/default',
       '../loader',
       '../loader/appcache',
       '../loader/archive',
       '../loader',
       '../loader/appcache',
       '../loader/archive',
+      '../loader/archive/cf',
+      '../loader/archive/mhtml',
       '../loader/cache',
       '../loader/icon',
       '../mathml',
       '../loader/cache',
       '../loader/icon',
       '../mathml',
       '../platform/graphics',
       '../platform/graphics/chromium',
       '../platform/graphics/filters',
       '../platform/graphics',
       '../platform/graphics/chromium',
       '../platform/graphics/filters',
+      '../platform/graphics/filters/arm',
       '../platform/graphics/gpu',
       '../platform/graphics/opentype',
       '../platform/graphics/skia',
       '../platform/graphics/gpu',
       '../platform/graphics/opentype',
       '../platform/graphics/skia',
       '../platform/image-decoders/xbm',
       '../platform/image-decoders/webp',
       '../platform/image-encoders/skia',
       '../platform/image-decoders/xbm',
       '../platform/image-decoders/webp',
       '../platform/image-encoders/skia',
+      '../platform/leveldb',
       '../platform/mock',
       '../platform/network',
       '../platform/network/chromium',
       '../platform/mock',
       '../platform/network',
       '../platform/network/chromium',
       '../svg/graphics',
       '../svg/graphics/filters',
       '../svg/properties',
       '../svg/graphics',
       '../svg/graphics/filters',
       '../svg/properties',
-      '../thirdparty/glu',
+      '../../ThirdParty/glu',
       '../webaudio',
       '../websockets',
       '../workers',
       '../webaudio',
       '../websockets',
       '../workers',
           # related directories.
           # platform/graphics/cg may need to stick around, though.
           '../platform/audio/mac',
           # related directories.
           # platform/graphics/cg may need to stick around, though.
           '../platform/audio/mac',
+          '../platform/cocoa',
           '../platform/graphics/mac',
           '../platform/mac',
           '../platform/text/mac',
           '../platform/graphics/mac',
           '../platform/mac',
           '../platform/text/mac',
         ],
       },{
         'derived_sources_aggregate_files': [
         ],
       },{
         'derived_sources_aggregate_files': [
-          '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources1.cpp',
-          '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources2.cpp',
-          '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources3.cpp',
-          '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources4.cpp',
-          '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources5.cpp',
-          '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources6.cpp',
-          '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources7.cpp',
-          '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources8.cpp',
+          '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources01.cpp',
+          '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources02.cpp',
+          '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources03.cpp',
+          '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources04.cpp',
+          '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources05.cpp',
+          '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources06.cpp',
+          '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources07.cpp',
+          '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources08.cpp',
+          '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources09.cpp',
+          '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources10.cpp',
+          '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources11.cpp',
+          '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources12.cpp',
+          '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources13.cpp',
+          '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources14.cpp',
+          '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources15.cpp',
+          '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources16.cpp',
+          '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources17.cpp',
+          '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources18.cpp',
+          '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources19.cpp',
         ],
       }],
     ],
   },
   'targets': [
     {
         ],
       }],
     ],
   },
   'targets': [
     {
+      'target_name': 'inspector_idl',
+      'type': 'none',
+      'actions': [
+        {
+          'action_name': 'generateInspectorProtocolIDL',
+          'inputs': [
+            '../inspector/generate-inspector-idl',
+            '../inspector/Inspector.json',
+          ],
+          'outputs': [
+            '<(SHARED_INTERMEDIATE_DIR)/webcore/Inspector.idl',
+          ],
+          'variables': {
+            'generator_include_dirs': [
+            ],
+          },
+          'action': [
+            'python',
+            '../inspector/generate-inspector-idl',
+            '-o',
+            '<@(_outputs)',
+            '<@(_inputs)'
+          ],
+          'message': 'Generating Inspector protocol sources from Inspector.idl',
+        },
+      ]
+    },
+    {
       'target_name': 'inspector_protocol_sources',
       'type': 'none',
       'target_name': 'inspector_protocol_sources',
       'type': 'none',
+      'dependencies': [
+        'inspector_idl'
+      ],
       'actions': [
         {
           'action_name': 'generateInspectorProtocolSources',
       'actions': [
         {
           'action_name': 'generateInspectorProtocolSources',
             '../bindings/scripts/CodeGenerator.pm',
             '../bindings/scripts/IDLParser.pm',
             '../bindings/scripts/IDLStructure.pm',
             '../bindings/scripts/CodeGenerator.pm',
             '../bindings/scripts/IDLParser.pm',
             '../bindings/scripts/IDLStructure.pm',
-            '../inspector/Inspector.idl',
+            '<(SHARED_INTERMEDIATE_DIR)/webcore/Inspector.idl',
           ],
           'outputs': [
             '<(SHARED_INTERMEDIATE_DIR)/webcore/InspectorBackendDispatcher.cpp',
           ],
           'outputs': [
             '<(SHARED_INTERMEDIATE_DIR)/webcore/InspectorBackendDispatcher.cpp',
           'action': [
             'python',
             'scripts/rule_binding.py',
           'action': [
             'python',
             'scripts/rule_binding.py',
-            '../inspector/Inspector.idl',
+            '<(SHARED_INTERMEDIATE_DIR)/webcore/Inspector.idl',
             '<(SHARED_INTERMEDIATE_DIR)/webcore',
             '<(SHARED_INTERMEDIATE_DIR)/webkit',
             '--',
             '<(SHARED_INTERMEDIATE_DIR)/webcore',
             '<(SHARED_INTERMEDIATE_DIR)/webkit',
             '--',
             'perl',
             '../inspector/xxd.pl',
             'InjectedScriptSource_js',
             'perl',
             '../inspector/xxd.pl',
             'InjectedScriptSource_js',
-            '../inspector/InjectedScriptSource.js',
-            '<(SHARED_INTERMEDIATE_DIR)/webkit/InjectedScriptSource.h'
+            '<@(_inputs)',
+            '<@(_outputs)'
           ],
           'message': 'Generating InjectedScriptSource.h from InjectedScriptSource.js',
         },
       ]
     },
     {
           ],
           'message': 'Generating InjectedScriptSource.h from InjectedScriptSource.js',
         },
       ]
     },
     {
+      'target_name': 'debugger_script_source',
+      'type': 'none',
+      'actions': [
+        {
+          'action_name': 'generateDebuggerScriptSource',
+          'inputs': [
+            '../bindings/v8/DebuggerScript.js',
+          ],
+          'outputs': [
+            '<(SHARED_INTERMEDIATE_DIR)/webkit/DebuggerScriptSource.h',
+          ],
+          'action': [
+            'perl',
+            '../inspector/xxd.pl',
+            'DebuggerScriptSource_js',
+            '<@(_inputs)',
+            '<@(_outputs)'
+          ],
+          'message': 'Generating DebuggerScriptSource.h from DebuggerScript.js',
+        },
+      ]
+    },
+    {
       'target_name': 'webcore_bindings_sources',
       'type': 'none',
       'hard_dependency': 1,
       'target_name': 'webcore_bindings_sources',
       'type': 'none',
       'hard_dependency': 1,
       'actions': [
         # Actions to build derived sources.
         {
       'actions': [
         # Actions to build derived sources.
         {
+          'action_name': 'generateXMLViewerCSS',
+          'inputs': [
+            '../xml/XMLViewer.css',
+          ],
+          'outputs': [
+            '<(SHARED_INTERMEDIATE_DIR)/webkit/XMLViewerCSS.h',
+          ],
+          'action': [
+            'perl',
+            '../inspector/xxd.pl',
+            'XMLViewer_css',
+            '<@(_inputs)',
+            '<@(_outputs)'
+          ],
+        },
+        {
+          'action_name': 'generateXMLViewerJS',
+          'inputs': [
+            '../xml/XMLViewer.js',
+          ],
+          'outputs': [
+            '<(SHARED_INTERMEDIATE_DIR)/webkit/XMLViewerJS.h',
+          ],
+          'action': [
+            'perl',
+            '../inspector/xxd.pl',
+            'XMLViewer_js',
+            '<@(_inputs)',
+            '<@(_outputs)'
+          ],
+        },
+        {
           'action_name': 'HTMLEntityTable',
           'inputs': [
             '../html/parser/HTMLEntityNames.in',
           'action_name': 'HTMLEntityTable',
           'inputs': [
             '../html/parser/HTMLEntityNames.in',
         },
         {
           'action_name': 'UserAgentStyleSheets',
         },
         {
           'action_name': 'UserAgentStyleSheets',
+          'variables': {
+            'scripts': [
+              '../css/make-css-file-arrays.pl',
+              '../bindings/scripts/preprocessor.pm',
+            ],
+            # The .css files are in the same order as ../DerivedSources.make.
+            'stylesheets': [
+              '../css/html.css',
+              '../css/quirks.css',
+              '../css/view-source.css',
+              '../css/themeChromiumLinux.css', # Chromium only.
+              '../css/themeChromiumSkia.css',  # Chromium only.
+              '../css/themeWin.css',
+              '../css/themeWinQuirks.css',
+              '../css/svg.css',
+              '../css/mathml.css',
+              '../css/mediaControls.css',
+              '../css/mediaControlsChromium.css',
+              '../css/fullscreen.css',
+              # Skip fullscreenQuickTime.
+            ],
+          },
           'inputs': [
           'inputs': [
-            '../css/make-css-file-arrays.pl',
-            '../css/html.css',
-            '../css/quirks.css',
-            '../css/view-source.css',
-            '../css/themeChromiumLinux.css',
-            '../css/themeChromiumSkia.css',
-            '../css/themeWin.css',
-            '../css/themeWinQuirks.css',
-            '../css/svg.css',
-            '../css/mathml.css',
-            '../css/mediaControls.css',
-            '../css/mediaControlsChromium.css',
+            '<@(scripts)',
+            '<@(stylesheets)'
           ],
           'outputs': [
             '<(SHARED_INTERMEDIATE_DIR)/webkit/UserAgentStyleSheets.h',
           ],
           'outputs': [
             '<(SHARED_INTERMEDIATE_DIR)/webkit/UserAgentStyleSheets.h',
             'python',
             'scripts/action_useragentstylesheets.py',
             '<@(_outputs)',
             'python',
             'scripts/action_useragentstylesheets.py',
             '<@(_outputs)',
+            '<@(stylesheets)',
             '--',
             '--',
-            '<@(_inputs)'
+            '<@(scripts)',
+            '--',
+            '--defines', '<(feature_defines)',
           ],
         },
         {
           ],
         },
         {
             '../bindings/scripts/CodeGeneratorV8.pm',
             '../bindings/scripts/IDLParser.pm',
             '../bindings/scripts/IDLStructure.pm',
             '../bindings/scripts/CodeGeneratorV8.pm',
             '../bindings/scripts/IDLParser.pm',
             '../bindings/scripts/IDLStructure.pm',
+            '../bindings/scripts/preprocessor.pm',
           ],
           'outputs': [
             # FIXME:  The .cpp file should be in webkit/bindings once
           ],
           'outputs': [
             # FIXME:  The .cpp file should be in webkit/bindings once
     },
     {
       'target_name': 'webcore_bindings',
     },
     {
       'target_name': 'webcore_bindings',
-      'type': '<(library)',
+      'type': 'static_library',
       'hard_dependency': 1,
       'dependencies': [
         'webcore_bindings_sources',
         'inspector_protocol_sources',
         'injected_script_source',
       'hard_dependency': 1,
       'dependencies': [
         'webcore_bindings_sources',
         'inspector_protocol_sources',
         'injected_script_source',
+        'debugger_script_source',
         '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:yarr',
         '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:wtf',
         '<(chromium_src_dir)/build/temp_gyp/googleurl.gyp:googleurl',
         '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:yarr',
         '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:wtf',
         '<(chromium_src_dir)/build/temp_gyp/googleurl.gyp:googleurl',
             'include_dirs+++': ['../dom'],
           },
         }],
             'include_dirs+++': ['../dom'],
           },
         }],
-        # FIXME: (kbr) ideally this target should just depend on webcore_prerequisites
-        # to pick up these include directories, but I'm nervous about making that change.
-        ['(OS=="linux" or OS=="win") and "WTF_USE_WEBAUDIO_MKL=1" in feature_defines', {
-          'include_dirs': [
-            '<(chromium_src_dir)/third_party/mkl/include',
-          ],
-        }],
         ['(OS=="linux" or OS=="win") and "WTF_USE_WEBAUDIO_FFTW=1" in feature_defines', {
           'include_dirs': [
             '<(chromium_src_dir)/third_party/fftw/api',
         ['(OS=="linux" or OS=="win") and "WTF_USE_WEBAUDIO_FFTW=1" in feature_defines', {
           'include_dirs': [
             '<(chromium_src_dir)/third_party/fftw/api',
       'type': 'none',
       'dependencies': [
         'webcore_bindings',
       'type': 'none',
       'dependencies': [
         'webcore_bindings',
+        '../../ThirdParty/glu/glu.gyp:libtess',
         '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:yarr',
         '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:wtf',
         '<(chromium_src_dir)/build/temp_gyp/googleurl.gyp:googleurl',
         '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:yarr',
         '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:wtf',
         '<(chromium_src_dir)/build/temp_gyp/googleurl.gyp:googleurl',
             '<(chromium_src_dir)/gpu/gpu.gyp:gles2_c_lib',
           ],
         }],
             '<(chromium_src_dir)/gpu/gpu.gyp:gles2_c_lib',
           ],
         }],
-        ['OS=="linux" or OS=="freebsd"', {
+        ['toolkit_uses_gtk == 1', {
           'dependencies': [
             '<(chromium_src_dir)/build/linux/system.gyp:fontconfig',
             '<(chromium_src_dir)/build/linux/system.gyp:gtk',
           'dependencies': [
             '<(chromium_src_dir)/build/linux/system.gyp:fontconfig',
             '<(chromium_src_dir)/build/linux/system.gyp:gtk',
             'include_dirs++': ['../dom'],
           },
         }],
             'include_dirs++': ['../dom'],
           },
         }],
-        ['(OS=="linux" or OS=="win") and "WTF_USE_WEBAUDIO_MKL=1" in feature_defines', {
+        ['(OS=="linux" or OS=="win") and "WTF_USE_WEBAUDIO_FFTW=1" in feature_defines', {
           # This directory needs to be on the include path for multiple sub-targets of webcore.
           'direct_dependent_settings': {
             'include_dirs': [
           # This directory needs to be on the include path for multiple sub-targets of webcore.
           'direct_dependent_settings': {
             'include_dirs': [
-              '<(chromium_src_dir)/third_party/mkl/include',
+              '<(chromium_src_dir)/third_party/fftw/api',
             ],
           },
         }],
             ],
           },
         }],
-        ['(OS=="linux" or OS=="win") and "WTF_USE_WEBAUDIO_FFTW=1" in feature_defines', {
+        ['(OS=="mac" or OS=="linux" or OS=="win") and "WTF_USE_WEBAUDIO_FFMPEG=1" in feature_defines', {
           # This directory needs to be on the include path for multiple sub-targets of webcore.
           'direct_dependent_settings': {
             'include_dirs': [
           # This directory needs to be on the include path for multiple sub-targets of webcore.
           'direct_dependent_settings': {
             'include_dirs': [
-              '<(chromium_src_dir)/third_party/fftw/api',
+              '<(chromium_src_dir)/third_party/ffmpeg/patched-ffmpeg-mt',
             ],
           },
             ],
           },
+          'dependencies': [
+            '<(chromium_src_dir)/third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
+          ],
+        }],
+        ['"ENABLE_LEVELDB=1" in feature_defines', {
+          'dependencies': [
+            '<(chromium_src_dir)/third_party/leveldb/leveldb.gyp:leveldb',
+          ],
+          'export_dependent_settings': [
+            '<(chromium_src_dir)/third_party/leveldb/leveldb.gyp:leveldb',
+          ],
         }],
       ],
     },
     {
       'target_name': 'webcore_html',
         }],
       ],
     },
     {
       'target_name': 'webcore_html',
-      'type': '<(library)',
+      'type': 'static_library',
       'dependencies': [
         'webcore_prerequisites',
       ],
       'sources': [
       'dependencies': [
         'webcore_prerequisites',
       ],
       'sources': [
+        '<@(webcore_privateheader_files)',
         '<@(webcore_files)',
       ],
       'sources/': [
         # Start by excluding everything then include html files only.
         ['exclude', '.*'],
         ['include', 'html/'],
         '<@(webcore_files)',
       ],
       'sources/': [
         # Start by excluding everything then include html files only.
         ['exclude', '.*'],
         ['include', 'html/'],
+
+        ['exclude', 'AllInOne\\.cpp$'],
       ],
     },
     {
       'target_name': 'webcore_svg',
       ],
     },
     {
       'target_name': 'webcore_svg',
-      'type': '<(library)',
+      'type': 'static_library',
       'dependencies': [
         'webcore_prerequisites',
       ],
       'sources': [
       'dependencies': [
         'webcore_prerequisites',
       ],
       'sources': [
+        '<@(webcore_privateheader_files)',
         '<@(webcore_files)',
       ],
       'sources/': [
         '<@(webcore_files)',
       ],
       'sources/': [
         ['include', 'rendering/style/SVG'],
         ['include', 'rendering/RenderSVG'],
         ['include', 'rendering/SVG'],
         ['include', 'rendering/style/SVG'],
         ['include', 'rendering/RenderSVG'],
         ['include', 'rendering/SVG'],
-        ['exclude', 'svg/SVGAllInOne\\.cpp$'],
+
+        ['exclude', 'AllInOne\\.cpp$'],
       ],
     },
     {
       'target_name': 'webcore_platform',
       ],
     },
     {
       'target_name': 'webcore_platform',
-      'type': '<(library)',
+      'type': 'static_library',
       'dependencies': [
         'webcore_prerequisites',
       ],
       'dependencies': [
         'webcore_prerequisites',
       ],
       # if this hard dependency could be split off the rest.
       'hard_dependency': 1,
       'sources': [
       # if this hard dependency could be split off the rest.
       'hard_dependency': 1,
       'sources': [
+        '<@(webcore_privateheader_files)',
         '<@(webcore_files)',
 
         # For WebCoreSystemInterface, Mac-only.
         '<@(webcore_files)',
 
         # For WebCoreSystemInterface, Mac-only.
-        '../../../Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm',
+        '../../WebKit/mac/WebCoreSupport/WebSystemInterface.mm',
       ],
       'sources/': [
       ],
       'sources/': [
-        # Start by excluding everything then include platform files only.
         ['exclude', '.*'],
         ['include', 'platform/'],
 
         ['exclude', '.*'],
         ['include', 'platform/'],
 
-        # Exclude things that don't apply to the Chromium platform on the basis
-        # of their enclosing directories and tags at the ends of their
-        # filenames.
-        ['exclude', '(android|cairo|cf|cg|curl|fftw|gtk|haiku|linux|mac|mkl|opentype|posix|qt|soup|svg|symbian|win|wx)/'],
-        ['exclude', '(?<!Chromium)(Android|Cairo|CF|CG|Curl|Gtk|Linux|Mac|OpenType|POSIX|Posix|Qt|Safari|Soup|Symbian|Win|Wx)\\.(cpp|mm?)$'],
-
-        # A few things can't be excluded by patterns.  List them individually.
+        # FIXME: Figure out how to store these patterns in a variable.
+        ['exclude', '(android|brew|cairo|ca|cf|cg|curl|efl|freetype|gstreamer|gtk|haiku|linux|mac|opengl|openvg|opentype|pango|posix|qt|soup|svg|symbian|texmap|iphone|win|wince|wx)/'],
+        ['exclude', '(?<!Chromium)(Android|Cairo|CF|CG|Curl|Gtk|JSC|Linux|Mac|OpenType|POSIX|Posix|Qt|Safari|Soup|Symbian|Win|WinCE|Wx)\\.(cpp|mm?)$'],
 
         ['include', 'platform/graphics/opentype/OpenTypeSanitizer\\.cpp$'],
 
 
         ['include', 'platform/graphics/opentype/OpenTypeSanitizer\\.cpp$'],
 
-        # Exclude some DB-related files.
-        ['exclude', 'platform/sql/SQLiteFileSystem\\.cpp$'],
-
-        # Use platform/KURLGoogle.cpp instead.
-        ['exclude', 'platform/KURL\\.cpp$'],
-
-        # Use platform/MIMETypeRegistryChromium.cpp instead.
+        ['exclude', 'platform/LinkHash\\.cpp$'],
         ['exclude', 'platform/MIMETypeRegistry\\.cpp$'],
         ['exclude', 'platform/MIMETypeRegistry\\.cpp$'],
-
-        # Theme.cpp is used only if we're using USE_NEW_THEME. We are not for
-        # Windows and Linux. We manually include Theme.cpp for the Mac below.
         ['exclude', 'platform/Theme\\.cpp$'],
         ['exclude', 'platform/Theme\\.cpp$'],
-
-        # Use LinkHashChromium.cpp instead
-        ['exclude', 'platform/LinkHash\\.cpp$'],
-
-        ['include', 'thirdparty/glu/libtess/'],
+        ['exclude', 'platform/graphics/ANGLEWebKitBridge\\.(cpp|h)$'],
+        ['exclude', 'platform/image-encoders/JPEGImageEncoder\\.(cpp|h)$'],
+        ['exclude', 'platform/image-encoders/PNGImageEncoder\\.(cpp|h)$'],
+        ['exclude', 'platform/network/ResourceHandle\\.cpp$'],
+        ['exclude', 'platform/sql/SQLiteFileSystem\\.cpp$'],
+        ['exclude', 'platform/text/LocalizedNumberNone\\.cpp$'],
+        ['exclude', 'platform/text/TextEncodingDetectorNone\\.cpp$'],
       ],
       'conditions': [
       ],
       'conditions': [
-        ['OS=="linux" or OS=="freebsd"', {
+        ['toolkit_uses_gtk == 1', {
           'sources/': [
             # Cherry-pick files excluded by the broader regular expressions above.
             ['include', 'platform/chromium/KeyCodeConversionGtk\\.cpp$'],
           'sources/': [
             # Cherry-pick files excluded by the broader regular expressions above.
             ['include', 'platform/chromium/KeyCodeConversionGtk\\.cpp$'],
             # Use USE_NEW_THEME on Mac.
             ['include', 'platform/Theme\\.cpp$'],
 
             # Use USE_NEW_THEME on Mac.
             ['include', 'platform/Theme\\.cpp$'],
 
-            ['include', 'Source/WebKit/mac/WebCoreSupport/WebSystemInterface\\.mm$'],
+            ['include', 'WebKit/mac/WebCoreSupport/WebSystemInterface\\.mm$'],
 
             # Chromium Mac does not use skia.
             ['exclude', 'platform/graphics/skia/[^/]*Skia\\.(cpp|h)$'],
 
             # Chromium Mac does not use skia.
             ['exclude', 'platform/graphics/skia/[^/]*Skia\\.(cpp|h)$'],
             # Again, Skia is not used on Mac.
             ['exclude', 'platform/chromium/DragImageChromiumSkia\\.cpp$'],
           ],
             # Again, Skia is not used on Mac.
             ['exclude', 'platform/chromium/DragImageChromiumSkia\\.cpp$'],
           ],
+        },{ # OS!="mac"
+          'sources/': [
+            # FIXME: We will eventually compile this too, but for now it's
+            # only used on mac.
+            ['exclude', 'platform/graphics/FontPlatformData\\.cpp$']
+          ],
         }],
         }],
-        ['OS!="linux" and OS!="freebsd"', {
+        ['toolkit_uses_gtk == 0', {
           'sources/': [
             ['exclude', '(Gtk|Linux)\\.cpp$'],
             ['exclude', 'Harfbuzz[^/]+\\.(cpp|h)$'],
           'sources/': [
             ['exclude', '(Gtk|Linux)\\.cpp$'],
             ['exclude', 'Harfbuzz[^/]+\\.(cpp|h)$'],
 
             # The Chromium Win currently uses GlyphPageTreeNodeChromiumWin.cpp from
             # platform/graphics/chromium, included by regex above, instead.
 
             # The Chromium Win currently uses GlyphPageTreeNodeChromiumWin.cpp from
             # platform/graphics/chromium, included by regex above, instead.
-            ['exclude', 'platform/graphics/skia/GlyphPageTreeNodeSkia\\.cpp$']
-          ],
-        }],
-        ['(OS=="linux" or OS=="win") and "WTF_USE_WEBAUDIO_MKL=1" in feature_defines', {
-          'sources/': [
-            ['include', 'platform/audio/mkl/FFTFrameMKL\\.cpp$'],
-          ],
-        }],
-        ['(OS=="linux" or OS=="win") and "WTF_USE_WEBAUDIO_FFTW=1" in feature_defines', {
-          'sources/': [
-            ['include', 'platform/audio/fftw/FFTFrameFFTW\\.cpp$'],
+            ['exclude', 'platform/graphics/skia/GlyphPageTreeNodeSkia\\.cpp$'],
+
+            # SystemInfo.cpp is useful and we don't want to copy it.
+            ['include', 'platform/win/SystemInfo\\.cpp$'],
           ],
         }],
       ],
     },
     {
       'target_name': 'webcore_rendering',
           ],
         }],
       ],
     },
     {
       'target_name': 'webcore_rendering',
-      'type': '<(library)',
+      'type': 'static_library',
       'dependencies': [
         'webcore_prerequisites',
       ],
       'sources': [
       'dependencies': [
         'webcore_prerequisites',
       ],
       'sources': [
+        '<@(webcore_privateheader_files)',
         '<@(webcore_files)',
       ],
       'sources/': [
         '<@(webcore_files)',
       ],
       'sources/': [
-        # Start by excluding everything then include rendering files only.
         ['exclude', '.*'],
         ['include', 'rendering/'],
 
         ['exclude', '.*'],
         ['include', 'rendering/'],
 
-        # Exclude things that don't apply to the Chromium platform on the basis
-        # of their enclosing directories and tags at the ends of their
-        # filenames.
-        ['exclude', '(android|cairo|cf|cg|curl|gtk|haiku|html|linux|mac|opentype|platform|posix|qt|soup|svg|symbian|win|wx)/'],
-        ['exclude', '(?<!Chromium)(Android|Cairo|CF|CG|Curl|Gtk|Linux|Mac|OpenType|POSIX|Posix|Qt|Safari|Soup|Symbian|Win|Wx)\\.(cpp|mm?)$'],
+        # FIXME: Figure out how to store these patterns in a variable.
+        ['exclude', '(android|brew|cairo|ca|cf|cg|curl|efl|freetype|gstreamer|gtk|haiku|linux|mac|opengl|openvg|opentype|pango|posix|qt|soup|svg|symbian|texmap|iphone|win|wince|wx)/'],
+        ['exclude', '(?<!Chromium)(Android|Cairo|CF|CG|Curl|Gtk|JSC|Linux|Mac|OpenType|POSIX|Posix|Qt|Safari|Soup|Symbian|Win|WinCE|Wx)\\.(cpp|mm?)$'],
+
+        ['exclude', 'AllInOne\\.cpp$'],
 
         # Exclude most of SVG except css and javascript bindings.
         ['exclude', 'rendering/style/SVG[^/]+.(cpp|h)$'],
 
         # Exclude most of SVG except css and javascript bindings.
         ['exclude', 'rendering/style/SVG[^/]+.(cpp|h)$'],
             ['exclude', 'rendering/RenderThemeChromiumSkia\\.cpp$'],
           ],
         }],
             ['exclude', 'rendering/RenderThemeChromiumSkia\\.cpp$'],
           ],
         }],
-        ['(OS=="linux" or OS=="freebsd" or OS=="openbsd") and gcc_version==42', {
+        ['os_posix == 1 and OS != "mac" and gcc_version == 42', {
           # Due to a bug in gcc 4.2.1 (the current version on hardy), we get
           # warnings about uninitialized this.
           'cflags': ['-Wno-uninitialized'],
         }],
           # Due to a bug in gcc 4.2.1 (the current version on hardy), we get
           # warnings about uninitialized this.
           'cflags': ['-Wno-uninitialized'],
         }],
-        ['OS!="linux" and OS!="freebsd"', {
+        ['toolkit_uses_gtk == 0', {
           'sources/': [
             ['exclude', '(Gtk|Linux)\\.cpp$'],
           ],
           'sources/': [
             ['exclude', '(Gtk|Linux)\\.cpp$'],
           ],
     },
     {
       'target_name': 'webcore_remaining',
     },
     {
       'target_name': 'webcore_remaining',
-      'type': '<(library)',
+      'type': 'static_library',
       'dependencies': [
         'webcore_prerequisites',
       ],
       'dependencies': [
         'webcore_prerequisites',
       ],
       # if this hard dependency could be split off the rest.
       'hard_dependency': 1,
       'sources': [
       # if this hard dependency could be split off the rest.
       'hard_dependency': 1,
       'sources': [
+        '<@(webcore_privateheader_files)',
         '<@(webcore_files)',
       ],
       'sources/': [
         '<@(webcore_files)',
       ],
       'sources/': [
-        # Exclude JSC custom bindings.
-        ['exclude', 'bindings/js'],
-
-        # Fortunately, many things can be excluded by using broad patterns.
-
-        # Exclude things that don't apply to the Chromium platform on the basis
-        # of their enclosing directories and tags at the ends of their
-        # filenames.
-        ['exclude', '(android|cairo|cf|cg|curl|gtk|haiku|html|linux|mac|opentype|platform|posix|qt|rendering|soup|svg|symbian|win|wx)/'],
-        ['exclude', '(?<!Chromium)(Android|Cairo|CF|CG|Curl|Gtk|Linux|Mac|OpenType|POSIX|Posix|Qt|Safari|Soup|Symbian|Win|Wx)\\.(cpp|mm?)$'],
+        ['exclude', 'html/'],
+        ['exclude', 'platform/'],
+        ['exclude', 'rendering/'],
 
 
-        # JSC-only.
-        ['exclude', 'inspector/JavaScript[^/]*\\.cpp$'],
+        # Exclude most of bindings, except of the V8-related parts.
+        ['exclude', 'bindings/[^/]+/'],
+        ['include', 'bindings/generic/'],
+        ['include', 'bindings/v8/'],
 
 
-        # ENABLE_OFFLINE_WEB_APPLICATIONS, exclude most of webcore's impl
-        ['exclude', 'loader/appcache/'],
-        ['include', 'loader/appcache/ApplicationCacheHost\.h$'],
-        ['include', 'loader/appcache/DOMApplicationCache\.(h|cpp)$'],
+        # Exclude most of bridge, except for the V8-related parts.
+        ['exclude', 'bridge/'],
+        ['include', 'bridge/jni/'],
+        ['exclude', 'bridge/jni/[^/]+_jsobject\\.mm$'],
+        ['exclude', 'bridge/jni/[^/]+_objc\\.mm$'],
+        ['exclude', 'bridge/jni/jsc/'],
 
 
-        # Exclude some DB-related files.
-        ['exclude', 'storage/DatabaseTracker\\.cpp$'],
-        ['exclude', 'storage/DatabaseTrackerClient\\.h$'],
-        ['exclude', 'storage/OriginQuotaManager\\.(cpp|h)$'],
-        ['exclude', 'storage/OriginUsageRecord\\.(cpp|h)$'],
-        ['exclude', 'storage/SQLTransactionClient\\.cpp$'],
+        # FIXME: Figure out how to store these patterns in a variable.
+        ['exclude', '(android|brew|cairo|ca|cf|cg|curl|efl|freetype|gstreamer|gtk|haiku|linux|mac|opengl|openvg|opentype|pango|posix|qt|soup|svg|symbian|texmap|iphone|win|wince|wx)/'],
+        ['exclude', '(?<!Chromium)(Android|Cairo|CF|CG|Curl|Gtk|JSC|Linux|Mac|OpenType|POSIX|Posix|Qt|Safari|Soup|Symbian|Win|WinCE|Wx)\\.(cpp|mm?)$'],
 
 
-        # Don't build StorageNamespace.  We have our own implementation.
-        ['exclude', 'storage/StorageNamespace\\.cpp$'],
+        ['exclude', 'AllInOne\\.cpp$'],
 
 
-        # Don't build StorageEventDispatcher.  We have our own implementation.
-        ['exclude', 'storage/StorageEventDispatcher\\.cpp$'],
-
-        # Don't build IDBFactoryBackendInterface.  We have our own implementation.
-        ['exclude', 'storage/IDBFactoryBackendInterface\\.cpp$'],
-
-        # Don't build IDBKeyPathBackendImpl.  We have our own implementation.
-        ['exclude', 'storage/IDBKeyPathBackendImpl\\.cpp$'],
-
-        # Don't build files needed for WebArchive support, since we disable
-        # this feature.
-        ['exclude', 'loader/archive/cf/LegacyWebArchive\\.cpp$'],
+        ['exclude', 'dom/StaticStringList\\.cpp$'],
+        ['exclude', 'dom/default/PlatformMessagePortChannel\\.(cpp|h)$'],
+        ['exclude', 'fileapi/LocalFileSystem\\.cpp$'],
+        ['exclude', 'inspector/InspectorFrontendClientLocal\\.cpp$'],
+        ['exclude', 'inspector/JavaScript[^/]*\\.cpp$'],
+        ['exclude', 'loader/UserStyleSheetLoader\\.cpp$'],
+        ['exclude', 'loader/appcache/'],
         ['exclude', 'loader/archive/cf/LegacyWebArchiveMac\\.mm$'],
         ['exclude', 'loader/archive/cf/LegacyWebArchiveMac\\.mm$'],
-        ['exclude', 'loader/archive/ArchiveFactory\\.cpp$'],
-
-        # Use loader/icon/IconDatabaseNone.cpp instead.
+        ['exclude', 'loader/archive/cf/LegacyWebArchive\\.cpp$'],
         ['exclude', 'loader/icon/IconDatabase\\.cpp$'],
         ['exclude', 'loader/icon/IconDatabase\\.cpp$'],
-
-        # Exclude some, but not all, of plugins.
+        ['exclude', 'plugins/PluginDataNone\\.cpp$'],
         ['exclude', 'plugins/PluginDatabase\\.cpp$'],
         ['exclude', 'plugins/PluginMainThreadScheduler\\.cpp$'],
         ['exclude', 'plugins/PluginDatabase\\.cpp$'],
         ['exclude', 'plugins/PluginMainThreadScheduler\\.cpp$'],
+        ['exclude', 'plugins/PluginPackageNone\\.cpp$'],
         ['exclude', 'plugins/PluginPackage\\.cpp$'],
         ['exclude', 'plugins/PluginStream\\.cpp$'],
         ['exclude', 'plugins/PluginView\\.cpp$'],
         ['exclude', 'plugins/npapi\\.cpp$'],
         ['exclude', 'plugins/PluginPackage\\.cpp$'],
         ['exclude', 'plugins/PluginStream\\.cpp$'],
         ['exclude', 'plugins/PluginView\\.cpp$'],
         ['exclude', 'plugins/npapi\\.cpp$'],
+        ['exclude', 'storage/DatabaseTrackerClient\\.h$'],
+        ['exclude', 'storage/DatabaseTracker\\.cpp$'],
+        ['exclude', 'storage/IDBFactoryBackendInterface\\.cpp$'],
+        ['exclude', 'storage/IDBKeyPathBackendImpl\\.cpp$'],
+        ['exclude', 'storage/OriginQuotaManager\\.(cpp|h)$'],
+        ['exclude', 'storage/OriginUsageRecord\\.(cpp|h)$'],
+        ['exclude', 'storage/SQLTransactionClient\\.cpp$'],
+        ['exclude', 'storage/StorageEventDispatcher\\.cpp$'],
+        ['exclude', 'storage/StorageNamespace\\.cpp$'],
+        ['exclude', 'workers/DefaultSharedWorkerRepository\\.(cpp|h)$'],
 
 
-        # FIXME: I don't know exactly why these are excluded.  It would
-        # be nice to provide more explicit comments.  Some of these do actually
-        # compile.
-        ['exclude', 'dom/StaticStringList\\.cpp$'],
-        ['exclude', 'loader/UserStyleSheetLoader\\.cpp$'],
-
-        # We use a multi-process version from the WebKit API.
-        ['exclude', 'dom/default/PlatformMessagePortChannel\\.(cpp|h)$'],
+        ['include', 'loader/appcache/ApplicationCacheHost\.h$'],
+        ['include', 'loader/appcache/DOMApplicationCache\.(cpp|h)$'],
       ],
       'link_settings': {
         'mac_bundle_resources': [
       ],
       'link_settings': {
         'mac_bundle_resources': [
             ['include', '/TransparencyWin\\.cpp$'],
           ],
         }],
             ['include', '/TransparencyWin\\.cpp$'],
           ],
         }],
-        ['(OS=="linux" or OS=="freebsd" or OS=="openbsd") and gcc_version==42', {
+        ['os_posix == 1 and OS != "mac" and gcc_version == 42', {
           # Due to a bug in gcc 4.2.1 (the current version on hardy), we get
           # warnings about uninitialized this.
           'cflags': ['-Wno-uninitialized'],
         }],
           # Due to a bug in gcc 4.2.1 (the current version on hardy), we get
           # warnings about uninitialized this.
           'cflags': ['-Wno-uninitialized'],
         }],
-        ['OS!="linux" and OS!="freebsd"', {
+        ['toolkit_uses_gtk == 0', {
           'sources/': [
             ['exclude', '(Gtk|Linux)\\.cpp$'],
           ],
           'sources/': [
             ['exclude', '(Gtk|Linux)\\.cpp$'],
           ],
           'direct_dependent_settings': {
             'include_dirs': [
               '../../../WebKitLibraries',
           'direct_dependent_settings': {
             'include_dirs': [
               '../../../WebKitLibraries',
-              '../../../Source/WebKit/mac/WebCoreSupport',
+              '../../WebKit/mac/WebCoreSupport',
             ],
           },
         }],
             ],
           },
         }],
             'include_dirs+++': ['../dom'],
           },
         }],
             'include_dirs+++': ['../dom'],
           },
         }],
-        ['OS=="win" and "WTF_USE_WEBAUDIO_MKL=1" in feature_defines', {
-          # FIXME: (kbr) figure out how to make these dependencies
-          # work in a cross-platform way. Attempts to use
-          # "link_settings" and "libraries" in conjunction with the
-          # msvs-specific settings didn't work so far.
-          'all_dependent_settings': {
-            'msvs_settings': {
-              'VCLinkerTool': {
-                'AdditionalLibraryDirectories': [
-                  # This is a hack to make this directory correct
-                  # relative to targets like chrome_dll. Should use
-                  # <(chromium_src_dir).
-                  '../third_party/mkl/lib/win/ia32',
-                ],
-                'AdditionalDependencies': [
-                  'mkl_intel_c.lib',
-                  'mkl_sequential.lib',
-                  'mkl_core.lib',
-                ],
-              },
-            },
-          },
-        }],
         ['OS=="linux" and "WTF_USE_WEBAUDIO_FFTW=1" in feature_defines', {
           # FIXME: (kbr) figure out how to make these dependencies
           # work in a cross-platform way. Attempts to use
         ['OS=="linux" and "WTF_USE_WEBAUDIO_FFTW=1" in feature_defines', {
           # FIXME: (kbr) figure out how to make these dependencies
           # work in a cross-platform way. Attempts to use