#include "third_party/blink/renderer/core/layout/layout_theme.h"
#include "build/build_config.h"
#include "third_party/blink/public/strings/grit/blink_strings.h"
#include "third_party/blink/public/web/blink.h"
#include "third_party/blink/renderer/core/css_value_keywords.h"
#include "third_party/blink/renderer/core/dom/document.h"
#include "third_party/blink/renderer/core/dom/shadow_root.h"
#include "third_party/blink/renderer/core/editing/frame_selection.h"
#include "third_party/blink/renderer/core/fileapi/file.h"
#include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/core/frame/settings.h"
#include "third_party/blink/renderer/core/html/forms/html_button_element.h"
#include "third_party/blink/renderer/core/html/forms/html_data_list_element.h"
#include "third_party/blink/renderer/core/html/forms/html_data_list_options_collection.h"
#include "third_party/blink/renderer/core/html/forms/html_form_control_element.h"
#include "third_party/blink/renderer/core/html/forms/html_input_element.h"
#include "third_party/blink/renderer/core/html/forms/html_option_element.h"
#include "third_party/blink/renderer/core/html/forms/html_select_element.h"
#include "third_party/blink/renderer/core/html/forms/html_text_area_element.h"
#include "third_party/blink/renderer/core/html/forms/spin_button_element.h"
#include "third_party/blink/renderer/core/html/forms/text_control_inner_elements.h"
#include "third_party/blink/renderer/core/html/html_collection.h"
#include "third_party/blink/renderer/core/html/html_meter_element.h"
#include "third_party/blink/renderer/core/html/html_progress_element.h"
#include "third_party/blink/renderer/core/html/parser/html_parser_idioms.h"
#include "third_party/blink/renderer/core/html/shadow/shadow_element_names.h"
#include "third_party/blink/renderer/core/html/shadow/shadow_element_utils.h"
#include "third_party/blink/renderer/core/html_names.h"
#include "third_party/blink/renderer/core/input_type_names.h"
#include "third_party/blink/renderer/core/layout/layout_box.h"
#include "third_party/blink/renderer/core/layout/layout_theme_font_provider.h"
#include "third_party/blink/renderer/core/layout/layout_theme_mobile.h"
#include "third_party/blink/renderer/core/page/focus_controller.h"
#include "third_party/blink/renderer/core/page/page.h"
#include "third_party/blink/renderer/core/style/computed_style.h"
#include "third_party/blink/renderer/core/style/computed_style_initial_values.h"
#include "third_party/blink/renderer/platform/file_metadata.h"
#include "third_party/blink/renderer/platform/fonts/font_selector.h"
#include "third_party/blink/renderer/platform/graphics/touch_action.h"
#include "third_party/blink/renderer/platform/runtime_enabled_features.h"
#include "third_party/blink/renderer/platform/text/writing_mode.h"
#include "third_party/blink/renderer/platform/theme/web_theme_engine_helper.h"
#include "third_party/blink/renderer/platform/web_test_support.h"
#include "third_party/blink/renderer/platform/wtf/text/string_builder.h"
#include "ui/base/ui_base_features.h"
#include "ui/native_theme/native_theme.h"
namespace blink {
FormControlType;
namespace {
ControlPart AutoAppearanceFor(const Element& element) { … }
void ResetBorder(ComputedStyleBuilder& builder) { … }
void ResetPadding(ComputedStyleBuilder& builder) { … }
}
LayoutTheme& LayoutTheme::GetTheme() { … }
LayoutTheme::LayoutTheme() : … { … }
ControlPart LayoutTheme::AdjustAppearanceWithAuthorStyle(
ControlPart part,
const ComputedStyleBuilder& builder) { … }
ControlPart LayoutTheme::AdjustAppearanceWithElementType(
const ComputedStyleBuilder& builder,
const Element* element) { … }
void LayoutTheme::AdjustStyle(const Element* element,
ComputedStyleBuilder& builder) { … }
String LayoutTheme::ExtraDefaultStyleSheet() { … }
String LayoutTheme::ExtraFullscreenStyleSheet() { … }
Color LayoutTheme::ActiveSelectionBackgroundColor(
mojom::blink::ColorScheme color_scheme) const { … }
Color LayoutTheme::InactiveSelectionBackgroundColor(
mojom::blink::ColorScheme color_scheme) const { … }
Color LayoutTheme::ActiveSelectionForegroundColor(
mojom::blink::ColorScheme color_scheme) const { … }
Color LayoutTheme::InactiveSelectionForegroundColor(
mojom::blink::ColorScheme color_scheme) const { … }
Color LayoutTheme::ActiveListBoxSelectionBackgroundColor(
mojom::blink::ColorScheme color_scheme) const { … }
Color LayoutTheme::InactiveListBoxSelectionBackgroundColor(
mojom::blink::ColorScheme color_scheme) const { … }
Color LayoutTheme::ActiveListBoxSelectionForegroundColor(
mojom::blink::ColorScheme color_scheme) const { … }
Color LayoutTheme::InactiveListBoxSelectionForegroundColor(
mojom::blink::ColorScheme color_scheme) const { … }
Color LayoutTheme::PlatformSpellingMarkerUnderlineColor() const { … }
Color LayoutTheme::PlatformGrammarMarkerUnderlineColor() const { … }
Color LayoutTheme::PlatformActiveSpellingMarkerHighlightColor() const { … }
Color LayoutTheme::PlatformActiveSelectionBackgroundColor(
mojom::blink::ColorScheme color_scheme) const { … }
Color LayoutTheme::PlatformActiveSelectionForegroundColor(
mojom::blink::ColorScheme color_scheme) const { … }
Color LayoutTheme::PlatformInactiveSelectionBackgroundColor(
mojom::blink::ColorScheme color_scheme) const { … }
Color LayoutTheme::PlatformInactiveSelectionForegroundColor(
mojom::blink::ColorScheme color_scheme) const { … }
Color LayoutTheme::PlatformActiveListBoxSelectionBackgroundColor(
mojom::blink::ColorScheme color_scheme) const { … }
Color LayoutTheme::PlatformActiveListBoxSelectionForegroundColor(
mojom::blink::ColorScheme color_scheme) const { … }
Color LayoutTheme::PlatformInactiveListBoxSelectionBackgroundColor(
mojom::blink::ColorScheme color_scheme) const { … }
Color LayoutTheme::PlatformInactiveListBoxSelectionForegroundColor(
mojom::blink::ColorScheme color_scheme) const { … }
bool LayoutTheme::IsControlStyled(ControlPart part,
const ComputedStyleBuilder& builder) const { … }
bool LayoutTheme::ShouldDrawDefaultFocusRing(const Node* node,
const ComputedStyle& style) const { … }
void LayoutTheme::AdjustCheckboxStyle(ComputedStyleBuilder& builder) const { … }
void LayoutTheme::AdjustRadioStyle(ComputedStyleBuilder& builder) const { … }
void LayoutTheme::AdjustButtonStyle(ComputedStyleBuilder&) const { … }
void LayoutTheme::AdjustInnerSpinButtonStyle(ComputedStyleBuilder&) const { … }
void LayoutTheme::AdjustMenuListStyle(ComputedStyleBuilder& builder) const { … }
void LayoutTheme::AdjustMenuListButtonStyle(ComputedStyleBuilder&) const { … }
void LayoutTheme::AdjustSliderContainerStyle(
const Element& element,
ComputedStyleBuilder& builder) const { … }
void LayoutTheme::AdjustSliderThumbStyle(ComputedStyleBuilder& builder) const { … }
void LayoutTheme::AdjustSliderThumbSize(ComputedStyleBuilder&) const { … }
void LayoutTheme::AdjustSearchFieldCancelButtonStyle(
ComputedStyleBuilder&) const { … }
void LayoutTheme::PlatformColorsDidChange() { … }
void LayoutTheme::ColorSchemeDidChange() { … }
void LayoutTheme::SetCaretBlinkInterval(base::TimeDelta interval) { … }
base::TimeDelta LayoutTheme::CaretBlinkInterval() const { … }
Color LayoutTheme::SystemColor(CSSValueID css_value_id,
mojom::blink::ColorScheme color_scheme,
const ui::ColorProvider* color_provider,
bool is_in_web_app_scope) const { … }
Color LayoutTheme::DefaultSystemColor(CSSValueID css_value_id,
mojom::blink::ColorScheme color_scheme,
const ui::ColorProvider* color_provider,
bool is_in_web_app_scope) const { … }
Color LayoutTheme::SystemColorFromColorProvider(
CSSValueID css_value_id,
mojom::blink::ColorScheme color_scheme,
const ui::ColorProvider* color_provider,
bool is_in_web_app_scope) const { … }
Color LayoutTheme::SystemHighlightFromColorProvider(
mojom::blink::ColorScheme color_scheme,
const ui::ColorProvider* color_provider) const { … }
Color LayoutTheme::PlatformTextSearchHighlightColor(
bool active_match,
bool in_forced_colors,
mojom::blink::ColorScheme color_scheme,
const ui::ColorProvider* color_provider,
bool is_in_web_app_scope) const { … }
Color LayoutTheme::PlatformTextSearchColor(
bool active_match,
bool in_forced_colors,
mojom::blink::ColorScheme color_scheme,
const ui::ColorProvider* color_provider,
bool is_in_web_app_scope) const { … }
Color LayoutTheme::TapHighlightColor() { … }
void LayoutTheme::SetCustomFocusRingColor(const Color& c) { … }
Color LayoutTheme::FocusRingColor(
mojom::blink::ColorScheme color_scheme) const { … }
bool LayoutTheme::DelegatesMenuListRendering() const { … }
void LayoutTheme::SetDelegatesMenuListRenderingForTesting(bool flag) { … }
String LayoutTheme::DisplayNameForFile(const File& file) const { … }
bool LayoutTheme::SupportsCalendarPicker(InputType::Type type) const { … }
void LayoutTheme::AdjustControlPartStyle(ComputedStyleBuilder& builder) { … }
bool LayoutTheme::HasCustomFocusRingColor() const { … }
Color LayoutTheme::GetCustomFocusRingColor() const { … }
bool LayoutTheme::IsAccentColorCustomized(
mojom::blink::ColorScheme color_scheme) const { … }
Color LayoutTheme::GetSystemAccentColor(
mojom::blink::ColorScheme color_scheme) const { … }
Color LayoutTheme::GetAccentColorOrDefault(
mojom::blink::ColorScheme color_scheme,
bool is_in_web_app_scope) const { … }
Color LayoutTheme::GetAccentColorText(mojom::blink::ColorScheme color_scheme,
bool is_in_web_app_scope) const { … }
}