// Copyright 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "ui/views/controls/styled_label.h" #include #include #include #include #include #include "base/i18n/rtl.h" #include "base/strings/string_util.h" #include "ui/accessibility/ax_node_data.h" #include "ui/gfx/font_list.h" #include "ui/gfx/text_elider.h" #include "ui/gfx/text_utils.h" #include "ui/native_theme/native_theme.h" #include "ui/views/controls/label.h" #include "ui/views/controls/link.h" #include "ui/views/controls/styled_label_listener.h" namespace views { // Helpers -------------------------------------------------------------------- namespace { gfx::Insets FocusBorderInsets(const Label& label) { // StyledLabel never adds a border, so the only Insets added are for the // possible focus ring. DCHECK(label.View::GetInsets().IsEmpty()); return label.GetInsets(); } std::unique_ptr