| # Copyright 2021 The Cobalt Authors. All Rights Reserved. |
| # |
| # Licensed under the Apache License, Version 2.0 (the "License"); |
| # you may not use this file except in compliance with the License. |
| # You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| |
| static_library("cssom") { |
| has_pedantic_warnings = true |
| |
| # cssom includes a file from css_parser which in turn depends on cssom. |
| # testing/mock_css_parser.h includes gmock which can't be in the deps |
| check_includes = false |
| |
| sources = [ |
| "absolute_url_value.cc", |
| "absolute_url_value.h", |
| "active_pseudo_class.cc", |
| "active_pseudo_class.h", |
| "after_pseudo_element.cc", |
| "after_pseudo_element.h", |
| "animation.h", |
| "animation_set.cc", |
| "animation_set.h", |
| "attribute_selector.cc", |
| "attribute_selector.h", |
| "before_pseudo_element.cc", |
| "before_pseudo_element.h", |
| "calc_value.cc", |
| "calc_value.h", |
| "cascade_precedence.h", |
| "cascaded_style.cc", |
| "cascaded_style.h", |
| "character_classification.h", |
| "child_combinator.cc", |
| "child_combinator.h", |
| "class_selector.cc", |
| "class_selector.h", |
| "cobalt_ui_nav_focus_transform_function.cc", |
| "cobalt_ui_nav_focus_transform_function.h", |
| "cobalt_ui_nav_spotlight_transform_function.cc", |
| "cobalt_ui_nav_spotlight_transform_function.h", |
| "color_stop.cc", |
| "color_stop.h", |
| "combinator.cc", |
| "combinator.h", |
| "combinator_visitor.h", |
| "complex_selector.cc", |
| "complex_selector.h", |
| "compound_selector.cc", |
| "compound_selector.h", |
| "computed_style.cc", |
| "computed_style.h", |
| "computed_style_utils.h", |
| "css.cc", |
| "css.h", |
| "css_computed_style_data.cc", |
| "css_computed_style_data.h", |
| "css_computed_style_declaration.cc", |
| "css_computed_style_declaration.h", |
| "css_condition_rule.cc", |
| "css_condition_rule.h", |
| "css_declaration_data.h", |
| "css_declaration_util.cc", |
| "css_declaration_util.h", |
| "css_declared_style_data.cc", |
| "css_declared_style_data.h", |
| "css_declared_style_declaration.cc", |
| "css_declared_style_declaration.h", |
| "css_font_face_declaration_data.cc", |
| "css_font_face_declaration_data.h", |
| "css_font_face_rule.cc", |
| "css_font_face_rule.h", |
| "css_grouping_rule.cc", |
| "css_grouping_rule.h", |
| "css_keyframe_rule.cc", |
| "css_keyframe_rule.h", |
| "css_keyframes_rule.cc", |
| "css_keyframes_rule.h", |
| "css_media_rule.cc", |
| "css_media_rule.h", |
| "css_parser.h", |
| "css_rule.cc", |
| "css_rule.h", |
| "css_rule_list.cc", |
| "css_rule_list.h", |
| "css_rule_style_declaration.cc", |
| "css_rule_style_declaration.h", |
| "css_rule_visitor.h", |
| "css_style_declaration.cc", |
| "css_style_declaration.h", |
| "css_style_rule.cc", |
| "css_style_rule.h", |
| "css_style_sheet.cc", |
| "css_style_sheet.h", |
| "css_transition.cc", |
| "css_transition.h", |
| "css_transition_set.cc", |
| "css_transition_set.h", |
| "descendant_combinator.cc", |
| "descendant_combinator.h", |
| "empty_pseudo_class.cc", |
| "empty_pseudo_class.h", |
| "filter_function.h", |
| "filter_function_list_value.cc", |
| "filter_function_list_value.h", |
| "focus_pseudo_class.cc", |
| "focus_pseudo_class.h", |
| "following_sibling_combinator.cc", |
| "following_sibling_combinator.h", |
| "font_style_value.cc", |
| "font_style_value.h", |
| "font_weight_value.cc", |
| "font_weight_value.h", |
| "hover_pseudo_class.cc", |
| "hover_pseudo_class.h", |
| "id_selector.cc", |
| "id_selector.h", |
| "integer_value.cc", |
| "integer_value.h", |
| "interpolate_property_value.cc", |
| "interpolate_property_value.h", |
| "interpolated_transform_property_value.cc", |
| "interpolated_transform_property_value.h", |
| "keyword_names.cc", |
| "keyword_names.h", |
| "keyword_value.cc", |
| "keyword_value.h", |
| "length_value.cc", |
| "length_value.h", |
| "linear_gradient_value.cc", |
| "linear_gradient_value.h", |
| "list_value.h", |
| "local_src_value.cc", |
| "local_src_value.h", |
| "map_to_mesh_function.cc", |
| "map_to_mesh_function.h", |
| "matrix_function.cc", |
| "matrix_function.h", |
| "media_feature.cc", |
| "media_feature.h", |
| "media_feature_keyword_value.cc", |
| "media_feature_keyword_value.h", |
| "media_feature_keyword_value_names.cc", |
| "media_feature_keyword_value_names.h", |
| "media_feature_names.cc", |
| "media_feature_names.h", |
| "media_list.cc", |
| "media_list.h", |
| "media_query.cc", |
| "media_query.h", |
| "media_type_names.cc", |
| "media_type_names.h", |
| "mutation_observer.h", |
| "next_sibling_combinator.cc", |
| "next_sibling_combinator.h", |
| "not_pseudo_class.cc", |
| "not_pseudo_class.h", |
| "number_value.cc", |
| "number_value.h", |
| "percentage_value.cc", |
| "percentage_value.h", |
| "property_definitions.cc", |
| "property_definitions.h", |
| "property_key_list_value.cc", |
| "property_key_list_value.h", |
| "property_list_value.h", |
| "property_value.h", |
| "property_value_visitor.cc", |
| "property_value_visitor.h", |
| "pseudo_class.h", |
| "pseudo_class_names.cc", |
| "pseudo_class_names.h", |
| "pseudo_element.h", |
| "pseudo_element_names.cc", |
| "pseudo_element_names.h", |
| "radial_gradient_value.cc", |
| "radial_gradient_value.h", |
| "ratio_value.cc", |
| "ratio_value.h", |
| "resolution_value.cc", |
| "resolution_value.h", |
| "rgba_color_value.cc", |
| "rgba_color_value.h", |
| "rotate_function.cc", |
| "rotate_function.h", |
| "scale_function.cc", |
| "scale_function.h", |
| "scoped_list_value.h", |
| "scoped_ref_list_value.h", |
| "selector.h", |
| "selector_tree.cc", |
| "selector_tree.h", |
| "selector_visitor.h", |
| "serializer.cc", |
| "serializer.h", |
| "shadow_value.cc", |
| "shadow_value.h", |
| "simple_selector.h", |
| "specificity.cc", |
| "specificity.h", |
| "string_value.cc", |
| "string_value.h", |
| "style_sheet.cc", |
| "style_sheet.h", |
| "style_sheet_list.cc", |
| "style_sheet_list.h", |
| "time_list_value.cc", |
| "time_list_value.h", |
| "timing_function.cc", |
| "timing_function.h", |
| "timing_function_list_value.cc", |
| "timing_function_list_value.h", |
| "transform_function.h", |
| "transform_function_list_value.cc", |
| "transform_function_list_value.h", |
| "transform_function_visitor.h", |
| "transform_property_value.h", |
| "translate_function.cc", |
| "translate_function.h", |
| "type_selector.cc", |
| "type_selector.h", |
| "unicode_range_value.cc", |
| "unicode_range_value.h", |
| "universal_selector.cc", |
| "universal_selector.h", |
| "url_src_value.cc", |
| "url_src_value.h", |
| "url_value.cc", |
| "url_value.h", |
| "user_agent_style_sheet.cc", |
| "user_agent_style_sheet.h", |
| "viewport_size.h", |
| ] |
| |
| configs -= [ "//starboard/build/config:size" ] |
| configs += [ "//starboard/build/config:speed" ] |
| |
| public_deps = [ "//cobalt/browser:generated_types" ] |
| |
| deps = [ |
| ":cssom_embed_resources_as_header_files", |
| "//cobalt/base", |
| "//cobalt/math", |
| "//cobalt/network", |
| "//cobalt/script", |
| "//cobalt/ui_navigation", |
| "//cobalt/web:dom_exception", |
| "//url", |
| ] |
| } |
| |
| config("embed_cssom_resources_as_header_files_config") { |
| include_dirs = [ root_gen_dir ] |
| } |
| |
| action("cssom_embed_resources_as_header_files") { |
| script = "//cobalt/build/generate_data_header.py" |
| |
| inputs = [ "embedded_resources/user_agent_style_sheet.css" ] |
| outputs = [ "$target_gen_dir/embedded_resources.h" ] |
| |
| public_configs = [ ":embed_cssom_resources_as_header_files_config" ] |
| |
| args = [ |
| "CSSOMEmbeddedResources", |
| rebase_path(outputs[0], root_build_dir), |
| rebase_path("embedded_resources", root_build_dir), |
| ] |
| } |
| |
| target(gtest_target_type, "cssom_test") { |
| testonly = true |
| has_pedantic_warnings = true |
| |
| sources = [ |
| "cascade_precedence_test.cc", |
| "cascaded_style_test.cc", |
| "computed_style_test.cc", |
| "css_computed_style_data_property_set_matcher_test.cc", |
| "css_computed_style_data_test.cc", |
| "css_computed_style_declaration_test.cc", |
| "css_declared_style_data_test.cc", |
| "css_declared_style_declaration_test.cc", |
| "css_font_face_declaration_data_test.cc", |
| "css_font_face_rule_test.cc", |
| "css_grouping_rule_test.cc", |
| "css_property_definitions_test.cc", |
| "css_rule_list_test.cc", |
| "css_rule_visitor_test.cc", |
| "css_style_sheet_test.cc", |
| "css_transition_set_test.cc", |
| "interpolate_property_value_test.cc", |
| "keyword_value_test.cc", |
| "media_feature_test.cc", |
| "media_list_test.cc", |
| "media_query_test.cc", |
| "property_value_is_equal_test.cc", |
| "property_value_to_string_test.cc", |
| "property_value_visitor_test.cc", |
| "rgba_color_value_test.cc", |
| "selector_test.cc", |
| "selector_tree_test.cc", |
| "selector_visitor_test.cc", |
| "serializer_test.cc", |
| "specificity_test.cc", |
| "style_sheet_list_test.cc", |
| "testing/mock_css_parser.h", |
| "timing_function_test.cc", |
| "transform_function_visitor_test.cc", |
| ] |
| |
| deps = [ |
| "//cobalt/base", |
| "//cobalt/css_parser", |
| "//cobalt/cssom", |
| "//cobalt/math", |
| "//cobalt/test:run_all_unittests", |
| "//testing/gmock", |
| "//testing/gtest", |
| "//url", |
| ] |
| } |