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