Rename rendering/RenderFileUploadControl to layout/LayoutFileUploadControl.
[chromium-blink-merge.git] / third_party / WebKit / Source / core / BUILD.gn
blob76e5e830caede76f1f37a0e172901b62f4ebc70e
1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 import("//build/config/ui.gni")
6 import("//third_party/WebKit/Source/bindings/bindings.gni")
7 import("//third_party/WebKit/Source/bindings/core/v8/generated.gni")
8 import("//third_party/WebKit/Source/bindings/modules/modules.gni")
9 import("//third_party/WebKit/Source/bindings/modules/v8/generated.gni")
10 import("//third_party/WebKit/Source/bindings/scripts/scripts.gni")
11 import("//third_party/WebKit/Source/config.gni")
12 import("//third_party/WebKit/Source/core/core.gni")
13 import("//third_party/WebKit/Source/build/scripts/scripts.gni")
14 import("//third_party/WebKit/Source/platform/platform_generated.gni")
16 visibility = [ "//third_party/WebKit/Source/*" ]
18 rel_blink_core_gen_dir = rebase_path(blink_core_output_dir, root_build_dir)
20 # Compute the optimization level. The GYP code sets "optimize: max" which sets
21 # speed-over-size optimization for official builds on Windows only. The GN's
22 # build optimize_max config applies this optimization on all platforms, so
23 # compute how to modify the config list to duplicate the GYP behavior.
24 if (is_debug) {
25   core_config_remove = [ "//build/config/compiler:no_optimize" ]
26   core_config_add = core_config_remove  # NOP
27 } else {
28   core_config_remove = [ "//build/config/compiler:optimize" ]
30   if (is_win && is_official_build) {
31     core_config_add = [ "//build/config/compiler:optimize_max" ]
32   } else {
33     core_config_add = core_config_remove  # NOP
34   }
37 # Core targets also get wexit time destructors.
38 core_config_add += [ "//build/config/compiler:wexit_time_destructors" ]
40 config("core_include_dirs") {
41   include_dirs = [
42     "..",
43     "$root_gen_dir/blink",
44   ]
45   if (is_android && use_openmax_dl_fft) {
46     include_dirs += [ "//third_party/openmax_dl" ]
47   }
50 # GYP version: WebKit/Source/core/core.gyp:webcore_generated
51 source_set("generated") {
52   deps = [
53     ":make_core_generated",
54     ":prerequisites",
55     "inspector:protocol_sources",
56     "inspector:instrumentation_sources",
57     "//gin",
58     "//skia",
59     "//third_party/iccjpeg",
60     "//third_party/libpng",
61     "//third_party/libwebp",
62     "//third_party/libxml",
63     "//third_party/libxslt",
64     "//third_party/npapi",
65     "//third_party/qcms",
66     "//third_party/sqlite",
67     "//third_party/WebKit/Source/bindings/core/v8:bindings_core_v8_generated",
68     # FIXME: don't depend on bindings/modules http://crbug.com/358074
69     "//third_party/WebKit/Source/bindings/modules:bindings_modules_generated",
70     "//third_party/WebKit/Source/bindings/modules/v8:bindings_modules_generated",
71     "//third_party/WebKit/Source/platform:make_platform_generated",
72     "//third_party/WebKit/Source/wtf",
73     "//url",
74     "//v8",
75   ]
78 # GYP version: WebKit/Source/core/core.gyp:webcore_prerequisites
79 source_set("prerequisites") {
80   public_deps = [
81     "//third_party/WebKit/Source/wtf",
82     "//gpu/command_buffer/client:gles2_c_lib",
83     "//skia",
84     "//third_party/angle:translator",
85     "//third_party/iccjpeg",
86     "//third_party/libpng",
87     "//third_party/libwebp",
88     "//third_party/libxml",
89     "//third_party/libxslt",
90     "//third_party/npapi",
91     "//third_party/ots",
92     "//third_party/qcms",
93     "//third_party/snappy",
94     "//third_party/sqlite",
95     "//third_party/zlib",
96     "//url",
97     "//v8",
98   ]
99   deps = [
100     ":make_core_generated",
101     "inspector:protocol_sources",
102     "inspector:instrumentation_sources",
103     "//third_party/WebKit/Source/bindings/core/v8:bindings_core_v8_generated",
104     # FIXME: don't depend on bindings_modules http://crbug.com/358074
105     "//third_party/WebKit/Source/bindings/modules/v8:bindings_modules_generated",
106     "//third_party/WebKit/Source/platform",
107   ]
109   public_configs = [
110     ":core_include_dirs",
111     "//third_party/WebKit/Source:config",
112     "//third_party/WebKit/Source:inside_blink",
113   ]
115   if (use_openmax_dl_fft) {
116     deps += [
117       "//third_party/openmax_dl/dl"
118     ]
119   }
122 # Note that this is a source set rather than a group, even though it has no
123 # sources. A group would implicitly forward all direct dependent configs
124 # through it, but we want to keep our internal targets' public_configs private
125 # and only forward some of them.
127 # GYP version: WebKit/Source/core/core.gyp:webcore
128 source_set("core") {
129   visibility = []  # Allow re-assignment of list.
130   visibility = [ "//third_party/WebKit/*" ]
132   configs -= core_config_remove
133   configs += core_config_add
135   public_deps = [
136     ":core_generated",
137     "//skia",
138     "//third_party/npapi",
139     "//third_party/qcms",
140     "//third_party/WebKit/Source/platform",
141     "//third_party/WebKit/Source/wtf",
142     "//url",
143     "//v8",
144   ]
145   deps = [
146     ":dom",
147     ":html",
148     ":remaining",
149     ":rendering",
150     ":svg",
151   ]
153   public_configs = [
154     ":core_include_dirs",
155   ]
157   # TODO(GYP) IPP libraries pkg-config. These seem to be experimental and used
158   # only on x86 Android. See also below. There should be one pkg-config call
159   # that creates a config used in both of these cases.
162 # GYP version: //third_party/WebKit/Source/core/core.gyp:webcore_dom
163 source_set("dom") {
164   sources = rebase_path(webcore_dom_files, ".", "//")
166   configs -= core_config_remove
167   configs += core_config_add + [
168     # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
169     "//build/config/compiler:no_size_t_to_int_warning",
170   ]
172   deps = [
173     ":prerequisites",
174   ]
177 # GYP version: //third_party/WebKit/Source/core/core.gyp:webcore_html
178 source_set("html") {
179   sources = rebase_path(webcore_html_files, ".", "//")
181   configs -= core_config_remove
182   configs += core_config_add
184   deps = [
185     ":prerequisites",
186   ]
188   # TODO(GYP)
189   # Shard this target into parts to work around linker limitations.
190   # on link time code generation builds.
191   #['OS=="win" and buildtype=="Official"', {
192   #  'msvs_shard': 5,
193   #}],
196 # GYP version: //third_party/WebKit/Source/core/core.gyp:webcore_svg
197 source_set("svg") {
198   sources = rebase_path(webcore_svg_files, ".", "//")
200   configs -= core_config_remove
201   configs += core_config_add
203   deps = [
204     ":prerequisites",
205   ]
207   # TODO(GYP)
208   # Shard this taret into parts to work around linker limitations.
209   # on link time code generation builds.
210   #['OS=="win" and buildtype=="Official"', {
211   #  'msvs_shard': 5,
212   #}],
215 # GYP version: //third_party/WebKit/Source/core/core.gyp:webcore_remaining
216 source_set("remaining") {
217   # This is currently a mashup of "webcore_rendering" and "webcore_remaining"
218   # in GYP. The file list variable is the same and then GYP filters on wether
219   # the path starts with "rendering/" or not. We should tweak the .gypis a bit
220   # to separate out the rendering files.
221   sources = rebase_path(webcore_non_rendering_files, ".", "//")
222   sources += rebase_path(webcore_rendering_files, ".", "//")
224   configs -= core_config_remove
225   configs += core_config_add + [
226     # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
227     "//build/config/compiler:no_size_t_to_int_warning",
228   ]
230   cflags = []
231   libs = []
233   deps = [
234     ":prerequisites",
235   ]
237   if (is_win) {
238     cflags += [
239       "/wd4334",
240     ]
241   } else {  # !is_win
242     sources -= [
243       "layout/LayoutThemeFontProviderWin.cpp",
244       "layout/LayoutThemeWin.cpp",
245       "layout/LayoutThemeWin.h",
246     ]
247   }
248   if (!is_linux) {
249     sources -= [
250       "layout/LayoutThemeLinux.cpp",
251       "layout/LayoutThemeLinux.h",
252     ]
253     if (!is_android) {
254       sources -= [
255         "layout/LayoutThemeFontProviderLinux.cpp",
256       ]
257     }
258   }
260   if (is_android) {
261     # Due to a bug in gcc 4.6 in android NDK, we got warnings about
262     # uninitialized variable.
263     # TODO: try removing now that we are on GCC 4.8.
264     cflags += [ "-Wno-uninitialized" ]
265   } else {  # !is_android
266     sources -= [
267       "layout/LayoutThemeAndroid.cpp",
268       "layout/LayoutThemeAndroid.h",
269     ]
270   }
272   if (is_mac) {
273     sources -= [
274       "layout/LayoutThemeDefault.cpp",
275       "layout/LayoutThemeDefault.h",
276       "layout/LayoutThemeFontProvider.cpp",
277       "layout/LayoutThemeFontProvider.h",
278     ]
279     libs += [ "Carbon.framework" ]
280     # Some Mac-specific parts of WebKit won't compile without having this
281     # prefix header injected.
282     cflags = [
283       "-include",
284       rebase_path("../build/mac/Prefix.h", root_build_dir),
285     ]
286   } else {  # !is_mac
287     sources -= [
288       "editing/SmartReplaceCF.cpp",
289     ]
290   }
293 # GYP version: //third_party/WebKit/Source/core/core.gyp:webcore_rendering
294 source_set("rendering") {
295   # The files that go here are currently in "remaining".
298 # GYP version: WebKit/Source/core/core.gyp:webcore_testing
299 source_set("testing") {
300   configs += [
301     "//third_party/WebKit/Source:inside_blink",
302     "//third_party/WebKit/Source:config",
303   ]
305   deps = [
306     ":core",
307     ":core_generated",
308   ]
310   sources = generated_core_testing_dictionary_files + webcore_testing_files
311   sources += [
312     "$bindings_core_v8_output_dir/V8DictionaryTest.cpp",
313     "$bindings_core_v8_output_dir/V8DictionaryTest.h",
314     "$bindings_core_v8_output_dir/V8GarbageCollectedScriptWrappable.cpp",
315     "$bindings_core_v8_output_dir/V8GarbageCollectedScriptWrappable.h",
316     "$bindings_core_v8_output_dir/V8GCObservation.cpp",
317     "$bindings_core_v8_output_dir/V8GCObservation.h",
318     "$bindings_core_v8_output_dir/V8PrivateScriptTest.cpp",
319     "$bindings_core_v8_output_dir/V8PrivateScriptTest.h",
320     "$bindings_core_v8_output_dir/V8TypeConversions.cpp",
321     "$bindings_core_v8_output_dir/V8TypeConversions.h",
322     "$bindings_core_v8_output_dir/V8UnionTypesTest.cpp",
323     "$bindings_core_v8_output_dir/V8UnionTypesTest.h",
324     "$bindings_core_v8_output_dir/V8Internals.cpp",
325     "$bindings_core_v8_output_dir/V8Internals.h",
326     "$bindings_core_v8_output_dir/V8InternalSettings.cpp",
327     "$bindings_core_v8_output_dir/V8InternalSettings.h",
328     "$bindings_core_v8_output_dir/V8InternalSettingsGenerated.cpp",
329     "$bindings_core_v8_output_dir/V8InternalSettingsGenerated.h",
330     "$bindings_core_v8_output_dir/V8InternalRuntimeFlags.cpp",
331     "$bindings_core_v8_output_dir/V8InternalRuntimeFlags.h",
332     "$bindings_core_v8_output_dir/V8LayerRect.cpp",
333     "$bindings_core_v8_output_dir/V8LayerRect.h",
334     "$bindings_core_v8_output_dir/V8LayerRectList.cpp",
335     "$bindings_core_v8_output_dir/V8LayerRectList.h",
336     "$bindings_core_v8_output_dir/V8RefCountedScriptWrappable.cpp",
337     "$bindings_core_v8_output_dir/V8RefCountedScriptWrappable.h",
338     "$bindings_core_v8_output_dir/V8InternalDictionary.cpp",
339     "$bindings_core_v8_output_dir/V8InternalDictionary.h",
340     "$bindings_core_v8_output_dir/V8InternalDictionaryDerived.cpp",
341     "$bindings_core_v8_output_dir/V8InternalDictionaryDerived.h",
342     "$bindings_core_v8_output_dir/V8PluginPlaceholderOptions.cpp",
343     "$bindings_core_v8_output_dir/V8PluginPlaceholderOptions.h",
344   ]
347 # GYP version: //third_party/WebKit/Source/core/core.gyp:webcore_generated
348 source_set("core_generated") {
349   sources = bindings_core_v8_files
350   # These files include all the .cpp files generated from the .idl files
351   # in webcore_files.
352   sources += bindings_core_generated_aggregate_files
353   sources += bindings_core_generated_union_type_files
354   # IDL dictionary impl files generated by IDL compiler
355   sources += generated_core_dictionary_files
357   sources += [
358     # Additional .cpp files for HashTools.h
359     "$blink_core_output_dir/CSSPropertyNames.cpp",
360     "$blink_core_output_dir/CSSValueKeywords.cpp",
362     # Additional .cpp files from make_core_generated actions.
363     "$blink_core_output_dir/Event.cpp",
364     "$blink_core_output_dir/EventHeaders.h",
365     "$blink_core_output_dir/EventNames.cpp",
366     "$blink_core_output_dir/EventNames.h",
367     "$blink_core_output_dir/EventTargetNames.cpp",
368     "$blink_core_output_dir/EventTargetNames.h",
369     "$blink_core_output_dir/EventTypeNames.cpp",
370     "$blink_core_output_dir/EventTypeNames.h",
371     "$blink_core_output_dir/FetchInitiatorTypeNames.cpp",
372     "$blink_core_output_dir/HTMLElementFactory.cpp",
373     "$blink_core_output_dir/HTMLElementFactory.h",
374     "$blink_core_output_dir/HTMLElementLookupTrie.cpp",
375     "$blink_core_output_dir/HTMLElementLookupTrie.h",
376     "$blink_core_output_dir/HTMLNames.cpp",
377     "$blink_core_output_dir/HTMLTokenizerNames.cpp",
378     "$blink_core_output_dir/InputTypeNames.cpp",
379     "$blink_core_output_dir/MathMLNames.cpp",
380     "$blink_core_output_dir/SVGNames.cpp",
381     "$blink_core_output_dir/XLinkNames.cpp",
382     "$blink_core_output_dir/XMLNSNames.cpp",
383     "$blink_core_output_dir/XMLNames.cpp",
385     # Generated from HTMLEntityNames.in
386     "$blink_core_output_dir/HTMLEntityTable.cpp",
388     # Generated from MediaFeatureNames.in
389     "$blink_core_output_dir/MediaFeatureNames.cpp",
391     # Generated from MediaTypeNames.in
392     "$blink_core_output_dir/MediaTypeNames.cpp",
394     # Generated from BisonCSSTokenizer-in.cpp
395     "$blink_core_output_dir/BisonCSSTokenizer.cpp",
397     # Generated from BisonCSSParser-in.cpp
398     "$blink_core_output_dir/BisonCSSParser.cpp",
400     # Generated from HTMLMetaElement-in.cpp
401     "$blink_core_output_dir/HTMLMetaElement.cpp",
403     # Additional .cpp files from the make_core_generated rules.
404     "$blink_core_output_dir/CSSGrammar.cpp",
405     "$blink_core_output_dir/XPathGrammar.cpp",
407     # Additional .cpp files from the inspector_protocol_sources list.
408     "$blink_core_output_dir/InspectorFrontend.cpp",
409     "$blink_core_output_dir/InspectorBackendDispatcher.cpp",
410     "$blink_core_output_dir/InspectorTypeBuilder.cpp",
412     # Additional .cpp files from the inspector_instrumentation_sources list.
413     "$blink_core_output_dir/InspectorCanvasInstrumentationInl.h",
414     "$blink_core_output_dir/InspectorConsoleInstrumentationInl.h",
415     "$blink_core_output_dir/InspectorInstrumentationInl.h",
416     "$blink_core_output_dir/InspectorOverridesInl.h",
417     "$blink_core_output_dir/InstrumentingAgentsInl.h",
418     "$blink_core_output_dir/InspectorInstrumentationImpl.cpp",
420     # Additional .cpp files for SVG.
421     "$blink_core_output_dir/SVGElementFactory.cpp",
423     # Generated from make_style_shorthands.py
424     "$blink_core_output_dir/StylePropertyShorthand.cpp",
426     # Generated from make_style_builder.py
427     "$blink_core_output_dir/StyleBuilder.cpp",
428     "$blink_core_output_dir/StyleBuilderFunctions.cpp",
430     # Generated from make_css_property_metadata.py
431     "$blink_core_output_dir/CSSPropertyMetadata.cpp",
432   ]
434   configs -= core_config_remove
435   configs += core_config_add
437   configs += [
438     "..:inside_blink",
439   ]
441   deps = [
442     ":make_core_generated",
443     ":prerequisites",
444     "inspector:protocol_sources",
445     "inspector:instrumentation_sources",
446     "//gin",
447     "//skia",
448     "//third_party/iccjpeg",
449     "//third_party/libpng",
450     "//third_party/libwebp",
451     "//third_party/libxml",
452     "//third_party/libxslt",
453     "//third_party/npapi",
454     "//third_party/qcms",
455     "//third_party/sqlite",
456     "//third_party/WebKit/Source/bindings/core/v8:bindings_core_v8_generated",
457     # FIXME: don't depend on bindings/modules http://crbug.com/358074
458     "//third_party/WebKit/Source/bindings/modules:bindings_modules_generated",
459     "//third_party/WebKit/Source/bindings/modules/v8:bindings_modules_generated",
460     "//third_party/WebKit/Source/platform:make_platform_generated",
461     "//third_party/WebKit/Source/wtf",
462     "//url",
463     "//v8",
464   ]
466   configs += [
467     ":core_include_dirs",
468     # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
469     "//build/config/compiler:no_size_t_to_int_warning",
470   ]
471   include_dirs = [
472     "$root_gen_dir/blink",
473   ]
475   cflags = []
476   defines = []
478   if (is_win && component_mode == "shared_library") {
479     defines += [ "USING_V8_SHARED" ]
480   }
482   if (is_win) {
483     cflags += [
484       # In generated bindings code: "switch contains default but no case".
485       # 4701 and 4702 are disabled because of issues in Bison-generated
486       # XPathGrammar.cpp and CSSGrammar.cpp.
487       "/wd4065",
488       "/wd4701",
489       "/wd4702",
490     ]
491   }
493   # TODO(GYP) More IPP libraries, see above.
494   #if ((is_linux || is_android) && use_webaudio_ipp)
495   #  ["OS in ("linux", "android") and "WTF_USE_WEBAUDIO_IPP=1" in feature_defines", {
496   #    "cflags": [
497   #      "<!@(pkg-config --cflags-only-I ipp)",
498   #    ],
499   #  }],
500   #],
503 # core_bindings_generated ------------------------------------------------------
505 # GYP version: WebKit/Source/core/core_generated.gyp:core_event_interfaces
506 generate_event_interfaces("core_event_interfaces") {
507   sources = core_event_idl_files
508   output_file = "core/EventInterfaces.in"
511 # generated_testing_idls -------------------------------------------------------
513 # GYP version: WebKit/Source/core/core_generated.gyp:generated_testing_idls
514 group("generated_testing_idls") {
515   deps = [
516     ":generated_testing_idls_settings",
517     ":generated_testing_idls_internal_runtime_flags",
518   ]
521 # "Settings" action in generated_testing_idls from GYP.
522 action("generated_testing_idls_settings") {
523   script = "../build/scripts/make_settings.py"
525   inputs = scripts_for_in_files + [
526     "../build/scripts/make_settings.py",
527     "../build/scripts/templates/InternalSettingsGenerated.idl.tmpl",
528     "../build/scripts/templates/InternalSettingsGenerated.cpp.tmpl",
529     "../build/scripts/templates/InternalSettingsGenerated.h.tmpl",
530     "../build/scripts/templates/SettingsMacros.h.tmpl",
531     "frame/Settings.in",
532   ]
533   outputs = [
534     "$blink_core_output_dir/SettingsMacros.h",
535     "$blink_core_output_dir/InternalSettingsGenerated.idl",
536     "$blink_core_output_dir/InternalSettingsGenerated.cpp",
537     "$blink_core_output_dir/InternalSettingsGenerated.h",
538   ]
540   args = [
541     rebase_path("frame/Settings.in", root_build_dir),
542     "--output_dir", rel_blink_core_gen_dir,
543   ]
546 # "InternalRuntimeFlags" action in generated_testing_idls from GYP.
547 action("generated_testing_idls_internal_runtime_flags") {
548   script = "../build/scripts/make_internal_runtime_flags.py"
550   inputs = scripts_for_in_files + [
551     "../build/scripts/make_internal_runtime_flags.py",
552     "../platform/RuntimeEnabledFeatures.in",
553     "../build/scripts/templates/InternalRuntimeFlags.h.tmpl",
554     "../build/scripts/templates/InternalRuntimeFlags.idl.tmpl",
555   ]
556   outputs = [
557     "$blink_core_output_dir/InternalRuntimeFlags.idl",
558     "$blink_core_output_dir/InternalRuntimeFlags.h",
559   ]
561   args = [
562     rebase_path("../platform/RuntimeEnabledFeatures.in", root_build_dir),
563     "--output_dir", rel_blink_core_gen_dir,
564   ]
567 # make_core_generated ----------------------------------------------------------
569 # GYP version: WebKit/Source/core/core_generated.gyp:make_core_generated
570 group("make_core_generated") {
571   deps = [
572     ":make_core_generated_private_script",
573     ":make_core_generated_private_script_for_testing",
574     ":make_core_generated_html_entity_table",
575     ":make_core_generated_css_property_names",
576     ":make_core_generated_css_tokenizer_codepoints",
577     ":make_core_generated_media_feature_names",
578     ":make_core_generated_media_features",
579     ":make_core_generated_media_type_names",
580     ":make_core_generated_style_property_shorthand",
581     ":make_core_generated_style_builder",
582     ":make_core_generated_css_value_keywords",
583     ":make_core_generated_html_element_factory",
584     ":make_core_generated_html_element_type_helpers",
585     ":make_core_generated_svg_names",
586     ":make_core_generated_svg_element_type_helpers",
587     ":make_core_generated_event_factory",
588     ":make_core_generated_event_names",
589     ":make_core_generated_event_target_names",
590     ":make_core_generated_math_ml_names",
591     ":make_core_generated_fetch_initiator_type_names",
592     ":make_core_generated_event_type_names",
593     ":make_core_generated_html_tokenizer_names",
594     ":make_core_generated_input_type_names",
595     ":make_core_generated_xlink_names",
596     ":make_core_generated_xml_ns_names",
597     ":make_core_generated_xml_names",
598     ":make_core_generated_make_token_matcher",
599     ":make_core_generated_make_parser",
600     ":make_core_generated_make_token_matcher_for_viewport",
601     ":make_core_generated_html_element_lookup_trie",
602     ":make_core_generated_bison",
603   ]
606 # "CSSPropertyNames" in make_core_generated from GYP.
607 css_properties("make_core_generated_css_property_names") {
608   script = "../build/scripts/make_css_property_names.py"
609   outputs = [
610     "$blink_core_output_dir/CSSPropertyNames.cpp",
611     "$blink_core_output_dir/CSSPropertyNames.h",
612   ]
615 # "MediaFeatures" in make_core_generated from GYP.
616 process_in_files("make_core_generated_media_features") {
617   script = "../build/scripts/make_media_features.py"
618   in_files = [
619     "css/MediaFeatureNames.in",
620   ]
621   other_inputs = [
622     "../build/scripts/make_media_features.py",
623     "../build/scripts/templates/MediaFeatures.h.tmpl",
624   ]
625   outputs = [
626     "$blink_core_output_dir/MediaFeatures.h",
627   ]
630 # "StylePropertyShorthand" in make_core_generated from GYP.
631 css_properties("make_core_generated_style_property_shorthand") {
632   script = "../build/scripts/make_style_shorthands.py"
633   other_inputs = [
634     "../build/scripts/templates/StylePropertyShorthand.cpp.tmpl",
635     "../build/scripts/templates/StylePropertyShorthand.h.tmpl",
636   ]
637   outputs = [
638     "$blink_core_output_dir/StylePropertyShorthand.cpp",
639     "$blink_core_output_dir/StylePropertyShorthand.h",
640   ]
643 # "StyleBuilder" in make_core_generated from GYP.
644 css_properties("make_core_generated_style_builder") {
645   script = "../build/scripts/make_style_builder.py"
646   other_inputs = [
647     "../build/scripts/templates/StyleBuilder.cpp.tmpl",
648     "../build/scripts/templates/StyleBuilderFunctions.cpp.tmpl",
649     "../build/scripts/templates/StyleBuilderFunctions.h.tmpl",
650   ]
651   outputs = [
652     "$blink_core_output_dir/StyleBuilder.cpp",
653     "$blink_core_output_dir/StyleBuilderFunctions.h",
654     "$blink_core_output_dir/StyleBuilderFunctions.cpp",
655   ]
658 # "CSSPropertyMetadata" in make_core_generated from GYP.
659 css_properties("make_core_generated_css_property_metadata") {
660   script = "../build/scripts/make_css_property_metadata.py"
661   other_inputs = [
662     "../build/scripts/templates/CSSPropertyMetadata.cpp.tmpl",
663   ]
664   outputs = [
665     "$blink_core_output_dir/CSSPropertyMetadata.cpp",
666   ]
669 # "CSSValueKeywords" in make_core_generated from GYP.
670 process_in_files("make_core_generated_css_value_keywords") {
671   script = "../build/scripts/make_css_value_keywords.py"
673   in_files = [
674     "css/CSSValueKeywords.in",
675     "css/SVGCSSValueKeywords.in",
676   ]
677   outputs = [
678     "$blink_core_output_dir/CSSValueKeywords.cpp",
679     "$blink_core_output_dir/CSSValueKeywords.h",
680   ]
681   other_args = [
682     "--gperf", gperf_exe,
683   ]
686 # "HTMLElementFactory" in make_core_generated from GYP.
687 process_in_files("make_core_generated_html_element_factory") {
688   script = "../build/scripts/make_element_factory.py"
690   in_files = [
691     "html/HTMLTagNames.in",
692     "html/HTMLAttributeNames.in",
693   ]
694   other_inputs = make_element_factory_files
695   outputs = [
696     "$blink_core_output_dir/HTMLElementFactory.cpp",
697     "$blink_core_output_dir/HTMLElementFactory.h",
698     "$blink_core_output_dir/HTMLNames.cpp",
699     "$blink_core_output_dir/HTMLNames.h",
700   ]
703 # "HTMLElementTypeHelpers" in make_core_generated from GYP.
704 process_in_files("make_core_generated_html_element_type_helpers") {
705   script = "../build/scripts/make_element_type_helpers.py"
707   in_files = [
708     "html/HTMLTagNames.in",
709   ]
710   other_inputs = make_element_type_helpers_files
711   outputs = [
712     "$blink_core_output_dir/HTMLElementTypeHelpers.h",
713   ]
716 # "SVGNames" in make_core_generated from GYP.
717 process_in_files("make_core_generated_svg_names") {
718   script = "../build/scripts/make_element_factory.py"
720   in_files = [
721     "svg/SVGTagNames.in",
722     "svg/SVGAttributeNames.in",
723   ]
724   other_inputs = make_element_factory_files
725   outputs = [
726     "$blink_core_output_dir/SVGElementFactory.cpp",
727     "$blink_core_output_dir/SVGElementFactory.h",
728     "$blink_core_output_dir/SVGNames.cpp",
729     "$blink_core_output_dir/SVGNames.h",
730   ]
733 # "SVGElementTypeHelpers" in make_core_generated from GYP.
734 process_in_files("make_core_generated_svg_element_type_helpers") {
735   script = "../build/scripts/make_element_type_helpers.py"
737   in_files = [
738     "svg/SVGTagNames.in",
739   ]
740   other_inputs = make_element_type_helpers_files
741   outputs = [
742     "$blink_core_output_dir/SVGElementTypeHelpers.h",
743   ]
746 # make_event_factory -----------------------------------------------------------
748 # "EventFactory" in make_core_generated from GYP.
749 process_in_files("make_core_generated_event_factory") {
750   script = "../build/scripts/make_event_factory.py"
752   in_files = [
753     "$blink_core_output_dir/EventInterfaces.in",
754     "events/EventAliases.in",
755   ]
756   other_inputs = make_event_factory_files
757   outputs = [
758     "$blink_core_output_dir/Event.cpp",
759     "$blink_core_output_dir/EventHeaders.h",
760   ]
763 # make_names -------------------------------------------------------------------
765 # "MediaFeatureNames" in make_core_generated from GYP.
766 process_in_files("make_core_generated_media_feature_names") {
767   script = "../build/scripts/make_media_feature_names.py"
768   in_files = [
769     "css/MediaFeatureNames.in",
770   ]
771   other_inputs = make_names_files
772   outputs = [
773     "$blink_core_output_dir/MediaFeatureNames.cpp",
774     "$blink_core_output_dir/MediaFeatureNames.h",
775   ]
778 # "MediaTypeNames" in make_core_generated from GYP.
779 make_names("make_core_generated_media_type_names") {
780   in_files = [
781     "css/MediaTypeNames.in",
782   ]
783   outputs = [
784     "$blink_core_output_dir/MediaTypeNames.cpp",
785     "$blink_core_output_dir/MediaTypeNames.h",
786   ]
789 # "EventNames" in make_core_generated from GYP.
790 make_names("make_core_generated_event_names") {
791   in_files = [
792     "$blink_core_output_dir/EventInterfaces.in",
793   ]
794   outputs = [
795     "$blink_core_output_dir/EventNames.cpp",
796     "$blink_core_output_dir/EventNames.h",
797   ]
800 # "EventTargetNames" in make_core_generated from GYP.
801 make_names("make_core_generated_event_target_names") {
802   in_files = [
803     "events/EventTargetFactory.in",
804   ]
805   outputs = [
806     "$blink_core_output_dir/EventTargetNames.cpp",
807     "$blink_core_output_dir/EventTargetNames.h",
808   ]
811 # "FetchInitiatorTypeNames" in make_core_generated from GYP.
812 make_names("make_core_generated_fetch_initiator_type_names") {
813   in_files = [
814     "fetch/FetchInitiatorTypeNames.in",
815   ]
816   outputs = [
817     "$blink_core_output_dir/FetchInitiatorTypeNames.cpp",
818     "$blink_core_output_dir/FetchInitiatorTypeNames.h",
819   ]
822 # "EventTypeNames" in make_core_generated from GYP.
823 make_names("make_core_generated_event_type_names") {
824   in_files = [
825     "events/EventTypeNames.in",
826   ]
827   outputs = [
828     "$blink_core_output_dir/EventTypeNames.cpp",
829     "$blink_core_output_dir/EventTypeNames.h",
830   ]
833 # "HTMLTokenizerNames" in make_core_generated from GYP.
834 make_names("make_core_generated_html_tokenizer_names") {
835   in_files = [
836     "html/parser/HTMLTokenizerNames.in",
837   ]
838   outputs = [
839     "$blink_core_output_dir/HTMLTokenizerNames.cpp",
840     "$blink_core_output_dir/HTMLTokenizerNames.h",
841   ]
844 # "InputTypeNames" in make_core_generated from GYP.
845 make_names("make_core_generated_input_type_names") {
846   in_files = [
847     "html/forms/InputTypeNames.in",
848   ]
849   outputs = [
850     "$blink_core_output_dir/InputTypeNames.cpp",
851     "$blink_core_output_dir/InputTypeNames.h",
852   ]
855 # make_qualified_names ---------------------------------------------------------
857 # "MathMLNames" in make_core_generated from GYP.
858 make_qualified_names("make_core_generated_math_ml_names") {
859   in_files = [
860     "html/parser/MathMLTagNames.in",
861     "html/parser/MathMLAttributeNames.in",
862   ]
863   outputs = [
864     "$blink_core_output_dir/MathMLNames.cpp",
865     "$blink_core_output_dir/MathMLNames.h",
866   ]
869 # "XLinkNames" in make_core_generated from GYP.
870 make_qualified_names("make_core_generated_xlink_names") {
871   in_files = [
872     "svg/xlinkattrs.in",
873   ]
874   outputs = [
875     "$blink_core_output_dir/XLinkNames.cpp",
876     "$blink_core_output_dir/XLinkNames.h",
877   ]
880 # "XMLNSNames" in make_core_generated from GYP.
881 make_qualified_names("make_core_generated_xml_ns_names") {
882   in_files = [
883     "xml/xmlnsattrs.in",
884   ]
885   outputs = [
886     "$blink_core_output_dir/XMLNSNames.cpp",
887     "$blink_core_output_dir/XMLNSNames.h",
888   ]
891 # "XMLNames" in make_core_generated from GYP.
892 make_qualified_names("make_core_generated_xml_names") {
893   in_files = [
894     "xml/xmlattrs.in",
895   ]
896   outputs = [
897     "$blink_core_output_dir/XMLNames.cpp",
898     "$blink_core_output_dir/XMLNames.h",
899   ]
902 # make_token_matcher -----------------------------------------------------------
904 # "MakeTokenMatcher" in make_core_generated from GYP.
905 make_token_matcher("make_core_generated_make_token_matcher") {
906   input_file = "css/parser/BisonCSSTokenizer-in.cpp"
907   output_file = "$blink_core_output_dir/BisonCSSTokenizer.cpp"
910 # "MakeParser" in make_core_generated from GYP.
911 make_token_matcher("make_core_generated_make_parser") {
912   input_file = "css/parser/BisonCSSParser-in.cpp"
913   output_file = "$blink_core_output_dir/BisonCSSParser.cpp"
916 # "MakeTokenMatcherForViewport" in make_core_generated from GYP.
917 make_token_matcher("make_core_generated_make_token_matcher_for_viewport") {
918   input_file = "html/HTMLMetaElement-in.cpp"
919   output_file = "$blink_core_output_dir/HTMLMetaElement.cpp"
922 # One-off scripts --------------------------------------------------------------
924 # "generatePrivateScript" in make_core_generated from GYP.
925 # FIXME: The implementation of Blink-in-JS is not yet mature.
926 # You can use Blink-in-JS in your local experiment, but don't ship it.
927 # crbug.com/341031
928 action("make_core_generated_private_script") {
929   visibility = []  # Allow re-assignment of list.
930   visibility = [ ":make_core_generated" ]
931   script = "../build/scripts/make_private_script_source.py"
933   inputs = [
934     "../bindings/core/v8/PrivateScriptRunner.js",
935     "html/HTMLMarqueeElement.js",
936     "html/shadow/PluginPlaceholderElement.js",
937     "xml/DocumentXMLTreeViewer.js",
938   ]
939   outputs = [
940     "$blink_core_output_dir/PrivateScriptSources.h",
941   ]
943   args = rebase_path(outputs, root_build_dir)
944   args += rebase_path(inputs, root_build_dir)
946   deps = make_core_generated_deps
949 action("make_core_generated_private_script_for_testing") {
950   visibility = []  # Allow re-assignment of list.
951   visibility = [ ":make_core_generated" ]
952   script = "../build/scripts/make_private_script_source.py"
954   inputs = [
955       "testing/PartialPrivateScriptTest.js",
956       "testing/PrivateScriptTest.js",
957   ]
958   outputs = [
959     "$blink_core_output_dir/PrivateScriptSourcesForTesting.h",
960   ]
962   args = [ "--for-testing" ]
963   args += rebase_path(outputs, root_build_dir)
964   args += rebase_path(inputs, root_build_dir)
966   deps = make_core_generated_deps
969 # "HTMLEntityTable" in make_core_generated from GYP.
970 action("make_core_generated_html_entity_table") {
971   visibility = []  # Allow re-assignment of list.
972   visibility = [ ":make_core_generated" ]
973   script = "html/parser/create-html-entity-table"
975   inputs = [
976     "html/parser/HTMLEntityNames.in",
977   ]
978   outputs = [
979     "$blink_core_output_dir/HTMLEntityTable.cpp",
980   ]
982   args = [ "-o" ] + rebase_path(outputs, root_build_dir) 
983   args += rebase_path(inputs, root_build_dir)
985   deps = make_core_generated_deps
988 # "CSSTokenizerCodepoints" in make_core_generated from GYP.
989 action("make_core_generated_css_tokenizer_codepoints") {
990   visibility = []  # Allow re-assignment of list.
991   visibility = [ ":make_core_generated" ]
992   script = "../build/scripts/make_css_tokenizer_codepoints.py"
994   outputs = [
995     "$blink_core_output_dir/CSSTokenizerCodepoints.cpp",
996   ]
998   args = [
999     "--output_dir", rel_blink_core_gen_dir,
1000   ]
1002   deps = make_core_generated_deps
1005 # "HTMLElementLookupTrie" in make_core_generated from GYP.
1006 action("make_core_generated_html_element_lookup_trie") {
1007   visibility = []  # Allow re-assignment of list.
1008   visibility = [ ":make_core_generated" ]
1009   script = "../build/scripts/make_element_lookup_trie.py"
1011   input_file = "html/HTMLTagNames.in"
1012   inputs = scripts_for_in_files + [
1013     input_file,
1014     "../build/scripts/templates/ElementLookupTrie.cpp.tmpl",
1015     "../build/scripts/templates/ElementLookupTrie.h.tmpl",
1016   ]
1017   outputs = [
1018     "$blink_core_output_dir/HTMLElementLookupTrie.cpp",
1019     "$blink_core_output_dir/HTMLElementLookupTrie.h",
1020   ]
1022   args = [
1023     rebase_path(input_file, root_build_dir),
1024     "--output_dir", rel_blink_core_gen_dir,
1025   ]
1027   deps = make_core_generated_deps
1030 # The bison rules from make_core_generated.
1031 action_foreach("make_core_generated_bison") {
1032   script = "../build/scripts/rule_bison.py"
1033   sources = [
1034     "css/parser/CSSGrammar.y",
1035     "xml/XPathGrammar.y",
1036   ]
1037   outputs = [
1038     "$blink_core_output_dir/{{source_name_part}}.cpp",
1039     "$blink_core_output_dir/{{source_name_part}}.h",
1040   ]
1041   args = [
1042     "{{source}}",
1043     rel_blink_core_gen_dir,
1044     bison_exe,
1045   ]
1047   deps = make_core_generated_deps