blob: 36c0181aaf3f9baae44de2f6bb53ddfab405f491 [file] [log] [blame]
# 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("layout") {
has_pedantic_warnings = true
sources = [
"anonymous_block_box.cc",
"anonymous_block_box.h",
"base_direction.h",
"benchmark_stat_names.cc",
"benchmark_stat_names.h",
"block_container_box.cc",
"block_container_box.h",
"block_formatting_block_container_box.cc",
"block_formatting_block_container_box.h",
"block_formatting_context.cc",
"block_formatting_context.h",
"block_level_replaced_box.cc",
"block_level_replaced_box.h",
"box.cc",
"box.h",
"box_generator.cc",
"box_generator.h",
"box_intersection_observer_module.cc",
"box_intersection_observer_module.h",
"container_box.cc",
"container_box.h",
"flex_container_box.cc",
"flex_container_box.h",
"flex_formatting_context.cc",
"flex_formatting_context.h",
"flex_item.cc",
"flex_item.h",
"flex_line.cc",
"flex_line.h",
"formatting_context.h",
"initial_containing_block.cc",
"initial_containing_block.h",
"inline_container_box.cc",
"inline_container_box.h",
"inline_formatting_context.cc",
"inline_formatting_context.h",
"inline_level_replaced_box.cc",
"inline_level_replaced_box.h",
"insets_layout_unit.cc",
"insets_layout_unit.h",
"intersection_observer_root.h",
"intersection_observer_target.cc",
"intersection_observer_target.h",
"layout.cc",
"layout.h",
"layout_boxes.cc",
"layout_boxes.h",
"layout_manager.cc",
"layout_manager.h",
"layout_stat_tracker.cc",
"layout_stat_tracker.h",
"layout_unit.h",
"letterboxed_image.cc",
"letterboxed_image.h",
"line_box.cc",
"line_box.h",
"line_wrapping.cc",
"line_wrapping.h",
"paragraph.cc",
"paragraph.h",
"point_layout_unit.cc",
"point_layout_unit.h",
"rect_layout_unit.cc",
"rect_layout_unit.h",
"render_tree_animations.h",
"replaced_box.cc",
"replaced_box.h",
"size_layout_unit.cc",
"size_layout_unit.h",
"text_box.cc",
"text_box.h",
"topmost_event_target.cc",
"topmost_event_target.h",
"used_style.cc",
"used_style.h",
"vector2d_layout_unit.cc",
"vector2d_layout_unit.h",
"white_space_processing.cc",
"white_space_processing.h",
]
if (is_debug) {
defines = [ "COBALT_BOX_DUMP_ENABLED" ]
}
configs -= [ "//starboard/build/config:size" ]
configs += [ "//starboard/build/config:speed" ]
# Exporting dom so that layout_test gets the transitive include paths to
# include generated headers.
public_deps = [ "//cobalt/dom" ]
deps = [
"//base:i18n",
"//cobalt/base",
"//cobalt/cssom",
"//cobalt/dom",
"//cobalt/loader",
"//cobalt/math",
"//cobalt/media",
"//cobalt/render_tree",
"//cobalt/render_tree:animations",
"//cobalt/ui_navigation",
"//cobalt/ui_navigation/scroll_engine",
"//cobalt/web_animations",
"//third_party/icu:icuuc",
]
}
target(gtest_target_type, "layout_test") {
testonly = true
has_pedantic_warnings = true
sources = [
"layout_unit_test.cc",
"letterboxed_image_test.cc",
"used_style_test.cc",
"white_space_processing_test.cc",
]
configs -= [ "//starboard/build/config:size" ]
configs += [ "//starboard/build/config:speed" ]
deps = [
":layout",
"//base",
"//cobalt//browser:test_dependencies_on_browser",
"//cobalt/base",
"//cobalt/css_parser",
"//cobalt/cssom",
"//cobalt/math",
"//cobalt/test:run_all_unittests",
"//testing/gmock",
"//testing/gtest",
]
}