Calendar Picker: Add capability to add platform-specific style sheet
[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': 'CalendarPickerMac',
867           'inputs': [
868             '../Resources/calendarPickerMac.css',
869           ],
870           'outputs': [
871             '<(SHARED_INTERMEDIATE_DIR)/webkit/CalendarPickerMac.h',
872             '<(SHARED_INTERMEDIATE_DIR)/webkit/CalendarPickerMac.cpp',
873           ],
874           'action': [
875             'python',
876             '../make-file-arrays.py',
877             '--condition=ENABLE(CALENDAR_PICKER)',
878             '--out-h=<(SHARED_INTERMEDIATE_DIR)/webkit/CalendarPickerMac.h',
879             '--out-cpp=<(SHARED_INTERMEDIATE_DIR)/webkit/CalendarPickerMac.cpp',
880             '<@(_inputs)',
881           ],
882         },
883         {
884           'action_name': 'XLinkNames',
885           'inputs': [
886             '../dom/make_names.pl',
887             '../svg/xlinkattrs.in',
888           ],
889           'outputs': [
890             '<(SHARED_INTERMEDIATE_DIR)/webkit/XLinkNames.cpp',
891             '<(SHARED_INTERMEDIATE_DIR)/webkit/XLinkNames.h',
892           ],
893           'action': [
894             'python',
895             'scripts/action_makenames.py',
896             '<@(_outputs)',
897             '--',
898             '<@(_inputs)',
899             '--',
900             '--extraDefines', '<(feature_defines)'
901           ],
902         },
903         {
904           'action_name': 'XMLNSNames',
905           'inputs': [
906             '../dom/make_names.pl',
907             '../xml/xmlnsattrs.in',
908           ],
909           'outputs': [
910             '<(SHARED_INTERMEDIATE_DIR)/webkit/XMLNSNames.cpp',
911             '<(SHARED_INTERMEDIATE_DIR)/webkit/XMLNSNames.h',
912           ],
913           'action': [
914             'python',
915             'scripts/action_makenames.py',
916             '<@(_outputs)',
917             '--',
918             '<@(_inputs)',
919             '--',
920             '--extraDefines', '<(feature_defines)'
921           ],
922         },
923         {
924           'action_name': 'XMLNames',
925           'inputs': [
926             '../dom/make_names.pl',
927             '../xml/xmlattrs.in',
928           ],
929           'outputs': [
930             '<(SHARED_INTERMEDIATE_DIR)/webkit/XMLNames.cpp',
931             '<(SHARED_INTERMEDIATE_DIR)/webkit/XMLNames.h',
932           ],
933           'action': [
934             'python',
935             'scripts/action_makenames.py',
936             '<@(_outputs)',
937             '--',
938             '<@(_inputs)',
939             '--',
940             '--extraDefines', '<(feature_defines)'
941           ],
942         },
943         {
944           'action_name': 'derived_sources_all_in_one',
945           'inputs': [
946             'scripts/action_derivedsourcesallinone.py',
947             '<(SHARED_INTERMEDIATE_DIR)/supplemental_dependency.tmp',
948           ],
949           'outputs': [
950             '<@(derived_sources_aggregate_files)',
951           ],
952           'action': [
953             'python',
954             'scripts/action_derivedsourcesallinone.py',
955             '<(SHARED_INTERMEDIATE_DIR)/supplemental_dependency.tmp',
956             '--',
957             '<@(derived_sources_aggregate_files)',
958           ],
959         },
960       ],
961       'rules': [
962         # Rules to build derived sources.
963         {
964           'rule_name': 'bison',
965           'extension': 'y',
966           'outputs': [
967             '<(SHARED_INTERMEDIATE_DIR)/webkit/<(RULE_INPUT_ROOT).cpp',
968             '<(SHARED_INTERMEDIATE_DIR)/webkit/<(RULE_INPUT_ROOT).h'
969           ],
970           'action': [
971             'python',
972             'scripts/rule_bison.py',
973             '<(RULE_INPUT_PATH)',
974             '<(SHARED_INTERMEDIATE_DIR)/webkit'
975           ],
976         },
977         {
978           'rule_name': 'gperf',
979           'extension': 'gperf',
980           #
981           # gperf outputs are generated by WebCore/make-hash-tools.pl
982           #
983           'outputs': [
984             '<(SHARED_INTERMEDIATE_DIR)/webkit/<(RULE_INPUT_ROOT).cpp',
985           ],
986           'inputs': [
987             '../make-hash-tools.pl',
988           ],
989           'action': [
990             'perl',
991             '../make-hash-tools.pl',
992             '<(SHARED_INTERMEDIATE_DIR)/webkit',
993             '<(RULE_INPUT_PATH)',
994           ],
995         },
996         # Rule to build generated JavaScript (V8) bindings from .idl source.
997         {
998           'rule_name': 'binding',
999           'extension': 'idl',
1000           'msvs_external_rule': 1,
1001           'inputs': [
1002             '../bindings/scripts/generate-bindings.pl',
1003             '../bindings/scripts/CodeGenerator.pm',
1004             '../bindings/scripts/CodeGeneratorV8.pm',
1005             '../bindings/scripts/IDLParser.pm',
1006             '../bindings/scripts/IDLStructure.pm',
1007             '../bindings/scripts/preprocessor.pm',
1008             '<(SHARED_INTERMEDIATE_DIR)/supplemental_dependency.tmp',
1009             '<(additional_idl_files_list)',
1010             '<!@(cat <(additional_idl_files_list))',
1011           ],
1012           'outputs': [
1013             # FIXME:  The .cpp file should be in webkit/bindings once
1014             # we coax GYP into supporting it (see 'action' below).
1015             '<(SHARED_INTERMEDIATE_DIR)/webcore/bindings/V8<(RULE_INPUT_ROOT).cpp',
1016             '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8<(RULE_INPUT_ROOT).h',
1017           ],
1018           'variables': {
1019             'generator_include_dirs': [
1020               '--include', '../Modules/filesystem',
1021               '--include', '../Modules/indexeddb',
1022               '--include', '../Modules/mediastream',
1023               '--include', '../Modules/webaudio',
1024               '--include', '../Modules/webdatabase',
1025               '--include', '../css',
1026               '--include', '../dom',
1027               '--include', '../fileapi',
1028               '--include', '../html',
1029               '--include', '../notifications',
1030               '--include', '../page',
1031               '--include', '../plugins',
1032               '--include', '../storage',
1033               '--include', '../svg',
1034               '--include', '../testing',
1035               '--include', '../workers',
1036               '--include', '../xml',
1037             ],
1038           },
1039           # FIXME:  Note that we put the .cpp files in webcore/bindings
1040           # but the .h files in webkit/bindings.  This is to work around
1041           # the unfortunate fact that GYP strips duplicate arguments
1042           # from lists.  When we have a better GYP way to suppress that
1043           # behavior, change the output location.
1044           'action': [
1045             'perl',
1046             '-w',
1047             '-I../bindings/scripts',
1048             '../bindings/scripts/generate-bindings.pl',
1049             '--outputHeadersDir',
1050             '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings',
1051             '--outputDir',
1052             '<(SHARED_INTERMEDIATE_DIR)/webcore/bindings',
1053             '--defines',
1054             '<(feature_defines) LANGUAGE_JAVASCRIPT V8_BINDING',
1055             '--generator',
1056             'V8',
1057             '<@(generator_include_dirs)',
1058             '--supplementalDependencyFile',
1059             '<(SHARED_INTERMEDIATE_DIR)/supplemental_dependency.tmp',
1060             '--additionalIdlFilesList',
1061             '<(additional_idl_files_list)',
1062             '<(RULE_INPUT_PATH)',
1063           ],
1064           'message': 'Generating binding from <(RULE_INPUT_PATH)',
1065         },
1066       ],
1067     },
1068     {
1069       'target_name': 'webcore_bindings',
1070       'type': 'static_library',
1071       'hard_dependency': 1,
1072       'dependencies': [
1073         'webcore_bindings_sources',
1074         'inspector_protocol_sources',
1075         'injected_script_source',
1076         'debugger_script_source',
1077         '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:yarr',
1078         '../../WTF/WTF.gyp/WTF.gyp:wtf',
1079         '<(chromium_src_dir)/build/temp_gyp/googleurl.gyp:googleurl',
1080         '<(chromium_src_dir)/skia/skia.gyp:skia',
1081         '<(chromium_src_dir)/third_party/iccjpeg/iccjpeg.gyp:iccjpeg',
1082         '<(chromium_src_dir)/third_party/libpng/libpng.gyp:libpng',
1083         '<(chromium_src_dir)/third_party/libxml/libxml.gyp:libxml',
1084         '<(chromium_src_dir)/third_party/libxslt/libxslt.gyp:libxslt',
1085         '<(chromium_src_dir)/third_party/libwebp/libwebp.gyp:libwebp',
1086         '<(chromium_src_dir)/third_party/npapi/npapi.gyp:npapi',
1087         '<(chromium_src_dir)/third_party/sqlite/sqlite.gyp:sqlite',
1088         '<(chromium_src_dir)/v8/tools/gyp/v8.gyp:v8',
1089         '<(libjpeg_gyp_path):libjpeg',
1090       ],
1091       'include_dirs': [
1092         '<(INTERMEDIATE_DIR)',
1093         # FIXME:  Remove <(SHARED_INTERMEDIATE_DIR)/webcore when we
1094         # can entice gyp into letting us put both the .cpp and .h
1095         # files in the same output directory.
1096         '<(SHARED_INTERMEDIATE_DIR)/webcore',
1097         '<(SHARED_INTERMEDIATE_DIR)/webkit',
1098         '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings',
1099         '<@(webcore_include_dirs)',
1100       ],
1101       'direct_dependent_settings': {
1102         'include_dirs': [
1103           '<(SHARED_INTERMEDIATE_DIR)/webkit',
1104           '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings',
1105         ],
1106       },
1107       'sources': [
1108         # These files include all the .cpp files generated from the .idl files
1109         # in webcore_files.
1110         '<@(derived_sources_aggregate_files)',
1111
1112         # Additional .cpp files for HashTools.h
1113         '<(SHARED_INTERMEDIATE_DIR)/webkit/ColorData.cpp',
1114         '<(SHARED_INTERMEDIATE_DIR)/webkit/CSSPropertyNames.cpp',
1115         '<(SHARED_INTERMEDIATE_DIR)/webkit/CSSValueKeywords.cpp',
1116
1117         # Additional .cpp files from webcore_bindings_sources actions.
1118         '<(SHARED_INTERMEDIATE_DIR)/webkit/HTMLElementFactory.cpp',
1119         '<(SHARED_INTERMEDIATE_DIR)/webkit/HTMLNames.cpp',
1120         '<(SHARED_INTERMEDIATE_DIR)/webkit/CalendarPicker.cpp',
1121         '<(SHARED_INTERMEDIATE_DIR)/webkit/EventFactory.cpp',
1122         '<(SHARED_INTERMEDIATE_DIR)/webkit/EventHeaders.h',
1123         '<(SHARED_INTERMEDIATE_DIR)/webkit/EventInterfaces.h',
1124         '<(SHARED_INTERMEDIATE_DIR)/webkit/EventTargetHeaders.h',
1125         '<(SHARED_INTERMEDIATE_DIR)/webkit/EventTargetInterfaces.h',
1126         '<(SHARED_INTERMEDIATE_DIR)/webkit/ExceptionCodeDescription.cpp',
1127         '<(SHARED_INTERMEDIATE_DIR)/webkit/UserAgentStyleSheetsData.cpp',
1128         '<(SHARED_INTERMEDIATE_DIR)/webkit/V8HTMLElementWrapperFactory.cpp',
1129         '<(SHARED_INTERMEDIATE_DIR)/webkit/XLinkNames.cpp',
1130         '<(SHARED_INTERMEDIATE_DIR)/webkit/XMLNSNames.cpp',
1131         '<(SHARED_INTERMEDIATE_DIR)/webkit/XMLNames.cpp',
1132         '<(SHARED_INTERMEDIATE_DIR)/webkit/SVGNames.cpp',
1133         '<(SHARED_INTERMEDIATE_DIR)/webkit/MathMLElementFactory.cpp',
1134         '<(SHARED_INTERMEDIATE_DIR)/webkit/MathMLNames.cpp',
1135         '<(SHARED_INTERMEDIATE_DIR)/webkit/WebKitFontFamilyNames.cpp',
1136
1137         # Generated from HTMLEntityNames.in
1138         '<(SHARED_INTERMEDIATE_DIR)/webkit/HTMLEntityTable.cpp',
1139
1140         # Additional .cpp files from the webcore_bindings_sources rules.
1141         '<(SHARED_INTERMEDIATE_DIR)/webkit/CSSGrammar.cpp',
1142         '<(SHARED_INTERMEDIATE_DIR)/webkit/XPathGrammar.cpp',
1143
1144         # Additional .cpp files from the webcore_inspector_sources list.
1145         '<(SHARED_INTERMEDIATE_DIR)/webcore/InspectorFrontend.cpp',
1146         '<(SHARED_INTERMEDIATE_DIR)/webcore/InspectorBackendDispatcher.cpp',
1147         '<(SHARED_INTERMEDIATE_DIR)/webcore/InspectorTypeBuilder.cpp',
1148       ],
1149       'conditions': [
1150         ['inside_chromium_build==1 and OS=="win" and component=="shared_library"', {
1151           'defines': [
1152             'USING_V8_SHARED',
1153           ],
1154         }],
1155         # TODO(maruel): Move it in its own project or generate it anyway?
1156         ['enable_svg!=0', {
1157           'sources': [
1158             '<(SHARED_INTERMEDIATE_DIR)/webkit/SVGElementFactory.cpp',
1159             '<(SHARED_INTERMEDIATE_DIR)/webkit/V8SVGElementWrapperFactory.cpp',
1160          ],
1161         }],
1162         ['OS=="mac"', {
1163           'include_dirs': [
1164             '<(chromium_src_dir)/third_party/apple_webkit',
1165           ],
1166           'sources': [
1167             '<(SHARED_INTERMEDIATE_DIR)/webkit/CalendarPickerMac.cpp',
1168           ],
1169         }],
1170         ['OS=="win"', {
1171           'defines': [
1172             'WEBCORE_NAVIGATOR_PLATFORM="Win32"',
1173             '__PRETTY_FUNCTION__=__FUNCTION__',
1174           ],
1175           # This is needed because Event.h in this directory is blocked
1176           # by a system header on windows.
1177           'include_dirs++': ['../dom'],
1178           'direct_dependent_settings': {
1179             'include_dirs+++': ['../dom'],
1180           },
1181         }],
1182         ['OS=="linux" and "WTF_USE_WEBAUDIO_IPP=1" in feature_defines', {
1183           'cflags': [
1184             '<!@(pkg-config --cflags-only-I ipp)',
1185           ],
1186         }],
1187       ],
1188     },
1189     {
1190       # We'll soon split libwebcore in multiple smaller libraries.
1191       # webcore_prerequisites will be the 'base' target of every sub-target.
1192       'target_name': 'webcore_prerequisites',
1193       'type': 'none',
1194       'dependencies': [
1195         'debugger_script_source',
1196         'injected_script_source',
1197         'inspector_protocol_sources',
1198         'webcore_bindings_sources',
1199         '../../ThirdParty/glu/glu.gyp:libtess',
1200         '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:yarr',
1201         '../../WTF/WTF.gyp/WTF.gyp:wtf',
1202         '<(chromium_src_dir)/build/temp_gyp/googleurl.gyp:googleurl',
1203         '<(chromium_src_dir)/skia/skia.gyp:skia',
1204         '<(chromium_src_dir)/third_party/iccjpeg/iccjpeg.gyp:iccjpeg',
1205         '<(chromium_src_dir)/third_party/libwebp/libwebp.gyp:libwebp',
1206         '<(chromium_src_dir)/third_party/libpng/libpng.gyp:libpng',
1207         '<(chromium_src_dir)/third_party/libxml/libxml.gyp:libxml',
1208         '<(chromium_src_dir)/third_party/libxslt/libxslt.gyp:libxslt',
1209         '<(chromium_src_dir)/third_party/npapi/npapi.gyp:npapi',
1210         '<(chromium_src_dir)/third_party/ots/ots.gyp:ots',
1211         '<(chromium_src_dir)/third_party/sqlite/sqlite.gyp:sqlite',
1212         '<(chromium_src_dir)/third_party/angle/src/build_angle.gyp:translator_glsl',
1213         '<(chromium_src_dir)/third_party/zlib/zlib.gyp:zlib',
1214         '<(chromium_src_dir)/v8/tools/gyp/v8.gyp:v8',
1215         '<(libjpeg_gyp_path):libjpeg',
1216       ],
1217       'export_dependent_settings': [
1218         '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:yarr',
1219         '../../WTF/WTF.gyp/WTF.gyp:wtf',
1220         '<(chromium_src_dir)/build/temp_gyp/googleurl.gyp:googleurl',
1221         '<(chromium_src_dir)/skia/skia.gyp:skia',
1222         '<(chromium_src_dir)/third_party/iccjpeg/iccjpeg.gyp:iccjpeg',
1223         '<(chromium_src_dir)/third_party/libwebp/libwebp.gyp:libwebp',
1224         '<(chromium_src_dir)/third_party/libpng/libpng.gyp:libpng',
1225         '<(chromium_src_dir)/third_party/libxml/libxml.gyp:libxml',
1226         '<(chromium_src_dir)/third_party/libxslt/libxslt.gyp:libxslt',
1227         '<(chromium_src_dir)/third_party/npapi/npapi.gyp:npapi',
1228         '<(chromium_src_dir)/third_party/ots/ots.gyp:ots',
1229         '<(chromium_src_dir)/third_party/sqlite/sqlite.gyp:sqlite',
1230         '<(chromium_src_dir)/third_party/angle/src/build_angle.gyp:translator_glsl',
1231         '<(chromium_src_dir)/third_party/zlib/zlib.gyp:zlib',
1232         '<(chromium_src_dir)/v8/tools/gyp/v8.gyp:v8',
1233         '<(libjpeg_gyp_path):libjpeg',
1234       ],
1235       # This is needed for mac because of webkit_system_interface. It'd be nice
1236       # if this hard dependency could be split off the rest.
1237       'hard_dependency': 1,
1238       'direct_dependent_settings': {
1239         'defines': [
1240           'WEBCORE_NAVIGATOR_VENDOR="Google Inc."',
1241         ],
1242         'include_dirs': [
1243           '<(INTERMEDIATE_DIR)',
1244           '<@(webcore_include_dirs)',
1245           '<(chromium_src_dir)/gpu',
1246           '<(chromium_src_dir)/third_party/angle/include/GLSLANG',
1247           '<(SHARED_INTERMEDIATE_DIR)/webkit',
1248           '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings',
1249         ],
1250         'mac_framework_dirs': [
1251           '$(SDKROOT)/System/Library/Frameworks/ApplicationServices.framework/Frameworks',
1252         ],
1253         'msvs_disabled_warnings': [
1254           4138, 4244, 4291, 4305, 4344, 4355, 4521, 4099,
1255         ],
1256         'scons_line_length' : 1,
1257         'xcode_settings': {
1258           # Some Mac-specific parts of WebKit won't compile without having this
1259           # prefix header injected.
1260           # FIXME: make this a first-class setting.
1261           'GCC_PREFIX_HEADER': '../WebCorePrefix.h',
1262         },
1263       },
1264       'conditions': [
1265         ['inside_chromium_build==1 and OS=="win" and component=="shared_library"', {
1266           'direct_dependent_settings': {
1267             'defines': [
1268                'USING_V8_SHARED',
1269             ],
1270           },
1271         }],
1272         ['use_accelerated_compositing==1', {
1273           'dependencies': [
1274             '<(chromium_src_dir)/gpu/gpu.gyp:gles2_c_lib',
1275           ],
1276           'export_dependent_settings': [
1277             '<(chromium_src_dir)/gpu/gpu.gyp:gles2_c_lib',
1278           ],
1279         }],
1280         ['use_x11 == 1', {
1281           'dependencies': [
1282             '<(chromium_src_dir)/build/linux/system.gyp:fontconfig',
1283           ],
1284           'export_dependent_settings': [
1285             '<(chromium_src_dir)/build/linux/system.gyp:fontconfig',
1286           ],
1287           'direct_dependent_settings': {
1288             'cflags': [
1289               # WebCore does not work with strict aliasing enabled.
1290               # https://bugs.webkit.org/show_bug.cgi?id=25864
1291               '-fno-strict-aliasing',
1292             ],
1293           },
1294         }],
1295         ['toolkit_uses_gtk == 1', {
1296           'dependencies': [
1297             '<(chromium_src_dir)/build/linux/system.gyp:gtk',
1298           ],
1299           'export_dependent_settings': [
1300             '<(chromium_src_dir)/build/linux/system.gyp:gtk',
1301           ],
1302         }],
1303         ['OS=="linux"', {
1304           'direct_dependent_settings': {
1305             'defines': [
1306               # Mozilla on Linux effectively uses uname -sm, but when running
1307               # 32-bit x86 code on an x86_64 processor, it uses
1308               # "Linux i686 (x86_64)".  Matching that would require making a
1309               # run-time determination.
1310               'WEBCORE_NAVIGATOR_PLATFORM="Linux i686"',
1311             ],
1312           },
1313         }],
1314         ['OS=="mac"', {
1315           'dependencies': [
1316             'webkit_system_interface',
1317           ],
1318           'export_dependent_settings': [
1319             'webkit_system_interface',
1320           ],
1321           'direct_dependent_settings': {
1322             'defines': [
1323               # Match Safari and Mozilla on Mac x86.
1324               'WEBCORE_NAVIGATOR_PLATFORM="MacIntel"',
1325
1326               # Chromium's version of WebCore includes the following Objective-C
1327               # classes. The system-provided WebCore framework may also provide
1328               # these classes. Because of the nature of Objective-C binding
1329               # (dynamically at runtime), it's possible for the
1330               # Chromium-provided versions to interfere with the system-provided
1331               # versions.  This may happen when a system framework attempts to
1332               # use WebCore.framework, such as when converting an HTML-flavored
1333               # string to an NSAttributedString.  The solution is to force
1334               # Objective-C class names that would conflict to use alternate
1335               # names.
1336               #
1337               # This list will hopefully shrink but may also grow.  Its
1338               # performance is monitored by the "Check Objective-C Rename"
1339               # postbuild step, and any suspicious-looking symbols not handled
1340               # here or whitelisted in that step will cause a build failure.
1341               #
1342               # If this is unhandled, the console will receive log messages
1343               # such as:
1344               # 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.
1345               'WebCascadeList=ChromiumWebCoreObjCWebCascadeList',
1346               'WebScrollbarPrefsObserver=ChromiumWebCoreObjCWebScrollbarPrefsObserver',
1347               'WebCoreRenderThemeNotificationObserver=ChromiumWebCoreObjCWebCoreRenderThemeNotificationObserver',
1348               'WebFontCache=ChromiumWebCoreObjCWebFontCache',
1349               'WebScrollAnimationHelperDelegate=ChromiumWebCoreObjCWebScrollAnimationHelperDelegate',
1350               'WebScrollbarPainterControllerDelegate=ChromiumWebCoreObjCWebScrollbarPainterControllerDelegate',
1351               'WebScrollbarPainterDelegate=ChromiumWebCoreObjCWebScrollbarPainterDelegate',
1352               'WebScrollbarPartAnimation=ChromiumWebCoreObjCWebScrollbarPartAnimation',
1353             ],
1354             'include_dirs': [
1355               '<(chromium_src_dir)/third_party/apple_webkit',
1356             ],
1357             'postbuilds': [
1358               {
1359                 # This step ensures that any Objective-C names that aren't
1360                 # redefined to be "safe" above will cause a build failure.
1361                 'postbuild_name': 'Check Objective-C Rename',
1362                 'variables': {
1363                   'class_whitelist_regex':
1364                       'ChromiumWebCoreObjC|TCMVisibleView|RTCMFlippedView',
1365                   'category_whitelist_regex':
1366                       'TCMInterposing|ScrollAnimatorChromiumMacExt',
1367                 },
1368                 'action': [
1369                   'mac/check_objc_rename.sh',
1370                   '<(class_whitelist_regex)',
1371                   '<(category_whitelist_regex)',
1372                 ],
1373               },
1374             ],
1375           },
1376         }],
1377         ['OS=="win"', {
1378           'direct_dependent_settings': {
1379             'defines': [
1380               # Match Safari and Mozilla on Windows.
1381               'WEBCORE_NAVIGATOR_PLATFORM="Win32"',
1382               '__PRETTY_FUNCTION__=__FUNCTION__',
1383             ],
1384             # This is needed because Event.h in this directory is blocked
1385             # by a system header on windows.
1386             'include_dirs++': ['../dom'],
1387           },
1388         }],
1389         ['OS=="linux" and "WTF_USE_WEBAUDIO_IPP=1" in feature_defines', {
1390           'direct_dependent_settings': {
1391             'cflags': [
1392               '<!@(pkg-config --cflags-only-I ipp)',
1393             ],
1394           },
1395         }],
1396         ['OS != "android" and "WTF_USE_WEBAUDIO_FFMPEG=1" in feature_defines', {
1397           # This directory needs to be on the include path for multiple sub-targets of webcore.
1398           'direct_dependent_settings': {
1399             'include_dirs': [
1400               '<(chromium_src_dir)/third_party/ffmpeg',
1401             ],
1402           },
1403           'dependencies': [
1404             '<(chromium_src_dir)/third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
1405           ],
1406         }],
1407         # Windows shared builder needs extra help for linkage
1408         ['OS=="win" and "WTF_USE_WEBAUDIO_FFMPEG=1" in feature_defines', {
1409           'export_dependent_settings': [
1410             '<(chromium_src_dir)/third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
1411           ],
1412         }],
1413         ['"WTF_USE_LEVELDB=1" in feature_defines', {
1414           'dependencies': [
1415             '<(chromium_src_dir)/third_party/leveldatabase/leveldatabase.gyp:leveldatabase',
1416           ],
1417           'export_dependent_settings': [
1418             '<(chromium_src_dir)/third_party/leveldatabase/leveldatabase.gyp:leveldatabase',
1419           ],
1420         }],
1421       ],
1422     },
1423     {
1424       'target_name': 'webcore_dom',
1425       'type': 'static_library',
1426       'dependencies': [
1427         'webcore_prerequisites',
1428       ],
1429       'sources': [
1430         '<@(webcore_dom_privateheader_files)',
1431         '<@(webcore_dom_files)',
1432       ],
1433       'sources!': [
1434         '../dom/default/PlatformMessagePortChannel.cpp',
1435         '../dom/default/PlatformMessagePortChannel.h',
1436       ],
1437       'sources/': [
1438         # FIXME: Figure out how to store these patterns in a variable.
1439         ['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)/'],
1440         ['exclude', '(?<!Chromium)(Cairo|CF|CG|Curl|Gtk|JSC|Linux|Mac|OpenType|POSIX|Posix|Qt|Safari|Soup|Symbian|Win|WinCE|Wx)\\.(cpp|mm?)$'],
1441
1442         ['exclude', 'AllInOne\\.cpp$'],
1443       ],
1444     },
1445     {
1446       'target_name': 'webcore_html',
1447       'type': 'static_library',
1448       'dependencies': [
1449         'webcore_prerequisites',
1450       ],
1451       'sources': [
1452         '<@(webcore_html_privateheader_files)',
1453         '<@(webcore_html_files)',
1454       ],
1455       'sources/': [
1456         ['exclude', 'AllInOne\\.cpp$'],
1457       ],
1458     },
1459     {
1460       'target_name': 'webcore_svg',
1461       'type': 'static_library',
1462       'dependencies': [
1463         'webcore_prerequisites',
1464       ],
1465       'sources': [
1466         '<@(webcore_svg_privateheader_files)',
1467         '<@(webcore_svg_files)',
1468       ],
1469       'sources/': [
1470         ['exclude', 'AllInOne\\.cpp$'],
1471       ],
1472     },
1473     {
1474       'target_name': 'webcore_platform',
1475       'type': 'static_library',
1476       'dependencies': [
1477         'webcore_prerequisites',
1478         '../../Platform/Platform.gyp/Platform.gyp:webkit_platform',
1479       ],
1480       'defines': [ 
1481         'WEBKIT_IMPLEMENTATION=1', 
1482       ], 
1483       # This is needed for mac because of webkit_system_interface. It'd be nice
1484       # if this hard dependency could be split off the rest.
1485       'hard_dependency': 1,
1486       'sources': [
1487         '<@(webcore_privateheader_files)',
1488         '<@(webcore_files)',
1489
1490         # For WebCoreSystemInterface, Mac-only.
1491         '../../WebKit/mac/WebCoreSupport/WebSystemInterface.mm',
1492       ],
1493       'sources/': [
1494         ['exclude', '.*'],
1495         ['include', 'platform/'],
1496
1497         # FIXME: Figure out how to store these patterns in a variable.
1498         ['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)/'],
1499         ['exclude', '(?<!Chromium)(Cairo|CF|CG|Curl|Gtk|JSC|Linux|Mac|OpenType|POSIX|Posix|Qt|Safari|Soup|Symbian|Win|WinCE|Wx)\\.(cpp|mm?)$'],
1500
1501         ['exclude', 'platform/LinkHash\\.cpp$'],
1502         ['exclude', 'platform/MIMETypeRegistry\\.cpp$'],
1503         ['exclude', 'platform/Theme\\.cpp$'],
1504         ['exclude', 'platform/graphics/ANGLEWebKitBridge\\.(cpp|h)$'],
1505         # *NEON.cpp files need special compile options.
1506         # They are moved to the webcore_arm_neon target.
1507         ['exclude', 'platform/graphics/filters/arm/.*NEON\\.(cpp|h)'],
1508         ['exclude', 'platform/image-encoders/JPEGImageEncoder\\.(cpp|h)$'],
1509         ['exclude', 'platform/image-encoders/PNGImageEncoder\\.(cpp|h)$'],
1510         ['exclude', 'platform/network/ResourceHandle\\.cpp$'],
1511         ['exclude', 'platform/sql/SQLiteFileSystem\\.cpp$'],
1512         ['exclude', 'platform/text/LocaleToScriptMappingICU\\.cpp$'],
1513         ['exclude', 'platform/text/LocalizedDateNone\\.cpp$'],
1514         ['exclude', 'platform/text/LocalizedNumberNone\\.cpp$'],
1515         ['exclude', 'platform/text/TextEncodingDetectorNone\\.cpp$'],
1516       ],
1517       'conditions': [
1518         ['inside_chromium_build==1', {
1519             'conditions': [
1520                 ['component=="shared_library"', {
1521                     'defines': [
1522                         'WEBKIT_DLL',
1523                     ],
1524                 }],
1525             ],
1526         }],
1527         ['use_x11 == 1', {
1528           'sources/': [
1529             # Cherry-pick files excluded by the broader regular expressions above.
1530             ['include', 'platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz\\.cpp$'],
1531             ['include', 'platform/graphics/harfbuzz/FontHarfBuzz\\.cpp$'],
1532             ['include', 'platform/graphics/harfbuzz/FontPlatformDataHarfBuzz\\.cpp$'],
1533             ['include', 'platform/graphics/harfbuzz/HarfBuzzSkia\\.cpp$'],
1534             ['include', 'platform/graphics/harfbuzz/HarfBuzzShaperBase\\.(cpp|h)$'],
1535             ['include', 'platform/graphics/skia/SimpleFontDataSkia\\.cpp$'],
1536           ],
1537         }, { # use_x11==0
1538           'sources/': [
1539             ['exclude', 'Linux\\.cpp$'],
1540             ['exclude', 'Harfbuzz[^/]+\\.(cpp|h)$'],
1541           ],
1542         }],
1543         ['toolkit_uses_gtk == 1', {
1544           'sources/': [
1545             # Cherry-pick files excluded by the broader regular expressions above.
1546             ['include', 'platform/chromium/KeyCodeConversionGtk\\.cpp$'],
1547           ],
1548         }, { # toolkit_uses_gtk==0
1549           'sources/': [
1550             ['exclude', 'Gtk\\.cpp$'],
1551           ],
1552         }],
1553         ['use_x11==1 or OS=="android"', {
1554           'dependencies': [
1555             '<(chromium_src_dir)/third_party/harfbuzz/harfbuzz.gyp:harfbuzz',
1556           ],
1557         }],
1558         ['OS=="mac"', {
1559           # Necessary for Mac .mm stuff.
1560           'include_dirs': [
1561             '<(chromium_src_dir)/third_party/apple_webkit',
1562           ],
1563           'dependencies': [
1564             'webkit_system_interface',
1565           ],
1566           'actions': [
1567             {
1568               # Allow framework-style #include of
1569               # <WebCore/WebCoreSystemInterface.h>.
1570               'action_name': 'WebCoreSystemInterface.h',
1571               'inputs': [
1572                 '../platform/mac/WebCoreSystemInterface.h',
1573               ],
1574               'outputs': [
1575                 '<(INTERMEDIATE_DIR)/WebCore/WebCoreSystemInterface.h',
1576               ],
1577               'action': ['cp', '<@(_inputs)', '<@(_outputs)'],
1578             },
1579           ],
1580           'sources/': [
1581             # Additional files from the WebCore Mac build that are presently
1582             # used in the WebCore Chromium Mac build too.
1583
1584             # The Mac build is USE(CF) but does not use CFNetwork.
1585             ['include', 'CF\\.cpp$'],
1586             ['exclude', 'network/cf/'],
1587
1588             # Use native Mac font code from WebCore.
1589             ['include', 'platform/(graphics/)?mac/[^/]*Font[^/]*\\.(cpp|mm?)$'],
1590             ['include', 'platform/graphics/mac/ComplexText[^/]*\\.(cpp|h)$'],
1591
1592             # We can use this for the fast Accelerate.framework FFT.
1593             ['include', 'platform/audio/mac/FFTFrameMac\\.cpp$'],
1594
1595             # Cherry-pick some files that can't be included by broader regexps.
1596             # Some of these are used instead of Chromium platform files, see
1597             # the specific exclusions in the "exclude" list below.
1598             ['include', 'rendering/RenderThemeMac\\.mm$'],
1599             ['include', 'platform/graphics/mac/ColorMac\\.mm$'],
1600             ['include', 'platform/graphics/mac/ComplexTextControllerCoreText\\.mm$'],
1601             ['include', 'platform/graphics/mac/FloatPointMac\\.mm$'],
1602             ['include', 'platform/graphics/mac/FloatRectMac\\.mm$'],
1603             ['include', 'platform/graphics/mac/FloatSizeMac\\.mm$'],
1604             ['include', 'platform/graphics/mac/GlyphPageTreeNodeMac\\.cpp$'],
1605             ['include', 'platform/graphics/mac/IntPointMac\\.mm$'],
1606             ['include', 'platform/graphics/mac/IntRectMac\\.mm$'],
1607             ['include', 'platform/mac/BlockExceptions\\.mm$'],
1608             ['include', 'platform/mac/KillRingMac\\.mm$'],
1609             ['include', 'platform/mac/LocalCurrentGraphicsContext\\.mm$'],
1610             ['include', 'platform/mac/NSScrollerImpDetails\\.mm$'],
1611             ['include', 'platform/mac/PurgeableBufferMac\\.cpp$'],
1612             ['include', 'platform/mac/ScrollbarThemeMac\\.mm$'],
1613             ['include', 'platform/mac/ScrollAnimatorMac\\.mm$'],
1614             ['include', 'platform/mac/ScrollElasticityController\\.mm$'],
1615             ['include', 'platform/mac/WebCoreSystemInterface\\.mm$'],
1616             ['include', 'platform/mac/WebCoreTextRenderer\\.mm$'],
1617             ['include', 'platform/text/mac/ShapeArabic\\.c$'],
1618             ['include', 'platform/text/mac/String(Impl)?Mac\\.mm$'],
1619             # Use USE_NEW_THEME on Mac.
1620             ['include', 'platform/Theme\\.cpp$'],
1621
1622             ['include', 'WebKit/mac/WebCoreSupport/WebSystemInterface\\.mm$'],
1623
1624             # We use LocalizedDateMac.mm instead of LocalizedDateICU.cpp.
1625             ['exclude', 'platform/text/LocalizedDateICU\\.cpp$'],
1626             ['include', 'platform/text/mac/LocalizedDateMac\\.mm$'],
1627
1628             # The Mac uses platform/mac/KillRingMac.mm instead of the dummy
1629             # implementation.
1630             ['exclude', 'platform/KillRingNone\\.cpp$'],
1631
1632             # The Mac currently uses FontCustomPlatformData.cpp from
1633             # platform/graphics/mac, included by regex above, instead.
1634             ['exclude', 'platform/graphics/skia/FontCustomPlatformData\\.cpp$'],
1635
1636             # The Mac currently uses ScrollbarThemeChromiumMac.mm, which is not
1637             # related to ScrollbarThemeChromium.cpp.
1638             ['exclude', 'platform/chromium/ScrollbarThemeChromium\\.cpp$'],
1639
1640             # The Mac does not use ImageSourceCG.cpp from platform/graphics/cg
1641             # even though it is included by regex above.
1642             ['exclude', 'platform/graphics/cg/ImageSourceCG\\.cpp$'],
1643             ['exclude', 'platform/graphics/cg/PDFDocumentImage\\.cpp$'],
1644
1645             # Mac uses only ScrollAnimatorMac.
1646             ['exclude', 'platform/ScrollAnimatorNone\\.cpp$'],
1647             ['exclude', 'platform/ScrollAnimatorNone\\.h$'],
1648
1649             ['include', 'platform/graphics/cg/FloatPointCG\\.cpp$'],
1650             ['include', 'platform/graphics/cg/FloatRectCG\\.cpp$'],
1651             ['include', 'platform/graphics/cg/FloatSizeCG\\.cpp$'],
1652             ['include', 'platform/graphics/cg/IntPointCG\\.cpp$'],
1653             ['include', 'platform/graphics/cg/IntRectCG\\.cpp$'],
1654             ['include', 'platform/graphics/cg/IntSizeCG\\.cpp$'],
1655             ['exclude', 'platform/graphics/chromium/ImageChromiumMac\\.mm$'],
1656             ['exclude', 'platform/graphics/mac/FontMac\\.mm$'],
1657             ['exclude', 'platform/graphics/skia/FontCacheSkia\\.cpp$'],
1658             ['exclude', 'platform/graphics/skia/GlyphPageTreeNodeSkia\\.cpp$'],
1659             ['exclude', 'platform/graphics/skia/SimpleFontDataSkia\\.cpp$'],
1660             ['exclude', 'platform/chromium/DragImageChromiumMac\\.cpp$'],
1661           ],
1662         },{ # OS!="mac"
1663           'sources/': [
1664             ['exclude', 'Mac\\.(cpp|mm?)$'],
1665
1666             # Linux uses FontLinux; Windows uses FontWin. Additionally, FontSkia
1667             # is excluded by a rule above if WebKit uses CG instead of Skia.
1668             ['exclude', 'platform/graphics/skia/FontSkia\\.cpp$'],
1669
1670             # FIXME: We will eventually compile this too, but for now it's
1671             # only used on mac.
1672             ['exclude', 'platform/graphics/FontPlatformData\\.cpp$'],
1673           ],
1674         }],
1675         ['use_x11 == 0 and OS != "mac"', {
1676           'sources/': [
1677             ['exclude', 'VDMX[^/]+\\.(cpp|h)$'],
1678           ],
1679         }],
1680         ['OS=="win"', {
1681           'sources/': [
1682             ['exclude', 'Posix\\.cpp$'],
1683
1684             # The Chromium Win currently uses GlyphPageTreeNodeChromiumWin.cpp from
1685             # platform/graphics/chromium, included by regex above, instead.
1686             ['exclude', 'platform/graphics/skia/FontCacheSkia\\.cpp$'],
1687             ['exclude', 'platform/graphics/skia/GlyphPageTreeNodeSkia\\.cpp$'],
1688             ['exclude', 'platform/graphics/skia/SimpleFontDataSkia\\.cpp$'],
1689
1690             # SystemInfo.cpp is useful and we don't want to copy it.
1691             ['include', 'platform/win/SystemInfo\\.cpp$'],
1692
1693             ['exclude', 'platform/text/LocalizedDateICU\.cpp$'],
1694             ['include', 'platform/text/LocalizedDateWin\.cpp$'],
1695             ['include', 'platform/text/LocaleWin\.cpp$'],
1696             ['include', 'platform/text/LocaleWin\.h$'],
1697           ],
1698         },{ # OS!="win"
1699           'sources/': [
1700             ['exclude', 'Win\\.cpp$'],
1701             ['exclude', '/(Windows|Uniscribe)[^/]*\\.cpp$'],
1702             ['include', 'platform/graphics/opentype/OpenTypeSanitizer\\.cpp$'],
1703           ],
1704         }],
1705         ['OS=="android"', {
1706           'sources/': [
1707             ['include', 'platform/chromium/ClipboardChromiumLinux\\.cpp$'],
1708             ['include', 'platform/chromium/FileSystemChromiumLinux\\.cpp$'],
1709             ['include', 'platform/graphics/chromium/GlyphPageTreeNodeLinux\\.cpp$'],
1710             ['exclude', 'platform/graphics/chromium/IconChromium\\.cpp$'],
1711             ['include', 'platform/graphics/chromium/VDMXParser\\.cpp$'],
1712             ['include', 'platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz\\.cpp$'],
1713             ['include', 'platform/graphics/harfbuzz/FontHarfBuzz\\.cpp$'],
1714             ['include', 'platform/graphics/harfbuzz/FontPlatformDataHarfBuzz\\.cpp$'],
1715             ['include', 'platform/graphics/harfbuzz/HarfBuzzSkia\\.cpp$'],
1716             ['include', 'platform/graphics/harfbuzz/HarfBuzzShaperBase\\.cpp$'],
1717             ['exclude', 'platform/graphics/skia/FontCacheSkia\\.cpp$'],
1718             ['include', 'platform/graphics/skia/SimpleFontDataSkia\\.cpp$'],
1719           ],
1720         }, { # OS!="android"
1721           'sources/': [
1722             ['exclude', 'Android\\.cpp$'],
1723           ],
1724         }],
1725       ],
1726     },
1727     # The *NEON.cpp files fail to compile when -mthumb is passed. Force
1728     # them to build in ARM mode.
1729     # See https://bugs.webkit.org/show_bug.cgi?id=62916.
1730     {
1731       'target_name': 'webcore_arm_neon',
1732       'conditions': [
1733         ['target_arch=="arm"', {
1734           'type': 'static_library',
1735           'dependencies': [
1736             'webcore_prerequisites',
1737           ],
1738           'hard_dependency': 1,
1739           'sources': [
1740             '<@(webcore_files)',
1741           ],
1742           'sources/': [
1743             ['exclude', '.*'],
1744             ['include', 'platform/graphics/filters/arm/.*NEON\\.(cpp|h)'],
1745           ],
1746           'cflags': ['-marm'],
1747           'conditions': [
1748             ['OS=="android"', {
1749               'cflags!': ['-mthumb'],
1750             }],
1751           ],
1752         },{  # target_arch!="arm"
1753           'type': 'none',
1754         }],
1755       ],
1756     },
1757     {
1758       'target_name': 'webcore_rendering',
1759       'type': 'static_library',
1760       'dependencies': [
1761         'webcore_prerequisites',
1762       ],
1763       'sources': [
1764         '<@(webcore_privateheader_files)',
1765         '<@(webcore_files)',
1766       ],
1767       'sources/': [
1768         ['exclude', '.*'],
1769         ['include', 'rendering/'],
1770
1771         # FIXME: Figure out how to store these patterns in a variable.
1772         ['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)/'],
1773         ['exclude', '(?<!Chromium)(Cairo|CF|CG|Curl|Gtk|JSC|Linux|Mac|OpenType|POSIX|Posix|Qt|Safari|Soup|Symbian|Win|WinCE|Wx)\\.(cpp|mm?)$'],
1774
1775         ['exclude', 'AllInOne\\.cpp$'],
1776       ],
1777       'conditions': [
1778         ['OS=="win"', {
1779           'sources/': [
1780             ['exclude', 'Posix\\.cpp$'],
1781           ],
1782         },{ # OS!="win"
1783           'sources/': [
1784             ['exclude', 'Win\\.cpp$'],
1785           ],
1786         }],
1787         ['OS=="mac"', {
1788           'sources/': [
1789             # RenderThemeChromiumSkia is not used on mac since RenderThemeChromiumMac
1790             # does not reference the Skia code that is used by Windows, Linux and Android.
1791             ['exclude', 'rendering/RenderThemeChromiumSkia\\.cpp$'],
1792           ],
1793         },{ # OS!="mac"
1794           'sources/': [['exclude', 'Mac\\.(cpp|mm?)$']]
1795         }],
1796         ['os_posix == 1 and OS != "mac" and OS != "android" and gcc_version == 42', {
1797           # Due to a bug in gcc 4.2.1 (the current version on hardy), we get
1798           # warnings about uninitialized this.
1799           'cflags': ['-Wno-uninitialized'],
1800         }],
1801         ['use_x11 == 0', {
1802           'sources/': [
1803             ['exclude', 'Linux\\.cpp$'],
1804           ],
1805         }],
1806         ['toolkit_uses_gtk == 0', {
1807           'sources/': [
1808             ['exclude', 'Gtk\\.cpp$'],
1809           ],
1810         }],
1811         ['OS=="android"', {
1812           'sources/': [
1813             ['include', 'rendering/RenderThemeChromiumLinux\\.cpp$'],
1814           ],
1815         },{ # OS!="android"
1816           'sources/': [
1817             ['exclude', 'Android\\.cpp$'],
1818           ],
1819         }],
1820       ],
1821     },
1822     {
1823       'target_name': 'webcore_remaining',
1824       'type': 'static_library',
1825       'dependencies': [
1826         'webcore_prerequisites',
1827         '<(chromium_src_dir)/third_party/v8-i18n/build/all.gyp:v8-i18n',
1828       ],
1829       # This is needed for mac because of webkit_system_interface. It'd be nice
1830       # if this hard dependency could be split off the rest.
1831       'hard_dependency': 1,
1832       'sources': [
1833         '<@(webcore_privateheader_files)',
1834         '<@(webcore_files)',
1835       ],
1836       'sources/': [
1837         ['exclude', 'platform/'],
1838         ['exclude', 'rendering/'],
1839
1840         # Exclude most of bindings, except of the V8-related parts.
1841         ['exclude', 'bindings/[^/]+/'],
1842         ['include', 'bindings/generic/'],
1843         ['include', 'bindings/v8/'],
1844
1845         # Exclude most of bridge, except for the V8-related parts.
1846         ['exclude', 'bridge/'],
1847         ['include', 'bridge/jni/'],
1848         ['exclude', 'bridge/jni/[^/]+_jsobject\\.mm$'],
1849         ['exclude', 'bridge/jni/[^/]+_objc\\.mm$'],
1850         ['exclude', 'bridge/jni/jsc/'],
1851
1852         # FIXME: Figure out how to store these patterns in a variable.
1853         ['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)/'],
1854         ['exclude', '(?<!Chromium)(Cairo|CF|CG|Curl|Gtk|JSC|Linux|Mac|OpenType|POSIX|Posix|Qt|Safari|Soup|Symbian|Win|WinCE|Wx)\\.(cpp|mm?)$'],
1855
1856         ['exclude', 'AllInOne\\.cpp$'],
1857
1858         ['exclude', 'Modules/filesystem/LocalFileSystem\\.cpp$'],
1859         ['exclude', 'Modules/indexeddb/IDBFactoryBackendInterface\\.cpp$'],
1860         ['exclude', 'Modules/indexeddb/IDBKeyPathBackendImpl\\.cpp$'],
1861         ['exclude', 'Modules/webdatabase/DatabaseTrackerClient\\.h$'],
1862         ['exclude', 'Modules/webdatabase/DatabaseTracker\\.cpp$'],
1863         ['exclude', 'Modules/webdatabase/OriginQuotaManager\\.(cpp|h)$'],
1864         ['exclude', 'Modules/webdatabase/OriginUsageRecord\\.(cpp|h)$'],
1865         ['exclude', 'Modules/webdatabase/SQLTransactionClient\\.cpp$'],
1866         ['exclude', 'inspector/InspectorFrontendClientLocal\\.cpp$'],
1867         ['exclude', 'inspector/JavaScript[^/]*\\.cpp$'],
1868         ['exclude', 'loader/UserStyleSheetLoader\\.cpp$'],
1869         ['exclude', 'loader/appcache/'],
1870         ['exclude', 'loader/archive/cf/LegacyWebArchiveMac\\.mm$'],
1871         ['exclude', 'loader/archive/cf/LegacyWebArchive\\.cpp$'],
1872         ['exclude', 'loader/icon/IconDatabase\\.cpp$'],
1873         ['exclude', 'plugins/PluginDataNone\\.cpp$'],
1874         ['exclude', 'plugins/PluginDatabase\\.cpp$'],
1875         ['exclude', 'plugins/PluginMainThreadScheduler\\.cpp$'],
1876         ['exclude', 'plugins/PluginPackageNone\\.cpp$'],
1877         ['exclude', 'plugins/PluginPackage\\.cpp$'],
1878         ['exclude', 'plugins/PluginStream\\.cpp$'],
1879         ['exclude', 'plugins/PluginView\\.cpp$'],
1880         ['exclude', 'plugins/npapi\\.cpp$'],
1881         ['exclude', 'storage/StorageAreaImpl\\.(cpp|h)$'],
1882         ['exclude', 'storage/StorageAreaSync\\.(cpp|h)$'],
1883         ['exclude', 'storage/StorageEventDispatcher\\.(cpp|h)$'],
1884         ['exclude', 'storage/StorageMap\\.(cpp|h)$'],
1885         ['exclude', 'storage/StorageNamespace\\.cpp$'],
1886         ['exclude', 'storage/StorageNamespaceImpl\\.(cpp|h)$'],
1887         ['exclude', 'storage/StorageSyncManager\\.(cpp|h)$'],
1888         ['exclude', 'storage/StorageTask\\.(cpp|h)$'],
1889         ['exclude', 'storage/StorageThread\\.(cpp|h)$'],
1890         ['exclude', 'storage/StorageTracker\\.(cpp|h)$'],
1891         ['exclude', 'storage/StorageTrackerClient\\.h$'],
1892         ['exclude', 'workers/DefaultSharedWorkerRepository\\.(cpp|h)$'],
1893
1894         ['include', 'loader/appcache/ApplicationCacheHost\.h$'],
1895         ['include', 'loader/appcache/DOMApplicationCache\.(cpp|h)$'],
1896       ],
1897       'link_settings': {
1898         'mac_bundle_resources': [
1899           '../Resources/aliasCursor.png',
1900           '../Resources/cellCursor.png',
1901           '../Resources/contextMenuCursor.png',
1902           '../Resources/copyCursor.png',
1903           '../Resources/eastResizeCursor.png',
1904           '../Resources/eastWestResizeCursor.png',
1905           '../Resources/helpCursor.png',
1906           '../Resources/linkCursor.png',
1907           '../Resources/missingImage.png',
1908           '../Resources/moveCursor.png',
1909           '../Resources/noDropCursor.png',
1910           '../Resources/noneCursor.png',
1911           '../Resources/northEastResizeCursor.png',
1912           '../Resources/northEastSouthWestResizeCursor.png',
1913           '../Resources/northResizeCursor.png',
1914           '../Resources/northSouthResizeCursor.png',
1915           '../Resources/northWestResizeCursor.png',
1916           '../Resources/northWestSouthEastResizeCursor.png',
1917           '../Resources/progressCursor.png',
1918           '../Resources/southEastResizeCursor.png',
1919           '../Resources/southResizeCursor.png',
1920           '../Resources/southWestResizeCursor.png',
1921           '../Resources/verticalTextCursor.png',
1922           '../Resources/waitCursor.png',
1923           '../Resources/westResizeCursor.png',
1924           '../Resources/zoomInCursor.png',
1925           '../Resources/zoomOutCursor.png',
1926         ],
1927       },
1928       'conditions': [
1929         # Shard this taret into ten parts to work around linker limitations.
1930         # on link time code generation builds.
1931         ['OS=="win" and buildtype=="Official"', {
1932           'msvs_shard': 10,
1933         }],
1934         ['OS=="win"', {
1935           'sources/': [
1936             ['exclude', 'Posix\\.cpp$'],
1937             ['include', '/opentype/'],
1938             ['include', '/SkiaFontWin\\.cpp$'],
1939             ['include', '/TransparencyWin\\.cpp$'],
1940           ],
1941         },{ # OS!="win"
1942           'sources/': [
1943             ['exclude', 'Win\\.cpp$'],
1944             ['exclude', '/(Windows|Uniscribe)[^/]*\\.cpp$']
1945           ],
1946         }],
1947         ['os_posix == 1 and OS != "mac" and OS != "android" and gcc_version == 42', {
1948           # Due to a bug in gcc 4.2.1 (the current version on hardy), we get
1949           # warnings about uninitialized this.
1950           'cflags': ['-Wno-uninitialized'],
1951         }],
1952         ['use_x11 == 0', {
1953           'sources/': [
1954             ['exclude', 'Linux\\.cpp$'],
1955           ],
1956         }],
1957         ['toolkit_uses_gtk == 0', {
1958           'sources/': [
1959             ['exclude', 'Gtk\\.cpp$'],
1960           ],
1961         }],
1962         ['OS!="mac"', {
1963           'sources/': [['exclude', 'Mac\\.(cpp|mm?)$']]
1964         }],
1965       ],
1966     },
1967     {
1968       'target_name': 'webcore',
1969       'type': 'none',
1970       'dependencies': [
1971         'webcore_arm_neon',
1972         'webcore_dom',
1973         'webcore_html',
1974         'webcore_platform',
1975         'webcore_remaining',
1976         'webcore_rendering',
1977         # Exported.
1978         'webcore_bindings',
1979         '../../WTF/WTF.gyp/WTF.gyp:wtf',
1980         '<(chromium_src_dir)/build/temp_gyp/googleurl.gyp:googleurl',
1981         '<(chromium_src_dir)/skia/skia.gyp:skia',
1982         '<(chromium_src_dir)/third_party/npapi/npapi.gyp:npapi',
1983         '<(chromium_src_dir)/v8/tools/gyp/v8.gyp:v8',
1984       ],
1985       'export_dependent_settings': [
1986         'webcore_bindings',
1987         '../../WTF/WTF.gyp/WTF.gyp:wtf',
1988         '<(chromium_src_dir)/build/temp_gyp/googleurl.gyp:googleurl',
1989         '<(chromium_src_dir)/skia/skia.gyp:skia',
1990         '<(chromium_src_dir)/third_party/npapi/npapi.gyp:npapi',
1991         '<(chromium_src_dir)/v8/tools/gyp/v8.gyp:v8',
1992       ],
1993       'direct_dependent_settings': {
1994         'include_dirs': [
1995           '<@(webcore_include_dirs)',
1996         ],
1997         'mac_framework_dirs': [
1998           '$(SDKROOT)/System/Library/Frameworks/ApplicationServices.framework/Frameworks',
1999           '$(SDKROOT)/System/Library/Frameworks/Accelerate.framework',
2000           '$(SDKROOT)/System/Library/Frameworks/CoreServices.framework',
2001           '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
2002           '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
2003           '$(SDKROOT)/System/Library/Frameworks/AudioToolbox.framework',
2004           '$(SDKROOT)/System/Library/Frameworks/AudioUnit.framework',
2005           '$(SDKROOT)/System/Library/Frameworks/CoreAudio.framework',
2006         ],
2007       },
2008       'conditions': [
2009         ['OS=="mac"', {
2010           'direct_dependent_settings': {
2011             'include_dirs': [
2012               '<(chromium_src_dir)/third_party/apple_webkit',
2013               '../../WebKit/mac/WebCoreSupport',
2014             ],
2015           },
2016         }],
2017         ['OS=="win"', {
2018           'direct_dependent_settings': {
2019             'include_dirs+++': ['../dom'],
2020           },
2021         }],
2022         ['OS=="linux" and "WTF_USE_WEBAUDIO_IPP=1" in feature_defines', {
2023           'link_settings': {
2024             'ldflags': [
2025               '<!@(pkg-config --libs-only-L ipp)',
2026             ],
2027             'libraries': [
2028               '-lipps -lippcore',
2029             ],
2030           },
2031         }],
2032         ['enable_svg!=0', {
2033           'dependencies': [
2034             'webcore_svg',
2035           ],
2036         }],
2037       ],
2038     },
2039     {
2040       'target_name': 'webcore_test_support',
2041       'type': 'static_library',
2042       'dependencies': [
2043         'webcore',
2044       ],
2045       'include_dirs': [
2046         '<(INTERMEDIATE_DIR)',
2047         '<(SHARED_INTERMEDIATE_DIR)/webcore',
2048         '<(SHARED_INTERMEDIATE_DIR)/webkit',
2049         '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings',
2050         '<@(webcore_include_dirs)',
2051         '../testing',
2052         '../testing/v8',
2053       ],
2054       'sources': [
2055         '<@(webcore_test_support_files)',
2056         '<(SHARED_INTERMEDIATE_DIR)/webcore/bindings/V8Internals.cpp',
2057         '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8Internals.h',
2058         '<(SHARED_INTERMEDIATE_DIR)/webcore/bindings/V8InternalSettings.cpp',
2059         '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8InternalSettings.h',
2060       ],
2061       'sources/': [
2062         ['exclude', 'testing/js'],
2063       ],
2064     },
2065   ],  # targets
2066 }