Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / Source / core / core.gyp
blob9eb50c867469846b74708f2a0dd548ef059b44f2
2 # Copyright (C) 2009 Google Inc. All rights reserved.
4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions are
6 # met:
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.
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.
32   'includes': [
33     '../build/win/precompile.gypi',
34     '../build/features.gypi',
35     '../build/scripts/scripts.gypi',
36     '../bindings/core/core.gypi',  # core can depend on bindings/core, but not on bindings
37     'core.gypi',
38   ],
40   'variables': {
41     'enable_wexit_time_destructors': 1,
43     'webcore_include_dirs': [
44       '..',  # WebKit/Source
45       '<(SHARED_INTERMEDIATE_DIR)/blink',  # gen/blink
46     ],
48     'conditions': [
49       ['OS=="android" and use_openmax_dl_fft!=0', {
50         'webcore_include_dirs': [
51           '<(DEPTH)/third_party/openmax_dl'
52         ]
53       }],
54     ],
55   },  # variables
57   'target_defaults': {
58     'variables': {
59       'optimize': 'max',
60     },
61   },
63   'targets': [
64     {
65       # GN version: //third_party/WebKit/Source/core/inspector:protocol_sources
66       'target_name': 'inspector_protocol_sources',
67       'type': 'none',
68       'dependencies': [
69         'generate_inspector_protocol_version'
70       ],
71       'actions': [
72         {
73           'action_name': 'generateInspectorProtocolBackendSources',
74           'inputs': [
75             # The python script in action below.
76             'inspector/CodeGeneratorInspector.py',
77             # The helper script imported by CodeGeneratorInspector.py.
78             'inspector/CodeGeneratorInspectorStrings.py',
79             # Input file for the script.
80             '../devtools/protocol.json',
81           ],
82           'outputs': [
83             '<(blink_core_output_dir)/InspectorBackendDispatcher.cpp',
84             '<(blink_core_output_dir)/InspectorBackendDispatcher.h',
85             '<(blink_core_output_dir)/InspectorFrontend.cpp',
86             '<(blink_core_output_dir)/InspectorFrontend.h',
87             '<(blink_core_output_dir)/InspectorTypeBuilder.cpp',
88             '<(blink_core_output_dir)/InspectorTypeBuilder.h',
89           ],
90           'variables': {
91             'generator_include_dirs': [
92             ],
93           },
94           'action': [
95             'python',
96             'inspector/CodeGeneratorInspector.py',
97             '../devtools/protocol.json',
98             '--output_dir', '<(blink_core_output_dir)',
99           ],
100           'message': 'Generating Inspector protocol backend sources from protocol.json',
101         },
102       ]
103     },
104     {
105       # GN version: //third_party/WebKit/Source/core/inspector:instrumentation_sources
106       'target_name': 'inspector_instrumentation_sources',
107       'type': 'none',
108       'dependencies': [],
109       'actions': [
110         {
111           'action_name': 'generateInspectorInstrumentation',
112           'inputs': [
113             # The python script in action below.
114             'inspector/CodeGeneratorInstrumentation.py',
115             # Input file for the script.
116             'inspector/InspectorInstrumentation.idl',
117           ],
118           'outputs': [
119             '<(blink_core_output_dir)/InspectorConsoleInstrumentationInl.h',
120             '<(blink_core_output_dir)/InspectorInstrumentationInl.h',
121             '<(blink_core_output_dir)/InspectorOverridesInl.h',
122             '<(blink_core_output_dir)/InstrumentingAgentsInl.h',
123             '<(blink_core_output_dir)/InspectorInstrumentationImpl.cpp',
124           ],
125           'action': [
126             'python',
127             'inspector/CodeGeneratorInstrumentation.py',
128             'inspector/InspectorInstrumentation.idl',
129             '--output_dir', '<(blink_core_output_dir)',
130           ],
131           'message': 'Generating Inspector instrumentation code from InspectorInstrumentation.idl',
132         }
133       ]
134     },
135     {
136       # GN version: //third_party/WebKit/Source/core/inspector:protocol_version
137       'target_name': 'generate_inspector_protocol_version',
138       'type': 'none',
139       'actions': [
140          {
141           'action_name': 'generateInspectorProtocolVersion',
142           'inputs': [
143             'inspector/generate-inspector-protocol-version',
144             '../devtools/protocol.json',
145           ],
146           'outputs': [
147             '<(blink_core_output_dir)/InspectorProtocolVersion.h',
148           ],
149           'variables': {
150             'generator_include_dirs': [
151             ],
152           },
153           'action': [
154             'python',
155             'inspector/generate-inspector-protocol-version',
156             '-o',
157             '<@(_outputs)',
158             '<@(_inputs)'
159           ],
160           'message': 'Validate inspector protocol for backwards compatibility and generate version file',
161         }
162       ]
163     },
164     {
165       # GN version: //third_party/WebKit/Source/core:core_generated
166       'target_name': 'webcore_generated',
167       'type': 'static_library',
168       'hard_dependency': 1,
169       'dependencies': [
170         'webcore_prerequisites',
171         'core_generated.gyp:make_core_generated',
172         'inspector_protocol_sources',
173         'inspector_instrumentation_sources',
174         '../bindings/core/v8/generated.gyp:bindings_core_v8_generated',
175         # FIXME: don't depend on bindings_modules http://crbug.com/358074
176         '../bindings/modules/generated.gyp:modules_event_generated',
177         '../bindings/modules/v8/generated.gyp:bindings_modules_v8_generated',
178         '../platform/platform_generated.gyp:make_platform_generated',
179         '../wtf/wtf.gyp:wtf',
180         '<(DEPTH)/gin/gin.gyp:gin',
181         '<(DEPTH)/skia/skia.gyp:skia',
182         '<(DEPTH)/third_party/iccjpeg/iccjpeg.gyp:iccjpeg',
183         '<(DEPTH)/third_party/libpng/libpng.gyp:libpng',
184         '<(DEPTH)/third_party/libwebp/libwebp.gyp:libwebp',
185         '<(DEPTH)/third_party/libxml/libxml.gyp:libxml',
186         '<(DEPTH)/third_party/libxslt/libxslt.gyp:libxslt',
187         '<(DEPTH)/third_party/npapi/npapi.gyp:npapi',
188         '<(DEPTH)/third_party/qcms/qcms.gyp:qcms',
189         '<(DEPTH)/third_party/snappy/snappy.gyp:snappy',
190         '<(DEPTH)/third_party/sqlite/sqlite.gyp:sqlite',
191         '<(DEPTH)/url/url.gyp:url_lib',
192         '<(DEPTH)/v8/tools/gyp/v8.gyp:v8',
193       ],
194       'include_dirs': [
195         '<@(webcore_include_dirs)',
196       ],
197       'sources': [
198         # FIXME: should be bindings_core_v8_files http://crbug.com/358074
199         '<@(bindings_core_v8_files)',
200         # These files include all the .cpp files generated from the .idl files
201         # in webcore_files.
202         '<@(bindings_core_v8_generated_aggregate_files)',
203         '<@(bindings_core_v8_generated_union_type_files)',
205         '<@(generated_core_additional_files)',
207         # IDL dictionary impl files generated by IDL compiler
208         '<@(generated_core_dictionary_files)',
209       ],
210       'conditions': [
211         ['OS=="win" and component=="shared_library"', {
212           'defines': [
213             'USING_V8_SHARED',
214           ],
215         }],
216         ['OS=="win"', {
217           # In generated bindings code: 'switch contains default but no case'.
218           # Disable c4267 warnings until we fix size_t to int truncations.
219           # 4701 and 4702 are disabled because of issues in Bison-generated
220           # XPathGrammar.cpp.cpp.
221           'msvs_disabled_warnings': [ 4065, 4267, 4701, 4702 ],
222         }],
223         ['OS in ("linux", "android") and "WTF_USE_WEBAUDIO_IPP=1" in feature_defines', {
224           'cflags': [
225             '<!@(pkg-config --cflags-only-I ipp)',
226           ],
227         }],
228       ],
229     },
230     {
231       # We'll soon split libwebcore in multiple smaller libraries.
232       # webcore_prerequisites will be the 'base' target of every sub-target.
233       # GN version: //third_party/WebKit/Source/core:prerequisites
234       'target_name': 'webcore_prerequisites',
235       'type': 'none',
236       'dependencies': [
237         'inspector_protocol_sources',
238         'inspector_instrumentation_sources',
239         'core_generated.gyp:make_core_generated',
240         '../bindings/core/v8/generated.gyp:bindings_core_v8_generated',
241         # FIXME: don't depend on bindings_modules http://crbug.com/358074
242         '../bindings/modules/v8/generated.gyp:bindings_modules_v8_generated',
243         '../wtf/wtf.gyp:wtf',
244         '../config.gyp:config',
245         '../platform/blink_platform.gyp:blink_platform',
246         '<(DEPTH)/gpu/gpu.gyp:gles2_c_lib',
247         '<(DEPTH)/skia/skia.gyp:skia',
248         '<(angle_path)/src/angle.gyp:translator',
249         '<(DEPTH)/third_party/iccjpeg/iccjpeg.gyp:iccjpeg',
250         '<(DEPTH)/third_party/icu/icu.gyp:icui18n',
251         '<(DEPTH)/third_party/icu/icu.gyp:icuuc',
252         '<(DEPTH)/third_party/libpng/libpng.gyp:libpng',
253         '<(DEPTH)/third_party/libwebp/libwebp.gyp:libwebp',
254         '<(DEPTH)/third_party/libxml/libxml.gyp:libxml',
255         '<(DEPTH)/third_party/libxslt/libxslt.gyp:libxslt',
256         '<(DEPTH)/third_party/npapi/npapi.gyp:npapi',
257         '<(DEPTH)/third_party/ots/ots.gyp:ots',
258         '<(DEPTH)/third_party/qcms/qcms.gyp:qcms',
259         '<(DEPTH)/third_party/sqlite/sqlite.gyp:sqlite',
260         '<(DEPTH)/third_party/zlib/zlib.gyp:zlib',
261         '<(DEPTH)/url/url.gyp:url_lib',
262         '<(DEPTH)/v8/tools/gyp/v8.gyp:v8',
263       ],
264       'export_dependent_settings': [
265         '../wtf/wtf.gyp:wtf',
266         '../config.gyp:config',
267         '<(DEPTH)/gpu/gpu.gyp:gles2_c_lib',
268         '<(DEPTH)/skia/skia.gyp:skia',
269         '<(angle_path)/src/angle.gyp:translator',
270         '<(DEPTH)/third_party/iccjpeg/iccjpeg.gyp:iccjpeg',
271         '<(DEPTH)/third_party/libpng/libpng.gyp:libpng',
272         '<(DEPTH)/third_party/libwebp/libwebp.gyp:libwebp',
273         '<(DEPTH)/third_party/libxml/libxml.gyp:libxml',
274         '<(DEPTH)/third_party/libxslt/libxslt.gyp:libxslt',
275         '<(DEPTH)/third_party/npapi/npapi.gyp:npapi',
276         '<(DEPTH)/third_party/ots/ots.gyp:ots',
277         '<(DEPTH)/third_party/qcms/qcms.gyp:qcms',
278         '<(DEPTH)/third_party/sqlite/sqlite.gyp:sqlite',
279         '<(DEPTH)/third_party/zlib/zlib.gyp:zlib',
280         '<(DEPTH)/url/url.gyp:url_lib',
281         '<(DEPTH)/v8/tools/gyp/v8.gyp:v8',
282       ],
283       'direct_dependent_settings': {
284         'defines': [
285           'BLINK_IMPLEMENTATION=1',
286           'INSIDE_BLINK',
287         ],
288         'include_dirs': [
289           '<@(webcore_include_dirs)',
290           '<(DEPTH)/gpu',
291           '<(angle_path)/include',
292         ],
293         'xcode_settings': {
294           # Some Mac-specific parts of WebKit won't compile without having this
295           # prefix header injected.
296           'GCC_PREFIX_HEADER': '<(DEPTH)/third_party/WebKit/Source/build/mac/Prefix.h',
297         },
298       },
299       'conditions': [
300         ['OS=="win" and component=="shared_library"', {
301           'direct_dependent_settings': {
302             'defines': [
303                'USING_V8_SHARED',
304             ],
305           },
306         }],
307         ['use_x11 == 1', {
308           'dependencies': [
309             '<(DEPTH)/build/linux/system.gyp:fontconfig',
310           ],
311           'export_dependent_settings': [
312             '<(DEPTH)/build/linux/system.gyp:fontconfig',
313           ],
314           'direct_dependent_settings': {
315             'cflags': [
316               # WebCore does not work with strict aliasing enabled.
317               # https://bugs.webkit.org/show_bug.cgi?id=25864
318               '-fno-strict-aliasing',
319             ],
320           },
321         }],
322         ['OS=="android"', {
323           'sources/': [
324             ['exclude', 'accessibility/'],
325           ],
326         }],
327         ['OS in ("linux", "android") and "WTF_USE_WEBAUDIO_IPP=1" in feature_defines', {
328           'direct_dependent_settings': {
329             'cflags': [
330               '<!@(pkg-config --cflags-only-I ipp)',
331             ],
332           },
333         }],
334         ['OS=="mac"', {
335           'direct_dependent_settings': {
336             'defines': [
337               # Chromium's version of WebCore includes the following Objective-C
338               # classes. The system-provided WebCore framework may also provide
339               # these classes. Because of the nature of Objective-C binding
340               # (dynamically at runtime), it's possible for the
341               # Chromium-provided versions to interfere with the system-provided
342               # versions.  This may happen when a system framework attempts to
343               # use core.framework, such as when converting an HTML-flavored
344               # string to an NSAttributedString.  The solution is to force
345               # Objective-C class names that would conflict to use alternate
346               # names.
347               #
348               # This list will hopefully shrink but may also grow.  Its
349               # performance is monitored by the "Check Objective-C Rename"
350               # postbuild step, and any suspicious-looking symbols not handled
351               # here or whitelisted in that step will cause a build failure.
352               #
353               # If this is unhandled, the console will receive log messages
354               # such as:
355               # com.google.Chrome[] objc[]: Class ScrollbarPrefsObserver is implemented in both .../Google Chrome.app/Contents/Versions/.../Google Chrome Helper.app/Contents/MacOS/../../../Google Chrome Framework.framework/Google Chrome Framework and /System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebCore.framework/Versions/A/WebCore. One of the two will be used. Which one is undefined.
356               'WebCoreTextFieldCell=ChromiumWebCoreObjCWebCoreTextFieldCell',
357             ],
358             'postbuilds': [
359               {
360                 # This step ensures that any Objective-C names that aren't
361                 # redefined to be "safe" above will cause a build failure.
362                 'postbuild_name': 'Check Objective-C Rename',
363                 'variables': {
364                   'class_whitelist_regex':
365                       'ChromiumWebCoreObjC|TCMVisibleView|RTCMFlippedView|ScrollerStyleObserver|LayoutThemeNotificationObserver',
366                   'category_whitelist_regex':
367                       'WebCoreFocusRingDrawing|WebCoreTheme',
368                 },
369                 'action': [
370                   '../build/scripts/check_objc_rename.sh',
371                   '<(class_whitelist_regex)',
372                   '<(category_whitelist_regex)',
373                 ],
374               },
375             ],
376           },
377         }],
378         ['"WTF_USE_WEBAUDIO_FFMPEG=1" in feature_defines', {
379           # This directory needs to be on the include path for multiple sub-targets of webcore.
380           'direct_dependent_settings': {
381             'include_dirs': [
382               '<(DEPTH)/third_party/ffmpeg',
383             ],
384           },
385           'dependencies': [
386             '<(DEPTH)/third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
387           ],
388         }],
389        ['"WTF_USE_WEBAUDIO_OPENMAX_DL_FFT=1" in feature_defines', {
390          'direct_dependent_settings': {
391            'include_dirs': [
392              '<(DEPTH)/third_party/openmax_dl',
393            ],
394          },
395          'dependencies': [
396            '<(DEPTH)/third_party/openmax_dl/dl/dl.gyp:openmax_dl',
397          ],
398        }],
399         # Windows shared builder needs extra help for linkage
400         ['OS=="win" and "WTF_USE_WEBAUDIO_FFMPEG=1" in feature_defines', {
401           'export_dependent_settings': [
402             '<(DEPTH)/third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
403           ],
404         }],
405       ],
406     },
407     {
408       # GN version: //third_party/WebKit/Source/core:dom
409       'target_name': 'webcore_dom',
410       'type': 'static_library',
411       'dependencies': [
412         'webcore_prerequisites',
413       ],
414       'sources': [
415         '<@(webcore_dom_files)',
416       ],
417       # Disable c4267 warnings until we fix size_t to int truncations.
418       'msvs_disabled_warnings': [ 4267, ],
419     },
420     {
421       # GN version: //third_party/WebKit/Source/core:html
422       'target_name': 'webcore_html',
423       'type': 'static_library',
424       'dependencies': [
425         'webcore_prerequisites',
426       ],
427       'sources': [
428         '<@(webcore_html_files)',
429       ],
430       'conditions': [
431         # Shard this taret into parts to work around linker limitations.
432         # on link time code generation builds.
433         ['OS=="win" and buildtype=="Official"', {
434           'msvs_shard': 5,
435         }],
436         ['OS!="android"', {
437           'sources/': [
438             ['exclude', 'Android\\.cpp$'],
439           ],
440         }],
441       ],
442     },
443     {
444       # GN version: //third_party/WebKit/Source/core:svg
445       'target_name': 'webcore_svg',
446       'type': 'static_library',
447       'dependencies': [
448         'webcore_prerequisites',
449       ],
450       'sources': [
451         '<@(webcore_svg_files)',
452       ],
453       'conditions': [
454         ['OS=="win" and buildtype=="Official"', {
455           'msvs_shard': 5,
456         }],
457       ],
458     },
459     {
460       # GN version: //third_party/WebKit/Source/core:rendering
461       'target_name': 'webcore_rendering',
462       'type': 'static_library',
463       'dependencies': [
464         'webcore_prerequisites',
465       ],
466       'sources': [
467         '<@(webcore_rendering_files)',
468       ],
469       'conditions': [
470         # Shard this taret into parts to work around linker limitations.
471         # on link time code generation builds.
472         ['OS=="win" and buildtype=="Official"', {
473           'msvs_shard': 5,
474         }],
475         ['use_default_render_theme==0 and OS != "android"', {
476           'sources!': [
477             'layout/LayoutThemeDefault.cpp',
478             'layout/LayoutThemeDefault.h',
479           ],
480         }],
481         ['OS!="win"', {
482           'sources!': [
483             'layout/LayoutThemeFontProviderWin.cpp',
484             'layout/LayoutThemeWin.cpp',
485             'layout/LayoutThemeWin.h',
486           ],
487         }],
488         ['OS=="win" and chromium_win_pch==1', {
489           'sources/': [
490             ['include', '<(DEPTH)/third_party/WebKit/Source/build/win/Precompile.cpp'],
491           ],
492         }],
493         ['OS=="mac"', {
494           'sources!': [
495             # LayoutThemeFontProvider is used by LayoutThemeDefault.
496             'layout/LayoutThemeFontProvider.cpp',
497             'layout/LayoutThemeFontProvider.h',
498           ],
499         },{ # OS!="mac"
500           'sources!': [
501             'layout/LayoutThemeMac.h',
502             'layout/LayoutThemeMac.mm',
503           ],
504         }],
505         ['OS == "android" and target_arch == "ia32" and gcc_version == 46', {
506           # Due to a bug in gcc 4.6 in android NDK, we get warnings about uninitialized variable.
507           'cflags': ['-Wno-uninitialized'],
508         }],
509         ['OS != "linux"', {
510           'sources!': [
511             'layout/LayoutThemeLinux.cpp',
512             'layout/LayoutThemeLinux.h',
513           ],
514         }],
515         ['OS != "linux" and OS != "android"', {
516           'sources!': [
517             'layout/LayoutThemeFontProviderLinux.cpp',
518           ],
519         }],
520         ['OS!="android"', {
521           'sources!': [
522             'layout/LayoutThemeAndroid.cpp',
523             'layout/LayoutThemeAndroid.h',
524           ],
525         }],
526       ],
527     },
528     {
529       # GN version: //third_party/WebKit/Source/core:remaining
530       'target_name': 'webcore_remaining',
531       'type': 'static_library',
532       'dependencies': [
533         'webcore_prerequisites',
534       ],
535       'sources': [
536         '<@(webcore_non_rendering_files)',
537       ],
538       'conditions': [
539         # Shard this target into parts to work around linker limitations.
540         # on link time code generation builds.
541         ['OS=="win" and (buildtype=="Official" or (fastbuild==0 and win_z7==1))', {
542           'msvs_shard': 19,
543         }],
544         ['OS=="android"', {
545           'cflags': [
546             # WebCore does not work with strict aliasing enabled.
547             # https://bugs.webkit.org/show_bug.cgi?id=25864
548             '-fno-strict-aliasing',
549           ],
550         }],
551         ['OS=="mac"', {
552           'link_settings': {
553             'libraries': [
554               '$(SDKROOT)/System/Library/Frameworks/Carbon.framework',
555             ],
556           },
557           'sources/': [
558             # Additional files from the WebCore Mac build that are presently
559             # used in the WebCore Chromium Mac build too.
561             # Cherry-pick some files that can't be included by broader regexps.
562             # Some of these are used instead of Chromium platform files, see
563             # the specific exclusions in the "exclude" list below.
564             ['include', 'platform/mac/WebCoreSystemInterface\\.h$'],
565             ['include', 'platform/mac/WebCoreTextRenderer\\.mm$'],
566             ['include', 'platform/text/mac/ShapeArabic\\.c$'],
567             ['include', 'platform/text/mac/String(Impl)?Mac\\.mm$'],
568             # Use USE_NEW_THEME on Mac.
569             ['include', 'platform/Theme\\.cpp$'],
570           ],
571         }, { # OS!="mac"
572           'sources!': [
573             'editing/commands/SmartReplaceCF.cpp',
574           ],
575         }],
576         ['OS=="win" and chromium_win_pch==1', {
577           'sources/': [
578             ['include', '<(DEPTH)/third_party/WebKit/Source/build/win/Precompile.cpp'],
579           ],
580         }],
581         ['use_default_render_theme==0 and OS != "android"', {
582           'sources!': [
583             'paint/ThemePainterDefault.cpp',
584             'paint/ThemePainterDefault.h',
585           ],
586         }],
587       ],
588       # Disable c4267 warnings until we fix size_t to int truncations.
589       'msvs_disabled_warnings': [ 4267, 4334, ],
590     },
591     {
592       # GN version: //third_party/WebKit/Source/core:core
593       'target_name': 'webcore',
594       'type': 'none',
595       'dependencies': [
596         'webcore_dom',
597         'webcore_html',
598         'webcore_remaining',
599         'webcore_rendering',
600         'webcore_svg',
601         # Exported.
602         'webcore_generated',
603         '../platform/blink_platform.gyp:blink_platform',
604         '../wtf/wtf.gyp:wtf',
605         '<(DEPTH)/skia/skia.gyp:skia',
606         '<(DEPTH)/third_party/npapi/npapi.gyp:npapi',
607         '<(DEPTH)/third_party/qcms/qcms.gyp:qcms',
608         '<(DEPTH)/url/url.gyp:url_lib',
609         '<(DEPTH)/v8/tools/gyp/v8.gyp:v8',
610       ],
611       'export_dependent_settings': [
612         'webcore_generated',
613         '../platform/blink_platform.gyp:blink_platform',
614         '../wtf/wtf.gyp:wtf',
615         '<(DEPTH)/skia/skia.gyp:skia',
616         '<(DEPTH)/third_party/npapi/npapi.gyp:npapi',
617         '<(DEPTH)/third_party/qcms/qcms.gyp:qcms',
618         '<(DEPTH)/url/url.gyp:url_lib',
619         '<(DEPTH)/v8/tools/gyp/v8.gyp:v8',
620       ],
621       'direct_dependent_settings': {
622         'include_dirs': [
623           '<@(webcore_include_dirs)',
624         ],
625       },
626       'conditions': [
627         ['OS=="linux" and "WTF_USE_WEBAUDIO_IPP=1" in feature_defines', {
628           'link_settings': {
629             'ldflags': [
630               '<!@(pkg-config --libs-only-L ipp)',
631             ],
632             'libraries': [
633               '-lipps -lippcore',
634             ],
635           },
636         }],
637         # Use IPP static libraries for x86 Android.
638         ['OS=="android" and "WTF_USE_WEBAUDIO_IPP=1" in feature_defines', {
639           'link_settings': {
640             'libraries': [
641                '<!@(pkg-config --libs ipp|sed s/-L//)/libipps_l.a',
642                '<!@(pkg-config --libs ipp|sed s/-L//)/libippcore_l.a',
643             ]
644           },
645         }],
646       ],
647     },
648     {
649       # GN version: //third_party/WebKit/Source/core:testing
650       'target_name': 'webcore_testing',
651       'type': 'static_library',
652       'dependencies': [
653         '../config.gyp:config',
654         '../wtf/wtf_tests.gyp:wtf_unittest_helpers',
655         'webcore_prerequisites',
656       ],
657       'defines': [
658         'BLINK_IMPLEMENTATION=1',
659         'INSIDE_BLINK',
660       ],
661       'include_dirs': [
662         'testing',
663         'testing/v8',
664       ],
665       'sources': [
666         # Note: file list duplicated in GN build.
667         '<@(generated_core_testing_dictionary_files)',
668         '<@(webcore_testing_files)',
669         '<@(generated_bindings_core_testing_files)',
670       ],
671       'sources/': [
672         ['exclude', 'testing/js'],
673       ],
674       'conditions': [
675         ['component!="shared_library" or link_core_modules_separately==0', {
676           'dependencies': [
677             'webcore',
678             'webcore_generated',
679           ],
680         }, {
681           'dependencies': [
682             'webcore_shared',
683           ],
684         }]
685       ],
686     },
687     {
688       # GN version: //third_party/WebKit/Source/core:core
689       'target_name': 'webcore_shared',
690       'type': 'shared_library',
691       'hard_dependency': 1,
692       'dependencies': [
693         'webcore_prerequisites',
695         '../platform/blink_platform.gyp:blink_common',
696         '../platform/blink_platform.gyp:blink_platform',
698         # webcore_generated dependency
699         'core_generated.gyp:make_core_generated',
700         'inspector_protocol_sources',
701         'inspector_instrumentation_sources',
702         '../bindings/core/v8/generated.gyp:bindings_core_v8_generated',
703         # FIXME: don't depend on bindings_modules http://crbug.com/358074
704         '../bindings/modules/generated.gyp:modules_event_generated',
705         '../bindings/modules/v8/generated.gyp:bindings_modules_v8_generated',
706         '../platform/platform_generated.gyp:make_platform_generated',
708         '../wtf/wtf.gyp:wtf',
709         '<(DEPTH)/gin/gin.gyp:gin',
710         '<(DEPTH)/skia/skia.gyp:skia',
711         '<(DEPTH)/third_party/libxml/libxml.gyp:libxml',
712         '<(DEPTH)/third_party/libxslt/libxslt.gyp:libxslt',
713         '<(DEPTH)/third_party/npapi/npapi.gyp:npapi',
714         '<(DEPTH)/third_party/qcms/qcms.gyp:qcms',
715         '<(DEPTH)/third_party/snappy/snappy.gyp:snappy',
716         '<(DEPTH)/third_party/sqlite/sqlite.gyp:sqlite',
717         '<(DEPTH)/url/url.gyp:url_lib',
718         '<(DEPTH)/v8/tools/gyp/v8.gyp:v8',
719       ],
720       'export_dependent_settings': [
721         '../platform/blink_platform.gyp:blink_platform',
722         '../wtf/wtf.gyp:wtf',
723         '<(DEPTH)/skia/skia.gyp:skia',
724         '<(DEPTH)/third_party/npapi/npapi.gyp:npapi',
725         '<(DEPTH)/third_party/qcms/qcms.gyp:qcms',
726         '<(DEPTH)/url/url.gyp:url_lib',
727         '<(DEPTH)/v8/tools/gyp/v8.gyp:v8',
728       ],
729       'direct_dependent_settings': {
730         'include_dirs': [
731           '<@(webcore_include_dirs)',
732         ],
733       },
734       'conditions': [
735         ['component!="shared_library" or link_core_modules_separately==0', {
736         }, {
737           'defines': [
738             'BLINK_CORE_IMPLEMENTATION=1',
739             'BLINK_IMPLEMENTATION=1',
740             'INSIDE_BLINK',
741           ],
742           'sources': [
743             # webcore_generated
744             '<@(bindings_core_v8_files)',
745             '<@(bindings_core_v8_generated_aggregate_files)',
746             '<@(bindings_core_v8_generated_union_type_files)',
747             '<@(generated_core_additional_files)',
748             '<@(generated_core_dictionary_files)',
750             # webcore_non_rendering, webcore_rendering
751             '<@(webcore_rendering_files)',
752             '<@(webcore_non_rendering_files)',
753             # webcore_dom
754             '<@(webcore_dom_files)',
755             # webcore_svg
756             '<@(webcore_svg_files)',
757             # webcore_html
758              '<@(webcore_html_files)',
759           ],
760           'include_dirs': [
761             '<@(webcore_include_dirs)',
762             '../..',  # WebKit
763             # for testing_files
764             'testing',
765             'testing/v8',
766           ],
767           'conditions': [
768             ['use_default_render_theme==0 and OS != "android"', {
769               'sources!': [
770                 'layout/LayoutThemeDefault.cpp',
771                 'layout/LayoutThemeDefault.h',
772                 'paint/ThemePainterDefault.cpp',
773                 'paint/ThemePainterDefault.h',
774               ],
775             }],
776             ['OS=="win"', {
777               # In generated bindings code: 'switch contains default but no
778               # case'.
779               # Disable c4267 warnings until we fix size_t to int truncations.
780               # 4701 and 4702 are disabled because of issues in Bison-generated
781               # XPathGrammar.cpp.cpp.
782               # Disable c4267 warnings until we fix size_t to int truncations.
783               'msvs_disabled_warnings': [ 4065, 4267, 4305, 4334, 4701, 4702, 4910 ],
784               # Disable incremental link when building debug binary to avoid
785               # "LNK1210: exceeded internal ILK size limit;".
786               'configurations': {
787                 'Debug_Base': {
788                   'msvs_settings': {
789                     'VCLinkerTool': {
790                       'LinkIncremental': '1',
791                     },
792                   },
793                 },
794               },
795             }, {
796               'sources!': [
797                 'layout/LayoutThemeFontProviderWin.cpp',
798                 'layout/LayoutThemeWin.cpp',
799                 'layout/LayoutThemeWin.h',
800               ],
801               'libraries': [
802                 '-lm -lstdc++',
803               ],
804             }],
805             ['OS=="win" and chromium_win_pch==1', {
806               'sources/': [
807                 ['include', '<(DEPTH)/third_party/WebKit/Source/build/win/Precompile.cpp'],
808               ],
809             }],
810             ['OS=="mac"', {
811               'sources!': [
812                 # LayoutThemeSkia is not used on mac since LayoutThemeMac
813                 # does not reference the Skia code that is used by Windows, Linux and Android.
814                 'layout/LayoutThemeSkia.cpp',
815                 'layout/LayoutThemeSkia.h',
817                 # LayoutThemeFontProvider is used by LayoutThemeSkia.
818                 'layout/LayoutThemeFontProvider.cpp',
819                 'layout/LayoutThemeFontProvider.h',
820               ],
821               'link_settings': {
822                 'libraries': [
823                   '$(SDKROOT)/System/Library/Frameworks/Carbon.framework',
824                 ],
825               },
826             },{ # OS!="mac"
827               'sources!': [
828                 'editing/commands/SmartReplaceCF.cpp',
829                 'layout/LayoutThemeMac.h',
830                 'layout/LayoutThemeMac.mm',
831               ],
832             }],
833             ['OS == "android" and target_arch == "ia32" and gcc_version == 46', {
834               # Due to a bug in gcc 4.6 in android NDK, we get warnings about uninitialized variable.
835               'cflags': ['-Wno-uninitialized'],
836             }],
837             ['OS != "linux"', {
838               'sources!': [
839                 'layout/LayoutThemeLinux.cpp',
840                 'layout/LayoutThemeLinux.h',
841               ],
842             }],
843             ['OS != "linux" and OS != "android"', {
844               'sources!': [
845                 'layout/LayoutThemeFontProviderLinux.cpp',
846               ],
847             }],
848             ['OS=="android"', {
849               'cflags': [
850                 # WebCore does not work with strict aliasing enabled.
851                 # https://bugs.webkit.org/show_bug.cgi?id=25864
852                 '-fno-strict-aliasing',
853               ],
854             }, {
855               'sources!': [
856                 'layout/LayoutThemeAndroid.cpp',
857                 'layout/LayoutThemeAndroid.h',
858               ],
859             }],
860           ],
861         }],
862         ['OS=="linux" and "WTF_USE_WEBAUDIO_IPP=1" in feature_defines', {
863           'link_settings': {
864             'ldflags': [
865               '<!@(pkg-config --libs-only-L ipp)',
866             ],
867             'libraries': [
868               '-lipps -lippcore',
869             ],
870           },
871         }],
872         # Use IPP static libraries for x86 Android.
873         ['OS=="android" and "WTF_USE_WEBAUDIO_IPP=1" in feature_defines', {
874           'link_settings': {
875             'libraries': [
876                '<!@(pkg-config --libs ipp|sed s/-L//)/libipps_l.a',
877                '<!@(pkg-config --libs ipp|sed s/-L//)/libippcore_l.a',
878             ]
879           },
880         }],
881       ],
882     },
883   ],  # targets