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