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