a28ee5d061059abfa4ef91582f3f579ca80d2954
[WebKit-https.git] / 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': {'chromium_src_dir': '../../WebKit/chromium'},
43     },{
44       # WebKit is checked out in src/chromium/third_party/WebKit
45       'variables': {'chromium_src_dir': '../../../..'},
46     }],
47     ['OS == "mac"', {
48       'targets': [
49         {
50           # On the Mac, libWebKitSystemInterface*.a is used to help WebCore
51           # interface with the system.  This library is supplied as a static
52           # library in binary format.  At present, it contains many global
53           # symbols not marked private_extern.  It should be considered an
54           # implementation detail of WebCore, and does not need these symbols
55           # to be exposed so widely.
56           #
57           # This target contains an action that cracks open the existing
58           # static library and rebuilds it with these global symbols
59           # transformed to private_extern.
60           'target_name': 'webkit_system_interface',
61           'type': 'static_library',
62           'variables': {
63             'adjusted_library_path':
64                 '<(PRODUCT_DIR)/libWebKitSystemInterfaceLeopardPrivateExtern.a',
65           },
66           'sources': [
67             # An empty source file is needed to convince Xcode to produce
68             # output for this target.  The resulting library won't actually
69             # contain anything.  The library at adjusted_library_path will,
70             # and that library is pushed to dependents of this target below.
71             'mac/Empty.cpp',
72           ],
73           'actions': [
74             {
75               'action_name': 'Adjust Visibility',
76               'inputs': [
77                 'mac/adjust_visibility.sh',
78                 '../../WebKitLibraries/libWebKitSystemInterfaceLeopard.a',
79               ],
80               'outputs': [
81                 '<(adjusted_library_path)',
82               ],
83               'action': [
84                 '<@(_inputs)',
85                 '<@(_outputs)',
86                 '<(INTERMEDIATE_DIR)/adjust_visibility',  # work directory
87               ],
88             },
89           ],  # actions
90           'link_settings': {
91             'libraries': [
92               '<(adjusted_library_path)',
93             ],
94           },  # link_settings
95         },  # target webkit_system_interface
96       ],  # targets
97     }],  # condition OS == "mac"
98   ],  # conditions
99
100   'variables': {
101     # If set to 1, doesn't compile debug symbols into webcore reducing the
102     # size of the binary and increasing the speed of gdb.  gcc only.
103     'remove_webcore_debug_symbols%': 0,
104
105     # If set to 0, doesn't build SVG support, reducing the size of the
106     # binary and increasing the speed of gdb.
107     'enable_svg%': 1,
108
109     'webcore_include_dirs': [
110       '../',
111       '../accessibility',
112       '../accessibility/chromium',
113       '../bindings',
114       '../bindings/generic',
115       '../bindings/v8',
116       '../bindings/v8/custom',
117       '../bindings/v8/specialization',
118       '../css',
119       '../dom',
120       '../dom/default',
121       '../editing',
122       '../history',
123       '../html',
124       '../html/canvas',
125       '../inspector',
126       '../loader',
127       '../loader/appcache',
128       '../loader/archive',
129       '../loader/icon',
130       '../notifications',
131       '../page',
132       '../page/animation',
133       '../page/chromium',
134       '../platform',
135       '../platform/animation',
136       '../platform/chromium',
137       '../platform/graphics',
138       '../platform/graphics/chromium',
139       '../platform/graphics/filters',
140       '../platform/graphics/opentype',
141       '../platform/graphics/skia',
142       '../platform/graphics/transforms',
143       '../platform/image-decoders',
144       '../platform/image-decoders/bmp',
145       '../platform/image-decoders/gif',
146       '../platform/image-decoders/ico',
147       '../platform/image-decoders/jpeg',
148       '../platform/image-decoders/png',
149       '../platform/image-decoders/skia',
150       '../platform/image-decoders/xbm',
151       '../platform/image-encoders/skia',
152       '../platform/mock',
153       '../platform/network',
154       '../platform/network/chromium',
155       '../platform/sql',
156       '../platform/text',
157       '../platform/text/transcoder',
158       '../plugins',
159       '../plugins/chromium',
160       '../rendering',
161       '../rendering/style',
162       '../storage',
163       '../storage/chromium',
164       '../svg',
165       '../svg/animation',
166       '../svg/graphics',
167       '../svg/graphics/filters',
168       '../websockets',
169       '../workers',
170       '../xml',
171     ],
172
173     'bindings_idl_files': [
174       '<@(webcore_bindings_idl_files)',
175     ],
176
177     'bindings_idl_files!': [
178       # Custom bindings in bindings/v8/custom exist for these.
179       '../dom/EventListener.idl',
180       '../dom/EventTarget.idl',
181       '../html/VoidCallback.idl',
182
183       # Bindings with custom Objective-C implementations.
184       '../page/AbstractView.idl',
185
186       # FIXME: I don't know why all of these are excluded.
187       # Extra SVG bindings to exclude.
188       '../svg/ElementTimeControl.idl',
189       '../svg/SVGAnimatedPathData.idl',
190       '../svg/SVGExternalResourcesRequired.idl',
191       '../svg/SVGFilterPrimitiveStandardAttributes.idl',
192       '../svg/SVGFitToViewBox.idl',
193
194       '../svg/SVGLangSpace.idl',
195       '../svg/SVGLocatable.idl',
196       '../svg/SVGStylable.idl',
197       '../svg/SVGTests.idl',
198       '../svg/SVGTransformable.idl',
199       '../svg/SVGViewSpec.idl',
200       '../svg/SVGZoomAndPan.idl',
201
202       # FIXME: I don't know why these are excluded, either.
203       # Someone (me?) should figure it out and add appropriate comments.
204       '../css/CSSUnknownRule.idl',
205
206       '../dom/DOMStringMap.idl',
207     ],
208
209     'conditions': [
210       ['enable_svg!=0', {
211         'bindings_idl_files': [
212           '<@(webcore_svg_bindings_idl_files)',
213         ],
214       }],
215       ['OS=="mac"', {
216         'webcore_include_dirs+': [
217           # platform/graphics/cg and mac needs to come before
218           # platform/graphics/chromium so that the Mac build picks up the
219           # version of ImageBufferData.h in the cg directory and
220           # FontPlatformData.h in the mac directory.  The + prepends this
221           # directory to the list.
222           # FIXME: This shouldn't need to be prepended.
223           # FIXME: Eliminate dependency on platform/graphics/mac and
224           # related directories.
225           # platform/graphics/cg may need to stick around, though.
226           '../platform/graphics/mac',
227           '../platform/graphics/cg',
228         ],
229         'webcore_include_dirs': [
230           # FIXME: Eliminate dependency on platform/mac and related
231           # directories.
232           '../loader/archive/cf',
233           '../platform/mac',
234           '../platform/text/mac',
235         ],
236         # enable -Wall and -Werror, just in Mac build for now
237         # FIXME: Also enable this for Linux/Windows after verifying no warnings
238         'chromium_code': 1,
239       }],
240       ['OS=="win"', {
241         'webcore_include_dirs': [
242           '../page/win',
243           '../platform/graphics/win',
244           '../platform/text/win',
245           '../platform/win',
246         ],
247       }],
248       ['OS=="win" and buildtype=="Official"', {
249         # On windows official release builds, we try to preserve symbol space.
250         'derived_sources_aggregate_files': [
251           '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSourcesAll.cpp',
252         ],
253       },{
254         'derived_sources_aggregate_files': [
255           '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources1.cpp',
256           '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources2.cpp',
257           '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources3.cpp',
258           '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources4.cpp',
259           '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources5.cpp',
260           '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources6.cpp',
261           '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources7.cpp',
262           '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources8.cpp',
263         ],
264       }]
265     ],
266   },
267   'targets': [
268     {
269       'target_name': 'webcore_bindings_sources',
270       'type': 'none',
271       'hard_dependency': 1,
272       'sources': [
273         # bison rule
274         '../css/CSSGrammar.y',
275         '../xml/XPathGrammar.y',
276
277         # gperf rule
278         '../html/DocTypeStrings.gperf',
279         '../html/HTMLEntityNames.gperf',
280         '../platform/ColorData.gperf',
281
282         # idl rules
283         '<@(bindings_idl_files)',
284       ],
285       'actions': [
286         # Actions to build derived sources.
287         {
288           'action_name': 'CSSPropertyNames',
289           'inputs': [
290             '../css/makeprop.pl',
291             '../css/CSSPropertyNames.in',
292           ],
293           'outputs': [
294             '<(SHARED_INTERMEDIATE_DIR)/webkit/CSSPropertyNames.cpp',
295             '<(SHARED_INTERMEDIATE_DIR)/webkit/CSSPropertyNames.h',
296           ],
297           'action': [
298             'python',
299             'scripts/action_csspropertynames.py',
300             '<@(_outputs)',
301             '--',
302             '<@(_inputs)'
303           ],
304           'conditions': [
305             ['enable_svg!=0', {
306               'inputs': [
307                 '../css/SVGCSSPropertyNames.in',
308               ],
309             }],
310           ],
311         },
312         {
313           'action_name': 'CSSValueKeywords',
314           'inputs': [
315             '../css/makevalues.pl',
316             '../css/CSSValueKeywords.in',
317           ],
318           'outputs': [
319             '<(SHARED_INTERMEDIATE_DIR)/webkit/CSSValueKeywords.cpp',
320             '<(SHARED_INTERMEDIATE_DIR)/webkit/CSSValueKeywords.h',
321           ],
322           'action': [
323             'python',
324             'scripts/action_cssvaluekeywords.py',
325             '<@(_outputs)',
326             '--',
327             '<@(_inputs)'
328           ],
329           'conditions': [
330             ['enable_svg!=0', {
331               'inputs': [
332                 '../css/SVGCSSValueKeywords.in',
333               ],
334             }],
335           ],
336         },
337         {
338           'action_name': 'HTMLNames',
339           'inputs': [
340             '../dom/make_names.pl',
341             '../html/HTMLTagNames.in',
342             '../html/HTMLAttributeNames.in',
343           ],
344           'outputs': [
345             '<(SHARED_INTERMEDIATE_DIR)/webkit/HTMLNames.cpp',
346             '<(SHARED_INTERMEDIATE_DIR)/webkit/HTMLNames.h',
347             '<(SHARED_INTERMEDIATE_DIR)/webkit/HTMLElementFactory.cpp',
348             '<(SHARED_INTERMEDIATE_DIR)/webkit/V8HTMLElementWrapperFactory.cpp',
349             '<(SHARED_INTERMEDIATE_DIR)/webkit/V8HTMLElementWrapperFactory.h',
350           ],
351           'action': [
352             'python',
353             'scripts/action_makenames.py',
354             '<@(_outputs)',
355             '--',
356             '<@(_inputs)',
357             '--',
358             '--factory',
359             '--wrapperFactoryV8',
360             '--extraDefines', '<(feature_defines)'
361           ],
362         },
363         {
364           'action_name': 'SVGNames',
365           'inputs': [
366             '../dom/make_names.pl',
367             '../svg/svgtags.in',
368             '../svg/svgattrs.in',
369           ],
370           'outputs': [
371             '<(SHARED_INTERMEDIATE_DIR)/webkit/SVGNames.cpp',
372             '<(SHARED_INTERMEDIATE_DIR)/webkit/SVGNames.h',
373             '<(SHARED_INTERMEDIATE_DIR)/webkit/SVGElementFactory.cpp',
374             '<(SHARED_INTERMEDIATE_DIR)/webkit/SVGElementFactory.h',
375             '<(SHARED_INTERMEDIATE_DIR)/webkit/V8SVGElementWrapperFactory.cpp',
376             '<(SHARED_INTERMEDIATE_DIR)/webkit/V8SVGElementWrapperFactory.h',
377           ],
378           'action': [
379             'python',
380             'scripts/action_makenames.py',
381             '<@(_outputs)',
382             '--',
383             '<@(_inputs)',
384             '--',
385             '--factory',
386             '--wrapperFactoryV8',
387             '--extraDefines', '<(feature_defines)'
388           ],
389         },
390         {
391           'action_name': 'MathMLNames',
392           'inputs': [
393             '../dom/make_names.pl',
394             '../mathml/mathtags.in',
395             '../mathml/mathattrs.in',
396           ],
397           'outputs': [
398             '<(SHARED_INTERMEDIATE_DIR)/webkit/MathMLNames.cpp',
399             '<(SHARED_INTERMEDIATE_DIR)/webkit/MathMLNames.h',
400           ],
401           'action': [
402             'python',
403             'scripts/action_makenames.py',
404             '<@(_outputs)',
405             '--',
406             '<@(_inputs)',
407             '--',
408             '--extraDefines', '<(feature_defines)'
409           ],
410         },
411         {
412           'action_name': 'UserAgentStyleSheets',
413           'inputs': [
414             '../css/make-css-file-arrays.pl',
415             '../css/html.css',
416             '../css/quirks.css',
417             '../css/view-source.css',
418             '../css/themeChromiumLinux.css',
419             '../css/themeWin.css',
420             '../css/themeWinQuirks.css',
421             '../css/svg.css',
422             '../css/mediaControls.css',
423             '../css/mediaControlsChromium.css',
424           ],
425           'outputs': [
426             '<(SHARED_INTERMEDIATE_DIR)/webkit/UserAgentStyleSheets.h',
427             '<(SHARED_INTERMEDIATE_DIR)/webkit/UserAgentStyleSheetsData.cpp',
428           ],
429           'action': [
430             'python',
431             'scripts/action_useragentstylesheets.py',
432             '<@(_outputs)',
433             '--',
434             '<@(_inputs)'
435           ],
436         },
437         {
438           'action_name': 'XLinkNames',
439           'inputs': [
440             '../dom/make_names.pl',
441             '../svg/xlinkattrs.in',
442           ],
443           'outputs': [
444             '<(SHARED_INTERMEDIATE_DIR)/webkit/XLinkNames.cpp',
445             '<(SHARED_INTERMEDIATE_DIR)/webkit/XLinkNames.h',
446           ],
447           'action': [
448             'python',
449             'scripts/action_makenames.py',
450             '<@(_outputs)',
451             '--',
452             '<@(_inputs)',
453             '--',
454             '--extraDefines', '<(feature_defines)'
455           ],
456         },
457         {
458           'action_name': 'XMLNSNames',
459           'inputs': [
460             '../dom/make_names.pl',
461             '../xml/xmlnsattrs.in',
462           ],
463           'outputs': [
464             '<(SHARED_INTERMEDIATE_DIR)/webkit/XMLNSNames.cpp',
465             '<(SHARED_INTERMEDIATE_DIR)/webkit/XMLNSNames.h',
466           ],
467           'action': [
468             'python',
469             'scripts/action_makenames.py',
470             '<@(_outputs)',
471             '--',
472             '<@(_inputs)',
473             '--',
474             '--extraDefines', '<(feature_defines)'
475           ],
476         },
477         {
478           'action_name': 'RemoteInspectorFrontend',
479           # The second input item will be used as item name in vcproj.
480           # It is not possible to put Inspector.idl there because
481           # all idl files are marking as excluded by gyp generator.
482           'inputs': [
483             '../bindings/scripts/generate-bindings.pl',
484             '../inspector/CodeGeneratorInspector.pm',
485             '../bindings/scripts/CodeGenerator.pm',
486             '../bindings/scripts/IDLParser.pm',
487             '../bindings/scripts/IDLStructure.pm',
488             '../inspector/Inspector.idl',
489           ],
490           'outputs': [
491             '<(SHARED_INTERMEDIATE_DIR)/webcore/bindings/InspectorBackendDispatcher.cpp',
492             '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/InspectorBackendDispatcher.h',
493             '<(SHARED_INTERMEDIATE_DIR)/webcore/bindings/RemoteInspectorFrontend.cpp',
494             '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/RemoteInspectorFrontend.h',
495           ],
496           'variables': {
497             'generator_include_dirs': [
498             ],
499           },
500           'action': [
501             'python',
502             'scripts/rule_binding.py',
503             '../inspector/Inspector.idl',
504             '<(SHARED_INTERMEDIATE_DIR)/webcore/bindings',
505             '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings',
506             '--',
507             '<@(_inputs)',
508             '--',
509             '--defines', '<(feature_defines) LANGUAGE_JAVASCRIPT',
510             '--generator', 'Inspector',
511             '<@(generator_include_dirs)'
512           ],
513           'message': 'Generating Inspector interface classes from Inspector.idl',
514         },
515         {
516           'action_name': 'XMLNames',
517           'inputs': [
518             '../dom/make_names.pl',
519             '../xml/xmlattrs.in',
520           ],
521           'outputs': [
522             '<(SHARED_INTERMEDIATE_DIR)/webkit/XMLNames.cpp',
523             '<(SHARED_INTERMEDIATE_DIR)/webkit/XMLNames.h',
524           ],
525           'action': [
526             'python',
527             'scripts/action_makenames.py',
528             '<@(_outputs)',
529             '--',
530             '<@(_inputs)',
531             '--',
532             '--extraDefines', '<(feature_defines)'
533           ],
534         },
535         {
536           'action_name': 'tokenizer',
537           'inputs': [
538             '../css/maketokenizer',
539             '../css/tokenizer.flex',
540           ],
541           'outputs': [
542             '<(SHARED_INTERMEDIATE_DIR)/webkit/tokenizer.cpp',
543           ],
544           'action': [
545             'python',
546             'scripts/action_maketokenizer.py',
547             '<@(_outputs)',
548             '--',
549             '<@(_inputs)'
550           ],
551         },
552         {
553           'action_name': 'derived_sources_all_in_one',
554           'variables': {
555             # Write sources into a file, so that the action command line won't
556             # exceed OS limites.
557             'idls_list_temp_file': '<|(idls_list_temp_file.tmp <@(bindings_idl_files))',
558           },
559           'inputs': [
560             'scripts/action_derivedsourcesallinone.py',
561             '<(idls_list_temp_file)',
562             '<!@(cat <(idls_list_temp_file))',
563           ],
564           'outputs': [
565             '<@(derived_sources_aggregate_files)',
566           ],
567           'action': [
568             'python',
569             'scripts/action_derivedsourcesallinone.py',
570             '<(idls_list_temp_file)',
571             '--',
572             '<@(derived_sources_aggregate_files)',
573           ],
574         },
575       ],
576       'rules': [
577         # Rules to build derived sources.
578         {
579           'rule_name': 'bison',
580           'extension': 'y',
581           'outputs': [
582             '<(SHARED_INTERMEDIATE_DIR)/webkit/<(RULE_INPUT_ROOT).cpp',
583             '<(SHARED_INTERMEDIATE_DIR)/webkit/<(RULE_INPUT_ROOT).h'
584           ],
585           'action': [
586             'python',
587             'scripts/rule_bison.py',
588             '<(RULE_INPUT_PATH)',
589             '<(SHARED_INTERMEDIATE_DIR)/webkit'
590           ],
591         },
592         {
593           'rule_name': 'gperf',
594           'extension': 'gperf',
595           #
596           # gperf outputs are generated by WebCore/make-hash-tools.pl
597           #
598           'outputs': [
599             '<(SHARED_INTERMEDIATE_DIR)/webkit/<(RULE_INPUT_ROOT).cpp',
600           ],
601           'dependencies': [
602             '../make-hash-tools.pl',
603           ],
604           'action': [
605             'perl',
606             '../make-hash-tools.pl',
607             '<(SHARED_INTERMEDIATE_DIR)/webkit',
608             '<(RULE_INPUT_PATH)',
609           ],
610           'process_outputs_as_sources': 0,
611         },
612         # Rule to build generated JavaScript (V8) bindings from .idl source.
613         {
614           'rule_name': 'binding',
615           'extension': 'idl',
616           'msvs_external_rule': 1,
617           'inputs': [
618             '../bindings/scripts/generate-bindings.pl',
619             '../bindings/scripts/CodeGenerator.pm',
620             '../bindings/scripts/CodeGeneratorV8.pm',
621             '../bindings/scripts/IDLParser.pm',
622             '../bindings/scripts/IDLStructure.pm',
623           ],
624           'outputs': [
625             # FIXME:  The .cpp file should be in webkit/bindings once
626             # we coax GYP into supporting it (see 'action' below).
627             '<(SHARED_INTERMEDIATE_DIR)/webcore/bindings/V8<(RULE_INPUT_ROOT).cpp',
628             '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8<(RULE_INPUT_ROOT).h',
629           ],
630           'variables': {
631             'generator_include_dirs': [
632               '--include', '../css',
633               '--include', '../dom',
634               '--include', '../html',
635               '--include', '../notifications',
636               '--include', '../page',
637               '--include', '../plugins',
638               '--include', '../storage',
639               '--include', '../svg',
640               '--include', '../websockets',
641               '--include', '../workers',
642               '--include', '../xml',
643             ],
644           },
645           # FIXME:  Note that we put the .cpp files in webcore/bindings
646           # but the .h files in webkit/bindings.  This is to work around
647           # the unfortunate fact that GYP strips duplicate arguments
648           # from lists.  When we have a better GYP way to suppress that
649           # behavior, change the output location.
650           'action': [
651             'python',
652             'scripts/rule_binding.py',
653             '<(RULE_INPUT_PATH)',
654             '<(SHARED_INTERMEDIATE_DIR)/webcore/bindings',
655             '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings',
656             '--',
657             '<@(_inputs)',
658             '--',
659             '--defines', '<(feature_defines) LANGUAGE_JAVASCRIPT V8_BINDING',
660             '--generator', 'V8',
661             '<@(generator_include_dirs)'
662           ],
663           'message': 'Generating binding from <(RULE_INPUT_PATH)',
664         },
665       ],
666     },
667     {
668       'target_name': 'webcore_bindings',
669       'type': '<(library)',
670       'hard_dependency': 1,
671       'dependencies': [
672         'webcore_bindings_sources',
673         '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:pcre',
674         '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:wtf',
675         '<(chromium_src_dir)/build/temp_gyp/googleurl.gyp:googleurl',
676         '<(chromium_src_dir)/skia/skia.gyp:skia',
677         '<(chromium_src_dir)/third_party/libjpeg/libjpeg.gyp:libjpeg',
678         '<(chromium_src_dir)/third_party/libpng/libpng.gyp:libpng',
679         '<(chromium_src_dir)/third_party/libxml/libxml.gyp:libxml',
680         '<(chromium_src_dir)/third_party/libxslt/libxslt.gyp:libxslt',
681         '<(chromium_src_dir)/third_party/npapi/npapi.gyp:npapi',
682         '<(chromium_src_dir)/third_party/sqlite/sqlite.gyp:sqlite',
683       ],
684       'include_dirs': [
685         '<(INTERMEDIATE_DIR)',
686         # FIXME:  Remove <(SHARED_INTERMEDIATE_DIR)/webcore when we
687         # can entice gyp into letting us put both the .cpp and .h
688         # files in the same output directory.
689         '<(SHARED_INTERMEDIATE_DIR)/webcore',
690         '<(SHARED_INTERMEDIATE_DIR)/webkit',
691         '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings',
692         '<@(webcore_include_dirs)',
693       ],
694       'direct_dependent_settings': {
695         'include_dirs': [
696           '<(SHARED_INTERMEDIATE_DIR)/webkit',
697           '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings',
698         ],
699       },
700       'sources': [
701         # These files include all the .cpp files generated from the .idl files
702         # in webcore_files.
703         '<@(derived_sources_aggregate_files)',
704
705         # Additional .cpp files from webcore_bindings_sources actions.
706         '<(SHARED_INTERMEDIATE_DIR)/webkit/HTMLElementFactory.cpp',
707         '<(SHARED_INTERMEDIATE_DIR)/webkit/HTMLNames.cpp',
708         '<(SHARED_INTERMEDIATE_DIR)/webkit/UserAgentStyleSheetsData.cpp',
709         '<(SHARED_INTERMEDIATE_DIR)/webkit/V8HTMLElementWrapperFactory.cpp',
710         '<(SHARED_INTERMEDIATE_DIR)/webkit/XLinkNames.cpp',
711         '<(SHARED_INTERMEDIATE_DIR)/webkit/XMLNSNames.cpp',
712         '<(SHARED_INTERMEDIATE_DIR)/webkit/XMLNames.cpp',
713         '<(SHARED_INTERMEDIATE_DIR)/webkit/SVGNames.cpp',
714         '<(SHARED_INTERMEDIATE_DIR)/webkit/MathMLNames.cpp',
715
716         # Additional .cpp files from the webcore_bindings_sources rules.
717         '<(SHARED_INTERMEDIATE_DIR)/webkit/CSSGrammar.cpp',
718         '<(SHARED_INTERMEDIATE_DIR)/webkit/XPathGrammar.cpp',
719
720         # Additional .cpp files from the webcore_inspector_sources list.
721         '<(SHARED_INTERMEDIATE_DIR)/webcore/bindings/RemoteInspectorFrontend.cpp',
722         '<(SHARED_INTERMEDIATE_DIR)/webcore/bindings/InspectorBackendDispatcher.cpp',
723       ],
724       'conditions': [
725         ['javascript_engine=="v8"', {
726           'dependencies': [
727             '<(chromium_src_dir)/v8/tools/gyp/v8.gyp:v8',
728           ],
729           'conditions': [
730             ['inside_chromium_build==1 and OS=="win" and component=="shared_library"', {
731               'defines': [
732                 'USING_V8_SHARED',
733               ],
734             }],
735           ],
736         }],
737         ['enable_svg!=0', {
738           'sources': [
739             '<(SHARED_INTERMEDIATE_DIR)/webkit/SVGElementFactory.cpp',
740             '<(SHARED_INTERMEDIATE_DIR)/webkit/V8SVGElementWrapperFactory.cpp',
741          ],
742         }],
743         ['OS=="mac"', {
744           'include_dirs': [
745             '../../WebKitLibraries',
746           ],
747         }],
748         ['OS=="win"', {
749           'dependencies': [
750             '<(chromium_src_dir)/build/win/system.gyp:cygwin'
751           ],
752           'defines': [
753             'WEBCORE_NAVIGATOR_PLATFORM="Win32"',
754             '__PRETTY_FUNCTION__=__FUNCTION__',
755           ],
756           # This is needed because Event.h in this directory is blocked
757           # by a system header on windows.
758           'include_dirs++': ['../dom'],
759           'direct_dependent_settings': {
760             'include_dirs+++': ['../dom'],
761           },
762         }],
763         ['OS!="win" and remove_webcore_debug_symbols==1', {
764           'configurations': {
765             'Debug': {
766               'cflags!': ['-g'],
767             }
768           },
769         }],
770       ],
771     },
772     {
773       'target_name': 'webcore',
774       'type': '<(library)',
775       'msvs_guid': '1C16337B-ACF3-4D03-AA90-851C5B5EADA6',
776       'dependencies': [
777         'webcore_bindings',
778         '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:pcre',
779         '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:wtf',
780         '<(chromium_src_dir)/build/temp_gyp/googleurl.gyp:googleurl',
781         '<(chromium_src_dir)/skia/skia.gyp:skia',
782         '<(chromium_src_dir)/third_party/libjpeg/libjpeg.gyp:libjpeg',
783         '<(chromium_src_dir)/third_party/libpng/libpng.gyp:libpng',
784         '<(chromium_src_dir)/third_party/libxml/libxml.gyp:libxml',
785         '<(chromium_src_dir)/third_party/libxslt/libxslt.gyp:libxslt',
786         '<(chromium_src_dir)/third_party/npapi/npapi.gyp:npapi',
787         '<(chromium_src_dir)/third_party/ots/ots.gyp:ots',
788         '<(chromium_src_dir)/third_party/sqlite/sqlite.gyp:sqlite',
789         '<(chromium_src_dir)/third_party/angle/src/build_angle.gyp:translator_common',
790       ],
791       'defines': [
792         'WEBCORE_NAVIGATOR_VENDOR="Google Inc."',
793       ],
794       'include_dirs': [
795         '<(INTERMEDIATE_DIR)',
796         '<@(webcore_include_dirs)',
797         '<(chromium_src_dir)/gpu',
798         '<(chromium_src_dir)/third_party/angle/include/GLSLANG',
799       ],
800       'sources': [
801         '<@(webcore_files)',
802
803         # For WebCoreSystemInterface, Mac-only.
804         '../../WebKit/mac/WebCoreSupport/WebSystemInterface.mm',
805       ],
806       'sources/': [
807         # Exclude JSC custom bindings.
808         ['exclude', 'bindings/js'],
809
810         # Fortunately, many things can be excluded by using broad patterns.
811
812         # Exclude things that don't apply to the Chromium platform on the basis
813         # of their enclosing directories and tags at the ends of their
814         # filenames.
815         ['exclude', '(android|cairo|cf|cg|curl|gtk|haiku|linux|mac|opentype|posix|qt|soup|symbian|win|wx)/'],
816         ['exclude', '(?<!Chromium)(Android|Cairo|CF|CG|Curl|Gtk|Linux|Mac|OpenType|POSIX|Posix|Qt|Safari|Soup|Symbian|Win|Wx)\\.(cpp|mm?)$'],
817         ['include', 'platform/graphics/opentype/OpenTypeSanitizer\\.cpp$'],
818
819         # JSC-only.
820         ['exclude', 'inspector/JavaScript[^/]*\\.cpp$'],
821
822         # ENABLE_OFFLINE_WEB_APPLICATIONS, exclude most of webcore's impl
823         ['exclude', 'loader/appcache/'],
824         ['include', 'loader/appcache/ApplicationCacheHost\.h$'],
825         ['include', 'loader/appcache/DOMApplicationCache\.(h|cpp)$'],
826
827         # Exclude some DB-related files.
828         ['exclude', 'platform/sql/SQLiteFileSystem.cpp'],
829         ['exclude', 'storage/DatabaseTracker.cpp'],
830         ['exclude', 'storage/DatabaseTrackerClient.h'],
831         ['exclude', 'storage/OriginQuotaManager.cpp'],
832         ['exclude', 'storage/OriginQuotaManager.h'],
833         ['exclude', 'storage/OriginUsageRecord.cpp'],
834         ['exclude', 'storage/OriginUsageRecord.h'],
835         ['exclude', 'storage/SQLTransactionClient.cpp'],
836       ],
837       'sources!': [
838         # A few things can't be excluded by patterns.  List them individually.
839
840         # Don't build StorageNamespace.  We have our own implementation.
841         '../storage/StorageNamespace.cpp',
842
843         # Don't build StorageEventDispatcher.  We have our own implementation.
844         '../storage/StorageEventDispatcher.cpp',
845
846         # Don't build IDBFactoryBackendInterface.  We have our own implementation.
847         '../storage/IDBFactoryBackendInterface.cpp',
848
849         # Use history/BackForwardListChromium.cpp instead.
850         '../history/BackForwardListImpl.cpp',
851
852         # Use loader/icon/IconDatabaseNone.cpp instead.
853         '../loader/icon/IconDatabase.cpp',
854
855         # Use platform/KURLGoogle.cpp instead.
856         '../platform/KURL.cpp',
857
858         # Use platform/MIMETypeRegistryChromium.cpp instead.
859         '../platform/MIMETypeRegistry.cpp',
860
861         # Theme.cpp is used only if we're using USE_NEW_THEME. We are not for
862         # Windows and Linux. We manually include Theme.cpp for the Mac below.
863         '../platform/Theme.cpp',
864
865         # Exclude some, but not all, of plugins.
866         '../plugins/PluginDatabase.cpp',
867         '../plugins/PluginMainThreadScheduler.cpp',
868         '../plugins/PluginPackage.cpp',
869         '../plugins/PluginStream.cpp',
870         '../plugins/PluginView.cpp',
871         '../plugins/npapi.cpp',
872
873         # Use LinkHashChromium.cpp instead
874         '../platform/LinkHash.cpp',
875
876         # Don't build these.
877         # FIXME: I don't know exactly why these are excluded.  It would
878         # be nice to provide more explicit comments.  Some of these do actually
879         # compile.
880         '../dom/StaticStringList.cpp',
881         '../loader/icon/IconFetcher.cpp',
882         '../loader/UserStyleSheetLoader.cpp',
883
884         # We use a multi-process version from the WebKit API.
885         '../dom/default/PlatformMessagePortChannel.cpp',
886         '../dom/default/PlatformMessagePortChannel.h',
887
888       ],
889       'direct_dependent_settings': {
890         'include_dirs': [
891           '<@(webcore_include_dirs)',
892         ],
893         'mac_framework_dirs': [
894           '$(SDKROOT)/System/Library/Frameworks/ApplicationServices.framework/Frameworks',
895         ],
896       },
897       'export_dependent_settings': [
898         'webcore_bindings',
899         '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:wtf',
900         '<(chromium_src_dir)/build/temp_gyp/googleurl.gyp:googleurl',
901         '<(chromium_src_dir)/skia/skia.gyp:skia',
902         '<(chromium_src_dir)/third_party/npapi/npapi.gyp:npapi',
903       ],
904       'link_settings': {
905         'mac_bundle_resources': [
906           '../Resources/aliasCursor.png',
907           '../Resources/cellCursor.png',
908           '../Resources/contextMenuCursor.png',
909           '../Resources/copyCursor.png',
910           '../Resources/crossHairCursor.png',
911           '../Resources/eastResizeCursor.png',
912           '../Resources/eastWestResizeCursor.png',
913           '../Resources/helpCursor.png',
914           '../Resources/linkCursor.png',
915           '../Resources/missingImage.png',
916           '../Resources/moveCursor.png',
917           '../Resources/noDropCursor.png',
918           '../Resources/noneCursor.png',
919           '../Resources/northEastResizeCursor.png',
920           '../Resources/northEastSouthWestResizeCursor.png',
921           '../Resources/northResizeCursor.png',
922           '../Resources/northSouthResizeCursor.png',
923           '../Resources/northWestResizeCursor.png',
924           '../Resources/northWestSouthEastResizeCursor.png',
925           '../Resources/notAllowedCursor.png',
926           '../Resources/progressCursor.png',
927           '../Resources/southEastResizeCursor.png',
928           '../Resources/southResizeCursor.png',
929           '../Resources/southWestResizeCursor.png',
930           '../Resources/verticalTextCursor.png',
931           '../Resources/waitCursor.png',
932           '../Resources/westResizeCursor.png',
933           '../Resources/zoomInCursor.png',
934           '../Resources/zoomOutCursor.png',
935         ],
936       },
937       'hard_dependency': 1,
938       'mac_framework_dirs': [
939         '$(SDKROOT)/System/Library/Frameworks/ApplicationServices.framework/Frameworks',
940       ],
941       'msvs_disabled_warnings': [
942         4138, 4244, 4291, 4305, 4344, 4355, 4521, 4099,
943       ],
944       'scons_line_length' : 1,
945       'xcode_settings': {
946         # Some Mac-specific parts of WebKit won't compile without having this
947         # prefix header injected.
948         # FIXME: make this a first-class setting.
949         'GCC_PREFIX_HEADER': '../WebCorePrefix.h',
950       },
951       'conditions': [
952         ['javascript_engine=="v8"', {
953           'dependencies': [
954             '<(chromium_src_dir)/v8/tools/gyp/v8.gyp:v8',
955           ],
956           'export_dependent_settings': [
957             '<(chromium_src_dir)/v8/tools/gyp/v8.gyp:v8',
958           ],
959           'conditions': [
960             ['inside_chromium_build==1 and OS=="win" and component=="shared_library"', {
961               'defines': [
962                 'USING_V8_SHARED',
963               ],
964             }],
965           ],
966         }],
967         ['enable_svg!=0', {
968           'sources/': [
969             ['exclude', 'svg/[^/]+\\.cpp$'],
970             ['include', 'svg/SVGAllInOne\\.cpp$'],
971           ],
972         }, {  # svg disabled
973           'sources/': [
974             ['exclude', 'svg/'],
975             ['exclude', 'css/svg/'],
976             ['exclude', 'rendering/style/SVG'],
977             ['exclude', 'rendering/RenderSVG'],
978             ['exclude', 'rendering/SVG'],
979           ],
980         }],
981         ['use_accelerated_compositing==1', {
982           'dependencies': [
983             '<(chromium_src_dir)/gpu/gpu.gyp:gles2_c_lib',
984           ],
985         }],
986         ['OS=="linux" or OS=="freebsd"', {
987           'dependencies': [
988             '<(chromium_src_dir)/build/linux/system.gyp:fontconfig',
989             '<(chromium_src_dir)/build/linux/system.gyp:gtk',
990           ],
991           'sources': [
992             '../platform/graphics/chromium/VDMXParser.cpp',
993             '../platform/graphics/chromium/HarfbuzzSkia.cpp',
994           ],
995           'sources/': [
996             # Cherry-pick files excluded by the broader regular expressions above.
997             ['include', 'platform/chromium/KeyCodeConversionGtk\\.cpp$'],
998             ['include', 'platform/graphics/chromium/FontCacheLinux\\.cpp$'],
999             ['include', 'platform/graphics/chromium/FontLinux\\.cpp$'],
1000             ['include', 'platform/graphics/chromium/FontPlatformDataLinux\\.cpp$'],
1001             ['include', 'platform/graphics/chromium/GlyphPageTreeNodeLinux\\.cpp$'],
1002             ['include', 'platform/graphics/chromium/SimpleFontDataLinux\\.cpp$'],
1003           ],
1004           'cflags': [
1005             # WebCore does not work with strict aliasing enabled.
1006             # https://bugs.webkit.org/show_bug.cgi?id=25864
1007             '-fno-strict-aliasing',
1008           ],
1009         }],
1010         ['OS=="linux"', {
1011           'defines': [
1012             # Mozilla on Linux effectively uses uname -sm, but when running
1013             # 32-bit x86 code on an x86_64 processor, it uses
1014             # "Linux i686 (x86_64)".  Matching that would require making a
1015             # run-time determination.
1016             'WEBCORE_NAVIGATOR_PLATFORM="Linux i686"',
1017           ],
1018         }],
1019         ['OS=="mac"', {
1020           'dependencies': [
1021             'webkit_system_interface',
1022           ],
1023           'defines': [
1024             # Match Safari and Mozilla on Mac x86.
1025             'WEBCORE_NAVIGATOR_PLATFORM="MacIntel"',
1026
1027             # Chromium's version of WebCore includes the following Objective-C
1028             # classes. The system-provided WebCore framework may also provide
1029             # these classes. Because of the nature of Objective-C binding
1030             # (dynamically at runtime), it's possible for the Chromium-provided
1031             # versions to interfere with the system-provided versions.  This may
1032             # happen when a system framework attempts to use WebCore.framework,
1033             # such as when converting an HTML-flavored string to an
1034             # NSAttributedString.  The solution is to force Objective-C class
1035             # names that would conflict to use alternate names.
1036
1037             # FIXME: This list will hopefully shrink but may also grow.
1038             # Periodically run:
1039             # nm libwebcore.a | grep -E '[atsATS] ([+-]\[|\.objc_class_name)'
1040             # and make sure that everything listed there has the alternate
1041             # ChromiumWebCoreObjC name, and that nothing extraneous is listed
1042             # here. If all Objective-C can be eliminated from Chromium's WebCore
1043             # library, these defines should be removed entirely.
1044             'ScrollbarPrefsObserver=ChromiumWebCoreObjCScrollbarPrefsObserver',
1045             'WebCoreRenderThemeNotificationObserver=ChromiumWebCoreObjCWebCoreRenderThemeNotificationObserver',
1046             'WebFontCache=ChromiumWebCoreObjCWebFontCache',
1047           ],
1048           'actions': [
1049             {
1050               # Allow framework-style #include of
1051               # <WebCore/WebCoreSystemInterface.h>.
1052               'action_name': 'WebCoreSystemInterface.h',
1053               'inputs': [
1054                 '../platform/mac/WebCoreSystemInterface.h',
1055               ],
1056               'outputs': [
1057                 '<(INTERMEDIATE_DIR)/WebCore/WebCoreSystemInterface.h',
1058               ],
1059               'action': ['cp', '<@(_inputs)', '<@(_outputs)'],
1060             },
1061           ],
1062           'include_dirs': [
1063             '../../WebKitLibraries',
1064           ],
1065           'sources/': [
1066             # Additional files from the WebCore Mac build that are presently
1067             # used in the WebCore Chromium Mac build too.
1068
1069             # The Mac build is PLATFORM_CF but does not use CFNetwork.
1070             ['include', 'CF\\.cpp$'],
1071             ['exclude', 'network/cf/'],
1072
1073             # The Mac build is PLATFORM_CG too.  platform/graphics/cg is the
1074             # only place that CG files we want to build are located, and not
1075             # all of them even have a CG suffix, so just add them by a
1076             # regexp matching their directory.
1077             ['include', 'platform/graphics/cg/[^/]*(?<!Win)?\\.(cpp|mm?)$'],
1078
1079             # Use native Mac font code from WebCore.
1080             ['include', 'platform/(graphics/)?mac/[^/]*Font[^/]*\\.(cpp|mm?)$'],
1081             ['include', 'platform/graphics/mac/ComplexText[^/]*\\.(cpp|h)$'],
1082
1083             # Cherry-pick some files that can't be included by broader regexps.
1084             # Some of these are used instead of Chromium platform files, see
1085             # the specific exclusions in the "sources!" list below.
1086             ['include', 'rendering/RenderThemeMac\\.mm$'],
1087             ['include', 'loader/archive/cf/LegacyWebArchive\\.cpp$'],
1088             ['include', 'platform/graphics/mac/ColorMac\\.mm$'],
1089             ['include', 'platform/graphics/mac/FloatPointMac\\.mm$'],
1090             ['include', 'platform/graphics/mac/FloatRectMac\\.mm$'],
1091             ['include', 'platform/graphics/mac/FloatSizeMac\\.mm$'],
1092             ['include', 'platform/graphics/mac/GlyphPageTreeNodeMac\\.cpp$'],
1093             ['include', 'platform/graphics/mac/GraphicsContextMac\\.mm$'],
1094             ['include', 'platform/graphics/mac/IntRectMac\\.mm$'],
1095             ['include', 'platform/mac/BlockExceptions\\.mm$'],
1096             ['include', 'platform/mac/KillRingMac\\.mm$'],
1097             ['include', 'platform/mac/LocalCurrentGraphicsContext\\.mm$'],
1098             ['include', 'platform/mac/PurgeableBufferMac\\.cpp$'],
1099             ['include', 'platform/mac/WebCoreSystemInterface\\.mm$'],
1100             ['include', 'platform/mac/WebCoreTextRenderer\\.mm$'],
1101             ['include', 'platform/text/mac/ShapeArabic\\.c$'],
1102             ['include', 'platform/text/mac/String(Impl)?Mac\\.mm$'],
1103             # Use USE_NEW_THEME on Mac.
1104             ['include', 'platform/Theme\\.cpp$'],
1105
1106             ['include', 'WebKit/mac/WebCoreSupport/WebSystemInterface\\.mm$'],
1107           ],
1108           'sources!': [
1109             # The Mac uses platform/mac/KillRingMac.mm instead of the dummy
1110             # implementation.
1111             '../platform/KillRingNone.cpp',
1112
1113             # The Mac currently uses FontCustomPlatformData.cpp from
1114             # platform/graphics/mac, included by regex above, instead.
1115             '../platform/graphics/chromium/FontCustomPlatformData.cpp',
1116
1117             # The Mac currently uses ScrollbarThemeChromiumMac.mm, which is not
1118             # related to ScrollbarThemeChromium.cpp.
1119             '../platform/chromium/ScrollbarThemeChromium.cpp',
1120
1121             # The Mac uses ImageSourceCG.cpp from platform/graphics/cg, included
1122             # by regex above, instead.
1123             '../platform/graphics/ImageSource.cpp',
1124
1125             # These Skia files aren't currently built on the Mac, which uses
1126             # CoreGraphics directly for this portion of graphics handling.
1127             '../platform/graphics/skia/FloatPointSkia.cpp',
1128             '../platform/graphics/skia/FloatRectSkia.cpp',
1129             '../platform/graphics/skia/GradientSkia.cpp',
1130             '../platform/graphics/skia/GraphicsContext3DSkia.cpp',
1131             '../platform/graphics/skia/GraphicsContextSkia.cpp',
1132             '../platform/graphics/skia/ImageBufferSkia.cpp',
1133             '../platform/graphics/skia/ImageSkia.cpp',
1134             '../platform/graphics/skia/ImageSourceSkia.cpp',
1135             '../platform/graphics/skia/IntPointSkia.cpp',
1136             '../platform/graphics/skia/IntRectSkia.cpp',
1137             '../platform/graphics/skia/PathSkia.cpp',
1138             '../platform/graphics/skia/PatternSkia.cpp',
1139             '../platform/graphics/skia/TransformationMatrixSkia.cpp',
1140
1141             # RenderThemeChromiumSkia is not used on mac since RenderThemeChromiumMac
1142             # does not reference the Skia code that is used by Windows and Linux.
1143             '../rendering/RenderThemeChromiumSkia.cpp',
1144
1145             # Skia image-decoders are also not used on mac.  CoreGraphics
1146             # is used directly instead.
1147             '../platform/image-decoders/ImageDecoder.h',
1148             '../platform/image-decoders/bmp/BMPImageDecoder.cpp',
1149             '../platform/image-decoders/bmp/BMPImageDecoder.h',
1150             '../platform/image-decoders/bmp/BMPImageReader.cpp',
1151             '../platform/image-decoders/bmp/BMPImageReader.h',
1152             '../platform/image-decoders/gif/GIFImageDecoder.cpp',
1153             '../platform/image-decoders/gif/GIFImageDecoder.h',
1154             '../platform/image-decoders/gif/GIFImageReader.cpp',
1155             '../platform/image-decoders/gif/GIFImageReader.h',
1156             '../platform/image-decoders/ico/ICOImageDecoder.cpp',
1157             '../platform/image-decoders/ico/ICOImageDecoder.h',
1158             '../platform/image-decoders/jpeg/JPEGImageDecoder.cpp',
1159             '../platform/image-decoders/jpeg/JPEGImageDecoder.h',
1160             '../platform/image-decoders/png/PNGImageDecoder.cpp',
1161             '../platform/image-decoders/png/PNGImageDecoder.h',
1162             '../platform/image-decoders/skia/ImageDecoderSkia.cpp',
1163             '../platform/image-decoders/xbm/XBMImageDecoder.cpp',
1164             '../platform/image-decoders/xbm/XBMImageDecoder.h',
1165
1166             # Again, Skia is not used on Mac.
1167             '../platform/chromium/DragImageChromiumSkia.cpp',
1168           ],
1169           'direct_dependent_settings': {
1170             'include_dirs': [
1171               '../../WebKitLibraries',
1172               '../../WebKit/mac/WebCoreSupport',
1173             ],
1174           },
1175         }],
1176         ['OS=="win"', {
1177           'dependencies': [
1178             '<(chromium_src_dir)/build/win/system.gyp:cygwin'
1179           ],
1180           'sources/': [
1181             ['exclude', 'Posix\\.cpp$'],
1182             ['include', '/opentype/'],
1183             ['include', '/TransparencyWin\\.cpp$'],
1184             ['include', '/SkiaFontWin\\.cpp$'],
1185           ],
1186           'defines': [
1187             # Match Safari and Mozilla on Windows.
1188             'WEBCORE_NAVIGATOR_PLATFORM="Win32"',
1189             '__PRETTY_FUNCTION__=__FUNCTION__',
1190           ],
1191           # This is needed because Event.h in this directory is blocked
1192           # by a system header on windows.
1193           'include_dirs++': ['../dom'],
1194           'direct_dependent_settings': {
1195             'include_dirs+++': ['../dom'],
1196           },
1197         }],
1198         ['OS!="linux" and OS!="freebsd"', {
1199           'sources/': [['exclude', '(Gtk|Linux)\\.cpp$']]
1200         }],
1201         ['OS!="mac"', {
1202           'sources/': [['exclude', 'Mac\\.(cpp|mm?)$']]
1203         }],
1204         ['OS!="win"', {
1205           'sources/': [
1206             ['exclude', 'Win\\.cpp$'],
1207             ['exclude', '/(Windows|Uniscribe)[^/]*\\.cpp$']
1208           ],
1209         }],
1210         ['OS!="win" and remove_webcore_debug_symbols==1', {
1211           'configurations': {
1212             'Debug': {
1213               'cflags!': ['-g'],
1214             }
1215           },
1216         }],
1217       ],
1218     },
1219   ],  # targets
1220 }