Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / Source / core / BUILD.gn
blob6d30dc7a0499f3df5d804ee789bad04536faecbb
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/chrome_build.gni")
6 import("//build/config/ui.gni")
7 import("//third_party/WebKit/Source/bindings/bindings.gni")
8 import("//third_party/WebKit/Source/bindings/core/v8/generated.gni")
9 import("//third_party/WebKit/Source/bindings/modules/modules.gni")
10 import("//third_party/WebKit/Source/bindings/modules/v8/generated.gni")
11 import("//third_party/WebKit/Source/bindings/scripts/scripts.gni")
12 import("//third_party/WebKit/Source/config.gni")
13 import("//third_party/WebKit/Source/core/core.gni")
14 import("//third_party/WebKit/Source/build/scripts/scripts.gni")
15 import("//third_party/WebKit/Source/platform/platform_generated.gni")
17 visibility = [ "//third_party/WebKit/Source/*" ]
19 rel_blink_core_gen_dir = rebase_path(blink_core_output_dir, root_build_dir)
21 # Compute the optimization level. The GYP code sets "optimize: max" which sets
22 # speed-over-size optimization for official builds on Windows only. The GN's
23 # build optimize_max config applies this optimization on all platforms, so
24 # compute how to modify the config list to duplicate the GYP behavior.
25 if (is_debug || !is_win || !is_official_build) {
26   # NOP.
27   core_config_add = []
28   core_config_remove = []
29 } else {
30   core_config_remove = [ "//build/config/compiler:default_optimization" ]
31   core_config_add = [ "//build/config/compiler:optimize_max" ]
34 # Core targets also get wexit time destructors.
35 core_config_add += [ "//build/config/compiler:wexit_time_destructors" ]
37 config("core_include_dirs") {
38   include_dirs = [
39     "..",
40     "$root_gen_dir/blink",
41   ]
42   if (is_android && use_openmax_dl_fft) {
43     include_dirs += [ "//third_party/openmax_dl" ]
44   }
47 # GYP version: WebKit/Source/core/core.gyp:webcore_generated
48 source_set("generated") {
49   deps = [
50     ":make_core_generated",
51     ":prerequisites",
52     "inspector:protocol_sources",
53     "inspector:instrumentation_sources",
54     "//gin",
55     "//skia",
56     "//third_party/iccjpeg",
57     "//third_party/libpng",
58     "//third_party/libwebp",
59     "//third_party/libxml",
60     "//third_party/libxslt",
61     "//third_party/npapi",
62     "//third_party/qcms",
63     "//third_party/sqlite",
64     "//third_party/WebKit/Source/bindings/core/v8:bindings_core_v8_generated",
65     # FIXME: don't depend on bindings/modules http://crbug.com/358074
66     "//third_party/WebKit/Source/bindings/modules:bindings_modules_generated",
67     "//third_party/WebKit/Source/bindings/modules/v8:bindings_modules_generated",
68     "//third_party/WebKit/Source/platform:make_platform_generated",
69     "//third_party/WebKit/Source/wtf",
70     "//url",
71     "//v8",
72   ]
75 # GYP version: WebKit/Source/core/core.gyp:webcore_prerequisites
76 source_set("prerequisites") {
77   public_deps = [
78     "//third_party/WebKit/Source/wtf",
79     "//gpu/command_buffer/client:gles2_c_lib",
80     "//skia",
81     "//third_party/angle:translator",
82     "//third_party/iccjpeg",
83     "//third_party/icu",
84     "//third_party/libpng",
85     "//third_party/libwebp",
86     "//third_party/libxml",
87     "//third_party/libxslt",
88     "//third_party/npapi",
89     "//third_party/ots",
90     "//third_party/qcms",
91     "//third_party/snappy",
92     "//third_party/sqlite",
93     "//third_party/zlib",
94     "//url",
95     "//v8",
96   ]
97   deps = [
98     ":make_core_generated",
99     "inspector:protocol_sources",
100     "inspector:instrumentation_sources",
101     "//third_party/WebKit/Source/bindings/core/v8:bindings_core_v8_generated",
102     # FIXME: don't depend on bindings_modules http://crbug.com/358074
103     "//third_party/WebKit/Source/bindings/modules/v8:bindings_modules_generated",
104     "//third_party/WebKit/Source/platform",
105   ]
107   public_configs = [
108     ":core_include_dirs",
109     "//third_party/WebKit/Source:config",
110     "//third_party/WebKit/Source:inside_blink",
111   ]
113   if (use_openmax_dl_fft) {
114     deps += [
115       "//third_party/openmax_dl/dl"
116     ]
117   }
120 # Note that this is a source set rather than a group, even though it has no
121 # sources. A group would implicitly forward all direct dependent configs
122 # through it, but we want to keep our internal targets' public_configs private
123 # and only forward some of them.
125 # GYP version: WebKit/Source/core/core.gyp:webcore
126 source_set("core") {
127   visibility = []  # Allow re-assignment of list.
128   visibility = [ "//third_party/WebKit/*" ]
130   configs -= core_config_remove
131   configs += core_config_add
133   public_deps = [
134     ":core_generated",
135     "//skia",
136     "//third_party/npapi",
137     "//third_party/qcms",
138     "//third_party/WebKit/Source/platform",
139     "//third_party/WebKit/Source/wtf",
140     "//url",
141     "//v8",
142   ]
143   deps = [
144     ":dom",
145     ":html",
146     ":remaining",
147     ":rendering",
148     ":svg",
149   ]
151   public_configs = [
152     ":core_include_dirs",
153   ]
155   # TODO(GYP) IPP libraries pkg-config. These seem to be experimental and used
156   # only on x86 Android. See also below. There should be one pkg-config call
157   # that creates a config used in both of these cases.
160 # GYP version: //third_party/WebKit/Source/core/core.gyp:webcore_dom
161 source_set("dom") {
162   sources = rebase_path(webcore_dom_files, ".", "//")
164   configs -= core_config_remove
165   configs += core_config_add + [
166     # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
167     "//build/config/compiler:no_size_t_to_int_warning",
168   ]
170   deps = [
171     ":prerequisites",
172   ]
175 # GYP version: //third_party/WebKit/Source/core/core.gyp:webcore_html
176 source_set("html") {
177   sources = rebase_path(webcore_html_files, ".", "//")
179   configs -= core_config_remove
180   configs += core_config_add
182   deps = [
183     ":prerequisites",
184   ]
186   # TODO(GYP)
187   # Shard this target into parts to work around linker limitations.
188   # on link time code generation builds.
189   #['OS=="win" and buildtype=="Official"', {
190   #  'msvs_shard': 5,
191   #}],
194 # GYP version: //third_party/WebKit/Source/core/core.gyp:webcore_svg
195 source_set("svg") {
196   sources = rebase_path(webcore_svg_files, ".", "//")
198   configs -= core_config_remove
199   configs += core_config_add
201   deps = [
202     ":prerequisites",
203   ]
205   # TODO(GYP)
206   # Shard this taret into parts to work around linker limitations.
207   # on link time code generation builds.
208   #['OS=="win" and buildtype=="Official"', {
209   #  'msvs_shard': 5,
210   #}],
213 # GYP version: //third_party/WebKit/Source/core/core.gyp:webcore_remaining
214 source_set("remaining") {
215   # This is currently a mashup of "webcore_rendering" and "webcore_remaining"
216   # in GYP. The file list variable is the same and then GYP filters on wether
217   # the path starts with "rendering/" or not. We should tweak the .gypis a bit
218   # to separate out the rendering files.
219   sources = rebase_path(webcore_non_rendering_files, ".", "//")
220   sources += rebase_path(webcore_rendering_files, ".", "//")
222   configs -= core_config_remove
223   configs += core_config_add + [
224     # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
225     "//build/config/compiler:no_size_t_to_int_warning",
226   ]
228   cflags = []
229   libs = []
231   deps = [
232     ":prerequisites",
233   ]
235   if (is_win) {
236     cflags += [
237       "/wd4334",
238     ]
239   } else {  # !is_win
240     sources -= [
241       "layout/LayoutThemeFontProviderWin.cpp",
242       "layout/LayoutThemeWin.cpp",
243       "layout/LayoutThemeWin.h",
244     ]
245   }
246   if (!is_linux) {
247     sources -= [
248       "layout/LayoutThemeLinux.cpp",
249       "layout/LayoutThemeLinux.h",
250     ]
251     if (!is_android) {
252       sources -= [
253         "layout/LayoutThemeFontProviderLinux.cpp",
254       ]
255     }
256   }
258   if (is_android) {
259     # Due to a bug in gcc 4.6 in android NDK, we got warnings about
260     # uninitialized variable.
261     # TODO: try removing now that we are on GCC 4.8.
262     cflags += [ "-Wno-uninitialized" ]
263   } else {  # !is_android
264     sources -= [
265       "layout/LayoutThemeAndroid.cpp",
266       "layout/LayoutThemeAndroid.h",
267     ]
268   }
270   if (is_mac) {
271     sources -= [
272       "layout/LayoutThemeDefault.cpp",
273       "layout/LayoutThemeDefault.h",
274       "layout/LayoutThemeFontProvider.cpp",
275       "layout/LayoutThemeFontProvider.h",
276       "paint/ThemePainterDefault.cpp",
277       "paint/ThemePainterDefault.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/commands/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     ":generated_testing_idls",
309     "//third_party/WebKit/Source/wtf:test_support",
310   ]
312   sources = generated_core_testing_dictionary_files + webcore_testing_files
313   sources += [
314     "$bindings_core_v8_output_dir/V8DictionaryTest.cpp",
315     "$bindings_core_v8_output_dir/V8DictionaryTest.h",
316     "$bindings_core_v8_output_dir/V8GarbageCollectedScriptWrappable.cpp",
317     "$bindings_core_v8_output_dir/V8GarbageCollectedScriptWrappable.h",
318     "$bindings_core_v8_output_dir/V8GCObservation.cpp",
319     "$bindings_core_v8_output_dir/V8GCObservation.h",
320     "$bindings_core_v8_output_dir/V8PrivateScriptTest.cpp",
321     "$bindings_core_v8_output_dir/V8PrivateScriptTest.h",
322     "$bindings_core_v8_output_dir/V8TypeConversions.cpp",
323     "$bindings_core_v8_output_dir/V8TypeConversions.h",
324     "$bindings_core_v8_output_dir/V8UnionTypesTest.cpp",
325     "$bindings_core_v8_output_dir/V8UnionTypesTest.h",
326     "$bindings_core_v8_output_dir/V8Internals.cpp",
327     "$bindings_core_v8_output_dir/V8Internals.h",
328     "$bindings_core_v8_output_dir/V8InternalSettings.cpp",
329     "$bindings_core_v8_output_dir/V8InternalSettings.h",
330     "$bindings_core_v8_output_dir/V8InternalSettingsGenerated.cpp",
331     "$bindings_core_v8_output_dir/V8InternalSettingsGenerated.h",
332     "$bindings_core_v8_output_dir/V8InternalRuntimeFlags.cpp",
333     "$bindings_core_v8_output_dir/V8InternalRuntimeFlags.h",
334     "$bindings_core_v8_output_dir/V8LayerRect.cpp",
335     "$bindings_core_v8_output_dir/V8LayerRect.h",
336     "$bindings_core_v8_output_dir/V8LayerRectList.cpp",
337     "$bindings_core_v8_output_dir/V8LayerRectList.h",
338     "$bindings_core_v8_output_dir/V8RefCountedScriptWrappable.cpp",
339     "$bindings_core_v8_output_dir/V8RefCountedScriptWrappable.h",
340     "$bindings_core_v8_output_dir/V8InternalDictionary.cpp",
341     "$bindings_core_v8_output_dir/V8InternalDictionary.h",
342     "$bindings_core_v8_output_dir/V8InternalDictionaryDerived.cpp",
343     "$bindings_core_v8_output_dir/V8InternalDictionaryDerived.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/HTMLElementFactory.cpp",
372     "$blink_core_output_dir/HTMLElementFactory.h",
373     "$blink_core_output_dir/HTMLElementLookupTrie.cpp",
374     "$blink_core_output_dir/HTMLElementLookupTrie.h",
375     "$blink_core_output_dir/HTMLNames.cpp",
376     "$blink_core_output_dir/HTMLTokenizerNames.cpp",
377     "$blink_core_output_dir/InputTypeNames.cpp",
378     "$blink_core_output_dir/MathMLNames.cpp",
379     "$blink_core_output_dir/SVGNames.cpp",
380     "$blink_core_output_dir/XLinkNames.cpp",
381     "$blink_core_output_dir/XMLNSNames.cpp",
382     "$blink_core_output_dir/XMLNames.cpp",
383     "$blink_core_output_dir/fetch/FetchInitiatorTypeNames.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 HTMLMetaElement-in.cpp
395     "$blink_core_output_dir/HTMLMetaElement.cpp",
397     # Additional .cpp files from the make_core_generated rules.
398     "$blink_core_output_dir/XPathGrammar.cpp",
400     # Additional .cpp files from the inspector_protocol_sources list.
401     "$blink_core_output_dir/InspectorFrontend.cpp",
402     "$blink_core_output_dir/InspectorBackendDispatcher.cpp",
403     "$blink_core_output_dir/InspectorTypeBuilder.cpp",
405     # Additional .cpp files from the inspector_instrumentation_sources list.
406     "$blink_core_output_dir/InspectorConsoleInstrumentationInl.h",
407     "$blink_core_output_dir/InspectorInstrumentationInl.h",
408     "$blink_core_output_dir/InspectorOverridesInl.h",
409     "$blink_core_output_dir/InstrumentingAgentsInl.h",
410     "$blink_core_output_dir/InspectorInstrumentationImpl.cpp",
412     # Additional .cpp files for SVG.
413     "$blink_core_output_dir/SVGElementFactory.cpp",
415     # Generated from make_style_shorthands.py
416     "$blink_core_output_dir/StylePropertyShorthand.cpp",
418     # Generated from make_style_builder.py
419     "$blink_core_output_dir/StyleBuilder.cpp",
420     "$blink_core_output_dir/StyleBuilderFunctions.cpp",
422     # Generated from make_css_property_metadata.py
423     "$blink_core_output_dir/CSSPropertyMetadata.cpp",
424   ]
426   configs -= core_config_remove
427   configs += core_config_add
429   configs += [
430     "..:inside_blink",
431   ]
433   public_deps = [
434     ":make_core_generated",
435     ":prerequisites",
436     "inspector:protocol_sources",
437     "inspector:instrumentation_sources",
438     "//gin",
439     "//skia",
440     "//third_party/iccjpeg",
441     "//third_party/libpng",
442     "//third_party/libwebp",
443     "//third_party/libxml",
444     "//third_party/libxslt",
445     "//third_party/npapi",
446     "//third_party/qcms",
447     "//third_party/sqlite",
448     "//third_party/WebKit/Source/bindings/core/v8:bindings_core_v8_generated",
449     # FIXME: don't depend on bindings/modules http://crbug.com/358074
450     "//third_party/WebKit/Source/bindings/modules:bindings_modules_generated",
451     "//third_party/WebKit/Source/bindings/modules/v8:bindings_modules_generated",
452     "//third_party/WebKit/Source/platform:make_platform_generated",
453     "//third_party/WebKit/Source/wtf",
454     "//url",
455     "//v8",
456   ]
458   configs += [
459     ":core_include_dirs",
460     # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
461     "//build/config/compiler:no_size_t_to_int_warning",
462   ]
463   include_dirs = [
464     "$root_gen_dir/blink",
465   ]
467   cflags = []
468   defines = []
470   if (is_win && is_component_build) {
471     defines += [ "USING_V8_SHARED" ]
472   }
474   if (is_win) {
475     cflags += [
476       # In generated bindings code: "switch contains default but no case".
477       # 4701 and 4702 are disabled because of issues in Bison-generated
478       # XPathGrammar.cpp.
479       "/wd4065",
480       "/wd4701",
481       "/wd4702",
482     ]
483   }
485   # TODO(GYP) More IPP libraries, see above.
486   #if ((is_linux || is_android) && use_webaudio_ipp)
487   #  ["OS in ("linux", "android") and "WTF_USE_WEBAUDIO_IPP=1" in feature_defines", {
488   #    "cflags": [
489   #      "<!@(pkg-config --cflags-only-I ipp)",
490   #    ],
491   #  }],
492   #],
495 # core_bindings_generated ------------------------------------------------------
497 # GYP version: WebKit/Source/core/core_generated.gyp:core_event_interfaces
498 generate_event_interfaces("core_event_interfaces") {
499   sources = core_event_idl_files
500   output_file = "core/EventInterfaces.in"
503 # generated_testing_idls -------------------------------------------------------
505 # GYP version: WebKit/Source/core/core_generated.gyp:generated_testing_idls
506 group("generated_testing_idls") {
507   public_deps = [
508     ":generated_settings_macros",
509     ":generated_testing_idls_settings",
510     ":generated_testing_idls_internal_runtime_flags",
511   ]
514 # "Settings" action in generated_testing_idls from GYP.
515 action("generated_settings_macros") {
516   script = "../build/scripts/make_settings.py"
518   inputs = scripts_for_in_files + [
519     "../build/scripts/make_settings.py",
520     "../build/scripts/templates/SettingsMacros.h.tmpl",
521     "frame/Settings.in",
522   ]
523   outputs = [
524     "$blink_core_output_dir/SettingsMacros.h",
525   ]
527   args = [
528     rebase_path("frame/Settings.in", root_build_dir),
529     "--output_dir", rel_blink_core_gen_dir,
530   ]
533 # "InternalSettings" action in generated_testing_idls from GYP.
534 action("generated_testing_idls_settings") {
535   script = "../build/scripts/make_internal_settings.py"
537   inputs = scripts_for_in_files + [
538     "../build/scripts/make_internal_settings.py",
539     "../build/scripts/templates/InternalSettingsGenerated.idl.tmpl",
540     "../build/scripts/templates/InternalSettingsGenerated.cpp.tmpl",
541     "../build/scripts/templates/InternalSettingsGenerated.h.tmpl",
542     "frame/Settings.in",
543   ]
544   outputs = [
545     "$blink_core_output_dir/testing/InternalSettingsGenerated.idl",
546     "$blink_core_output_dir/testing/InternalSettingsGenerated.cpp",
547     "$blink_core_output_dir/testing/InternalSettingsGenerated.h",
548   ]
550   args = [
551     rebase_path("frame/Settings.in", root_build_dir),
552     "--output_dir", "$rel_blink_core_gen_dir/testing",
553   ]
556 # "InternalRuntimeFlags" action in generated_testing_idls from GYP.
557 action("generated_testing_idls_internal_runtime_flags") {
558   script = "../build/scripts/make_internal_runtime_flags.py"
560   inputs = scripts_for_in_files + [
561     "../build/scripts/make_internal_runtime_flags.py",
562     "../platform/RuntimeEnabledFeatures.in",
563     "../build/scripts/templates/InternalRuntimeFlags.h.tmpl",
564     "../build/scripts/templates/InternalRuntimeFlags.idl.tmpl",
565   ]
566   outputs = [
567     "$blink_core_output_dir/testing/InternalRuntimeFlags.idl",
568     "$blink_core_output_dir/testing/InternalRuntimeFlags.h",
569   ]
571   args = [
572     rebase_path("../platform/RuntimeEnabledFeatures.in", root_build_dir),
573     "--output_dir", "$rel_blink_core_gen_dir/testing",
574   ]
577 # make_core_generated ----------------------------------------------------------
579 # GYP version: WebKit/Source/core/core_generated.gyp:make_core_generated
580 group("make_core_generated") {
581   public_deps = [
582     ":make_core_generated_private_script",
583     ":make_core_generated_private_script_for_testing",
584     ":make_core_generated_html_entity_table",
585     ":make_core_generated_css_property_names",
586     ":make_core_generated_css_tokenizer_codepoints",
587     ":make_core_generated_media_feature_names",
588     ":make_core_generated_media_features",
589     ":make_core_generated_media_type_names",
590     ":make_core_generated_style_property_shorthand",
591     ":make_core_generated_style_builder",
592     ":make_core_generated_css_property_metadata",
593     ":make_core_generated_css_value_keywords",
594     ":make_core_generated_html_element_factory",
595     ":make_core_generated_html_element_type_helpers",
596     ":make_core_generated_svg_names",
597     ":make_core_generated_svg_element_type_helpers",
598     ":make_core_generated_event_factory",
599     ":make_core_generated_event_names",
600     ":make_core_generated_event_target_names",
601     ":make_core_generated_math_ml_names",
602     ":make_core_generated_fetch_initiator_type_names",
603     ":make_core_generated_event_type_names",
604     ":make_core_generated_html_tokenizer_names",
605     ":make_core_generated_input_type_names",
606     ":make_core_generated_xlink_names",
607     ":make_core_generated_xml_ns_names",
608     ":make_core_generated_xml_names",
609     ":make_core_generated_make_token_matcher_for_viewport",
610     ":make_core_generated_html_element_lookup_trie",
611     ":make_core_generated_bison",
612   ]
615 # "CSSPropertyNames" in make_core_generated from GYP.
616 css_properties("make_core_generated_css_property_names") {
617   script = "../build/scripts/make_css_property_names.py"
618   outputs = [
619     "$blink_core_output_dir/CSSPropertyNames.cpp",
620     "$blink_core_output_dir/CSSPropertyNames.h",
621   ]
624 # "MediaFeatures" in make_core_generated from GYP.
625 process_in_files("make_core_generated_media_features") {
626   script = "../build/scripts/make_media_features.py"
627   in_files = [
628     "css/MediaFeatureNames.in",
629   ]
630   other_inputs = [
631     "../build/scripts/make_media_features.py",
632     "../build/scripts/templates/MediaFeatures.h.tmpl",
633   ]
634   outputs = [
635     "$blink_core_output_dir/MediaFeatures.h",
636   ]
639 # "StylePropertyShorthand" in make_core_generated from GYP.
640 css_properties("make_core_generated_style_property_shorthand") {
641   script = "../build/scripts/make_style_shorthands.py"
642   other_inputs = [
643     "../build/scripts/templates/StylePropertyShorthand.cpp.tmpl",
644     "../build/scripts/templates/StylePropertyShorthand.h.tmpl",
645   ]
646   outputs = [
647     "$blink_core_output_dir/StylePropertyShorthand.cpp",
648     "$blink_core_output_dir/StylePropertyShorthand.h",
649   ]
652 # "StyleBuilder" in make_core_generated from GYP.
653 css_properties("make_core_generated_style_builder") {
654   script = "../build/scripts/make_style_builder.py"
655   other_inputs = [
656     "../build/scripts/templates/StyleBuilder.cpp.tmpl",
657     "../build/scripts/templates/StyleBuilderFunctions.cpp.tmpl",
658     "../build/scripts/templates/StyleBuilderFunctions.h.tmpl",
659   ]
660   outputs = [
661     "$blink_core_output_dir/StyleBuilder.cpp",
662     "$blink_core_output_dir/StyleBuilderFunctions.h",
663     "$blink_core_output_dir/StyleBuilderFunctions.cpp",
664   ]
667 # "CSSPropertyMetadata" in make_core_generated from GYP.
668 css_properties("make_core_generated_css_property_metadata") {
669   script = "../build/scripts/make_css_property_metadata.py"
670   other_inputs = [
671     "../build/scripts/templates/CSSPropertyMetadata.cpp.tmpl",
672   ]
673   outputs = [
674     "$blink_core_output_dir/CSSPropertyMetadata.cpp",
675   ]
678 # "CSSValueKeywords" in make_core_generated from GYP.
679 process_in_files("make_core_generated_css_value_keywords") {
680   script = "../build/scripts/make_css_value_keywords.py"
682   in_files = [
683     "css/CSSValueKeywords.in",
684     "css/SVGCSSValueKeywords.in",
685   ]
686   outputs = [
687     "$blink_core_output_dir/CSSValueKeywords.cpp",
688     "$blink_core_output_dir/CSSValueKeywords.h",
689   ]
690   other_args = [
691     "--gperf", gperf_exe,
692   ]
695 # "HTMLElementFactory" in make_core_generated from GYP.
696 process_in_files("make_core_generated_html_element_factory") {
697   script = "../build/scripts/make_element_factory.py"
699   in_files = [
700     "html/HTMLTagNames.in",
701     "html/HTMLAttributeNames.in",
702   ]
703   other_inputs = make_element_factory_files
704   outputs = [
705     "$blink_core_output_dir/HTMLElementFactory.cpp",
706     "$blink_core_output_dir/HTMLElementFactory.h",
707     "$blink_core_output_dir/HTMLNames.cpp",
708     "$blink_core_output_dir/HTMLNames.h",
709   ]
712 # "HTMLElementTypeHelpers" in make_core_generated from GYP.
713 process_in_files("make_core_generated_html_element_type_helpers") {
714   script = "../build/scripts/make_element_type_helpers.py"
716   in_files = [
717     "html/HTMLTagNames.in",
718   ]
719   other_inputs = make_element_type_helpers_files
720   outputs = [
721     "$blink_core_output_dir/HTMLElementTypeHelpers.h",
722   ]
725 # "SVGNames" in make_core_generated from GYP.
726 process_in_files("make_core_generated_svg_names") {
727   script = "../build/scripts/make_element_factory.py"
729   in_files = [
730     "svg/SVGTagNames.in",
731     "svg/SVGAttributeNames.in",
732   ]
733   other_inputs = make_element_factory_files
734   outputs = [
735     "$blink_core_output_dir/SVGElementFactory.cpp",
736     "$blink_core_output_dir/SVGElementFactory.h",
737     "$blink_core_output_dir/SVGNames.cpp",
738     "$blink_core_output_dir/SVGNames.h",
739   ]
742 # "SVGElementTypeHelpers" in make_core_generated from GYP.
743 process_in_files("make_core_generated_svg_element_type_helpers") {
744   script = "../build/scripts/make_element_type_helpers.py"
746   in_files = [
747     "svg/SVGTagNames.in",
748   ]
749   other_inputs = make_element_type_helpers_files
750   outputs = [
751     "$blink_core_output_dir/SVGElementTypeHelpers.h",
752   ]
755 # make_event_factory -----------------------------------------------------------
757 # "EventFactory" in make_core_generated from GYP.
758 process_in_files("make_core_generated_event_factory") {
759   script = "../build/scripts/make_event_factory.py"
761   in_files = [
762     "$blink_core_output_dir/EventInterfaces.in",
763     "events/EventAliases.in",
764   ]
765   other_inputs = make_event_factory_files
766   outputs = [
767     "$blink_core_output_dir/Event.cpp",
768     "$blink_core_output_dir/EventHeaders.h",
769   ]
772 # make_names -------------------------------------------------------------------
774 # "MediaFeatureNames" in make_core_generated from GYP.
775 process_in_files("make_core_generated_media_feature_names") {
776   script = "../build/scripts/make_media_feature_names.py"
777   in_files = [
778     "css/MediaFeatureNames.in",
779   ]
780   other_inputs = make_names_files
781   outputs = [
782     "$blink_core_output_dir/MediaFeatureNames.cpp",
783     "$blink_core_output_dir/MediaFeatureNames.h",
784   ]
787 # "MediaTypeNames" in make_core_generated from GYP.
788 make_names("make_core_generated_media_type_names") {
789   in_files = [
790     "css/MediaTypeNames.in",
791   ]
792   outputs = [
793     "$blink_core_output_dir/MediaTypeNames.cpp",
794     "$blink_core_output_dir/MediaTypeNames.h",
795   ]
798 # "EventNames" in make_core_generated from GYP.
799 make_names("make_core_generated_event_names") {
800   in_files = [
801     "$blink_core_output_dir/EventInterfaces.in",
802   ]
803   outputs = [
804     "$blink_core_output_dir/EventNames.cpp",
805     "$blink_core_output_dir/EventNames.h",
806   ]
809 # "EventTargetNames" in make_core_generated from GYP.
810 make_names("make_core_generated_event_target_names") {
811   in_files = [
812     "events/EventTargetFactory.in",
813   ]
814   outputs = [
815     "$blink_core_output_dir/EventTargetNames.cpp",
816     "$blink_core_output_dir/EventTargetNames.h",
817   ]
820 # "FetchInitiatorTypeNames" in make_core_generated from GYP.
821 make_names("make_core_generated_fetch_initiator_type_names") {
822   in_files = [
823     "fetch/FetchInitiatorTypeNames.in",
824   ]
825   outputs = [
826     "$blink_core_output_dir/fetch/FetchInitiatorTypeNames.cpp",
827     "$blink_core_output_dir/fetch/FetchInitiatorTypeNames.h",
828   ]
831 # "EventTypeNames" in make_core_generated from GYP.
832 make_names("make_core_generated_event_type_names") {
833   in_files = [
834     "events/EventTypeNames.in",
835   ]
836   outputs = [
837     "$blink_core_output_dir/EventTypeNames.cpp",
838     "$blink_core_output_dir/EventTypeNames.h",
839   ]
842 # "HTMLTokenizerNames" in make_core_generated from GYP.
843 make_names("make_core_generated_html_tokenizer_names") {
844   in_files = [
845     "html/parser/HTMLTokenizerNames.in",
846   ]
847   outputs = [
848     "$blink_core_output_dir/HTMLTokenizerNames.cpp",
849     "$blink_core_output_dir/HTMLTokenizerNames.h",
850   ]
853 # "InputTypeNames" in make_core_generated from GYP.
854 make_names("make_core_generated_input_type_names") {
855   in_files = [
856     "html/forms/InputTypeNames.in",
857   ]
858   outputs = [
859     "$blink_core_output_dir/InputTypeNames.cpp",
860     "$blink_core_output_dir/InputTypeNames.h",
861   ]
864 # make_qualified_names ---------------------------------------------------------
866 # "MathMLNames" in make_core_generated from GYP.
867 make_qualified_names("make_core_generated_math_ml_names") {
868   in_files = [
869     "html/parser/MathMLTagNames.in",
870     "html/parser/MathMLAttributeNames.in",
871   ]
872   outputs = [
873     "$blink_core_output_dir/MathMLNames.cpp",
874     "$blink_core_output_dir/MathMLNames.h",
875   ]
878 # "XLinkNames" in make_core_generated from GYP.
879 make_qualified_names("make_core_generated_xlink_names") {
880   in_files = [
881     "svg/xlinkattrs.in",
882   ]
883   outputs = [
884     "$blink_core_output_dir/XLinkNames.cpp",
885     "$blink_core_output_dir/XLinkNames.h",
886   ]
889 # "XMLNSNames" in make_core_generated from GYP.
890 make_qualified_names("make_core_generated_xml_ns_names") {
891   in_files = [
892     "xml/xmlnsattrs.in",
893   ]
894   outputs = [
895     "$blink_core_output_dir/XMLNSNames.cpp",
896     "$blink_core_output_dir/XMLNSNames.h",
897   ]
900 # "XMLNames" in make_core_generated from GYP.
901 make_qualified_names("make_core_generated_xml_names") {
902   in_files = [
903     "xml/xmlattrs.in",
904   ]
905   outputs = [
906     "$blink_core_output_dir/XMLNames.cpp",
907     "$blink_core_output_dir/XMLNames.h",
908   ]
911 # make_token_matcher -----------------------------------------------------------
913 # "MakeTokenMatcherForViewport" in make_core_generated from GYP.
914 make_token_matcher("make_core_generated_make_token_matcher_for_viewport") {
915   input_file = "html/HTMLMetaElement-in.cpp"
916   output_file = "$blink_core_output_dir/HTMLMetaElement.cpp"
919 # One-off scripts --------------------------------------------------------------
921 # "generatePrivateScript" in make_core_generated from GYP.
922 # FIXME: The implementation of Blink-in-JS is not yet mature.
923 # You can use Blink-in-JS in your local experiment, but don't ship it.
924 # crbug.com/341031
925 action("make_core_generated_private_script") {
926   visibility = []  # Allow re-assignment of list.
927   visibility = [ ":make_core_generated" ]
928   script = "../build/scripts/make_private_script_source.py"
930   inputs = [
931     "../bindings/core/v8/PrivateScriptRunner.js",
932     "html/HTMLMarqueeElement.js",
933     "xml/DocumentXMLTreeViewer.js",
934   ]
935   outputs = [
936     "$blink_core_output_dir/PrivateScriptSources.h",
937   ]
939   args = rebase_path(outputs, root_build_dir)
940   args += rebase_path(inputs, root_build_dir)
942   deps = make_core_generated_deps
945 action("make_core_generated_private_script_for_testing") {
946   visibility = []  # Allow re-assignment of list.
947   visibility = [ ":make_core_generated" ]
948   script = "../build/scripts/make_private_script_source.py"
950   inputs = [
951       "testing/PartialPrivateScriptTest.js",
952       "testing/PrivateScriptTest.js",
953   ]
954   outputs = [
955     "$blink_core_output_dir/PrivateScriptSourcesForTesting.h",
956   ]
958   args = [ "--for-testing" ]
959   args += rebase_path(outputs, root_build_dir)
960   args += rebase_path(inputs, root_build_dir)
962   deps = make_core_generated_deps
965 # "HTMLEntityTable" in make_core_generated from GYP.
966 action("make_core_generated_html_entity_table") {
967   visibility = []  # Allow re-assignment of list.
968   visibility = [ ":make_core_generated" ]
969   script = "html/parser/create-html-entity-table"
971   inputs = [
972     "html/parser/HTMLEntityNames.in",
973   ]
974   outputs = [
975     "$blink_core_output_dir/HTMLEntityTable.cpp",
976   ]
978   args = [ "-o" ] + rebase_path(outputs, root_build_dir)
979   args += rebase_path(inputs, root_build_dir)
981   deps = make_core_generated_deps
984 # "CSSTokenizerCodepoints" in make_core_generated from GYP.
985 action("make_core_generated_css_tokenizer_codepoints") {
986   visibility = []  # Allow re-assignment of list.
987   visibility = [ ":make_core_generated" ]
988   script = "../build/scripts/make_css_tokenizer_codepoints.py"
990   outputs = [
991     "$blink_core_output_dir/CSSTokenizerCodepoints.cpp",
992   ]
994   args = [
995     "--output_dir", rel_blink_core_gen_dir,
996   ]
998   deps = make_core_generated_deps
1001 # "HTMLElementLookupTrie" in make_core_generated from GYP.
1002 action("make_core_generated_html_element_lookup_trie") {
1003   visibility = []  # Allow re-assignment of list.
1004   visibility = [ ":make_core_generated" ]
1005   script = "../build/scripts/make_element_lookup_trie.py"
1007   input_file = "html/HTMLTagNames.in"
1008   inputs = scripts_for_in_files + [
1009     input_file,
1010     "../build/scripts/templates/ElementLookupTrie.cpp.tmpl",
1011     "../build/scripts/templates/ElementLookupTrie.h.tmpl",
1012   ]
1013   outputs = [
1014     "$blink_core_output_dir/HTMLElementLookupTrie.cpp",
1015     "$blink_core_output_dir/HTMLElementLookupTrie.h",
1016   ]
1018   args = [
1019     rebase_path(input_file, root_build_dir),
1020     "--output_dir", rel_blink_core_gen_dir,
1021   ]
1023   deps = make_core_generated_deps
1026 # The bison rules from make_core_generated.
1027 action_foreach("make_core_generated_bison") {
1028   script = "../build/scripts/rule_bison.py"
1029   sources = [
1030     "xml/XPathGrammar.y",
1031   ]
1032   outputs = [
1033     "$blink_core_output_dir/{{source_name_part}}.cpp",
1034     "$blink_core_output_dir/{{source_name_part}}.h",
1035   ]
1036   args = [
1037     "{{source}}",
1038     rel_blink_core_gen_dir,
1039     bison_exe,
1040   ]
1042   deps = make_core_generated_deps