| # Copyright 2020 The Chromium Authors |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| _material_package = "*com_google_android_material*" |
| |
| weblayer_resource_exclusion_exceptions = [ |
| # TextInputLayout (used for HTTP Auth dialog) |
| "${_material_package}/design_text_*", |
| "${_material_package}/text_*", |
| |
| # Used for the translate infobar |
| "${_material_package}/design_layout_tab_*", |
| |
| # Referenced by Widget.Material3.AutoCompleteTextView. For context: |
| # https://crbug.com/1298549 |
| "${_material_package}/layout/m3_auto_complete_simple_item.xml", |
| "${_material_package}/layout/mtrl_auto_complete_simple_item.xml", |
| |
| # Referenced by Base.ThemeOverlay.Material3.Dialog. For context: |
| # https://crbug.com/1392477 |
| "${_material_package}/layout/m*_alert_*dialog*", |
| ] |
| |
| # Copied from chrome_public_apk_tmpl.gni. |
| |
| # resource_values_filter_rules: Filters per-resource, after "aapt2 compile". |
| # Before ":" matches .zip path. |
| # After ":" matches resource name (e.g. "attr/selectorSize"). |
| # |
| # resource_exclusion_regex: Filters per-file, before "aapt2 compile". |
| |
| # Remove unneeded entries from material design values.xml files. |
| weblayer_resource_values_filter_rules = [ |
| "${_material_package}:[Bb]adge", |
| "${_material_package}:[Bb]ottomNavigation", |
| "${_material_package}:[Bb]ottomSheet", |
| "${_material_package}:[Bb]uttonToggleGroup", |
| "${_material_package}:[Cc]alendar", |
| "${_material_package}:design_snackbar", |
| "${_material_package}:[Ff]loatingActionButton", |
| "${_material_package}:mtrl_slider", |
| "${_material_package}:[Nn]avigationView", |
| "${_material_package}:[Pp]icker", |
| "${_material_package}:[Ss]nackbar", |
| "${_material_package}:[Ss]lider", |
| "${_material_package}:[Tt]oolbarLayout", |
| ] |
| |
| _material_package = "com_google_android_material.*" |
| |
| # Used only by alert dialog on tiny screens. |
| weblayer_resource_exclusion_regex = "${_material_package}values-small" |
| |
| # Used only by date picker (which chrome doesn't use). |
| weblayer_resource_exclusion_regex += |
| "|${_material_package}-(w480dp-port|w360dp-port|h480dp-land|h360dp-land)" |
| |
| # Material design layouts that cause views to be kept that we don't use. |
| # Instead of manually filtering, unused resource removal would be better: |
| # https://crbug.com/636448 |
| weblayer_resource_exclusion_regex += "|${_material_package}/layout" |
| weblayer_resource_exclusion_regex += |
| "|${_material_package}/color.*(calendar_|bottom_nav_|picker_|slider_)" |
| weblayer_resource_exclusion_regex += |
| "|${_material_package}/drawable.*design_snackbar" |
| weblayer_resource_exclusion_regex += "|${_material_package}/xml.*badge_" |