6c688b5a9f0bb209ff805e1055fbdd0f601c02e1
[WebKit-https.git] / Source / WebCore / WebCore.gyp / WebCore.gyp
1 #
2 # Copyright (C) 2009 Google Inc. All rights reserved.
3 #
4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions are
6 # met:
7 #
8 #     * Redistributions of source code must retain the above copyright
9 # notice, this list of conditions and the following disclaimer.
10 #     * Redistributions in binary form must reproduce the above
11 # copyright notice, this list of conditions and the following disclaimer
12 # in the documentation and/or other materials provided with the
13 # distribution.
14 #     * Neither the name of Google Inc. nor the names of its
15 # contributors may be used to endorse or promote products derived from
16 # this software without specific prior written permission.
17 #
18 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 #
30
31 {
32   'includes': [
33     '../../WebKit/chromium/WinPrecompile.gypi',
34     # FIXME: Sense whether upstream or downstream build, and
35     # include the right features.gypi
36     '../../WebKit/chromium/features.gypi',
37     '../WebCore.gypi',
38   ],
39
40   'variables': {
41     # If set to 1, doesn't compile debug symbols into webcore reducing the
42     # size of the binary and increasing the speed of gdb.  gcc only.
43     'remove_webcore_debug_symbols%': 0,
44
45     # If set to 0, doesn't build SVG support, reducing the size of the
46     # binary and increasing the speed of gdb.
47     'enable_svg%': 1,
48
49     'enable_wexit_time_destructors': 1,
50
51     'webcore_include_dirs': [
52       '../',
53       '../..',
54       '../Modules/battery',
55       '../Modules/filesystem',
56       '../Modules/filesystem/chromium',
57       '../Modules/gamepad',
58       '../Modules/geolocation',
59       '../Modules/intents',
60       '../Modules/indexeddb',
61       '../Modules/mediasource',
62       '../Modules/mediastream',
63       '../Modules/navigatorcontentutils',
64       '../Modules/notifications',
65       '../Modules/proximity',
66       '../Modules/quota',
67       '../Modules/speech',
68       '../Modules/webaudio',
69       '../Modules/webdatabase',
70       '../Modules/webdatabase/chromium',
71       '../Modules/websockets',
72       '../accessibility',
73       '../accessibility/chromium',
74       '../bindings',
75       '../bindings/generic',
76       '../bindings/v8',
77       '../bindings/v8/custom',
78       '../bridge',
79       '../bridge/jni',
80       '../bridge/jni/v8',
81       '../css',
82       '../dom',
83       '../dom/default',
84       '../editing',
85       '../fileapi',
86       '../history',
87       '../html',
88       '../html/canvas',
89       '../html/parser',
90       '../html/shadow',
91       '../html/track',
92       '../inspector',
93       '../loader',
94       '../loader/appcache',
95       '../loader/archive',
96       '../loader/archive/cf',
97       '../loader/archive/mhtml',
98       '../loader/cache',
99       '../loader/icon',
100       '../mathml',
101       '../page',
102       '../page/animation',
103       '../page/chromium',
104       '../page/scrolling',
105       '../page/scrolling/chromium',
106       '../platform',
107       '../platform/animation',
108       '../platform/audio',
109       '../platform/audio/chromium',
110       '../platform/chromium',
111       '../platform/chromium/support',
112       '../platform/graphics',
113       '../platform/graphics/chromium',
114       '../platform/graphics/chromium/cc',
115       '../platform/graphics/cpu/arm',
116       '../platform/graphics/cpu/arm/filters',
117       '../platform/graphics/filters',
118       '../platform/graphics/filters/skia',
119       '../platform/graphics/gpu',
120       '../platform/graphics/opentype',
121       '../platform/graphics/skia',
122       '../platform/graphics/transforms',
123       '../platform/image-decoders',
124       '../platform/image-decoders/bmp',
125       '../platform/image-decoders/gif',
126       '../platform/image-decoders/ico',
127       '../platform/image-decoders/jpeg',
128       '../platform/image-decoders/png',
129       '../platform/image-decoders/skia',
130       '../platform/image-decoders/webp',
131       '../platform/image-encoders/skia',
132       '../platform/leveldb',
133       '../platform/mediastream',
134       '../platform/mediastream/chromium',
135       '../platform/mock',
136       '../platform/network',
137       '../platform/network/chromium',
138       '../platform/sql',
139       '../platform/text',
140       '../platform/text/transcoder',
141       '../plugins',
142       '../plugins/chromium',
143       '../rendering',
144       '../rendering/mathml',
145       '../rendering/style',
146       '../rendering/svg',
147       '../storage',
148       '../svg',
149       '../svg/animation',
150       '../svg/graphics',
151       '../svg/graphics/filters',
152       '../svg/properties',
153       '../../ThirdParty/glu',
154       '../workers',
155       '../xml',
156       '../xml/parser',
157     ],
158
159     'bindings_idl_files': [
160       '<@(webcore_bindings_idl_files)',
161     ],
162
163     'bindings_idl_files!': [
164       # Custom bindings in bindings/v8/custom exist for these.
165       '../dom/EventListener.idl',
166
167       # Bindings with custom Objective-C implementations.
168       '../page/AbstractView.idl',
169
170       # These bindings are excluded, as they're only used through inheritance and don't define constants that would need a constructor.
171       '../svg/ElementTimeControl.idl',
172       '../svg/SVGExternalResourcesRequired.idl',
173       '../svg/SVGFilterPrimitiveStandardAttributes.idl',
174       '../svg/SVGFitToViewBox.idl',
175       '../svg/SVGLangSpace.idl',
176       '../svg/SVGLocatable.idl',
177       '../svg/SVGTests.idl',
178       '../svg/SVGTransformable.idl',
179
180       # FIXME: I don't know why these are excluded, either.
181       # Someone (me?) should figure it out and add appropriate comments.
182       '../css/CSSUnknownRule.idl',
183     ],
184
185     'conditions': [
186       # Location of the chromium src directory.
187       ['inside_chromium_build==0', {
188         # webkit is being built outside of the full chromium project.
189         'chromium_src_dir': '../../WebKit/chromium',
190         'libjpeg_gyp_path': '../../WebKit/chromium/third_party/libjpeg_turbo/libjpeg.gyp',
191       },{
192         # webkit is checked out in src/chromium/third_party/webkit
193         'chromium_src_dir': '../../../../..',
194       }],
195       # TODO(maruel): Move it in its own project or generate it anyway?
196       ['enable_svg!=0', {
197         'bindings_idl_files': [
198           '<@(webcore_svg_bindings_idl_files)',
199         ],
200       }],
201       ['OS=="mac"', {
202         'webcore_include_dirs': [
203           # FIXME: Eliminate dependency on platform/mac and related
204           # directories.
205           # FIXME: Eliminate dependency on platform/graphics/mac and
206           # related directories.
207           # platform/graphics/cg may need to stick around, though.
208           '../platform/audio/mac',
209           '../platform/cocoa',
210           '../platform/graphics/cg',
211           '../platform/graphics/cocoa',
212           '../platform/graphics/mac',
213           '../platform/mac',
214           '../platform/text/mac',
215           '../platform/graphics/harfbuzz',
216           '../platform/graphics/harfbuzz/ng',
217         ],
218       }],
219       ['OS=="win"', {
220         'webcore_include_dirs': [
221           '../page/win',
222           '../platform/audio/win',
223           '../platform/graphics/win',
224           '../platform/text/win',
225           '../platform/win',
226         ],
227         # Using native perl rather than cygwin perl cuts execution time of idl
228         # preprocessing rules by a bit more than 50%.
229         'perl_exe': '<(DEPTH)/third_party/perl/perl/bin/perl.exe',
230         'gperf_exe': '<(DEPTH)/third_party/gperf/bin/gperf.exe',
231         'bison_exe': '<(DEPTH)/third_party/bison/bin/bison.exe',
232         # Using cl instead of cygwin gcc cuts the processing time from
233         # 1m58s to 0m52s.
234         'preprocessor': '--preprocessor "cl.exe -nologo -EP -TP"',
235       },{
236         # enable -Wall and -Werror, just for Mac and Linux builds for now
237         # FIXME: Also enable this for Windows after verifying no warnings
238         'chromium_code': 1,
239         'perl_exe': 'perl',
240         'gperf_exe': 'gperf',
241         'bison_exe': 'bison',
242         # Without one specified, the scripts default to 'gcc'.
243         'preprocessor': '',
244       }],
245       ['use_x11==1 or OS=="android"', {
246         'webcore_include_dirs': [
247           '../platform/graphics/harfbuzz',
248           '../platform/graphics/harfbuzz/ng',
249         ],
250       }],
251       ['OS=="win" and buildtype=="Official"', {
252         # On windows official release builds, we try to preserve symbol space.
253         'derived_sources_aggregate_files': [
254           '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSourcesAll.cpp',
255         ],
256       },{
257         'derived_sources_aggregate_files': [
258           '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources01.cpp',
259           '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources02.cpp',
260           '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources03.cpp',
261           '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources04.cpp',
262           '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources05.cpp',
263           '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources06.cpp',
264           '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources07.cpp',
265           '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources08.cpp',
266           '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources09.cpp',
267           '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources10.cpp',
268           '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources11.cpp',
269           '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources12.cpp',
270           '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources13.cpp',
271           '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources14.cpp',
272           '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources15.cpp',
273           '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources16.cpp',
274           '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources17.cpp',
275           '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources18.cpp',
276           '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources19.cpp',
277         ],
278       }],
279     ],
280   },  # variables
281
282   'target_defaults': {
283     'variables': {
284       'optimize': 'max',
285     },
286   },
287
288   'conditions': [
289     ['OS!="win" and remove_webcore_debug_symbols==1', {
290       # Remove -g from all targets defined here.
291       'target_defaults': {
292         'cflags!': ['-g'],
293       },
294     }],
295     ['os_posix==1 and OS!="mac" and gcc_version>=46', {
296       'target_defaults': {
297         # Disable warnings about c++0x compatibility, as some names (such as nullptr) conflict
298         # with upcoming c++0x types.
299         'cflags_cc': ['-Wno-c++0x-compat'],
300       },
301     }],
302     ['OS=="linux" and target_arch=="arm"', {
303       # Due to a bug in gcc arm, we get warnings about uninitialized timesNewRoman.unstatic.3258
304       # and colorTransparent.unstatic.4879.
305       'target_defaults': {
306         'cflags': ['-Wno-uninitialized'],
307       },
308     }],
309     ['OS == "mac"', {
310       'targets': [
311         {
312           # On the Mac, libWebKitSystemInterface*.a is used to help WebCore
313           # interface with the system.  This library is supplied as a static
314           # library in binary format.  At present, it contains many global
315           # symbols not marked private_extern.  It should be considered an
316           # implementation detail of WebCore, and does not need these symbols
317           # to be exposed so widely.
318           #
319           # This target contains an action that cracks open the existing
320           # static library and rebuilds it with these global symbols
321           # transformed to private_extern.
322           'target_name': 'webkit_system_interface',
323           'type': 'none',
324           'variables': {
325             'adjusted_library_path':
326                 '<(PRODUCT_DIR)/libWebKitSystemInterfaceLeopardPrivateExtern.a',
327           },
328           'actions': [
329             {
330               'action_name': 'Adjust Visibility',
331               'inputs': [
332                 'mac/adjust_visibility.sh',
333                 '<(chromium_src_dir)/third_party/apple_webkit/libWebKitSystemInterfaceLeopard.a',
334               ],
335               'outputs': [
336                 '<(adjusted_library_path)',
337               ],
338               'action': [
339                 '<@(_inputs)',
340                 '<@(_outputs)',
341                 '<(INTERMEDIATE_DIR)/adjust_visibility',  # work directory
342               ],
343             },
344           ],  # actions
345           'link_settings': {
346             'libraries': [
347               '<(adjusted_library_path)',
348
349               # libWebKitSystemInterfaceLeopard.a references _kCIFormatRGBA8.
350               '$(SDKROOT)/System/Library/Frameworks/QuartzCore.framework',
351             ],
352           },  # link_settings
353         },  # target webkit_system_interface
354       ],  # targets
355     }],  # condition OS == "mac"
356     ['clang==1', {
357       'target_defaults': {
358         'cflags': ['-Wglobal-constructors', '-Wunused-parameter'],
359         'xcode_settings': {
360           'WARNING_CFLAGS': ['-Wglobal-constructors', '-Wunused-parameter'],
361         },
362       },
363     }],
364   ],  # conditions
365
366   'targets': [
367     {
368       'target_name': 'inspector_protocol_sources',
369       'type': 'none',
370       'dependencies': [
371         'generate_inspector_protocol_version'
372       ],
373       'actions': [
374         {
375           'action_name': 'generateInspectorProtocolSources',
376           'inputs': [
377             # First input. It stands for python script in action below.
378             '../inspector/CodeGeneratorInspector.py',
379             # Other inputs. They go as arguments to the python script.
380             '../inspector/Inspector.json',
381           ],
382           'outputs': [
383             '<(SHARED_INTERMEDIATE_DIR)/webcore/InspectorBackendDispatcher.cpp',
384             '<(SHARED_INTERMEDIATE_DIR)/webkit/InspectorBackendDispatcher.h',
385             '<(SHARED_INTERMEDIATE_DIR)/webcore/InspectorFrontend.cpp',
386             '<(SHARED_INTERMEDIATE_DIR)/webkit/InspectorFrontend.h',
387             '<(SHARED_INTERMEDIATE_DIR)/webcore/InspectorTypeBuilder.cpp',
388             '<(SHARED_INTERMEDIATE_DIR)/webkit/InspectorTypeBuilder.h',
389             '<(SHARED_INTERMEDIATE_DIR)/webcore/InspectorBackendCommands.js',
390           ],
391           'variables': {
392             'generator_include_dirs': [
393             ],
394           },
395           'action': [
396             'python',
397             '<@(_inputs)',
398             '--output_h_dir', '<(SHARED_INTERMEDIATE_DIR)/webkit',
399             '--output_cpp_dir', '<(SHARED_INTERMEDIATE_DIR)/webcore',
400           ],
401           'message': 'Generating Inspector protocol sources from Inspector.json',
402           'msvs_cygwin_shell': 1,
403         },
404       ]
405     },
406     {
407       'target_name': 'generate_inspector_protocol_version',
408       'type': 'none',
409       'actions': [
410          {
411           'action_name': 'generateInspectorProtocolVersion',
412           'inputs': [
413             '../inspector/generate-inspector-protocol-version',
414             '../inspector/Inspector.json',
415           ],
416           'outputs': [
417             '<(SHARED_INTERMEDIATE_DIR)/webkit/InspectorProtocolVersion.h',
418           ],
419           'variables': {
420             'generator_include_dirs': [
421             ],
422           },
423           'action': [
424             'python',
425             '../inspector/generate-inspector-protocol-version',
426             '-o',
427             '<@(_outputs)',
428             '<@(_inputs)'
429           ],
430           'message': 'Validate inspector protocol for backwards compatibility and generate version file',
431         }
432       ]
433     },
434     {
435       'target_name': 'inspector_overlay_page',
436       'type': 'none',
437       'actions': [
438         {
439           'action_name': 'generateInspectorOverlayPage',
440           'inputs': [
441             '../inspector/InspectorOverlayPage.html',
442           ],
443           'outputs': [
444             '<(SHARED_INTERMEDIATE_DIR)/webkit/InspectorOverlayPage.h',
445           ],
446           'msvs_cygwin_shell': 0,
447           'action': [
448             '<(perl_exe)',
449             '../inspector/xxd.pl',
450             'InspectorOverlayPage_html',
451             '<@(_inputs)',
452             '<@(_outputs)'
453           ],
454           'message': 'Generating InspectorOverlayPage.h from InspectorOverlayPage.html',
455         },
456       ]
457     },
458     {
459       'target_name': 'injected_canvas_script_source',
460       'type': 'none',
461       'actions': [
462         {
463           'action_name': 'generateInjectedScriptCanvasModuleSource',
464           'inputs': [
465             '../inspector/InjectedScriptCanvasModuleSource.js',
466           ],
467           'outputs': [
468             '<(SHARED_INTERMEDIATE_DIR)/webkit/InjectedScriptCanvasModuleSource.h',
469           ],
470           'msvs_cygwin_shell': 0,
471           'action': [
472             '<(perl_exe)',
473             '../inspector/xxd.pl',
474             'InjectedScriptCanvasModuleSource_js',
475             '<@(_inputs)',
476             '<@(_outputs)'
477           ],
478           'message': 'Generating InjectedScriptCanvasModuleSource.h from InjectedScriptCanvasModuleSource.js',
479         },
480       ]
481     },
482     {
483       'target_name': 'injected_script_source',
484       'type': 'none',
485       'actions': [
486         {
487           'action_name': 'generateInjectedScriptSource',
488           'inputs': [
489             '../inspector/InjectedScriptSource.js',
490           ],
491           'outputs': [
492             '<(SHARED_INTERMEDIATE_DIR)/webkit/InjectedScriptSource.h',
493           ],
494           'msvs_cygwin_shell': 0,
495           'action': [
496             '<(perl_exe)',
497             '../inspector/xxd.pl',
498             'InjectedScriptSource_js',
499             '<@(_inputs)',
500             '<@(_outputs)'
501           ],
502           'message': 'Generating InjectedScriptSource.h from InjectedScriptSource.js',
503         },
504       ]
505     },
506     {
507       'target_name': 'debugger_script_source',
508       'type': 'none',
509       'actions': [
510         {
511           'action_name': 'generateDebuggerScriptSource',
512           'inputs': [
513             '../bindings/v8/DebuggerScript.js',
514           ],
515           'outputs': [
516             '<(SHARED_INTERMEDIATE_DIR)/webkit/DebuggerScriptSource.h',
517           ],
518           'msvs_cygwin_shell': 0,
519           'action': [
520             '<(perl_exe)',
521             '../inspector/xxd.pl',
522             'DebuggerScriptSource_js',
523             '<@(_inputs)',
524             '<@(_outputs)'
525           ],
526           'message': 'Generating DebuggerScriptSource.h from DebuggerScript.js',
527         },
528       ]
529     },
530     {
531       'target_name': 'generate_settings',
532       'type': 'none',
533       'actions': [
534         {
535           'action_name': 'Settings',
536           'inputs': [
537             '../page/make_settings.pl',
538             '../page/Settings.in',
539           ],
540           'outputs': [
541             '<(SHARED_INTERMEDIATE_DIR)/webkit/SettingsMacros.h',
542             '<(SHARED_INTERMEDIATE_DIR)/webkit/InternalSettingsGenerated.idl',
543             '<(SHARED_INTERMEDIATE_DIR)/webkit/InternalSettingsGenerated.cpp',
544             '<(SHARED_INTERMEDIATE_DIR)/webkit/InternalSettingsGenerated.h',
545           ],
546           'action': [
547             'python',
548             'scripts/action_makenames.py',
549             '<@(_outputs)',
550             '--',
551             '<@(_inputs)',
552           ],
553           'msvs_cygwin_shell': 1,
554         },
555       ]
556     },
557     {
558       'target_name': 'generate_supplemental_dependency',
559       'type': 'none',
560       'actions': [
561         {
562           'action_name': 'generateSupplementalDependency',
563           'variables': {
564             # Write sources into a file, so that the action command line won't
565             # exceed OS limits.
566             'idl_files_list': '<|(idl_files_list.tmp <@(bindings_idl_files))',
567           },
568           'inputs': [
569             '../bindings/scripts/preprocess-idls.pl',
570             '<(idl_files_list)',
571             '<!@(cat <(idl_files_list))',
572           ],
573           'outputs': [
574             '<(SHARED_INTERMEDIATE_DIR)/supplemental_dependency.tmp',
575           ],
576           'msvs_cygwin_shell': 0,
577           'action': [
578             '<(perl_exe)',
579             '-w',
580             '-I../bindings/scripts',
581             '../bindings/scripts/preprocess-idls.pl',
582             '--defines',
583             '<(feature_defines) LANGUAGE_JAVASCRIPT V8_BINDING',
584             '--idlFilesList',
585             '<(idl_files_list)',
586             '--supplementalDependencyFile',
587             '<(SHARED_INTERMEDIATE_DIR)/supplemental_dependency.tmp',
588           ],
589           'message': 'Resolving [Supplemental=XXX] dependencies in all IDL files',
590         }
591       ]
592     },
593     {
594       'target_name': 'webcore_bindings_sources',
595       'type': 'none',
596       'hard_dependency': 1,
597       'dependencies': [
598         'generate_supplemental_dependency',
599         'generate_settings',
600       ],
601       'sources': [
602         # bison rule
603         '<(SHARED_INTERMEDIATE_DIR)/webkit/CSSGrammar.y',
604         '../xml/XPathGrammar.y',
605
606         # gperf rule
607         '../platform/ColorData.gperf',
608
609         # idl rules
610         '<@(bindings_idl_files)',
611         '<@(webcore_test_support_idl_files)',
612       ],
613       'actions': [
614         # Actions to build derived sources.
615         {
616           'action_name': 'generateV8ArrayBufferViewCustomScript',
617           'inputs': [
618             '../bindings/v8/custom/V8ArrayBufferViewCustomScript.js',
619           ],
620           'outputs': [
621             '<(SHARED_INTERMEDIATE_DIR)/webkit/V8ArrayBufferViewCustomScript.h',
622           ],
623           'msvs_cygwin_shell': 0,
624           'action': [
625             '<(perl_exe)',
626             '../inspector/xxd.pl',
627             'V8ArrayBufferViewCustomScript_js',
628             '<@(_inputs)',
629             '<@(_outputs)'
630           ],
631           'message': 'Generating V8ArrayBufferViewCustomScript.h from V8ArrayBufferViewCustomScript.js',
632         },
633         {
634           'action_name': 'generateXMLViewerCSS',
635           'inputs': [
636             '../xml/XMLViewer.css',
637           ],
638           'outputs': [
639             '<(SHARED_INTERMEDIATE_DIR)/webkit/XMLViewerCSS.h',
640           ],
641           'msvs_cygwin_shell': 0,
642           'action': [
643             '<(perl_exe)',
644             '../inspector/xxd.pl',
645             'XMLViewer_css',
646             '<@(_inputs)',
647             '<@(_outputs)'
648           ],
649         },
650         {
651           'action_name': 'generateXMLViewerJS',
652           'inputs': [
653             '../xml/XMLViewer.js',
654           ],
655           'outputs': [
656             '<(SHARED_INTERMEDIATE_DIR)/webkit/XMLViewerJS.h',
657           ],
658           'msvs_cygwin_shell': 0,
659           'action': [
660             '<(perl_exe)',
661             '../inspector/xxd.pl',
662             'XMLViewer_js',
663             '<@(_inputs)',
664             '<@(_outputs)'
665           ],
666         },
667         {
668           'action_name': 'HTMLEntityTable',
669           'inputs': [
670             '../html/parser/create-html-entity-table',
671             '../html/parser/HTMLEntityNames.in',
672           ],
673           'outputs': [
674             '<(SHARED_INTERMEDIATE_DIR)/webkit/HTMLEntityTable.cpp'
675           ],
676           'action': [
677             'python',
678             '../html/parser/create-html-entity-table',
679             '-o',
680             '<@(_outputs)',
681             '<@(_inputs)'
682           ],
683         },
684         {
685           'action_name': 'CSSPropertyNames',
686           'inputs': [
687             '../css/makeprop.pl',
688             '../css/CSSPropertyNames.in',
689           ],
690           'outputs': [
691             '<(SHARED_INTERMEDIATE_DIR)/webkit/CSSPropertyNames.cpp',
692             '<(SHARED_INTERMEDIATE_DIR)/webkit/CSSPropertyNames.h',
693           ],
694           'action': [
695             'python',
696             'scripts/action_csspropertynames.py',
697             '<@(_outputs)',
698             '--',
699             '--defines', '<(feature_defines)',
700             '--',
701             '<@(_inputs)',
702           ],
703           'conditions': [
704             # TODO(maruel): Move it in its own project or generate it anyway?
705             ['enable_svg!=0', {
706               'inputs': [
707                 '../css/SVGCSSPropertyNames.in',
708               ],
709             }],
710           ],
711           'msvs_cygwin_shell': 1,
712         },
713         {
714           'action_name': 'CSSValueKeywords',
715           'inputs': [
716             '../css/makevalues.pl',
717             '../css/CSSValueKeywords.in',
718           ],
719           'outputs': [
720             '<(SHARED_INTERMEDIATE_DIR)/webkit/CSSValueKeywords.cpp',
721             '<(SHARED_INTERMEDIATE_DIR)/webkit/CSSValueKeywords.h',
722           ],
723           'action': [
724             'python',
725             'scripts/action_cssvaluekeywords.py',
726             '<@(_outputs)',
727             '--',
728             '--defines', '<(feature_defines)',
729             '--',
730             '<@(_inputs)',
731           ],
732           'conditions': [
733             # TODO(maruel): Move it in its own project or generate it anyway?
734             ['enable_svg!=0', {
735               'inputs': [
736                 '../css/SVGCSSValueKeywords.in',
737               ],
738             }],
739           ],
740           'msvs_cygwin_shell': 1,
741         },
742         {
743           'action_name': 'HTMLNames',
744           'inputs': [
745             '../dom/make_names.pl',
746             '../html/HTMLTagNames.in',
747             '../html/HTMLAttributeNames.in',
748           ],
749           'outputs': [
750             '<(SHARED_INTERMEDIATE_DIR)/webkit/HTMLNames.cpp',
751             '<(SHARED_INTERMEDIATE_DIR)/webkit/HTMLNames.h',
752             '<(SHARED_INTERMEDIATE_DIR)/webkit/HTMLElementFactory.cpp',
753             '<(SHARED_INTERMEDIATE_DIR)/webkit/V8HTMLElementWrapperFactory.cpp',
754             '<(SHARED_INTERMEDIATE_DIR)/webkit/V8HTMLElementWrapperFactory.h',
755           ],
756           'action': [
757             'python',
758             'scripts/action_makenames.py',
759             '<@(_outputs)',
760             '--',
761             '<@(_inputs)',
762             '--',
763             '--factory',
764             '--wrapperFactoryV8',
765             '--extraDefines', '<(feature_defines)'
766           ],
767           'msvs_cygwin_shell': 1,
768         },
769         {
770           'action_name': 'WebKitFontFamilyNames',
771           'inputs': [
772             '../dom/make_names.pl',
773             '../css/WebKitFontFamilyNames.in',
774           ],
775           'outputs': [
776             '<(SHARED_INTERMEDIATE_DIR)/webkit/WebKitFontFamilyNames.cpp',
777             '<(SHARED_INTERMEDIATE_DIR)/webkit/WebKitFontFamilyNames.h',
778           ],
779           'action': [
780             'python',
781             'scripts/action_makenames.py',
782             '<@(_outputs)',
783             '--',
784             '<@(_inputs)',
785             '--',
786             '--fonts',
787           ],
788           'msvs_cygwin_shell': 1,
789         },
790         {
791           'action_name': 'SVGNames',
792           'inputs': [
793             '../dom/make_names.pl',
794             '../svg/svgtags.in',
795             '../svg/svgattrs.in',
796           ],
797           'outputs': [
798             '<(SHARED_INTERMEDIATE_DIR)/webkit/SVGNames.cpp',
799             '<(SHARED_INTERMEDIATE_DIR)/webkit/SVGNames.h',
800             '<(SHARED_INTERMEDIATE_DIR)/webkit/SVGElementFactory.cpp',
801             '<(SHARED_INTERMEDIATE_DIR)/webkit/SVGElementFactory.h',
802             '<(SHARED_INTERMEDIATE_DIR)/webkit/V8SVGElementWrapperFactory.cpp',
803             '<(SHARED_INTERMEDIATE_DIR)/webkit/V8SVGElementWrapperFactory.h',
804           ],
805           'action': [
806             'python',
807             'scripts/action_makenames.py',
808             '<@(_outputs)',
809             '--',
810             '<@(_inputs)',
811             '--',
812             '--factory',
813             '--wrapperFactoryV8',
814             '--extraDefines', '<(feature_defines)'
815           ],
816           'msvs_cygwin_shell': 1,
817         },
818         {
819           'action_name': 'EventFactory',
820           'inputs': [
821             '../dom/make_event_factory.pl',
822             '../dom/EventNames.in',
823           ],
824           'outputs': [
825             '<(SHARED_INTERMEDIATE_DIR)/webkit/EventFactory.cpp',
826             '<(SHARED_INTERMEDIATE_DIR)/webkit/EventHeaders.h',
827             '<(SHARED_INTERMEDIATE_DIR)/webkit/EventInterfaces.h',
828           ],
829           'action': [
830             'python',
831             'scripts/action_makenames.py',
832             '<@(_outputs)',
833             '--',
834             '<@(_inputs)',
835           ],
836           'msvs_cygwin_shell': 1,
837         },
838         {
839           'action_name': 'EventTargetFactory',
840           'inputs': [
841             '../dom/make_event_factory.pl',
842             '../dom/EventTargetFactory.in',
843           ],
844           'outputs': [
845             '<(SHARED_INTERMEDIATE_DIR)/webkit/EventTargetHeaders.h',
846             '<(SHARED_INTERMEDIATE_DIR)/webkit/EventTargetInterfaces.h',
847           ],
848           'action': [
849             'python',
850             'scripts/action_makenames.py',
851             '<@(_outputs)',
852             '--',
853             '<@(_inputs)',
854           ],
855           'msvs_cygwin_shell': 1,
856         },
857         {
858           'action_name': 'ExceptionCodeDescription',
859           'inputs': [
860             '../dom/make_dom_exceptions.pl',
861             '../dom/DOMExceptions.in',
862           ],
863           'outputs': [
864             '<(SHARED_INTERMEDIATE_DIR)/webkit/ExceptionCodeDescription.cpp',
865             '<(SHARED_INTERMEDIATE_DIR)/webkit/ExceptionCodeDescription.h',
866             '<(SHARED_INTERMEDIATE_DIR)/webkit/ExceptionHeaders.h',
867             '<(SHARED_INTERMEDIATE_DIR)/webkit/ExceptionInterfaces.h',
868           ],
869           'action': [
870             'python',
871             'scripts/action_makenames.py',
872             '<@(_outputs)',
873             '--',
874             '<@(_inputs)',
875           ],
876           'msvs_cygwin_shell': 1,
877         },
878         {
879           'action_name': 'MathMLNames',
880           'inputs': [
881             '../dom/make_names.pl',
882             '../mathml/mathtags.in',
883             '../mathml/mathattrs.in',
884           ],
885           'outputs': [
886             '<(SHARED_INTERMEDIATE_DIR)/webkit/MathMLNames.cpp',
887             '<(SHARED_INTERMEDIATE_DIR)/webkit/MathMLNames.h',
888             '<(SHARED_INTERMEDIATE_DIR)/webkit/MathMLElementFactory.cpp',
889             '<(SHARED_INTERMEDIATE_DIR)/webkit/MathMLElementFactory.h',
890           ],
891           'action': [
892             'python',
893             'scripts/action_makenames.py',
894             '<@(_outputs)',
895             '--',
896             '<@(_inputs)',
897             '--',
898             '--factory',
899             '--extraDefines', '<(feature_defines)'
900           ],
901           'msvs_cygwin_shell': 1,
902         },
903         {
904           'action_name': 'UserAgentStyleSheets',
905           'variables': {
906             'scripts': [
907               '../css/make-css-file-arrays.pl',
908               '../bindings/scripts/preprocessor.pm',
909             ],
910             # The .css files are in the same order as ../DerivedSources.make.
911             'stylesheets': [
912               '../css/html.css',
913               '../css/quirks.css',
914               '../css/view-source.css',
915               '../css/themeChromium.css', # Chromium only.
916               '../css/themeChromiumAndroid.css', # Chromium only.
917               '../css/themeChromiumLinux.css', # Chromium only.
918               '../css/themeChromiumSkia.css',  # Chromium only.
919               '../css/themeWin.css',
920               '../css/themeWinQuirks.css',
921               '../css/svg.css',
922               '../css/mathml.css',
923               '../css/mediaControls.css',
924               '../css/mediaControlsChromium.css',
925               '../css/mediaControlsChromiumAndroid.css',
926               '../css/fullscreen.css',
927               # Skip fullscreenQuickTime.
928             ],
929           },
930           'inputs': [
931             '<@(scripts)',
932             '<@(stylesheets)'
933           ],
934           'outputs': [
935             '<(SHARED_INTERMEDIATE_DIR)/webkit/UserAgentStyleSheets.h',
936             '<(SHARED_INTERMEDIATE_DIR)/webkit/UserAgentStyleSheetsData.cpp',
937           ],
938           'action': [
939             'python',
940             'scripts/action_useragentstylesheets.py',
941             '<@(_outputs)',
942             '<@(stylesheets)',
943             '--',
944             '<@(scripts)',
945             '--',
946             '--defines', '<(feature_defines)',
947           ],
948           'msvs_cygwin_shell': 1,
949         },
950         {
951           'action_name': 'PickerCommon',
952           'inputs': [
953             '../Resources/pagepopups/pickerCommon.css',
954             '../Resources/pagepopups/pickerCommon.js',
955           ],
956           'outputs': [
957             '<(SHARED_INTERMEDIATE_DIR)/webkit/PickerCommon.h',
958             '<(SHARED_INTERMEDIATE_DIR)/webkit/PickerCommon.cpp',
959           ],
960           'action': [
961             'python',
962             '../make-file-arrays.py',
963             '--condition=ENABLE(CALENDAR_PICKER) OR ENABLE(INPUT_TYPE_COLOR)',
964             '--out-h=<(SHARED_INTERMEDIATE_DIR)/webkit/PickerCommon.h',
965             '--out-cpp=<(SHARED_INTERMEDIATE_DIR)/webkit/PickerCommon.cpp',
966             '<@(_inputs)',
967           ],
968         },
969         {
970           'action_name': 'CalendarPicker',
971           'inputs': [
972             '../Resources/pagepopups/calendarPicker.css',
973             '../Resources/pagepopups/calendarPicker.js',
974             '../Resources/pagepopups/suggestionPicker.css',
975             '../Resources/pagepopups/suggestionPicker.js',
976           ],
977           'outputs': [
978             '<(SHARED_INTERMEDIATE_DIR)/webkit/CalendarPicker.h',
979             '<(SHARED_INTERMEDIATE_DIR)/webkit/CalendarPicker.cpp',
980           ],
981           'action': [
982             'python',
983             '../make-file-arrays.py',
984             '--condition=ENABLE(CALENDAR_PICKER)',
985             '--out-h=<(SHARED_INTERMEDIATE_DIR)/webkit/CalendarPicker.h',
986             '--out-cpp=<(SHARED_INTERMEDIATE_DIR)/webkit/CalendarPicker.cpp',
987             '<@(_inputs)',
988           ],
989         },
990         {
991           'action_name': 'CalendarPickerMac',
992           'inputs': [
993             '../Resources/pagepopups/calendarPickerMac.css',
994           ],
995           'outputs': [
996             '<(SHARED_INTERMEDIATE_DIR)/webkit/CalendarPickerMac.h',
997             '<(SHARED_INTERMEDIATE_DIR)/webkit/CalendarPickerMac.cpp',
998           ],
999           'action': [
1000             'python',
1001             '../make-file-arrays.py',
1002             '--condition=ENABLE(CALENDAR_PICKER)',
1003             '--out-h=<(SHARED_INTERMEDIATE_DIR)/webkit/CalendarPickerMac.h',
1004             '--out-cpp=<(SHARED_INTERMEDIATE_DIR)/webkit/CalendarPickerMac.cpp',
1005             '<@(_inputs)',
1006           ],
1007         },
1008         {
1009           'action_name': 'ColorSuggestionPicker',
1010           'inputs': [
1011             '../Resources/pagepopups/colorSuggestionPicker.css',
1012             '../Resources/pagepopups/colorSuggestionPicker.js',
1013           ],
1014           'outputs': [
1015             '<(SHARED_INTERMEDIATE_DIR)/webkit/ColorSuggestionPicker.h',
1016             '<(SHARED_INTERMEDIATE_DIR)/webkit/ColorSuggestionPicker.cpp',
1017           ],
1018           'action': [
1019             'python',
1020             '../make-file-arrays.py',
1021             '--condition=ENABLE(INPUT_TYPE_COLOR)',
1022             '--out-h=<(SHARED_INTERMEDIATE_DIR)/webkit/ColorSuggestionPicker.h',
1023             '--out-cpp=<(SHARED_INTERMEDIATE_DIR)/webkit/ColorSuggestionPicker.cpp',
1024             '<@(_inputs)',
1025           ],
1026         },
1027         {
1028           'action_name': 'XLinkNames',
1029           'inputs': [
1030             '../dom/make_names.pl',
1031             '../svg/xlinkattrs.in',
1032           ],
1033           'outputs': [
1034             '<(SHARED_INTERMEDIATE_DIR)/webkit/XLinkNames.cpp',
1035             '<(SHARED_INTERMEDIATE_DIR)/webkit/XLinkNames.h',
1036           ],
1037           'action': [
1038             'python',
1039             'scripts/action_makenames.py',
1040             '<@(_outputs)',
1041             '--',
1042             '<@(_inputs)',
1043             '--',
1044             '--extraDefines', '<(feature_defines)'
1045           ],
1046           'msvs_cygwin_shell': 1,
1047         },
1048         {
1049           'action_name': 'XMLNSNames',
1050           'inputs': [
1051             '../dom/make_names.pl',
1052             '../xml/xmlnsattrs.in',
1053           ],
1054           'outputs': [
1055             '<(SHARED_INTERMEDIATE_DIR)/webkit/XMLNSNames.cpp',
1056             '<(SHARED_INTERMEDIATE_DIR)/webkit/XMLNSNames.h',
1057           ],
1058           'action': [
1059             'python',
1060             'scripts/action_makenames.py',
1061             '<@(_outputs)',
1062             '--',
1063             '<@(_inputs)',
1064             '--',
1065             '--extraDefines', '<(feature_defines)'
1066           ],
1067           'msvs_cygwin_shell': 1,
1068         },
1069         {
1070           'action_name': 'XMLNames',
1071           'inputs': [
1072             '../dom/make_names.pl',
1073             '../xml/xmlattrs.in',
1074           ],
1075           'outputs': [
1076             '<(SHARED_INTERMEDIATE_DIR)/webkit/XMLNames.cpp',
1077             '<(SHARED_INTERMEDIATE_DIR)/webkit/XMLNames.h',
1078           ],
1079           'action': [
1080             'python',
1081             'scripts/action_makenames.py',
1082             '<@(_outputs)',
1083             '--',
1084             '<@(_inputs)',
1085             '--',
1086             '--extraDefines', '<(feature_defines)'
1087           ],
1088           'msvs_cygwin_shell': 1,
1089         },
1090         {
1091           'action_name': 'derived_sources_all_in_one',
1092           'inputs': [
1093             'scripts/action_derivedsourcesallinone.py',
1094             '<(SHARED_INTERMEDIATE_DIR)/supplemental_dependency.tmp',
1095           ],
1096           'outputs': [
1097             '<@(derived_sources_aggregate_files)',
1098           ],
1099           'action': [
1100             'python',
1101             'scripts/action_derivedsourcesallinone.py',
1102             '<(SHARED_INTERMEDIATE_DIR)/supplemental_dependency.tmp',
1103             '--',
1104             '<@(derived_sources_aggregate_files)',
1105           ],
1106         },
1107         {
1108           'action_name': 'preprocess_grammar',
1109           'inputs': [
1110             '../css/CSSGrammar.y.in',
1111             '../css/CSSGrammar.y.includes',
1112           ],
1113           'outputs': [
1114             '<(SHARED_INTERMEDIATE_DIR)/webkit/CSSGrammar.y',
1115           ],
1116           'action': [
1117             '<(perl_exe)',
1118             '-I',
1119             '../bindings/scripts',
1120             '../css/makegrammar.pl',
1121             '--outputDir',
1122             '<(SHARED_INTERMEDIATE_DIR)/webkit/',
1123             '--extraDefines',
1124             '<(feature_defines)',
1125             '--preprocessOnly',
1126             '<@(preprocessor)',
1127             '<@(_inputs)',
1128           ],
1129         },
1130       ],
1131       'rules': [
1132         # Rules to build derived sources.
1133         {
1134           'rule_name': 'bison',
1135           'extension': 'y',
1136           'outputs': [
1137             '<(SHARED_INTERMEDIATE_DIR)/webkit/<(RULE_INPUT_ROOT).cpp',
1138             '<(SHARED_INTERMEDIATE_DIR)/webkit/<(RULE_INPUT_ROOT).h'
1139           ],
1140           'action': [
1141             'python',
1142             'scripts/rule_bison.py',
1143             '<(RULE_INPUT_PATH)',
1144             '<(SHARED_INTERMEDIATE_DIR)/webkit',
1145             '<(bison_exe)',
1146           ],
1147           'msvs_cygwin_shell': 1,
1148         },
1149         {
1150           'rule_name': 'gperf',
1151           'extension': 'gperf',
1152           #
1153           # gperf outputs are generated by WebCore/make-hash-tools.pl
1154           #
1155           'outputs': [
1156             '<(SHARED_INTERMEDIATE_DIR)/webkit/<(RULE_INPUT_ROOT).cpp',
1157           ],
1158           'inputs': [
1159             '../make-hash-tools.pl',
1160           ],
1161           'msvs_cygwin_shell': 0,
1162           'action': [
1163             '<(perl_exe)',
1164             '../make-hash-tools.pl',
1165             '<(SHARED_INTERMEDIATE_DIR)/webkit',
1166             '<(RULE_INPUT_PATH)',
1167             '<(gperf_exe)',
1168           ],
1169         },
1170         # Rule to build generated JavaScript (V8) bindings from .idl source.
1171         {
1172           'rule_name': 'binding',
1173           'extension': 'idl',
1174           'msvs_external_rule': 1,
1175           'inputs': [
1176             '../bindings/scripts/generate-bindings.pl',
1177             '../bindings/scripts/CodeGenerator.pm',
1178             '../bindings/scripts/CodeGeneratorV8.pm',
1179             '../bindings/scripts/IDLParser.pm',
1180             '../bindings/scripts/IDLAttributes.txt',
1181             '../bindings/scripts/preprocessor.pm',
1182             '<!@pymod_do_main(supplemental_idl_files <@(bindings_idl_files))',
1183           ],
1184           'outputs': [
1185             # FIXME:  The .cpp file should be in webkit/bindings once
1186             # we coax GYP into supporting it (see 'action' below).
1187             '<(SHARED_INTERMEDIATE_DIR)/webcore/bindings/V8<(RULE_INPUT_ROOT).cpp',
1188             '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8<(RULE_INPUT_ROOT).h',
1189           ],
1190           'variables': {
1191             'generator_include_dirs': [
1192               '--include', '../Modules/filesystem',
1193               '--include', '../Modules/indexeddb',
1194               '--include', '../Modules/intents',
1195               '--include', '../Modules/mediasource',
1196               '--include', '../Modules/mediastream',
1197               '--include', '../Modules/navigatorcontentutils',
1198               '--include', '../Modules/notifications',
1199               '--include', '../Modules/webaudio',
1200               '--include', '../Modules/webdatabase',
1201               '--include', '../css',
1202               '--include', '../dom',
1203               '--include', '../fileapi',
1204               '--include', '../html',
1205               '--include', '../page',
1206               '--include', '../plugins',
1207               '--include', '../storage',
1208               '--include', '../svg',
1209               '--include', '../testing',
1210               '--include', '../workers',
1211               '--include', '../xml',
1212               '--include', '<(SHARED_INTERMEDIATE_DIR)/webkit',
1213             ],
1214           },
1215           'msvs_cygwin_shell': 0,
1216           # FIXME:  Note that we put the .cpp files in webcore/bindings
1217           # but the .h files in webkit/bindings.  This is to work around
1218           # the unfortunate fact that GYP strips duplicate arguments
1219           # from lists.  When we have a better GYP way to suppress that
1220           # behavior, change the output location.
1221           'action': [
1222             '<(perl_exe)',
1223             '-w',
1224             '-I../bindings/scripts',
1225             '../bindings/scripts/generate-bindings.pl',
1226             '--outputHeadersDir',
1227             '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings',
1228             '--outputDir',
1229             '<(SHARED_INTERMEDIATE_DIR)/webcore/bindings',
1230             '--idlAttributesFile',
1231             '../bindings/scripts/IDLAttributes.txt',
1232             '--defines',
1233             '<(feature_defines) LANGUAGE_JAVASCRIPT V8_BINDING',
1234             '--generator',
1235             'V8',
1236             '<@(generator_include_dirs)',
1237             '--supplementalDependencyFile',
1238             '<(SHARED_INTERMEDIATE_DIR)/supplemental_dependency.tmp',
1239             '--additionalIdlFiles',
1240             '<(webcore_test_support_idl_files)',
1241             '<(RULE_INPUT_PATH)',
1242             '<@(preprocessor)',
1243           ],
1244           'message': 'Generating binding from <(RULE_INPUT_PATH)',
1245         },
1246       ],
1247     },
1248     {
1249       'target_name': 'webcore_bindings',
1250       'type': 'static_library',
1251       'hard_dependency': 1,
1252       'dependencies': [
1253         'webcore_bindings_sources',
1254         'inspector_overlay_page',
1255         'inspector_protocol_sources',
1256         'injected_canvas_script_source',
1257         'injected_script_source',
1258         'debugger_script_source',
1259         '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:yarr',
1260         '../../WTF/WTF.gyp/WTF.gyp:wtf',
1261         '<(chromium_src_dir)/build/temp_gyp/googleurl.gyp:googleurl',
1262         '<(chromium_src_dir)/skia/skia.gyp:skia',
1263         '<(chromium_src_dir)/third_party/iccjpeg/iccjpeg.gyp:iccjpeg',
1264         '<(chromium_src_dir)/third_party/libpng/libpng.gyp:libpng',
1265         '<(chromium_src_dir)/third_party/libxml/libxml.gyp:libxml',
1266         '<(chromium_src_dir)/third_party/libxslt/libxslt.gyp:libxslt',
1267         '<(chromium_src_dir)/third_party/libwebp/libwebp.gyp:libwebp',
1268         '<(chromium_src_dir)/third_party/npapi/npapi.gyp:npapi',
1269         '<(chromium_src_dir)/third_party/qcms/qcms.gyp:qcms',
1270         '<(chromium_src_dir)/third_party/sqlite/sqlite.gyp:sqlite',
1271         '<(chromium_src_dir)/v8/tools/gyp/v8.gyp:v8',
1272         '<(libjpeg_gyp_path):libjpeg',
1273       ],
1274       'include_dirs': [
1275         '<(INTERMEDIATE_DIR)',
1276         # FIXME:  Remove <(SHARED_INTERMEDIATE_DIR)/webcore when we
1277         # can entice gyp into letting us put both the .cpp and .h
1278         # files in the same output directory.
1279         '<(SHARED_INTERMEDIATE_DIR)/webcore',
1280         '<(SHARED_INTERMEDIATE_DIR)/webkit',
1281         '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings',
1282         '<@(webcore_include_dirs)',
1283       ],
1284       'direct_dependent_settings': {
1285         'include_dirs': [
1286           '<(SHARED_INTERMEDIATE_DIR)/webkit',
1287           '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings',
1288         ],
1289       },
1290       'sources': [
1291         # These files include all the .cpp files generated from the .idl files
1292         # in webcore_files.
1293         '<@(derived_sources_aggregate_files)',
1294
1295         # Additional .cpp files for HashTools.h
1296         '<(SHARED_INTERMEDIATE_DIR)/webkit/ColorData.cpp',
1297         '<(SHARED_INTERMEDIATE_DIR)/webkit/CSSPropertyNames.cpp',
1298         '<(SHARED_INTERMEDIATE_DIR)/webkit/CSSValueKeywords.cpp',
1299
1300         # Additional .cpp files from webcore_bindings_sources actions.
1301         '<(SHARED_INTERMEDIATE_DIR)/webkit/HTMLElementFactory.cpp',
1302         '<(SHARED_INTERMEDIATE_DIR)/webkit/HTMLNames.cpp',
1303         '<(SHARED_INTERMEDIATE_DIR)/webkit/CalendarPicker.cpp',
1304         '<(SHARED_INTERMEDIATE_DIR)/webkit/ColorSuggestionPicker.cpp',
1305         '<(SHARED_INTERMEDIATE_DIR)/webkit/EventFactory.cpp',
1306         '<(SHARED_INTERMEDIATE_DIR)/webkit/EventHeaders.h',
1307         '<(SHARED_INTERMEDIATE_DIR)/webkit/EventInterfaces.h',
1308         '<(SHARED_INTERMEDIATE_DIR)/webkit/EventTargetHeaders.h',
1309         '<(SHARED_INTERMEDIATE_DIR)/webkit/EventTargetInterfaces.h',
1310         '<(SHARED_INTERMEDIATE_DIR)/webkit/ExceptionCodeDescription.cpp',
1311         '<(SHARED_INTERMEDIATE_DIR)/webkit/PickerCommon.cpp',
1312         '<(SHARED_INTERMEDIATE_DIR)/webkit/UserAgentStyleSheetsData.cpp',
1313         '<(SHARED_INTERMEDIATE_DIR)/webkit/V8HTMLElementWrapperFactory.cpp',
1314         '<(SHARED_INTERMEDIATE_DIR)/webkit/XLinkNames.cpp',
1315         '<(SHARED_INTERMEDIATE_DIR)/webkit/XMLNSNames.cpp',
1316         '<(SHARED_INTERMEDIATE_DIR)/webkit/XMLNames.cpp',
1317         '<(SHARED_INTERMEDIATE_DIR)/webkit/SVGNames.cpp',
1318         '<(SHARED_INTERMEDIATE_DIR)/webkit/MathMLElementFactory.cpp',
1319         '<(SHARED_INTERMEDIATE_DIR)/webkit/MathMLNames.cpp',
1320         '<(SHARED_INTERMEDIATE_DIR)/webkit/WebKitFontFamilyNames.cpp',
1321
1322         # Generated from HTMLEntityNames.in
1323         '<(SHARED_INTERMEDIATE_DIR)/webkit/HTMLEntityTable.cpp',
1324
1325         # Additional .cpp files from the webcore_bindings_sources rules.
1326         '<(SHARED_INTERMEDIATE_DIR)/webkit/CSSGrammar.cpp',
1327         '<(SHARED_INTERMEDIATE_DIR)/webkit/XPathGrammar.cpp',
1328
1329         # Additional .cpp files from the webcore_inspector_sources list.
1330         '<(SHARED_INTERMEDIATE_DIR)/webcore/InspectorFrontend.cpp',
1331         '<(SHARED_INTERMEDIATE_DIR)/webcore/InspectorBackendDispatcher.cpp',
1332         '<(SHARED_INTERMEDIATE_DIR)/webcore/InspectorTypeBuilder.cpp',
1333       ],
1334       'conditions': [
1335         ['inside_chromium_build==1 and OS=="win" and component=="shared_library"', {
1336           'defines': [
1337             'USING_V8_SHARED',
1338           ],
1339         }],
1340         # TODO(maruel): Move it in its own project or generate it anyway?
1341         ['enable_svg!=0', {
1342           'sources': [
1343             '<(SHARED_INTERMEDIATE_DIR)/webkit/SVGElementFactory.cpp',
1344             '<(SHARED_INTERMEDIATE_DIR)/webkit/V8SVGElementWrapperFactory.cpp',
1345          ],
1346         }],
1347         ['OS=="mac"', {
1348           'include_dirs': [
1349             '<(chromium_src_dir)/third_party/apple_webkit',
1350           ],
1351           'sources': [
1352             '<(SHARED_INTERMEDIATE_DIR)/webkit/CalendarPickerMac.cpp',
1353           ],
1354         }],
1355         ['OS=="win"', {
1356           'defines': [
1357             'WEBCORE_NAVIGATOR_PLATFORM="Win32"',
1358             '__PRETTY_FUNCTION__=__FUNCTION__',
1359           ],
1360           # This is needed because Event.h in this directory is blocked
1361           # by a system header on windows.
1362           'include_dirs++': ['../dom'],
1363           'direct_dependent_settings': {
1364             'include_dirs+++': ['../dom'],
1365           },
1366           # In generated bindings code: 'switch contains default but no case'.
1367           # Disable c4267 warnings until we fix size_t to int truncations.
1368           'msvs_disabled_warnings': [ 4065, 4267 ],
1369         }],
1370         ['OS in ("linux", "android") and "WTF_USE_WEBAUDIO_IPP=1" in feature_defines', {
1371           'cflags': [
1372             '<!@(pkg-config --cflags-only-I ipp)',
1373           ],
1374         }],
1375       ],
1376     },
1377     {
1378       # We'll soon split libwebcore in multiple smaller libraries.
1379       # webcore_prerequisites will be the 'base' target of every sub-target.
1380       'target_name': 'webcore_prerequisites',
1381       'type': 'none',
1382       'dependencies': [
1383         'debugger_script_source',
1384         'injected_canvas_script_source',
1385         'injected_script_source',
1386         'inspector_overlay_page',
1387         'inspector_protocol_sources',
1388         'webcore_bindings_sources',
1389         '../../ThirdParty/glu/glu.gyp:libtess',
1390         '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:yarr',
1391         '../../WTF/WTF.gyp/WTF.gyp:wtf',
1392         '<(chromium_src_dir)/build/temp_gyp/googleurl.gyp:googleurl',
1393         '<(chromium_src_dir)/skia/skia.gyp:skia',
1394         '<(chromium_src_dir)/third_party/iccjpeg/iccjpeg.gyp:iccjpeg',
1395         '<(chromium_src_dir)/third_party/libwebp/libwebp.gyp:libwebp',
1396         '<(chromium_src_dir)/third_party/libpng/libpng.gyp:libpng',
1397         '<(chromium_src_dir)/third_party/libxml/libxml.gyp:libxml',
1398         '<(chromium_src_dir)/third_party/libxslt/libxslt.gyp:libxslt',
1399         '<(chromium_src_dir)/third_party/npapi/npapi.gyp:npapi',
1400         '<(chromium_src_dir)/third_party/ots/ots.gyp:ots',
1401         '<(chromium_src_dir)/third_party/qcms/qcms.gyp:qcms',
1402         '<(chromium_src_dir)/third_party/sqlite/sqlite.gyp:sqlite',
1403         '<(chromium_src_dir)/third_party/angle/src/build_angle.gyp:translator_glsl',
1404         '<(chromium_src_dir)/third_party/zlib/zlib.gyp:zlib',
1405         '<(chromium_src_dir)/v8/tools/gyp/v8.gyp:v8',
1406         '<(libjpeg_gyp_path):libjpeg',
1407       ],
1408       'export_dependent_settings': [
1409         '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:yarr',
1410         '../../WTF/WTF.gyp/WTF.gyp:wtf',
1411         '<(chromium_src_dir)/build/temp_gyp/googleurl.gyp:googleurl',
1412         '<(chromium_src_dir)/skia/skia.gyp:skia',
1413         '<(chromium_src_dir)/third_party/iccjpeg/iccjpeg.gyp:iccjpeg',
1414         '<(chromium_src_dir)/third_party/libwebp/libwebp.gyp:libwebp',
1415         '<(chromium_src_dir)/third_party/libpng/libpng.gyp:libpng',
1416         '<(chromium_src_dir)/third_party/libxml/libxml.gyp:libxml',
1417         '<(chromium_src_dir)/third_party/libxslt/libxslt.gyp:libxslt',
1418         '<(chromium_src_dir)/third_party/npapi/npapi.gyp:npapi',
1419         '<(chromium_src_dir)/third_party/ots/ots.gyp:ots',
1420         '<(chromium_src_dir)/third_party/qcms/qcms.gyp:qcms',
1421         '<(chromium_src_dir)/third_party/sqlite/sqlite.gyp:sqlite',
1422         '<(chromium_src_dir)/third_party/angle/src/build_angle.gyp:translator_glsl',
1423         '<(chromium_src_dir)/third_party/zlib/zlib.gyp:zlib',
1424         '<(chromium_src_dir)/v8/tools/gyp/v8.gyp:v8',
1425         '<(libjpeg_gyp_path):libjpeg',
1426       ],
1427       # This is needed for mac because of webkit_system_interface. It'd be nice
1428       # if this hard dependency could be split off the rest.
1429       'hard_dependency': 1,
1430       'direct_dependent_settings': {
1431         'defines': [
1432           'WEBCORE_NAVIGATOR_VENDOR="Google Inc."',
1433           'WEBKIT_IMPLEMENTATION=1',
1434         ],
1435         'include_dirs': [
1436           '../../Platform/chromium',
1437           '<(INTERMEDIATE_DIR)',
1438           '<@(webcore_include_dirs)',
1439           '<(chromium_src_dir)/gpu',
1440           '<(chromium_src_dir)/third_party/angle/include/GLSLANG',
1441           '<(SHARED_INTERMEDIATE_DIR)/webkit',
1442           '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings',
1443         ],
1444         'msvs_disabled_warnings': [
1445           4138, 4244, 4291, 4305, 4344, 4355, 4521, 4099,
1446         ],
1447         'scons_line_length' : 1,
1448         'xcode_settings': {
1449           # Some Mac-specific parts of WebKit won't compile without having this
1450           # prefix header injected.
1451           # FIXME: make this a first-class setting.
1452           'GCC_PREFIX_HEADER': '../WebCorePrefix.h',
1453         },
1454       },
1455       'conditions': [
1456         ['inside_chromium_build==1 and OS=="win" and component=="shared_library"', {
1457           'direct_dependent_settings': {
1458             'defines': [
1459                'USING_V8_SHARED',
1460             ],
1461           },
1462         }],
1463         ['use_accelerated_compositing==1', {
1464           'dependencies': [
1465             '<(chromium_src_dir)/gpu/gpu.gyp:gles2_c_lib',
1466           ],
1467           'export_dependent_settings': [
1468             '<(chromium_src_dir)/gpu/gpu.gyp:gles2_c_lib',
1469           ],
1470         }],
1471         ['use_x11 == 1', {
1472           'dependencies': [
1473             '<(chromium_src_dir)/build/linux/system.gyp:fontconfig',
1474           ],
1475           'export_dependent_settings': [
1476             '<(chromium_src_dir)/build/linux/system.gyp:fontconfig',
1477           ],
1478           'direct_dependent_settings': {
1479             'cflags': [
1480               # WebCore does not work with strict aliasing enabled.
1481               # https://bugs.webkit.org/show_bug.cgi?id=25864
1482               '-fno-strict-aliasing',
1483             ],
1484           },
1485         }],
1486         ['toolkit_uses_gtk == 1', {
1487           'dependencies': [
1488             '<(chromium_src_dir)/build/linux/system.gyp:gtk',
1489           ],
1490           'export_dependent_settings': [
1491             '<(chromium_src_dir)/build/linux/system.gyp:gtk',
1492           ],
1493         }],
1494         ['OS=="android"', {
1495           'sources/': [
1496             ['exclude', 'accessibility/'],
1497           ],
1498         }],
1499         ['OS=="mac"', {
1500           'dependencies': [
1501             'webkit_system_interface',
1502           ],
1503           'export_dependent_settings': [
1504             'webkit_system_interface',
1505           ],
1506           'direct_dependent_settings': {
1507             'defines': [
1508               # Match Safari and Mozilla on Mac x86.
1509               'WEBCORE_NAVIGATOR_PLATFORM="MacIntel"',
1510
1511               # Chromium's version of WebCore includes the following Objective-C
1512               # classes. The system-provided WebCore framework may also provide
1513               # these classes. Because of the nature of Objective-C binding
1514               # (dynamically at runtime), it's possible for the
1515               # Chromium-provided versions to interfere with the system-provided
1516               # versions.  This may happen when a system framework attempts to
1517               # use WebCore.framework, such as when converting an HTML-flavored
1518               # string to an NSAttributedString.  The solution is to force
1519               # Objective-C class names that would conflict to use alternate
1520               # names.
1521               #
1522               # This list will hopefully shrink but may also grow.  Its
1523               # performance is monitored by the "Check Objective-C Rename"
1524               # postbuild step, and any suspicious-looking symbols not handled
1525               # here or whitelisted in that step will cause a build failure.
1526               #
1527               # If this is unhandled, the console will receive log messages
1528               # such as:
1529               # com.google.Chrome[] objc[]: Class ScrollbarPrefsObserver is implemented in both .../Google Chrome.app/Contents/Versions/.../Google Chrome Helper.app/Contents/MacOS/../../../Google Chrome Framework.framework/Google Chrome Framework and /System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebCore.framework/Versions/A/WebCore. One of the two will be used. Which one is undefined.
1530               'WebCascadeList=ChromiumWebCoreObjCWebCascadeList',
1531               'WebCoreFlippedView=ChromiumWebCoreObjCWebCoreFlippedView',
1532               'WebCoreTextFieldCell=ChromiumWebCoreObjCWebCoreTextFieldCell',
1533               'WebScrollbarPrefsObserver=ChromiumWebCoreObjCWebScrollbarPrefsObserver',
1534               'WebCoreRenderThemeNotificationObserver=ChromiumWebCoreObjCWebCoreRenderThemeNotificationObserver',
1535               'WebFontCache=ChromiumWebCoreObjCWebFontCache',
1536               'WebScrollAnimationHelperDelegate=ChromiumWebCoreObjCWebScrollAnimationHelperDelegate',
1537               'WebScrollbarPainterControllerDelegate=ChromiumWebCoreObjCWebScrollbarPainterControllerDelegate',
1538               'WebScrollbarPainterDelegate=ChromiumWebCoreObjCWebScrollbarPainterDelegate',
1539               'WebScrollbarPartAnimation=ChromiumWebCoreObjCWebScrollbarPartAnimation',
1540             ],
1541             'include_dirs': [
1542               '<(chromium_src_dir)/third_party/apple_webkit',
1543             ],
1544             'postbuilds': [
1545               {
1546                 # This step ensures that any Objective-C names that aren't
1547                 # redefined to be "safe" above will cause a build failure.
1548                 'postbuild_name': 'Check Objective-C Rename',
1549                 'variables': {
1550                   'class_whitelist_regex':
1551                       'ChromiumWebCoreObjC|TCMVisibleView|RTCMFlippedView',
1552                   'category_whitelist_regex':
1553                       'TCMInterposing|ScrollAnimatorChromiumMacExt',
1554                 },
1555                 'action': [
1556                   'mac/check_objc_rename.sh',
1557                   '<(class_whitelist_regex)',
1558                   '<(category_whitelist_regex)',
1559                 ],
1560               },
1561             ],
1562           },
1563         }],
1564         ['OS=="win"', {
1565           'direct_dependent_settings': {
1566             'defines': [
1567               # Match Safari and Mozilla on Windows.
1568               'WEBCORE_NAVIGATOR_PLATFORM="Win32"',
1569               '__PRETTY_FUNCTION__=__FUNCTION__',
1570             ],
1571             # This is needed because Event.h in this directory is blocked
1572             # by a system header on windows.
1573             'include_dirs++': ['../dom'],
1574           },
1575         }],
1576         ['OS in ("linux", "android") and "WTF_USE_WEBAUDIO_IPP=1" in feature_defines', {
1577           'direct_dependent_settings': {
1578             'cflags': [
1579               '<!@(pkg-config --cflags-only-I ipp)',
1580             ],
1581           },
1582         }],
1583         ['"WTF_USE_WEBAUDIO_FFMPEG=1" in feature_defines', {
1584           # This directory needs to be on the include path for multiple sub-targets of webcore.
1585           'direct_dependent_settings': {
1586             'include_dirs': [
1587               '<(chromium_src_dir)/third_party/ffmpeg',
1588             ],
1589           },
1590           'dependencies': [
1591             '<(chromium_src_dir)/third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
1592           ],
1593         }],
1594         # Windows shared builder needs extra help for linkage
1595         ['OS=="win" and "WTF_USE_WEBAUDIO_FFMPEG=1" in feature_defines', {
1596           'export_dependent_settings': [
1597             '<(chromium_src_dir)/third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
1598           ],
1599         }],
1600         ['"WTF_USE_LEVELDB=1" in feature_defines', {
1601           'dependencies': [
1602             '<(chromium_src_dir)/third_party/leveldatabase/leveldatabase.gyp:leveldatabase',
1603           ],
1604           'export_dependent_settings': [
1605             '<(chromium_src_dir)/third_party/leveldatabase/leveldatabase.gyp:leveldatabase',
1606           ],
1607         }],
1608       ],
1609     },
1610     {
1611       'target_name': 'webcore_dom',
1612       'type': 'static_library',
1613       'dependencies': [
1614         'webcore_prerequisites',
1615       ],
1616       'sources': [
1617         '<@(webcore_dom_files)',
1618       ],
1619       'sources!': [
1620         '../dom/default/PlatformMessagePortChannel.cpp',
1621         '../dom/default/PlatformMessagePortChannel.h',
1622       ],
1623       'sources/': [
1624         # FIXME: Figure out how to store these patterns in a variable.
1625         ['exclude', '(cairo|ca|cf|cg|curl|efl|freetype|gstreamer|gtk|linux|mac|opengl|openvg|opentype|pango|posix|qt|soup|svg|texmap|iphone|win|wince|wx)/'],
1626         ['exclude', '(?<!Chromium)(Cairo|CF|CG|Curl|Gtk|JSC|Linux|Mac|OpenType|POSIX|Posix|Qt|Safari|Soup|Win|WinCE|Wx)\\.(cpp|mm?)$'],
1627
1628         ['exclude', 'AllInOne\\.cpp$'],
1629       ],
1630     },
1631     {
1632       'target_name': 'webcore_html',
1633       'type': 'static_library',
1634       'dependencies': [
1635         'webcore_prerequisites',
1636       ],
1637       'sources': [
1638         '<@(webcore_html_files)',
1639       ],
1640       'sources/': [
1641         ['exclude', 'AllInOne\\.cpp$'],
1642       ],
1643       'conditions': [
1644         ['OS!="android"', {
1645           'sources/': [
1646             ['exclude', 'Android\\.cpp$'],
1647           ],
1648         }],
1649       ],
1650     },
1651     {
1652       'target_name': 'webcore_svg',
1653       'type': 'static_library',
1654       'dependencies': [
1655         'webcore_prerequisites',
1656       ],
1657       'sources': [
1658         '<@(webcore_svg_files)',
1659       ],
1660       'sources/': [
1661         ['exclude', 'AllInOne\\.cpp$'],
1662       ],
1663     },
1664     {
1665       'target_name': 'webcore_platform',
1666       'type': 'static_library',
1667       'dependencies': [
1668         'webcore_prerequisites',
1669       ],
1670       # This is needed for mac because of webkit_system_interface. It'd be nice
1671       # if this hard dependency could be split off the rest.
1672       'hard_dependency': 1,
1673       'sources': [
1674         '<@(webcore_platform_files)',
1675
1676         # For WebCoreSystemInterface, Mac-only.
1677         '../../WebKit/mac/WebCoreSupport/WebSystemInterface.mm',
1678       ],
1679       'sources/': [
1680         ['exclude', '.*'],
1681         ['include', 'platform/'],
1682
1683         # FIXME: Figure out how to store these patterns in a variable.
1684         ['exclude', '(cairo|ca|cf|cg|curl|efl|freetype|gstreamer|gtk|harfbuzz|linux|mac|opengl|openvg|opentype|pango|posix|qt|soup|svg|texmap|iphone|win|wince|wx)/'],
1685         ['exclude', '(?<!Chromium)(Cairo|CF|CG|Curl|Gtk|JSC|Linux|Mac|OpenType|POSIX|Posix|Qt|Safari|Soup|Win|WinCE|Wx)\\.(cpp|mm?)$'],
1686
1687         ['exclude', 'platform/LinkHash\\.cpp$'],
1688         ['exclude', 'platform/MIMETypeRegistry\\.cpp$'],
1689         ['exclude', 'platform/Theme\\.cpp$'],
1690         # *NEON.cpp files need special compile options.
1691         # They are moved to the webcore_arm_neon target.
1692         ['exclude', 'platform/graphics/cpu/arm/filters/.*NEON\\.(cpp|h)'],
1693         ['exclude', 'platform/image-encoders/JPEGImageEncoder\\.(cpp|h)$'],
1694         ['exclude', 'platform/image-encoders/PNGImageEncoder\\.(cpp|h)$'],
1695         ['exclude', 'platform/network/ResourceHandle\\.cpp$'],
1696         ['exclude', 'platform/sql/SQLiteFileSystem\\.cpp$'],
1697         ['exclude', 'platform/text/LocaleToScriptMappingICU\\.cpp$'],
1698         ['exclude', 'platform/text/TextEncodingDetectorNone\\.cpp$'],
1699       ],
1700       'conditions': [
1701         ['inside_chromium_build==1', {
1702             'conditions': [
1703                 ['component=="shared_library"', {
1704                     'defines': [
1705                         'WEBKIT_DLL',
1706                     ],
1707                 }],
1708             ],
1709         }],
1710         ['use_default_render_theme==1', {
1711           'sources/': [
1712             ['exclude', 'platform/chromium/PlatformThemeChromiumWin.h'],
1713             ['exclude', 'platform/chromium/PlatformThemeChromiumWin.cpp'],
1714             ['exclude', 'platform/chromium/ScrollbarThemeChromiumWin.cpp'],
1715             ['exclude', 'platform/chromium/ScrollbarThemeChromiumWin.h'],
1716           ],
1717         }, { # use_default_render_theme==0
1718           'sources/': [
1719             ['exclude', 'platform/chromium/PlatformThemeChromiumDefault.cpp'],
1720             ['exclude', 'platform/chromium/PlatformThemeChromiumDefault.h'],
1721             ['exclude', 'platform/chromium/ScrollbarThemeChromiumDefault.cpp'],
1722             ['exclude', 'platform/chromium/ScrollbarThemeChromiumDefault.h'],
1723           ],
1724         }],
1725         ['use_x11==1 or OS=="android"', {
1726           'sources/': [
1727             # Cherry-pick files excluded by the broader regular expressions above.
1728             ['include', 'platform/graphics/harfbuzz/FontHarfBuzz\\.cpp$'],
1729             ['include', 'platform/graphics/harfbuzz/FontPlatformDataHarfBuzz\\.cpp$'],
1730             ['include', 'platform/graphics/harfbuzz/HarfBuzzShaperBase\\.(cpp|h)$'],
1731             ['include', 'platform/graphics/harfbuzz/ng/HarfBuzzNGFace\\.(cpp|h)$'],
1732             ['include', 'platform/graphics/harfbuzz/ng/HarfBuzzNGFaceSkia\\.cpp$'],
1733             ['include', 'platform/graphics/harfbuzz/ng/HarfBuzzShaper\\.(cpp|h)$'],
1734             ['include', 'platform/graphics/opentype/OpenTypeTypes\\.h$'],
1735             ['include', 'platform/graphics/opentype/OpenTypeVerticalData\\.(cpp|h)$'],
1736             ['include', 'platform/graphics/skia/SimpleFontDataSkia\\.cpp$'],
1737           ],
1738           'dependencies': [
1739             '<(chromium_src_dir)/third_party/harfbuzz-ng/harfbuzz.gyp:harfbuzz-ng',
1740           ],
1741         }, { # use_x11==0 and OS!="android"
1742           'sources/': [
1743             ['exclude', 'Harfbuzz[^/]+\\.(cpp|h)$'],
1744           ],
1745         }],
1746         ['use_x11!=1', {
1747           'sources/': [
1748             ['exclude', 'Linux\\.cpp$'],
1749           ],
1750         }],
1751         ['toolkit_uses_gtk == 1', {
1752           'sources/': [
1753             # Cherry-pick files excluded by the broader regular expressions above.
1754             ['include', 'platform/chromium/KeyCodeConversionGtk\\.cpp$'],
1755           ],
1756         }, { # toolkit_uses_gtk==0
1757           'sources/': [
1758             ['exclude', 'Gtk\\.cpp$'],
1759           ],
1760         }],
1761         ['OS=="mac"', {
1762           # Necessary for Mac .mm stuff.
1763           'include_dirs': [
1764             '<(chromium_src_dir)/third_party/apple_webkit',
1765           ],
1766           'dependencies': [
1767             'webkit_system_interface',
1768             '<(chromium_src_dir)/third_party/harfbuzz-ng/harfbuzz.gyp:harfbuzz-ng',
1769           ],
1770           'actions': [
1771             {
1772               # Allow framework-style #include of
1773               # <WebCore/WebCoreSystemInterface.h>.
1774               'action_name': 'WebCoreSystemInterface.h',
1775               'inputs': [
1776                 '../platform/mac/WebCoreSystemInterface.h',
1777               ],
1778               'outputs': [
1779                 '<(INTERMEDIATE_DIR)/WebCore/WebCoreSystemInterface.h',
1780               ],
1781               'action': ['cp', '<@(_inputs)', '<@(_outputs)'],
1782             },
1783           ],
1784           'sources': [
1785             '../editing/SmartReplaceCF.cpp',
1786             '../../WebKit/mac/WebCoreSupport/WebSystemInterface.mm',
1787           ],
1788           'sources/': [
1789             # Additional files from the WebCore Mac build that are presently
1790             # used in the WebCore Chromium Mac build too.
1791
1792             # The Mac build is USE(CF) but does not use CFNetwork.
1793             ['include', 'CF\\.cpp$'],
1794             ['exclude', 'network/cf/'],
1795
1796             # Use native Mac font code from WebCore.
1797             ['include', 'platform/(graphics/)?mac/[^/]*Font[^/]*\\.(cpp|mm?)$'],
1798             ['include', 'platform/graphics/mac/ComplexText[^/]*\\.(cpp|h)$'],
1799
1800             # We can use this for the fast Accelerate.framework FFT.
1801             ['include', 'platform/audio/mac/FFTFrameMac\\.cpp$'],
1802
1803             # Cherry-pick some files that can't be included by broader regexps.
1804             # Some of these are used instead of Chromium platform files, see
1805             # the specific exclusions in the "exclude" list below.
1806             ['include', 'platform/graphics/mac/ColorMac\\.mm$'],
1807             ['include', 'platform/graphics/mac/ComplexTextControllerCoreText\\.mm$'],
1808             ['include', 'platform/graphics/mac/FloatPointMac\\.mm$'],
1809             ['include', 'platform/graphics/mac/FloatRectMac\\.mm$'],
1810             ['include', 'platform/graphics/mac/FloatSizeMac\\.mm$'],
1811             ['include', 'platform/graphics/mac/GlyphPageTreeNodeMac\\.cpp$'],
1812             ['include', 'platform/graphics/mac/IntPointMac\\.mm$'],
1813             ['include', 'platform/graphics/mac/IntRectMac\\.mm$'],
1814             ['include', 'platform/mac/BlockExceptions\\.mm$'],
1815             ['include', 'platform/mac/KillRingMac\\.mm$'],
1816             ['include', 'platform/mac/LocalCurrentGraphicsContext\\.mm$'],
1817             ['include', 'platform/mac/NSScrollerImpDetails\\.mm$'],
1818             ['include', 'platform/mac/PurgeableBufferMac\\.cpp$'],
1819             ['include', 'platform/mac/ScrollbarThemeMac\\.mm$'],
1820             ['include', 'platform/mac/ScrollAnimatorMac\\.mm$'],
1821             ['include', 'platform/mac/ScrollElasticityController\\.mm$'],
1822             ['include', 'platform/mac/ThemeMac\\.h$'],
1823             ['include', 'platform/mac/ThemeMac\\.mm$'],
1824             ['include', 'platform/mac/WebCoreSystemInterface\\.mm$'],
1825             ['include', 'platform/mac/WebCoreTextRenderer\\.mm$'],
1826             ['include', 'platform/text/mac/ShapeArabic\\.c$'],
1827             ['include', 'platform/text/mac/String(Impl)?Mac\\.mm$'],
1828             # Use USE_NEW_THEME on Mac.
1829             ['include', 'platform/Theme\\.cpp$'],
1830
1831             ['include', 'WebKit/mac/WebCoreSupport/WebSystemInterface\\.mm$'],
1832
1833             # We use LocaleMac.mm instead of LocaleICU.cpp in order to
1834             # apply system locales.
1835             ['exclude', 'platform/text/LocaleICU\\.cpp$'],
1836             ['exclude', 'platform/text/LocaleICU\\.h$'],
1837             ['include', 'platform/text/mac/LocaleMac\\.mm$'],
1838
1839             # The Mac uses platform/mac/KillRingMac.mm instead of the dummy
1840             # implementation.
1841             ['exclude', 'platform/KillRingNone\\.cpp$'],
1842
1843             # The Mac currently uses FontCustomPlatformData.cpp from
1844             # platform/graphics/mac, included by regex above, instead.
1845             ['exclude', 'platform/graphics/skia/FontCustomPlatformData\\.cpp$'],
1846
1847             # The Mac currently uses ScrollbarThemeChromiumMac.mm, which is not
1848             # related to ScrollbarThemeChromium.cpp.
1849             ['exclude', 'platform/chromium/ScrollbarThemeChromium\\.cpp$'],
1850
1851             # The Mac does not use ImageSourceCG.cpp from platform/graphics/cg
1852             # even though it is included by regex above.
1853             ['exclude', 'platform/graphics/cg/ImageSourceCG\\.cpp$'],
1854             ['exclude', 'platform/graphics/cg/PDFDocumentImage\\.cpp$'],
1855
1856             # Mac uses only ScrollAnimatorMac.
1857             ['exclude', 'platform/ScrollAnimatorNone\\.cpp$'],
1858             ['exclude', 'platform/ScrollAnimatorNone\\.h$'],
1859
1860             ['include', 'platform/graphics/cg/FloatPointCG\\.cpp$'],
1861             ['include', 'platform/graphics/cg/FloatRectCG\\.cpp$'],
1862             ['include', 'platform/graphics/cg/FloatSizeCG\\.cpp$'],
1863             ['include', 'platform/graphics/cg/IntPointCG\\.cpp$'],
1864             ['include', 'platform/graphics/cg/IntRectCG\\.cpp$'],
1865             ['include', 'platform/graphics/cg/IntSizeCG\\.cpp$'],
1866             ['exclude', 'platform/graphics/mac/FontMac\\.mm$'],
1867             ['exclude', 'platform/graphics/skia/FontCacheSkia\\.cpp$'],
1868             ['exclude', 'platform/graphics/skia/GlyphPageTreeNodeSkia\\.cpp$'],
1869             ['exclude', 'platform/graphics/skia/SimpleFontDataSkia\\.cpp$'],
1870
1871             # Mac uses Harfbuzz-ng.
1872             ['include', 'platform/graphics/harfbuzz/HarfBuzzShaperBase\\.(cpp|h)$'],
1873             ['include', 'platform/graphics/harfbuzz/ng/HarfBuzzNGFaceCoreText\\.cpp$'],
1874             ['include', 'platform/graphics/harfbuzz/ng/HarfBuzzNGFace\\.(cpp|h)$'],
1875             ['include', 'platform/graphics/harfbuzz/ng/HarfBuzzShaper\\.(cpp|h)$'],
1876           ],
1877         },{ # OS!="mac"
1878           'sources/': [
1879             ['exclude', 'Mac\\.(cpp|mm?)$'],
1880
1881             # Linux uses FontLinux; Windows uses FontWin. Additionally, FontSkia
1882             # is excluded by a rule above if WebKit uses CG instead of Skia.
1883             ['exclude', 'platform/graphics/skia/FontSkia\\.cpp$'],
1884
1885             # FIXME: We will eventually compile this too, but for now it's
1886             # only used on mac.
1887             ['exclude', 'platform/graphics/FontPlatformData\\.cpp$'],
1888           ],
1889         }],
1890         ['use_x11 == 0 and OS != "mac"', {
1891           'sources/': [
1892             ['exclude', 'VDMX[^/]+\\.(cpp|h)$'],
1893           ],
1894         }],
1895         ['OS=="win"', {
1896           'sources/': [
1897             ['exclude', 'Posix\\.cpp$'],
1898
1899             ['include', '/opentype/'],
1900             ['include', '/SkiaFontWin\\.cpp$'],
1901             ['include', '/TransparencyWin\\.cpp$'],
1902
1903             # The Chromium Win currently uses GlyphPageTreeNodeChromiumWin.cpp from
1904             # platform/graphics/chromium, included by regex above, instead.
1905             ['exclude', 'platform/graphics/skia/FontCacheSkia\\.cpp$'],
1906             ['exclude', 'platform/graphics/skia/GlyphPageTreeNodeSkia\\.cpp$'],
1907             ['exclude', 'platform/graphics/skia/SimpleFontDataSkia\\.cpp$'],
1908
1909             # SystemInfo.cpp is useful and we don't want to copy it.
1910             ['include', 'platform/win/SystemInfo\\.cpp$'],
1911
1912             ['exclude', 'platform/text/LocaleICU\\.cpp$'],
1913             ['exclude', 'platform/text/LocaleICU\\.h$'],
1914             ['include', 'platform/text/win/LocaleWin\.cpp$'],
1915             ['include', 'platform/text/win/LocaleWin\.h$'],
1916           ],
1917         },{ # OS!="win"
1918           'sources/': [
1919             ['exclude', 'Win\\.cpp$'],
1920             ['exclude', '/(Windows|Uniscribe)[^/]*\\.cpp$'],
1921             ['include', 'platform/graphics/opentype/OpenTypeSanitizer\\.cpp$'],
1922           ],
1923         }],
1924         ['OS=="android"', {
1925           'sources/': [
1926             ['include', 'platform/chromium/ClipboardChromiumLinux\\.cpp$'],
1927             ['include', 'platform/chromium/FileSystemChromiumLinux\\.cpp$'],
1928             ['include', 'platform/graphics/chromium/GlyphPageTreeNodeLinux\\.cpp$'],
1929             ['exclude', 'platform/graphics/chromium/IconChromium\\.cpp$'],
1930             ['include', 'platform/graphics/chromium/VDMXParser\\.cpp$'],
1931             ['exclude', 'platform/graphics/skia/FontCacheSkia\\.cpp$'],
1932           ],
1933         }, { # OS!="android"
1934           'sources/': [
1935             ['exclude', 'Android\\.cpp$'],
1936           ],
1937         }],
1938       ],
1939     },
1940     {
1941       'target_name': 'webcore_platform_geometry',
1942       'type': 'static_library',
1943       'dependencies': [
1944         'webcore_prerequisites',
1945       ],
1946       'sources': [
1947         '<@(webcore_platform_geometry_files)',
1948       ],
1949     },
1950     # The *NEON.cpp files fail to compile when -mthumb is passed. Force
1951     # them to build in ARM mode.
1952     # See https://bugs.webkit.org/show_bug.cgi?id=62916.
1953     {
1954       'target_name': 'webcore_arm_neon',
1955       'conditions': [
1956         ['target_arch=="arm"', {
1957           'type': 'static_library',
1958           'dependencies': [
1959             'webcore_prerequisites',
1960           ],
1961           'hard_dependency': 1,
1962           'sources': [
1963             '<@(webcore_files)',
1964           ],
1965           'sources/': [
1966             ['exclude', '.*'],
1967             ['include', 'platform/graphics/cpu/arm/filters/.*NEON\\.(cpp|h)'],
1968           ],
1969           'cflags': ['-marm'],
1970           'conditions': [
1971             ['OS=="android"', {
1972               'cflags!': ['-mthumb'],
1973             }],
1974           ],
1975         },{  # target_arch!="arm"
1976           'type': 'none',
1977         }],
1978       ],
1979     },
1980     {
1981       'target_name': 'webcore_rendering',
1982       'type': 'static_library',
1983       'dependencies': [
1984         'webcore_prerequisites',
1985       ],
1986       'sources': [
1987         '<@(webcore_files)',
1988       ],
1989       'sources/': [
1990         ['exclude', '.*'],
1991         ['include', 'rendering/'],
1992
1993         # FIXME: Figure out how to store these patterns in a variable.
1994         ['exclude', '(cairo|ca|cf|cg|curl|efl|freetype|gstreamer|gtk|linux|mac|opengl|openvg|opentype|pango|posix|qt|soup|svg|texmap|iphone|win|wince|wx)/'],
1995         ['exclude', '(?<!Chromium)(Cairo|CF|CG|Curl|Gtk|JSC|Linux|Mac|OpenType|POSIX|Posix|Qt|Safari|Soup|Win|WinCE|Wx)\\.(cpp|mm?)$'],
1996         # Previous rule excludes things like ChromiumFooWin, include those.
1997         ['include', 'rendering/.*Chromium.*\\.(cpp|mm?)$'],
1998         ['exclude', 'AllInOne\\.cpp$'],
1999       ],
2000       'conditions': [
2001         ['use_default_render_theme==0', {
2002           'sources/': [
2003             ['exclude', 'rendering/RenderThemeChromiumDefault.*'],
2004           ],
2005         }],
2006         ['use_default_render_theme==1', {
2007           'sources/': [
2008             ['exclude', 'RenderThemeChromiumWin.*'],
2009           ],
2010         }],
2011         ['OS=="win"', {
2012           'sources/': [
2013             ['exclude', 'Posix\\.cpp$'],
2014           ],
2015         },{ # OS!="win"
2016           'sources/': [
2017             ['exclude', 'Win\\.cpp$'],
2018           ],
2019         }],
2020         ['OS=="mac"', {
2021           'sources/': [
2022             # RenderThemeChromiumSkia is not used on mac since RenderThemeChromiumMac
2023             # does not reference the Skia code that is used by Windows, Linux and Android.
2024             ['exclude', 'rendering/RenderThemeChromiumSkia\\.cpp$'],
2025             # RenderThemeChromiumFontProvider is used by RenderThemeChromiumSkia.
2026             ['exclude', 'rendering/RenderThemeChromiumFontProvider\\.cpp'],
2027             ['exclude', 'rendering/RenderThemeChromiumFontProvider\\.h'],
2028           ],
2029         },{ # OS!="mac"
2030           'sources/': [['exclude', 'Mac\\.(cpp|mm?)$']]
2031         }],
2032         ['os_posix == 1 and OS != "mac" and gcc_version == 42', {
2033           # Due to a bug in gcc 4.2.1 (the current version on hardy), we get
2034           # warnings about uninitialized this.
2035           'cflags': ['-Wno-uninitialized'],
2036         }],
2037         ['OS == "android" and target_arch == "ia32" and gcc_version == 46', {
2038           # Due to a bug in gcc 4.6 in android NDK, we get warnings about uninitialized variable.
2039           'cflags': ['-Wno-uninitialized'],
2040         }],
2041         ['use_x11 == 0', {
2042           'sources/': [
2043             ['exclude', 'Linux\\.cpp$'],
2044           ],
2045         }],
2046         ['toolkit_uses_gtk == 0', {
2047           'sources/': [
2048             ['exclude', 'Gtk\\.cpp$'],
2049           ],
2050         }],
2051         ['OS=="android"', {
2052           'sources/': [
2053             ['include', 'rendering/RenderThemeChromiumFontProviderLinux\\.cpp$'],
2054             ['include', 'rendering/RenderThemeChromiumDefault\\.cpp$'],
2055           ],
2056         },{ # OS!="android"
2057           'sources/': [
2058             ['exclude', 'Android\\.cpp$'],
2059           ],
2060         }],
2061       ],
2062     },
2063     {
2064       'target_name': 'webcore_remaining',
2065       'type': 'static_library',
2066       'dependencies': [
2067         '<(chromium_src_dir)/third_party/v8-i18n/build/all.gyp:v8-i18n',
2068         'webcore_prerequisites',
2069       ],
2070       # This is needed for mac because of webkit_system_interface. It'd be nice
2071       # if this hard dependency could be split off the rest.
2072       'hard_dependency': 1,
2073       'sources': [
2074         '<@(webcore_files)',
2075       ],
2076       'sources/': [
2077         ['exclude', 'platform/'],
2078         ['exclude', 'rendering/'],
2079
2080         # Exclude most of bindings, except of the V8-related parts.
2081         ['exclude', 'bindings/[^/]+/'],
2082         ['include', 'bindings/generic/'],
2083         ['include', 'bindings/v8/'],
2084
2085         # Exclude most of bridge, except for the V8-related parts.
2086         ['exclude', 'bridge/'],
2087         ['include', 'bridge/jni/'],
2088         ['exclude', 'bridge/jni/[^/]+_jsobject\\.mm$'],
2089         ['exclude', 'bridge/jni/[^/]+_objc\\.mm$'],
2090         ['exclude', 'bridge/jni/jsc/'],
2091
2092         # FIXME: Figure out how to store these patterns in a variable.
2093         ['exclude', '(atk|cairo|ca|cf|cg|curl|efl|freetype|gstreamer|gtk|linux|mac|opengl|openvg|opentype|pango|posix|qt|soup|svg|texmap|iphone|win|wince|wx)/'],
2094         ['exclude', '(?<!Chromium)(Cairo|CF|CG|Curl|Gtk|JSC|Linux|Mac|OpenType|POSIX|Posix|Qt|Safari|Soup|Win|WinCE|Wx)\\.(cpp|mm?)$'],
2095
2096         ['exclude', 'AllInOne\\.cpp$'],
2097
2098         ['exclude', 'Modules/filesystem/LocalFileSystem\\.cpp$'],
2099         ['exclude', 'Modules/indexeddb/IDBFactoryBackendInterface\\.cpp$'],
2100         ['exclude', 'Modules/webdatabase/DatabaseManagerClient\\.h$'],
2101         ['exclude', 'Modules/webdatabase/DatabaseTracker\\.cpp$'],
2102         ['exclude', 'Modules/webdatabase/OriginQuotaManager\\.(cpp|h)$'],
2103         ['exclude', 'Modules/webdatabase/OriginUsageRecord\\.(cpp|h)$'],
2104         ['exclude', 'Modules/webdatabase/SQLTransactionClient\\.cpp$'],
2105         ['exclude', 'inspector/InspectorFrontendClientLocal\\.cpp$'],
2106         ['exclude', 'inspector/JavaScript[^/]*\\.cpp$'],
2107         ['exclude', 'loader/UserStyleSheetLoader\\.cpp$'],
2108         ['exclude', 'loader/appcache/'],
2109         ['exclude', 'loader/archive/cf/LegacyWebArchiveMac\\.mm$'],
2110         ['exclude', 'loader/archive/cf/LegacyWebArchive\\.cpp$'],
2111         ['exclude', 'loader/icon/IconDatabase\\.cpp$'],
2112         ['exclude', 'plugins/PluginDataNone\\.cpp$'],
2113         ['exclude', 'plugins/PluginDatabase\\.cpp$'],
2114         ['exclude', 'plugins/PluginMainThreadScheduler\\.cpp$'],
2115         ['exclude', 'plugins/PluginPackageNone\\.cpp$'],
2116         ['exclude', 'plugins/PluginPackage\\.cpp$'],
2117         ['exclude', 'plugins/PluginStream\\.cpp$'],
2118         ['exclude', 'plugins/PluginView\\.cpp$'],
2119         ['exclude', 'plugins/npapi\\.cpp$'],
2120         ['exclude', 'storage/StorageAreaImpl\\.(cpp|h)$'],
2121         ['exclude', 'storage/StorageAreaSync\\.(cpp|h)$'],
2122         ['exclude', 'storage/StorageEventDispatcher\\.(cpp|h)$'],
2123         ['exclude', 'storage/StorageMap\\.(cpp|h)$'],
2124         ['exclude', 'storage/StorageNamespace\\.cpp$'],
2125         ['exclude', 'storage/StorageNamespaceImpl\\.(cpp|h)$'],
2126         ['exclude', 'storage/StorageSyncManager\\.(cpp|h)$'],
2127         ['exclude', 'storage/StorageTask\\.(cpp|h)$'],
2128         ['exclude', 'storage/StorageThread\\.(cpp|h)$'],
2129         ['exclude', 'storage/StorageTracker\\.(cpp|h)$'],
2130         ['exclude', 'storage/StorageTrackerClient\\.h$'],
2131         ['exclude', 'workers/DefaultSharedWorkerRepository\\.(cpp|h)$'],
2132
2133         ['include', 'loader/appcache/ApplicationCacheHost\.h$'],
2134         ['include', 'loader/appcache/DOMApplicationCache\.(cpp|h)$'],
2135       ],
2136       'conditions': [
2137         # Shard this taret into ten parts to work around linker limitations.
2138         # on link time code generation builds.
2139         ['OS=="win" and buildtype=="Official"', {
2140           'msvs_shard': 10,
2141         }],
2142         ['os_posix == 1 and OS != "mac" and gcc_version == 42', {
2143           # Due to a bug in gcc 4.2.1 (the current version on hardy), we get
2144           # warnings about uninitialized this.
2145           'cflags': ['-Wno-uninitialized'],
2146         }],
2147         ['use_x11 == 0', {
2148           'sources/': [
2149             ['exclude', 'Linux\\.cpp$'],
2150           ],
2151         }],
2152         ['toolkit_uses_gtk == 0', {
2153           'sources/': [
2154             ['exclude', 'Gtk\\.cpp$'],
2155           ],
2156         }],
2157         ['OS=="android"', {
2158           'cflags': [
2159             # WebCore does not work with strict aliasing enabled.
2160             # https://bugs.webkit.org/show_bug.cgi?id=25864
2161             '-fno-strict-aliasing',
2162           ],
2163         }, { # OS!="android"
2164           'sources/': [['exclude', 'Android\\.cpp$']]
2165         }],
2166         ['OS!="mac"', {
2167           'sources/': [['exclude', 'Mac\\.(cpp|mm?)$']]
2168         }],
2169       ],
2170     },
2171     {
2172       'target_name': 'webcore',
2173       'type': 'none',
2174       'dependencies': [
2175         'webcore_dom',
2176         'webcore_html',
2177         'webcore_platform',
2178         'webcore_platform_geometry',
2179         'webcore_remaining',
2180         'webcore_rendering',
2181         # Exported.
2182         'webcore_bindings',
2183         '../../WTF/WTF.gyp/WTF.gyp:wtf',
2184         '<(chromium_src_dir)/build/temp_gyp/googleurl.gyp:googleurl',
2185         '<(chromium_src_dir)/skia/skia.gyp:skia',
2186         '<(chromium_src_dir)/third_party/npapi/npapi.gyp:npapi',
2187         '<(chromium_src_dir)/third_party/qcms/qcms.gyp:qcms',
2188         '<(chromium_src_dir)/v8/tools/gyp/v8.gyp:v8',
2189       ],
2190       'export_dependent_settings': [
2191         'webcore_bindings',
2192         '../../WTF/WTF.gyp/WTF.gyp:wtf',
2193         '<(chromium_src_dir)/build/temp_gyp/googleurl.gyp:googleurl',
2194         '<(chromium_src_dir)/skia/skia.gyp:skia',
2195         '<(chromium_src_dir)/third_party/npapi/npapi.gyp:npapi',
2196         '<(chromium_src_dir)/third_party/qcms/qcms.gyp:qcms',
2197         '<(chromium_src_dir)/v8/tools/gyp/v8.gyp:v8',
2198       ],
2199       'direct_dependent_settings': {
2200         'include_dirs': [
2201           '<@(webcore_include_dirs)',
2202         ],
2203       },
2204       'conditions': [
2205         ['target_arch=="arm"', {
2206           'dependencies': [
2207             'webcore_arm_neon',
2208           ],
2209         }],
2210         ['OS=="mac"', {
2211           'direct_dependent_settings': {
2212             'include_dirs': [
2213               '<(chromium_src_dir)/third_party/apple_webkit',
2214               '../../WebKit/mac/WebCoreSupport',
2215             ],
2216           },
2217         }],
2218         ['OS=="win"', {
2219           'direct_dependent_settings': {
2220             'include_dirs+++': ['../dom'],
2221           },
2222         }],
2223         ['OS=="linux" and "WTF_USE_WEBAUDIO_IPP=1" in feature_defines', {
2224           'link_settings': {
2225             'ldflags': [
2226               '<!@(pkg-config --libs-only-L ipp)',
2227             ],
2228             'libraries': [
2229               '-lipps -lippcore',
2230             ],
2231           },
2232         }],
2233         # Use IPP static libraries for x86 Android.
2234         ['OS=="android" and "WTF_USE_WEBAUDIO_IPP=1" in feature_defines', {
2235           'link_settings': {
2236             'libraries': [
2237                '<!@(pkg-config --libs ipp|sed s/-L//)/libipps_l.a',
2238                '<!@(pkg-config --libs ipp|sed s/-L//)/libippcore_l.a',
2239             ]
2240           },
2241         }],
2242         ['enable_svg!=0', {
2243           'dependencies': [
2244             'webcore_svg',
2245           ],
2246         }],
2247       ],
2248     },
2249     {
2250       'target_name': 'webcore_test_support',
2251       'type': 'static_library',
2252       'dependencies': [
2253         'webcore',
2254       ],
2255       'include_dirs': [
2256         '<(INTERMEDIATE_DIR)',
2257         '<(SHARED_INTERMEDIATE_DIR)/webcore',
2258         '<(SHARED_INTERMEDIATE_DIR)/webkit',
2259         '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings',
2260         '<@(webcore_include_dirs)',
2261         '../testing',
2262         '../testing/v8',
2263         '../../Platform/chromium',
2264       ],
2265       'sources': [
2266         '<@(webcore_test_support_files)',
2267         '<(SHARED_INTERMEDIATE_DIR)/webcore/bindings/V8MallocStatistics.cpp',
2268         '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8MallocStatistics.h',
2269         '<(SHARED_INTERMEDIATE_DIR)/webcore/bindings/V8TypeConversions.cpp',
2270         '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8TypeConversions.h',
2271         '<(SHARED_INTERMEDIATE_DIR)/webcore/bindings/V8Internals.cpp',
2272         '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8Internals.h',
2273         '<(SHARED_INTERMEDIATE_DIR)/webcore/bindings/V8InternalSettings.cpp',
2274         '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8InternalSettings.h',
2275         '<(SHARED_INTERMEDIATE_DIR)/webcore/bindings/V8InternalSettingsGenerated.cpp',
2276         '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8InternalSettingsGenerated.h',
2277       ],
2278       'sources/': [
2279         ['exclude', 'testing/js'],
2280       ],
2281     },
2282   ],  # targets
2283 }