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