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
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
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.
33 '../../WebKit/chromium/WinPrecompile.gypi',
34 # FIXME: Sense whether upstream or downstream build, and
35 # include the right features.gypi
36 '../../WebKit/chromium/features.gypi',
41 # If set to 1, doesn't compile debug symbols into webcore reducing the
42 # size of the binary and increasing the speed of gdb. gcc only.
43 'remove_webcore_debug_symbols%': 0,
45 # If set to 0, doesn't build SVG support, reducing the size of the
46 # binary and increasing the speed of gdb.
49 'enable_wexit_time_destructors': 1,
51 'webcore_include_dirs': [
55 '../Modules/geolocation',
57 '../Modules/indexeddb',
58 '../Modules/mediastream',
59 '../Modules/websockets',
61 '../accessibility/chromium',
63 '../bindings/generic',
65 '../bindings/v8/custom',
66 '../bindings/v8/specialization',
85 '../loader/archive/cf',
86 '../loader/archive/mhtml',
96 '../platform/animation',
98 '../platform/audio/chromium',
99 '../platform/chromium',
100 '../platform/graphics',
101 '../platform/graphics/chromium',
102 '../platform/graphics/filters',
103 '../platform/graphics/filters/arm',
104 '../platform/graphics/gpu',
105 '../platform/graphics/opentype',
106 '../platform/graphics/skia',
107 '../platform/graphics/transforms',
108 '../platform/image-decoders',
109 '../platform/image-decoders/bmp',
110 '../platform/image-decoders/gif',
111 '../platform/image-decoders/ico',
112 '../platform/image-decoders/jpeg',
113 '../platform/image-decoders/png',
114 '../platform/image-decoders/skia',
115 '../platform/image-decoders/xbm',
116 '../platform/image-decoders/webp',
117 '../platform/image-encoders/skia',
118 '../platform/leveldb',
119 '../platform/mediastream',
121 '../platform/network',
122 '../platform/network/chromium',
125 '../platform/text/transcoder',
127 '../plugins/chromium',
129 '../rendering/style',
132 '../storage/chromium',
136 '../svg/graphics/filters',
138 '../../ThirdParty/glu',
145 'bindings_idl_files': [
146 '<@(webcore_bindings_idl_files)',
149 'bindings_idl_files!': [
150 # Custom bindings in bindings/v8/custom exist for these.
151 '../dom/EventListener.idl',
152 '../dom/EventTarget.idl',
153 '../html/VoidCallback.idl',
155 # Bindings with custom Objective-C implementations.
156 '../page/AbstractView.idl',
158 # These bindings are excluded, as they're only used through inheritance and don't define constants that would need a constructor.
159 '../svg/ElementTimeControl.idl',
160 '../svg/SVGExternalResourcesRequired.idl',
161 '../svg/SVGFilterPrimitiveStandardAttributes.idl',
162 '../svg/SVGFitToViewBox.idl',
164 '../svg/SVGLangSpace.idl',
165 '../svg/SVGLocatable.idl',
166 '../svg/SVGStylable.idl',
167 '../svg/SVGTests.idl',
168 '../svg/SVGTransformable.idl',
169 '../svg/SVGViewSpec.idl',
170 '../svg/SVGZoomAndPan.idl',
172 # FIXME: I don't know why these are excluded, either.
173 # Someone (me?) should figure it out and add appropriate comments.
174 '../css/CSSUnknownRule.idl',
178 # Location of the chromium src directory.
179 ['inside_chromium_build==0', {
180 # webkit is being built outside of the full chromium project.
181 'chromium_src_dir': '../../WebKit/chromium',
182 'libjpeg_gyp_path': '../../WebKit/chromium/third_party/libjpeg_turbo/libjpeg.gyp',
184 # webkit is checked out in src/chromium/third_party/webkit
185 'chromium_src_dir': '../../../../..',
187 # TODO(maruel): Move it in its own project or generate it anyway?
189 'bindings_idl_files': [
190 '<@(webcore_svg_bindings_idl_files)',
193 ['OS=="mac" and use_skia==0', {
194 'webcore_include_dirs+': [
195 # platform/graphics/cg and cocoa need to come before
196 # platform/graphics/chromium so that the Mac build picks up the
197 # version of ImageBufferData.h in the cg directory and
198 # FontPlatformData.h in the cocoa directory. The + prepends this
199 # directory to the list.
200 # FIXME: This shouldn't need to be prepended.
201 '../platform/graphics/cocoa',
202 '../platform/graphics/cg',
206 'webcore_include_dirs': [
207 # FIXME: Eliminate dependency on platform/mac and related
209 # FIXME: Eliminate dependency on platform/graphics/mac and
210 # related directories.
211 # platform/graphics/cg may need to stick around, though.
212 '../platform/audio/mac',
214 '../platform/graphics/mac',
216 '../platform/text/mac',
219 ['OS=="mac" and use_skia==1', {
220 'webcore_include_dirs': [
221 '../platform/graphics/cocoa',
222 '../platform/graphics/cg',
226 'webcore_include_dirs': [
228 '../platform/audio/win',
229 '../platform/graphics/win',
230 '../platform/text/win',
234 # enable -Wall and -Werror, just for Mac and Linux builds for now
235 # FIXME: Also enable this for Windows after verifying no warnings
238 ['use_x11==1 or OS=="android"', {
239 'webcore_include_dirs': [
240 '../platform/graphics/harfbuzz',
243 ['OS=="win" and buildtype=="Official"', {
244 # On windows official release builds, we try to preserve symbol space.
245 'derived_sources_aggregate_files': [
246 '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSourcesAll.cpp',
249 'derived_sources_aggregate_files': [
250 '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources01.cpp',
251 '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources02.cpp',
252 '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources03.cpp',
253 '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources04.cpp',
254 '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources05.cpp',
255 '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources06.cpp',
256 '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources07.cpp',
257 '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources08.cpp',
258 '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources09.cpp',
259 '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources10.cpp',
260 '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources11.cpp',
261 '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources12.cpp',
262 '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources13.cpp',
263 '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources14.cpp',
264 '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources15.cpp',
265 '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources16.cpp',
266 '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources17.cpp',
267 '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources18.cpp',
268 '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources19.cpp',
281 ['OS!="win" and remove_webcore_debug_symbols==1', {
282 # Remove -g from all targets defined here.
287 ['os_posix==1 and OS!="mac" and OS!="android" and gcc_version==46', {
289 # Disable warnings about c++0x compatibility, as some names (such as nullptr) conflict
290 # with upcoming c++0x types.
291 'cflags_cc': ['-Wno-c++0x-compat'],
294 ['OS=="linux" and target_arch=="arm"', {
295 # Due to a bug in gcc arm, we get warnings about uninitialized timesNewRoman.unstatic.3258
296 # and colorTransparent.unstatic.4879.
298 'cflags': ['-Wno-uninitialized'],
304 # On the Mac, libWebKitSystemInterface*.a is used to help WebCore
305 # interface with the system. This library is supplied as a static
306 # library in binary format. At present, it contains many global
307 # symbols not marked private_extern. It should be considered an
308 # implementation detail of WebCore, and does not need these symbols
309 # to be exposed so widely.
311 # This target contains an action that cracks open the existing
312 # static library and rebuilds it with these global symbols
313 # transformed to private_extern.
314 'target_name': 'webkit_system_interface',
317 'adjusted_library_path':
318 '<(PRODUCT_DIR)/libWebKitSystemInterfaceLeopardPrivateExtern.a',
322 'action_name': 'Adjust Visibility',
324 'mac/adjust_visibility.sh',
325 '<(chromium_src_dir)/third_party/apple_webkit/libWebKitSystemInterfaceLeopard.a',
328 '<(adjusted_library_path)',
333 '<(INTERMEDIATE_DIR)/adjust_visibility', # work directory
339 '<(adjusted_library_path)',
342 }, # target webkit_system_interface
344 }], # condition OS == "mac"
347 'cflags': ['-Wglobal-constructors'],
349 'WARNING_CFLAGS': ['-Wglobal-constructors'],
357 'target_name': 'inspector_protocol_sources',
360 'generate_inspector_protocol_version'
364 'action_name': 'generateInspectorProtocolSources',
366 # First input. It stands for python script in action below.
367 '../inspector/CodeGeneratorInspector.py',
368 # Other inputs. They go as arguments to the python script.
369 '../inspector/Inspector.json',
372 '<(SHARED_INTERMEDIATE_DIR)/webcore/InspectorBackendDispatcher.cpp',
373 '<(SHARED_INTERMEDIATE_DIR)/webkit/InspectorBackendDispatcher.h',
374 '<(SHARED_INTERMEDIATE_DIR)/webcore/InspectorFrontend.cpp',
375 '<(SHARED_INTERMEDIATE_DIR)/webkit/InspectorFrontend.h',
376 '<(SHARED_INTERMEDIATE_DIR)/webcore/InspectorTypeBuilder.cpp',
377 '<(SHARED_INTERMEDIATE_DIR)/webkit/InspectorTypeBuilder.h',
378 '<(SHARED_INTERMEDIATE_DIR)/webcore/InspectorBackendStub.js',
381 'generator_include_dirs': [
387 '--output_h_dir', '<(SHARED_INTERMEDIATE_DIR)/webkit',
388 '--output_cpp_dir', '<(SHARED_INTERMEDIATE_DIR)/webcore',
390 'message': 'Generating Inspector protocol sources from Inspector.json',
395 'target_name': 'generate_inspector_protocol_version',
399 'action_name': 'generateInspectorProtocolVersion',
401 '../inspector/generate-inspector-protocol-version',
402 '../inspector/Inspector.json',
405 '<(SHARED_INTERMEDIATE_DIR)/webkit/InspectorProtocolVersion.h',
408 'generator_include_dirs': [
413 '../inspector/generate-inspector-protocol-version',
418 'message': 'Validate inspector protocol for backwards compatibility and generate version file',
423 'target_name': 'injected_script_source',
427 'action_name': 'generateInjectedScriptSource',
429 '../inspector/InjectedScriptSource.js',
432 '<(SHARED_INTERMEDIATE_DIR)/webkit/InjectedScriptSource.h',
436 '../inspector/xxd.pl',
437 'InjectedScriptSource_js',
441 'message': 'Generating InjectedScriptSource.h from InjectedScriptSource.js',
446 'target_name': 'debugger_script_source',
450 'action_name': 'generateDebuggerScriptSource',
452 '../bindings/v8/DebuggerScript.js',
455 '<(SHARED_INTERMEDIATE_DIR)/webkit/DebuggerScriptSource.h',
459 '../inspector/xxd.pl',
460 'DebuggerScriptSource_js',
464 'message': 'Generating DebuggerScriptSource.h from DebuggerScript.js',
469 'target_name': 'generate_supplemental_dependency',
473 'action_name': 'generateSupplementalDependency',
475 # Write sources into a file, so that the action command line won't
477 'idl_files_list': '<|(idl_files_list.tmp <@(bindings_idl_files))',
480 '../bindings/scripts/preprocess-idls.pl',
481 '../bindings/scripts/IDLParser.pm',
482 '../bindings/scripts/IDLAttributes.txt',
484 '<!@(cat <(idl_files_list))',
487 '<(SHARED_INTERMEDIATE_DIR)/supplemental_dependency.tmp',
492 '-I../bindings/scripts',
493 '../bindings/scripts/preprocess-idls.pl',
495 '<(feature_defines) LANGUAGE_JAVASCRIPT V8_BINDING',
498 '--supplementalDependencyFile',
499 '<(SHARED_INTERMEDIATE_DIR)/supplemental_dependency.tmp',
500 '--idlAttributesFile',
501 '../bindings/scripts/IDLAttributes.txt',
503 'message': 'Resolving [Supplemental=XXX] dependencies in all IDL files',
508 'target_name': 'webcore_bindings_sources',
510 'hard_dependency': 1,
512 'generate_supplemental_dependency',
515 # Write sources into a file, so that the action command line won't
517 'additional_idl_files_list': '<|(additional_idl_files_list.tmp <@(webcore_test_support_idl_files))',
521 '../css/CSSGrammar.y',
522 '../xml/XPathGrammar.y',
525 '../platform/ColorData.gperf',
528 '<@(bindings_idl_files)',
529 '<@(webcore_test_support_idl_files)',
532 # Actions to build derived sources.
534 'action_name': 'generateV8ArrayBufferViewCustomScript',
536 '../bindings/v8/custom/V8ArrayBufferViewCustomScript.js',
539 '<(SHARED_INTERMEDIATE_DIR)/webkit/V8ArrayBufferViewCustomScript.h',
543 '../inspector/xxd.pl',
544 'V8ArrayBufferViewCustomScript_js',
548 'message': 'Generating V8ArrayBufferViewCustomScript.h from V8ArrayBufferViewCustomScript.js',
551 'action_name': 'generateXMLViewerCSS',
553 '../xml/XMLViewer.css',
556 '<(SHARED_INTERMEDIATE_DIR)/webkit/XMLViewerCSS.h',
560 '../inspector/xxd.pl',
567 'action_name': 'generateXMLViewerJS',
569 '../xml/XMLViewer.js',
572 '<(SHARED_INTERMEDIATE_DIR)/webkit/XMLViewerJS.h',
576 '../inspector/xxd.pl',
583 'action_name': 'HTMLEntityTable',
585 '../html/parser/HTMLEntityNames.in',
588 '<(SHARED_INTERMEDIATE_DIR)/webkit/HTMLEntityTable.cpp'
592 '../html/parser/create-html-entity-table',
599 'action_name': 'CSSPropertyNames',
601 '../css/makeprop.pl',
602 '../css/CSSPropertyNames.in',
605 '<(SHARED_INTERMEDIATE_DIR)/webkit/CSSPropertyNames.cpp',
606 '<(SHARED_INTERMEDIATE_DIR)/webkit/CSSPropertyNames.h',
610 'scripts/action_csspropertynames.py',
613 '--defines', '<(feature_defines)',
618 # TODO(maruel): Move it in its own project or generate it anyway?
621 '../css/SVGCSSPropertyNames.in',
627 'action_name': 'CSSValueKeywords',
629 '../css/makevalues.pl',
630 '../css/CSSValueKeywords.in',
633 '<(SHARED_INTERMEDIATE_DIR)/webkit/CSSValueKeywords.cpp',
634 '<(SHARED_INTERMEDIATE_DIR)/webkit/CSSValueKeywords.h',
638 'scripts/action_cssvaluekeywords.py',
641 '--defines', '<(feature_defines)',
646 # TODO(maruel): Move it in its own project or generate it anyway?
649 '../css/SVGCSSValueKeywords.in',
655 'action_name': 'HTMLNames',
657 '../dom/make_names.pl',
658 '../html/HTMLTagNames.in',
659 '../html/HTMLAttributeNames.in',
662 '<(SHARED_INTERMEDIATE_DIR)/webkit/HTMLNames.cpp',
663 '<(SHARED_INTERMEDIATE_DIR)/webkit/HTMLNames.h',
664 '<(SHARED_INTERMEDIATE_DIR)/webkit/HTMLElementFactory.cpp',
665 '<(SHARED_INTERMEDIATE_DIR)/webkit/V8HTMLElementWrapperFactory.cpp',
666 '<(SHARED_INTERMEDIATE_DIR)/webkit/V8HTMLElementWrapperFactory.h',
670 'scripts/action_makenames.py',
676 '--wrapperFactoryV8',
677 '--extraDefines', '<(feature_defines)'
681 'action_name': 'WebKitFontFamilyNames',
683 '../dom/make_names.pl',
684 '../css/WebKitFontFamilyNames.in',
687 '<(SHARED_INTERMEDIATE_DIR)/webkit/WebKitFontFamilyNames.cpp',
688 '<(SHARED_INTERMEDIATE_DIR)/webkit/WebKitFontFamilyNames.h',
692 'scripts/action_makenames.py',
701 'action_name': 'SVGNames',
703 '../dom/make_names.pl',
705 '../svg/svgattrs.in',
708 '<(SHARED_INTERMEDIATE_DIR)/webkit/SVGNames.cpp',
709 '<(SHARED_INTERMEDIATE_DIR)/webkit/SVGNames.h',
710 '<(SHARED_INTERMEDIATE_DIR)/webkit/SVGElementFactory.cpp',
711 '<(SHARED_INTERMEDIATE_DIR)/webkit/SVGElementFactory.h',
712 '<(SHARED_INTERMEDIATE_DIR)/webkit/V8SVGElementWrapperFactory.cpp',
713 '<(SHARED_INTERMEDIATE_DIR)/webkit/V8SVGElementWrapperFactory.h',
717 'scripts/action_makenames.py',
723 '--wrapperFactoryV8',
724 '--extraDefines', '<(feature_defines)'
728 'action_name': 'EventFactory',
730 '../dom/make_event_factory.pl',
731 '../dom/EventFactory.in',
734 '<(SHARED_INTERMEDIATE_DIR)/webkit/EventFactory.cpp',
735 '<(SHARED_INTERMEDIATE_DIR)/webkit/EventHeaders.h',
736 '<(SHARED_INTERMEDIATE_DIR)/webkit/EventInterfaces.h',
740 'scripts/action_makenames.py',
747 'action_name': 'EventTargetFactory',
749 '../dom/make_event_factory.pl',
750 '../dom/EventTargetFactory.in',
753 '<(SHARED_INTERMEDIATE_DIR)/webkit/EventTargetHeaders.h',
754 '<(SHARED_INTERMEDIATE_DIR)/webkit/EventTargetInterfaces.h',
758 'scripts/action_makenames.py',
765 'action_name': 'ExceptionCodeDescription',
767 '../dom/make_dom_exceptions.pl',
768 '../dom/DOMExceptions.in',
771 '<(SHARED_INTERMEDIATE_DIR)/webkit/ExceptionCodeDescription.cpp',
772 '<(SHARED_INTERMEDIATE_DIR)/webkit/ExceptionCodeDescription.h',
773 '<(SHARED_INTERMEDIATE_DIR)/webkit/ExceptionHeaders.h',
774 '<(SHARED_INTERMEDIATE_DIR)/webkit/ExceptionInterfaces.h',
778 'scripts/action_makenames.py',
785 'action_name': 'MathMLNames',
787 '../dom/make_names.pl',
788 '../mathml/mathtags.in',
789 '../mathml/mathattrs.in',
792 '<(SHARED_INTERMEDIATE_DIR)/webkit/MathMLNames.cpp',
793 '<(SHARED_INTERMEDIATE_DIR)/webkit/MathMLNames.h',
794 '<(SHARED_INTERMEDIATE_DIR)/webkit/MathMLElementFactory.cpp',
795 '<(SHARED_INTERMEDIATE_DIR)/webkit/MathMLElementFactory.h',
799 'scripts/action_makenames.py',
805 '--extraDefines', '<(feature_defines)'
809 'action_name': 'UserAgentStyleSheets',
812 '../css/make-css-file-arrays.pl',
813 '../bindings/scripts/preprocessor.pm',
815 # The .css files are in the same order as ../DerivedSources.make.
819 '../css/view-source.css',
820 '../css/themeChromium.css', # Chromium only.
821 '../css/themeChromiumAndroid.css', # Chromium only.
822 '../css/themeChromiumLinux.css', # Chromium only.
823 '../css/themeChromiumSkia.css', # Chromium only.
824 '../css/themeWin.css',
825 '../css/themeWinQuirks.css',
828 '../css/mediaControls.css',
829 '../css/mediaControlsChromium.css',
830 '../css/fullscreen.css',
831 # Skip fullscreenQuickTime.
839 '<(SHARED_INTERMEDIATE_DIR)/webkit/UserAgentStyleSheets.h',
840 '<(SHARED_INTERMEDIATE_DIR)/webkit/UserAgentStyleSheetsData.cpp',
844 'scripts/action_useragentstylesheets.py',
850 '--defines', '<(feature_defines)',
854 'action_name': 'XLinkNames',
856 '../dom/make_names.pl',
857 '../svg/xlinkattrs.in',
860 '<(SHARED_INTERMEDIATE_DIR)/webkit/XLinkNames.cpp',
861 '<(SHARED_INTERMEDIATE_DIR)/webkit/XLinkNames.h',
865 'scripts/action_makenames.py',
870 '--extraDefines', '<(feature_defines)'
874 'action_name': 'XMLNSNames',
876 '../dom/make_names.pl',
877 '../xml/xmlnsattrs.in',
880 '<(SHARED_INTERMEDIATE_DIR)/webkit/XMLNSNames.cpp',
881 '<(SHARED_INTERMEDIATE_DIR)/webkit/XMLNSNames.h',
885 'scripts/action_makenames.py',
890 '--extraDefines', '<(feature_defines)'
894 'action_name': 'XMLNames',
896 '../dom/make_names.pl',
897 '../xml/xmlattrs.in',
900 '<(SHARED_INTERMEDIATE_DIR)/webkit/XMLNames.cpp',
901 '<(SHARED_INTERMEDIATE_DIR)/webkit/XMLNames.h',
905 'scripts/action_makenames.py',
910 '--extraDefines', '<(feature_defines)'
914 'action_name': 'derived_sources_all_in_one',
916 'scripts/action_derivedsourcesallinone.py',
917 '<(SHARED_INTERMEDIATE_DIR)/supplemental_dependency.tmp',
920 '<@(derived_sources_aggregate_files)',
924 'scripts/action_derivedsourcesallinone.py',
925 '<(SHARED_INTERMEDIATE_DIR)/supplemental_dependency.tmp',
927 '<@(derived_sources_aggregate_files)',
932 # Rules to build derived sources.
934 'rule_name': 'bison',
937 '<(SHARED_INTERMEDIATE_DIR)/webkit/<(RULE_INPUT_ROOT).cpp',
938 '<(SHARED_INTERMEDIATE_DIR)/webkit/<(RULE_INPUT_ROOT).h'
942 'scripts/rule_bison.py',
943 '<(RULE_INPUT_PATH)',
944 '<(SHARED_INTERMEDIATE_DIR)/webkit'
948 'rule_name': 'gperf',
949 'extension': 'gperf',
951 # gperf outputs are generated by WebCore/make-hash-tools.pl
954 '<(SHARED_INTERMEDIATE_DIR)/webkit/<(RULE_INPUT_ROOT).cpp',
957 '../make-hash-tools.pl',
961 '../make-hash-tools.pl',
962 '<(SHARED_INTERMEDIATE_DIR)/webkit',
963 '<(RULE_INPUT_PATH)',
966 # Rule to build generated JavaScript (V8) bindings from .idl source.
968 'rule_name': 'binding',
970 'msvs_external_rule': 1,
972 '../bindings/scripts/generate-bindings.pl',
973 '../bindings/scripts/CodeGenerator.pm',
974 '../bindings/scripts/CodeGeneratorV8.pm',
975 '../bindings/scripts/IDLParser.pm',
976 '../bindings/scripts/IDLStructure.pm',
977 '../bindings/scripts/preprocessor.pm',
978 '<(SHARED_INTERMEDIATE_DIR)/supplemental_dependency.tmp',
979 '<(additional_idl_files_list)',
980 '<!@(cat <(additional_idl_files_list))',
983 # FIXME: The .cpp file should be in webkit/bindings once
984 # we coax GYP into supporting it (see 'action' below).
985 '<(SHARED_INTERMEDIATE_DIR)/webcore/bindings/V8<(RULE_INPUT_ROOT).cpp',
986 '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8<(RULE_INPUT_ROOT).h',
989 'generator_include_dirs': [
990 '--include', '../Modules/mediastream',
991 '--include', '../css',
992 '--include', '../dom',
993 '--include', '../fileapi',
994 '--include', '../html',
995 '--include', '../notifications',
996 '--include', '../page',
997 '--include', '../plugins',
998 '--include', '../storage',
999 '--include', '../svg',
1000 '--include', '../testing',
1001 '--include', '../webaudio',
1002 '--include', '../workers',
1003 '--include', '../xml',
1006 # FIXME: Note that we put the .cpp files in webcore/bindings
1007 # but the .h files in webkit/bindings. This is to work around
1008 # the unfortunate fact that GYP strips duplicate arguments
1009 # from lists. When we have a better GYP way to suppress that
1010 # behavior, change the output location.
1014 '-I../bindings/scripts',
1015 '../bindings/scripts/generate-bindings.pl',
1016 '--outputHeadersDir',
1017 '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings',
1019 '<(SHARED_INTERMEDIATE_DIR)/webcore/bindings',
1021 '<(feature_defines) LANGUAGE_JAVASCRIPT V8_BINDING',
1024 '<@(generator_include_dirs)',
1025 '--supplementalDependencyFile',
1026 '<(SHARED_INTERMEDIATE_DIR)/supplemental_dependency.tmp',
1027 '--additionalIdlFilesList',
1028 '<(additional_idl_files_list)',
1029 '<(RULE_INPUT_PATH)',
1031 'message': 'Generating binding from <(RULE_INPUT_PATH)',
1036 'target_name': 'webcore_bindings',
1037 'type': 'static_library',
1038 'hard_dependency': 1,
1040 'webcore_bindings_sources',
1041 'inspector_protocol_sources',
1042 'injected_script_source',
1043 'debugger_script_source',
1044 '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:yarr',
1045 '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:wtf',
1046 '../../WTF/WTF.gyp/WTF.gyp:newwtf',
1047 '<(chromium_src_dir)/build/temp_gyp/googleurl.gyp:googleurl',
1048 '<(chromium_src_dir)/skia/skia.gyp:skia',
1049 '<(chromium_src_dir)/third_party/iccjpeg/iccjpeg.gyp:iccjpeg',
1050 '<(chromium_src_dir)/third_party/libpng/libpng.gyp:libpng',
1051 '<(chromium_src_dir)/third_party/libxml/libxml.gyp:libxml',
1052 '<(chromium_src_dir)/third_party/libxslt/libxslt.gyp:libxslt',
1053 '<(chromium_src_dir)/third_party/libwebp/libwebp.gyp:libwebp',
1054 '<(chromium_src_dir)/third_party/npapi/npapi.gyp:npapi',
1055 '<(chromium_src_dir)/third_party/sqlite/sqlite.gyp:sqlite',
1056 '<(chromium_src_dir)/v8/tools/gyp/v8.gyp:v8',
1057 '<(libjpeg_gyp_path):libjpeg',
1060 '<(INTERMEDIATE_DIR)',
1061 # FIXME: Remove <(SHARED_INTERMEDIATE_DIR)/webcore when we
1062 # can entice gyp into letting us put both the .cpp and .h
1063 # files in the same output directory.
1064 '<(SHARED_INTERMEDIATE_DIR)/webcore',
1065 '<(SHARED_INTERMEDIATE_DIR)/webkit',
1066 '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings',
1067 '<@(webcore_include_dirs)',
1069 'direct_dependent_settings': {
1071 '<(SHARED_INTERMEDIATE_DIR)/webkit',
1072 '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings',
1076 # These files include all the .cpp files generated from the .idl files
1078 '<@(derived_sources_aggregate_files)',
1080 # Additional .cpp files for HashTools.h
1081 '<(SHARED_INTERMEDIATE_DIR)/webkit/ColorData.cpp',
1082 '<(SHARED_INTERMEDIATE_DIR)/webkit/CSSPropertyNames.cpp',
1083 '<(SHARED_INTERMEDIATE_DIR)/webkit/CSSValueKeywords.cpp',
1085 # Additional .cpp files from webcore_bindings_sources actions.
1086 '<(SHARED_INTERMEDIATE_DIR)/webkit/HTMLElementFactory.cpp',
1087 '<(SHARED_INTERMEDIATE_DIR)/webkit/HTMLNames.cpp',
1088 '<(SHARED_INTERMEDIATE_DIR)/webkit/EventFactory.cpp',
1089 '<(SHARED_INTERMEDIATE_DIR)/webkit/EventHeaders.h',
1090 '<(SHARED_INTERMEDIATE_DIR)/webkit/EventInterfaces.h',
1091 '<(SHARED_INTERMEDIATE_DIR)/webkit/EventTargetHeaders.h',
1092 '<(SHARED_INTERMEDIATE_DIR)/webkit/EventTargetInterfaces.h',
1093 '<(SHARED_INTERMEDIATE_DIR)/webkit/ExceptionCodeDescription.cpp',
1094 '<(SHARED_INTERMEDIATE_DIR)/webkit/UserAgentStyleSheetsData.cpp',
1095 '<(SHARED_INTERMEDIATE_DIR)/webkit/V8HTMLElementWrapperFactory.cpp',
1096 '<(SHARED_INTERMEDIATE_DIR)/webkit/XLinkNames.cpp',
1097 '<(SHARED_INTERMEDIATE_DIR)/webkit/XMLNSNames.cpp',
1098 '<(SHARED_INTERMEDIATE_DIR)/webkit/XMLNames.cpp',
1099 '<(SHARED_INTERMEDIATE_DIR)/webkit/SVGNames.cpp',
1100 '<(SHARED_INTERMEDIATE_DIR)/webkit/MathMLElementFactory.cpp',
1101 '<(SHARED_INTERMEDIATE_DIR)/webkit/MathMLNames.cpp',
1102 '<(SHARED_INTERMEDIATE_DIR)/webkit/WebKitFontFamilyNames.cpp',
1104 # Generated from HTMLEntityNames.in
1105 '<(SHARED_INTERMEDIATE_DIR)/webkit/HTMLEntityTable.cpp',
1107 # Additional .cpp files from the webcore_bindings_sources rules.
1108 '<(SHARED_INTERMEDIATE_DIR)/webkit/CSSGrammar.cpp',
1109 '<(SHARED_INTERMEDIATE_DIR)/webkit/XPathGrammar.cpp',
1111 # Additional .cpp files from the webcore_inspector_sources list.
1112 '<(SHARED_INTERMEDIATE_DIR)/webcore/InspectorFrontend.cpp',
1113 '<(SHARED_INTERMEDIATE_DIR)/webcore/InspectorBackendDispatcher.cpp',
1114 '<(SHARED_INTERMEDIATE_DIR)/webcore/InspectorTypeBuilder.cpp',
1117 ['inside_chromium_build==1 and OS=="win" and component=="shared_library"', {
1122 # TODO(maruel): Move it in its own project or generate it anyway?
1125 '<(SHARED_INTERMEDIATE_DIR)/webkit/SVGElementFactory.cpp',
1126 '<(SHARED_INTERMEDIATE_DIR)/webkit/V8SVGElementWrapperFactory.cpp',
1131 '<(chromium_src_dir)/third_party/apple_webkit',
1136 'WEBCORE_NAVIGATOR_PLATFORM="Win32"',
1137 '__PRETTY_FUNCTION__=__FUNCTION__',
1139 # This is needed because Event.h in this directory is blocked
1140 # by a system header on windows.
1141 'include_dirs++': ['../dom'],
1142 'direct_dependent_settings': {
1143 'include_dirs+++': ['../dom'],
1146 ['OS=="linux" and "WTF_USE_WEBAUDIO_IPP=1" in feature_defines', {
1148 '<!@(pkg-config --cflags-only-I ipp)',
1154 # We'll soon split libwebcore in multiple smaller libraries.
1155 # webcore_prerequisites will be the 'base' target of every sub-target.
1156 'target_name': 'webcore_prerequisites',
1159 'debugger_script_source',
1160 'injected_script_source',
1161 'inspector_protocol_sources',
1162 'webcore_bindings_sources',
1163 '../../ThirdParty/glu/glu.gyp:libtess',
1164 '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:yarr',
1165 '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:wtf',
1166 '../../WTF/WTF.gyp/WTF.gyp:newwtf',
1167 '<(chromium_src_dir)/build/temp_gyp/googleurl.gyp:googleurl',
1168 '<(chromium_src_dir)/skia/skia.gyp:skia',
1169 '<(chromium_src_dir)/third_party/iccjpeg/iccjpeg.gyp:iccjpeg',
1170 '<(chromium_src_dir)/third_party/libwebp/libwebp.gyp:libwebp',
1171 '<(chromium_src_dir)/third_party/libpng/libpng.gyp:libpng',
1172 '<(chromium_src_dir)/third_party/libxml/libxml.gyp:libxml',
1173 '<(chromium_src_dir)/third_party/libxslt/libxslt.gyp:libxslt',
1174 '<(chromium_src_dir)/third_party/npapi/npapi.gyp:npapi',
1175 '<(chromium_src_dir)/third_party/ots/ots.gyp:ots',
1176 '<(chromium_src_dir)/third_party/sqlite/sqlite.gyp:sqlite',
1177 '<(chromium_src_dir)/third_party/angle/src/build_angle.gyp:translator_glsl',
1178 '<(chromium_src_dir)/third_party/zlib/zlib.gyp:zlib',
1179 '<(chromium_src_dir)/v8/tools/gyp/v8.gyp:v8',
1180 '<(libjpeg_gyp_path):libjpeg',
1182 'export_dependent_settings': [
1183 '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:yarr',
1184 '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:wtf',
1185 '../../WTF/WTF.gyp/WTF.gyp:newwtf',
1186 '<(chromium_src_dir)/build/temp_gyp/googleurl.gyp:googleurl',
1187 '<(chromium_src_dir)/skia/skia.gyp:skia',
1188 '<(chromium_src_dir)/third_party/iccjpeg/iccjpeg.gyp:iccjpeg',
1189 '<(chromium_src_dir)/third_party/libwebp/libwebp.gyp:libwebp',
1190 '<(chromium_src_dir)/third_party/libpng/libpng.gyp:libpng',
1191 '<(chromium_src_dir)/third_party/libxml/libxml.gyp:libxml',
1192 '<(chromium_src_dir)/third_party/libxslt/libxslt.gyp:libxslt',
1193 '<(chromium_src_dir)/third_party/npapi/npapi.gyp:npapi',
1194 '<(chromium_src_dir)/third_party/ots/ots.gyp:ots',
1195 '<(chromium_src_dir)/third_party/sqlite/sqlite.gyp:sqlite',
1196 '<(chromium_src_dir)/third_party/angle/src/build_angle.gyp:translator_glsl',
1197 '<(chromium_src_dir)/v8/tools/gyp/v8.gyp:v8',
1198 '<(libjpeg_gyp_path):libjpeg',
1200 # This is needed for mac because of webkit_system_interface. It'd be nice
1201 # if this hard dependency could be split off the rest.
1202 'hard_dependency': 1,
1203 'direct_dependent_settings': {
1205 'WEBCORE_NAVIGATOR_VENDOR="Google Inc."',
1208 '<(INTERMEDIATE_DIR)',
1209 '<@(webcore_include_dirs)',
1210 '<(chromium_src_dir)/gpu',
1211 '<(chromium_src_dir)/third_party/angle/include/GLSLANG',
1212 '<(SHARED_INTERMEDIATE_DIR)/webkit',
1213 '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings',
1215 'mac_framework_dirs': [
1216 '$(SDKROOT)/System/Library/Frameworks/ApplicationServices.framework/Frameworks',
1218 'msvs_disabled_warnings': [
1219 4138, 4244, 4291, 4305, 4344, 4355, 4521, 4099,
1221 'scons_line_length' : 1,
1223 # Some Mac-specific parts of WebKit won't compile without having this
1224 # prefix header injected.
1225 # FIXME: make this a first-class setting.
1226 'GCC_PREFIX_HEADER': '../WebCorePrefix.h',
1230 ['inside_chromium_build==1 and OS=="win" and component=="shared_library"', {
1231 'direct_dependent_settings': {
1237 ['use_accelerated_compositing==1', {
1239 '<(chromium_src_dir)/gpu/gpu.gyp:gles2_c_lib',
1241 'export_dependent_settings': [
1242 '<(chromium_src_dir)/gpu/gpu.gyp:gles2_c_lib',
1247 '<(chromium_src_dir)/build/linux/system.gyp:fontconfig',
1249 'export_dependent_settings': [
1250 '<(chromium_src_dir)/build/linux/system.gyp:fontconfig',
1252 'direct_dependent_settings': {
1254 # WebCore does not work with strict aliasing enabled.
1255 # https://bugs.webkit.org/show_bug.cgi?id=25864
1256 '-fno-strict-aliasing',
1260 ['toolkit_uses_gtk == 1', {
1262 '<(chromium_src_dir)/build/linux/system.gyp:gtk',
1264 'export_dependent_settings': [
1265 '<(chromium_src_dir)/build/linux/system.gyp:gtk',
1269 'direct_dependent_settings': {
1271 # Mozilla on Linux effectively uses uname -sm, but when running
1272 # 32-bit x86 code on an x86_64 processor, it uses
1273 # "Linux i686 (x86_64)". Matching that would require making a
1274 # run-time determination.
1275 'WEBCORE_NAVIGATOR_PLATFORM="Linux i686"',
1281 'webkit_system_interface',
1283 'export_dependent_settings': [
1284 'webkit_system_interface',
1286 'direct_dependent_settings': {
1288 # Match Safari and Mozilla on Mac x86.
1289 'WEBCORE_NAVIGATOR_PLATFORM="MacIntel"',
1291 # Chromium's version of WebCore includes the following Objective-C
1292 # classes. The system-provided WebCore framework may also provide
1293 # these classes. Because of the nature of Objective-C binding
1294 # (dynamically at runtime), it's possible for the
1295 # Chromium-provided versions to interfere with the system-provided
1296 # versions. This may happen when a system framework attempts to
1297 # use WebCore.framework, such as when converting an HTML-flavored
1298 # string to an NSAttributedString. The solution is to force
1299 # Objective-C class names that would conflict to use alternate
1302 # This list will hopefully shrink but may also grow. Its
1303 # performance is monitored by the "Check Objective-C Rename"
1304 # postbuild step, and any suspicious-looking symbols not handled
1305 # here or whitelisted in that step will cause a build failure.
1307 # If this is unhandled, the console will receive log messages
1309 # 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.
1310 'WebCascadeList=ChromiumWebCoreObjCWebCascadeList',
1311 'WebScrollbarPrefsObserver=ChromiumWebCoreObjCWebScrollbarPrefsObserver',
1312 'WebCoreRenderThemeNotificationObserver=ChromiumWebCoreObjCWebCoreRenderThemeNotificationObserver',
1313 'WebFontCache=ChromiumWebCoreObjCWebFontCache',
1314 'WebScrollAnimationHelperDelegate=ChromiumWebCoreObjCWebScrollAnimationHelperDelegate',
1315 'WebScrollbarPainterControllerDelegate=ChromiumWebCoreObjCWebScrollbarPainterControllerDelegate',
1316 'WebScrollbarPainterDelegate=ChromiumWebCoreObjCWebScrollbarPainterDelegate',
1317 'WebScrollbarPartAnimation=ChromiumWebCoreObjCWebScrollbarPartAnimation',
1320 '<(chromium_src_dir)/third_party/apple_webkit',
1324 # This step ensures that any Objective-C names that aren't
1325 # redefined to be "safe" above will cause a build failure.
1326 'postbuild_name': 'Check Objective-C Rename',
1328 'class_whitelist_regex':
1329 'ChromiumWebCoreObjC|TCMVisibleView|RTCMFlippedView',
1330 'category_whitelist_regex':
1331 'TCMInterposing|ScrollAnimatorChromiumMacExt',
1334 'mac/check_objc_rename.sh',
1335 '<(class_whitelist_regex)',
1336 '<(category_whitelist_regex)',
1343 'direct_dependent_settings': {
1345 # Match Safari and Mozilla on Windows.
1346 'WEBCORE_NAVIGATOR_PLATFORM="Win32"',
1347 '__PRETTY_FUNCTION__=__FUNCTION__',
1349 # This is needed because Event.h in this directory is blocked
1350 # by a system header on windows.
1351 'include_dirs++': ['../dom'],
1354 ['OS=="linux" and "WTF_USE_WEBAUDIO_IPP=1" in feature_defines', {
1355 'direct_dependent_settings': {
1357 '<!@(pkg-config --cflags-only-I ipp)',
1361 ['OS != "android" and "WTF_USE_WEBAUDIO_FFMPEG=1" in feature_defines', {
1362 # This directory needs to be on the include path for multiple sub-targets of webcore.
1363 'direct_dependent_settings': {
1365 '<(chromium_src_dir)/third_party/ffmpeg/patched-ffmpeg',
1366 '<(chromium_src_dir)/third_party/ffmpeg',
1370 '<(chromium_src_dir)/third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
1373 # Windows shared builder needs extra help for linkage
1374 ['OS=="win" and "WTF_USE_WEBAUDIO_FFMPEG=1" in feature_defines', {
1375 'export_dependent_settings': [
1376 '<(chromium_src_dir)/third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
1379 ['"WTF_USE_LEVELDB=1" in feature_defines', {
1381 '<(chromium_src_dir)/third_party/leveldatabase/leveldatabase.gyp:leveldatabase',
1383 'export_dependent_settings': [
1384 '<(chromium_src_dir)/third_party/leveldatabase/leveldatabase.gyp:leveldatabase',
1390 'target_name': 'webcore_dom',
1391 'type': 'static_library',
1393 'webcore_prerequisites',
1396 '<@(webcore_dom_privateheader_files)',
1397 '<@(webcore_dom_files)',
1400 '../dom/default/PlatformMessagePortChannel.cpp',
1401 '../dom/default/PlatformMessagePortChannel.h',
1404 # FIXME: Figure out how to store these patterns in a variable.
1405 ['exclude', '(cairo|ca|cf|cg|curl|efl|freetype|gstreamer|gtk|linux|mac|opengl|openvg|opentype|pango|posix|qt|soup|svg|symbian|texmap|iphone|win|wince|wx)/'],
1406 ['exclude', '(?<!Chromium)(Cairo|CF|CG|Curl|Gtk|JSC|Linux|Mac|OpenType|POSIX|Posix|Qt|Safari|Soup|Symbian|Win|WinCE|Wx)\\.(cpp|mm?)$'],
1408 ['exclude', 'AllInOne\\.cpp$'],
1412 'target_name': 'webcore_html',
1413 'type': 'static_library',
1415 'webcore_prerequisites',
1418 '<@(webcore_html_privateheader_files)',
1419 '<@(webcore_html_files)',
1422 ['exclude', 'AllInOne\\.cpp$'],
1426 'target_name': 'webcore_svg',
1427 'type': 'static_library',
1429 'webcore_prerequisites',
1432 '<@(webcore_svg_privateheader_files)',
1433 '<@(webcore_svg_files)',
1436 ['exclude', 'AllInOne\\.cpp$'],
1440 'target_name': 'webcore_platform',
1441 'type': 'static_library',
1443 'webcore_prerequisites',
1445 # This is needed for mac because of webkit_system_interface. It'd be nice
1446 # if this hard dependency could be split off the rest.
1447 'hard_dependency': 1,
1449 '<@(webcore_privateheader_files)',
1450 '<@(webcore_files)',
1452 # For WebCoreSystemInterface, Mac-only.
1453 '../../WebKit/mac/WebCoreSupport/WebSystemInterface.mm',
1457 ['include', 'platform/'],
1459 # FIXME: Figure out how to store these patterns in a variable.
1460 ['exclude', '(cairo|ca|cf|cg|curl|efl|freetype|gstreamer|gtk|harfbuzz|linux|mac|opengl|openvg|opentype|pango|posix|qt|soup|svg|symbian|texmap|iphone|win|wince|wx)/'],
1461 ['exclude', '(?<!Chromium)(Cairo|CF|CG|Curl|Gtk|JSC|Linux|Mac|OpenType|POSIX|Posix|Qt|Safari|Soup|Symbian|Win|WinCE|Wx)\\.(cpp|mm?)$'],
1463 ['exclude', 'platform/LinkHash\\.cpp$'],
1464 ['exclude', 'platform/MIMETypeRegistry\\.cpp$'],
1465 ['exclude', 'platform/Theme\\.cpp$'],
1466 ['exclude', 'platform/graphics/ANGLEWebKitBridge\\.(cpp|h)$'],
1467 # *NEON.cpp files need special compile options.
1468 # They are moved to the webcore_arm_neon target.
1469 ['exclude', 'platform/graphics/filters/arm/.*NEON\\.(cpp|h)'],
1470 ['exclude', 'platform/image-encoders/JPEGImageEncoder\\.(cpp|h)$'],
1471 ['exclude', 'platform/image-encoders/PNGImageEncoder\\.(cpp|h)$'],
1472 ['exclude', 'platform/network/ResourceHandle\\.cpp$'],
1473 ['exclude', 'platform/sql/SQLiteFileSystem\\.cpp$'],
1474 ['exclude', 'platform/text/LocaleToScriptMappingDefault\\.cpp$'],
1475 ['exclude', 'platform/text/LocalizedNumberNone\\.cpp$'],
1476 ['exclude', 'platform/text/TextEncodingDetectorNone\\.cpp$'],
1481 # Cherry-pick files excluded by the broader regular expressions above.
1482 ['include', 'platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz\\.cpp$'],
1483 ['include', 'platform/graphics/harfbuzz/FontHarfBuzz\\.cpp$'],
1484 ['include', 'platform/graphics/harfbuzz/FontPlatformDataHarfBuzz\\.cpp$'],
1485 ['include', 'platform/graphics/harfbuzz/HarfBuzzSkia\\.cpp$'],
1486 ['include', 'platform/graphics/harfbuzz/HarfBuzzShaperBase\\.(cpp|h)$'],
1487 ['include', 'platform/graphics/skia/SimpleFontDataSkia\\.cpp$'],
1491 ['exclude', 'Linux\\.cpp$'],
1492 ['exclude', 'Harfbuzz[^/]+\\.(cpp|h)$'],
1495 ['toolkit_uses_gtk == 1', {
1497 # Cherry-pick files excluded by the broader regular expressions above.
1498 ['include', 'platform/chromium/KeyCodeConversionGtk\\.cpp$'],
1500 }, { # toolkit_uses_gtk==0
1502 ['exclude', 'Gtk\\.cpp$'],
1505 ['use_x11==1 or OS=="android"', {
1507 '<(chromium_src_dir)/third_party/harfbuzz/harfbuzz.gyp:harfbuzz',
1512 ['include', 'platform/graphics/opentype/OpenTypeSanitizer\\.cpp$'],
1515 ['OS=="mac" and use_skia==0', {
1517 # The Mac build is PLATFORM_CG too. platform/graphics/cg is the
1518 # only place that CG files we want to build are located, and not
1519 # all of them even have a CG suffix, so just add them by a
1520 # regexp matching their directory.
1521 ['include', 'platform/graphics/cg/[^/]*(?<!Win)?\\.(cpp|mm?)$'],
1525 # Necessary for Mac .mm stuff.
1527 '<(chromium_src_dir)/third_party/apple_webkit',
1530 'webkit_system_interface',
1534 # Allow framework-style #include of
1535 # <WebCore/WebCoreSystemInterface.h>.
1536 'action_name': 'WebCoreSystemInterface.h',
1538 '../platform/mac/WebCoreSystemInterface.h',
1541 '<(INTERMEDIATE_DIR)/WebCore/WebCoreSystemInterface.h',
1543 'action': ['cp', '<@(_inputs)', '<@(_outputs)'],
1547 # Additional files from the WebCore Mac build that are presently
1548 # used in the WebCore Chromium Mac build too.
1550 # The Mac build is USE(CF) but does not use CFNetwork.
1551 ['include', 'CF\\.cpp$'],
1552 ['exclude', 'network/cf/'],
1554 # Use native Mac font code from WebCore.
1555 ['include', 'platform/(graphics/)?mac/[^/]*Font[^/]*\\.(cpp|mm?)$'],
1556 ['include', 'platform/graphics/mac/ComplexText[^/]*\\.(cpp|h)$'],
1558 # We can use this for the fast Accelerate.framework FFT.
1559 ['include', 'platform/audio/mac/FFTFrameMac\\.cpp$'],
1561 # Cherry-pick some files that can't be included by broader regexps.
1562 # Some of these are used instead of Chromium platform files, see
1563 # the specific exclusions in the "exclude" list below.
1564 ['include', 'rendering/RenderThemeMac\\.mm$'],
1565 ['include', 'platform/graphics/mac/ColorMac\\.mm$'],
1566 ['include', 'platform/graphics/mac/ComplexTextControllerCoreText\\.mm$'],
1567 ['include', 'platform/graphics/mac/FloatPointMac\\.mm$'],
1568 ['include', 'platform/graphics/mac/FloatRectMac\\.mm$'],
1569 ['include', 'platform/graphics/mac/FloatSizeMac\\.mm$'],
1570 ['include', 'platform/graphics/mac/GlyphPageTreeNodeMac\\.cpp$'],
1571 ['include', 'platform/graphics/mac/IntPointMac\\.mm$'],
1572 ['include', 'platform/graphics/mac/IntRectMac\\.mm$'],
1573 ['include', 'platform/mac/BlockExceptions\\.mm$'],
1574 ['include', 'platform/mac/KillRingMac\\.mm$'],
1575 ['include', 'platform/mac/LocalCurrentGraphicsContext\\.mm$'],
1576 ['include', 'platform/mac/NSScrollerImpDetails\\.mm$'],
1577 ['include', 'platform/mac/PurgeableBufferMac\\.cpp$'],
1578 ['include', 'platform/mac/ScrollbarThemeMac\\.mm$'],
1579 ['include', 'platform/mac/ScrollAnimatorMac\\.mm$'],
1580 ['include', 'platform/mac/ScrollElasticityController\\.mm$'],
1581 ['include', 'platform/mac/WebCoreSystemInterface\\.mm$'],
1582 ['include', 'platform/mac/WebCoreTextRenderer\\.mm$'],
1583 ['include', 'platform/text/mac/ShapeArabic\\.c$'],
1584 ['include', 'platform/text/mac/String(Impl)?Mac\\.mm$'],
1585 # Use USE_NEW_THEME on Mac.
1586 ['include', 'platform/Theme\\.cpp$'],
1588 ['include', 'WebKit/mac/WebCoreSupport/WebSystemInterface\\.mm$'],
1590 # The Mac uses platform/mac/KillRingMac.mm instead of the dummy
1592 ['exclude', 'platform/KillRingNone\\.cpp$'],
1594 # The Mac currently uses FontCustomPlatformData.cpp from
1595 # platform/graphics/mac, included by regex above, instead.
1596 ['exclude', 'platform/graphics/skia/FontCustomPlatformData\\.cpp$'],
1598 # The Mac currently uses ScrollbarThemeChromiumMac.mm, which is not
1599 # related to ScrollbarThemeChromium.cpp.
1600 ['exclude', 'platform/chromium/ScrollbarThemeChromium\\.cpp$'],
1602 # The Mac does not use ImageSourceCG.cpp from platform/graphics/cg
1603 # even though it is included by regex above.
1604 ['exclude', 'platform/graphics/cg/ImageSourceCG\\.cpp$'],
1605 ['exclude', 'platform/graphics/cg/PDFDocumentImage\\.cpp$'],
1607 # Mac uses only ScrollAnimatorMac.
1608 ['exclude', 'platform/ScrollAnimatorNone\\.cpp$'],
1609 ['exclude', 'platform/ScrollAnimatorNone\\.h$'],
1611 ['include', '/chrome/junk\\.txt$'],
1615 # FIXME: We will eventually compile this too, but for now it's
1617 ['exclude', 'platform/graphics/FontPlatformData\\.cpp$'],
1620 ['OS=="mac" and use_skia==0', {
1622 # Cherry-pick some files that can't be included by broader regexps.
1623 # Some of these are used instead of Chromium platform files, see
1624 # the specific exclusions in the "exclude" list below.
1625 ['include', 'platform/graphics/mac/GraphicsContextMac\\.mm$'],
1627 # Chromium Mac does not use skia.
1628 ['exclude', 'platform/graphics/skia/[^/]*Skia\\.(cpp|h)$'],
1630 # The Mac currently uses ImageChromiumMac.mm from
1631 # platform/graphics/chromium, included by regex above, instead.
1632 ['exclude', 'platform/graphics/chromium/ImageChromium\\.cpp$'],
1634 # ImageDecoderSkia is not used on mac. ImageDecoderCG is used instead.
1635 ['exclude', 'platform/image-decoders/skia/ImageDecoderSkia\\.cpp$'],
1636 ['include', 'platform/image-decoders/cg/ImageDecoderCG\\.cpp$'],
1638 # Again, Skia is not used on Mac.
1639 ['exclude', 'platform/chromium/DragImageChromiumSkia\\.cpp$'],
1642 ['OS=="mac" and use_skia==1', {
1644 ['include', 'platform/graphics/cg/FloatPointCG\\.cpp$'],
1645 ['include', 'platform/graphics/cg/FloatRectCG\\.cpp$'],
1646 ['include', 'platform/graphics/cg/FloatSizeCG\\.cpp$'],
1647 ['include', 'platform/graphics/cg/IntPointCG\\.cpp$'],
1648 ['include', 'platform/graphics/cg/IntRectCG\\.cpp$'],
1649 ['include', 'platform/graphics/cg/IntSizeCG\\.cpp$'],
1650 ['exclude', 'platform/graphics/chromium/ImageChromiumMac\\.mm$'],
1651 ['exclude', 'platform/graphics/mac/FontMac\\.mm$'],
1652 ['exclude', 'platform/graphics/skia/FontCacheSkia\\.cpp$'],
1653 ['exclude', 'platform/graphics/skia/GlyphPageTreeNodeSkia\\.cpp$'],
1654 ['exclude', 'platform/graphics/skia/SimpleFontDataSkia\\.cpp$'],
1655 ['exclude', 'platform/chromium/DragImageChromiumMac\\.cpp$'],
1658 ['use_x11 == 0 and (OS!="mac" or use_skia==0)', {
1660 ['exclude', 'VDMX[^/]+\\.(cpp|h)$'],
1665 ['exclude', 'Mac\\.(cpp|mm?)$'],
1667 # Linux uses FontLinux; Windows uses FontWin. Additionally, FontSkia
1668 # is excluded by a rule above if WebKit uses CG instead of Skia.
1669 ['exclude', 'platform/graphics/skia/FontSkia\\.cpp$'],
1674 ['exclude', 'Win\\.cpp$'],
1675 ['exclude', '/(Windows|Uniscribe)[^/]*\\.cpp$']
1680 ['exclude', 'Posix\\.cpp$'],
1682 # The Chromium Win currently uses GlyphPageTreeNodeChromiumWin.cpp from
1683 # platform/graphics/chromium, included by regex above, instead.
1684 ['exclude', 'platform/graphics/skia/FontCacheSkia\\.cpp$'],
1685 ['exclude', 'platform/graphics/skia/GlyphPageTreeNodeSkia\\.cpp$'],
1686 ['exclude', 'platform/graphics/skia/SimpleFontDataSkia\\.cpp$'],
1688 # SystemInfo.cpp is useful and we don't want to copy it.
1689 ['include', 'platform/win/SystemInfo\\.cpp$'],
1694 ['include', 'platform/chromium/ClipboardChromiumLinux\\.cpp$'],
1695 ['include', 'platform/chromium/FileSystemChromiumLinux\\.cpp$'],
1696 ['include', 'platform/graphics/chromium/GlyphPageTreeNodeLinux\\.cpp$'],
1697 ['exclude', 'platform/graphics/chromium/IconChromium\\.cpp$'],
1698 ['include', 'platform/graphics/chromium/VDMXParser\\.cpp$'],
1699 ['include', 'platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz\\.cpp$'],
1700 ['include', 'platform/graphics/harfbuzz/FontHarfBuzz\\.cpp$'],
1701 ['include', 'platform/graphics/harfbuzz/FontPlatformDataHarfBuzz\\.cpp$'],
1702 ['include', 'platform/graphics/harfbuzz/HarfBuzzSkia\\.cpp$'],
1703 ['include', 'platform/graphics/harfbuzz/HarfBuzzShaperBase\\.cpp$'],
1704 ['include', 'platform/graphics/skia/SimpleFontDataSkia\\.cpp$'],
1706 }, { # OS!="android"
1708 ['exclude', 'Android\\.cpp$'],
1713 # The *NEON.cpp files fail to compile when -mthumb is passed. Force
1714 # them to build in ARM mode.
1715 # See https://bugs.webkit.org/show_bug.cgi?id=62916.
1717 'target_name': 'webcore_arm_neon',
1718 'type': 'static_library',
1720 'webcore_prerequisites',
1722 'hard_dependency': 1,
1724 '<@(webcore_files)',
1728 ['include', 'platform/graphics/filters/arm/.*NEON\\.(cpp|h)'],
1732 'cflags!': ['-mthumb'],
1733 'cflags': ['-marm'],
1735 ['OS=="linux" and target_arch=="arm"', {
1736 'cflags': ['-marm'],
1741 'target_name': 'webcore_rendering',
1742 'type': 'static_library',
1744 'webcore_prerequisites',
1747 '<@(webcore_privateheader_files)',
1748 '<@(webcore_files)',
1752 ['include', 'rendering/'],
1754 # FIXME: Figure out how to store these patterns in a variable.
1755 ['exclude', '(cairo|ca|cf|cg|curl|efl|freetype|gstreamer|gtk|linux|mac|opengl|openvg|opentype|pango|posix|qt|soup|svg|symbian|texmap|iphone|win|wince|wx)/'],
1756 ['exclude', '(?<!Chromium)(Cairo|CF|CG|Curl|Gtk|JSC|Linux|Mac|OpenType|POSIX|Posix|Qt|Safari|Soup|Symbian|Win|WinCE|Wx)\\.(cpp|mm?)$'],
1758 ['exclude', 'AllInOne\\.cpp$'],
1763 ['exclude', 'Posix\\.cpp$'],
1768 # RenderThemeChromiumSkia is not used on mac since RenderThemeChromiumMac
1769 # does not reference the Skia code that is used by Windows, Linux and Android.
1770 ['exclude', 'rendering/RenderThemeChromiumSkia\\.cpp$'],
1773 ['os_posix == 1 and OS != "mac" and OS != "android" and gcc_version == 42', {
1774 # Due to a bug in gcc 4.2.1 (the current version on hardy), we get
1775 # warnings about uninitialized this.
1776 'cflags': ['-Wno-uninitialized'],
1780 ['exclude', 'Linux\\.cpp$'],
1783 ['toolkit_uses_gtk == 0', {
1785 ['exclude', 'Gtk\\.cpp$'],
1789 'sources/': [['exclude', 'Mac\\.(cpp|mm?)$']]
1793 ['exclude', 'Win\\.cpp$'],
1798 ['include', 'rendering/RenderThemeChromiumLinux\\.cpp$'],
1802 ['exclude', 'Android\\.cpp$'],
1808 'target_name': 'webcore_remaining',
1809 'type': 'static_library',
1811 'webcore_prerequisites',
1812 '<(chromium_src_dir)/third_party/v8-i18n/build/all.gyp:v8-i18n',
1814 # This is needed for mac because of webkit_system_interface. It'd be nice
1815 # if this hard dependency could be split off the rest.
1816 'hard_dependency': 1,
1818 '<@(webcore_privateheader_files)',
1819 '<@(webcore_files)',
1822 ['exclude', 'platform/'],
1823 ['exclude', 'rendering/'],
1825 # Exclude most of bindings, except of the V8-related parts.
1826 ['exclude', 'bindings/[^/]+/'],
1827 ['include', 'bindings/generic/'],
1828 ['include', 'bindings/v8/'],
1830 # Exclude most of bridge, except for the V8-related parts.
1831 ['exclude', 'bridge/'],
1832 ['include', 'bridge/jni/'],
1833 ['exclude', 'bridge/jni/[^/]+_jsobject\\.mm$'],
1834 ['exclude', 'bridge/jni/[^/]+_objc\\.mm$'],
1835 ['exclude', 'bridge/jni/jsc/'],
1837 # FIXME: Figure out how to store these patterns in a variable.
1838 ['exclude', '(cairo|ca|cf|cg|curl|efl|freetype|gstreamer|gtk|linux|mac|opengl|openvg|opentype|pango|posix|qt|soup|svg|symbian|texmap|iphone|win|wince|wx)/'],
1839 ['exclude', '(?<!Chromium)(Cairo|CF|CG|Curl|Gtk|JSC|Linux|Mac|OpenType|POSIX|Posix|Qt|Safari|Soup|Symbian|Win|WinCE|Wx)\\.(cpp|mm?)$'],
1841 ['exclude', 'AllInOne\\.cpp$'],
1843 ['exclude', 'fileapi/LocalFileSystem\\.cpp$'],
1844 ['exclude', 'inspector/InspectorFrontendClientLocal\\.cpp$'],
1845 ['exclude', 'inspector/JavaScript[^/]*\\.cpp$'],
1846 ['exclude', 'loader/UserStyleSheetLoader\\.cpp$'],
1847 ['exclude', 'loader/appcache/'],
1848 ['exclude', 'loader/archive/cf/LegacyWebArchiveMac\\.mm$'],
1849 ['exclude', 'loader/archive/cf/LegacyWebArchive\\.cpp$'],
1850 ['exclude', 'loader/icon/IconDatabase\\.cpp$'],
1851 ['exclude', 'plugins/PluginDataNone\\.cpp$'],
1852 ['exclude', 'plugins/PluginDatabase\\.cpp$'],
1853 ['exclude', 'plugins/PluginMainThreadScheduler\\.cpp$'],
1854 ['exclude', 'plugins/PluginPackageNone\\.cpp$'],
1855 ['exclude', 'plugins/PluginPackage\\.cpp$'],
1856 ['exclude', 'plugins/PluginStream\\.cpp$'],
1857 ['exclude', 'plugins/PluginView\\.cpp$'],
1858 ['exclude', 'plugins/npapi\\.cpp$'],
1859 ['exclude', 'storage/DatabaseTrackerClient\\.h$'],
1860 ['exclude', 'storage/DatabaseTracker\\.cpp$'],
1861 ['exclude', 'storage/IDBFactoryBackendInterface\\.cpp$'],
1862 ['exclude', 'storage/IDBKeyPathBackendImpl\\.cpp$'],
1863 ['exclude', 'storage/OriginQuotaManager\\.(cpp|h)$'],
1864 ['exclude', 'storage/OriginUsageRecord\\.(cpp|h)$'],
1865 ['exclude', 'storage/SQLTransactionClient\\.cpp$'],
1866 ['exclude', 'storage/StorageEventDispatcher\\.cpp$'],
1867 ['exclude', 'storage/StorageNamespace\\.cpp$'],
1868 ['exclude', 'workers/DefaultSharedWorkerRepository\\.(cpp|h)$'],
1870 ['include', 'loader/appcache/ApplicationCacheHost\.h$'],
1871 ['include', 'loader/appcache/DOMApplicationCache\.(cpp|h)$'],
1874 'mac_bundle_resources': [
1875 '../Resources/aliasCursor.png',
1876 '../Resources/cellCursor.png',
1877 '../Resources/contextMenuCursor.png',
1878 '../Resources/copyCursor.png',
1879 '../Resources/eastResizeCursor.png',
1880 '../Resources/eastWestResizeCursor.png',
1881 '../Resources/helpCursor.png',
1882 '../Resources/linkCursor.png',
1883 '../Resources/missingImage.png',
1884 '../Resources/moveCursor.png',
1885 '../Resources/noDropCursor.png',
1886 '../Resources/noneCursor.png',
1887 '../Resources/northEastResizeCursor.png',
1888 '../Resources/northEastSouthWestResizeCursor.png',
1889 '../Resources/northResizeCursor.png',
1890 '../Resources/northSouthResizeCursor.png',
1891 '../Resources/northWestResizeCursor.png',
1892 '../Resources/northWestSouthEastResizeCursor.png',
1893 '../Resources/progressCursor.png',
1894 '../Resources/southEastResizeCursor.png',
1895 '../Resources/southResizeCursor.png',
1896 '../Resources/southWestResizeCursor.png',
1897 '../Resources/verticalTextCursor.png',
1898 '../Resources/waitCursor.png',
1899 '../Resources/westResizeCursor.png',
1900 '../Resources/zoomInCursor.png',
1901 '../Resources/zoomOutCursor.png',
1905 # Shard this taret into ten parts to work around linker limitations.
1906 # on link time code generation builds.
1907 ['OS=="win" and buildtype=="Official"', {
1912 ['exclude', 'Posix\\.cpp$'],
1913 ['include', '/opentype/'],
1914 ['include', '/SkiaFontWin\\.cpp$'],
1915 ['include', '/TransparencyWin\\.cpp$'],
1918 ['os_posix == 1 and OS != "mac" and OS != "android" and gcc_version == 42', {
1919 # Due to a bug in gcc 4.2.1 (the current version on hardy), we get
1920 # warnings about uninitialized this.
1921 'cflags': ['-Wno-uninitialized'],
1925 ['exclude', 'Linux\\.cpp$'],
1928 ['toolkit_uses_gtk == 0', {
1930 ['exclude', 'Gtk\\.cpp$'],
1934 'sources/': [['exclude', 'Mac\\.(cpp|mm?)$']]
1938 ['exclude', 'Win\\.cpp$'],
1939 ['exclude', '/(Windows|Uniscribe)[^/]*\\.cpp$']
1945 'target_name': 'webcore',
1952 'webcore_remaining',
1953 'webcore_rendering',
1956 '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:wtf',
1957 '../../WTF/WTF.gyp/WTF.gyp:newwtf',
1958 '<(chromium_src_dir)/build/temp_gyp/googleurl.gyp:googleurl',
1959 '<(chromium_src_dir)/skia/skia.gyp:skia',
1960 '<(chromium_src_dir)/third_party/npapi/npapi.gyp:npapi',
1961 '<(chromium_src_dir)/v8/tools/gyp/v8.gyp:v8',
1963 'export_dependent_settings': [
1965 '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:wtf',
1966 '../../WTF/WTF.gyp/WTF.gyp:newwtf',
1967 '<(chromium_src_dir)/build/temp_gyp/googleurl.gyp:googleurl',
1968 '<(chromium_src_dir)/skia/skia.gyp:skia',
1969 '<(chromium_src_dir)/third_party/npapi/npapi.gyp:npapi',
1970 '<(chromium_src_dir)/v8/tools/gyp/v8.gyp:v8',
1972 'direct_dependent_settings': {
1974 '<@(webcore_include_dirs)',
1976 'mac_framework_dirs': [
1977 '$(SDKROOT)/System/Library/Frameworks/ApplicationServices.framework/Frameworks',
1978 '$(SDKROOT)/System/Library/Frameworks/Accelerate.framework',
1979 '$(SDKROOT)/System/Library/Frameworks/CoreServices.framework',
1980 '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
1981 '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
1982 '$(SDKROOT)/System/Library/Frameworks/AudioToolbox.framework',
1983 '$(SDKROOT)/System/Library/Frameworks/AudioUnit.framework',
1984 '$(SDKROOT)/System/Library/Frameworks/CoreAudio.framework',
1989 'direct_dependent_settings': {
1991 '<(chromium_src_dir)/third_party/apple_webkit',
1992 '../../WebKit/mac/WebCoreSupport',
1997 'direct_dependent_settings': {
1998 'include_dirs+++': ['../dom'],
2001 ['OS=="linux" and "WTF_USE_WEBAUDIO_IPP=1" in feature_defines', {
2004 '<!@(pkg-config --libs-only-L ipp)',
2019 'target_name': 'webcore_test_support',
2020 'type': 'static_library',
2025 '<(INTERMEDIATE_DIR)',
2026 '<(SHARED_INTERMEDIATE_DIR)/webcore',
2027 '<(SHARED_INTERMEDIATE_DIR)/webkit',
2028 '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings',
2029 '<@(webcore_include_dirs)',
2034 '<@(webcore_test_support_files)',
2035 '<(SHARED_INTERMEDIATE_DIR)/webcore/bindings/V8Internals.cpp',
2036 '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8Internals.h',
2037 '<(SHARED_INTERMEDIATE_DIR)/webcore/bindings/V8InternalSettings.cpp',
2038 '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8InternalSettings.h',
2041 ['exclude', 'testing/js'],