blob: f407db10b78cca9497535f7802082cde6611aaed [file] [log] [blame]
// Copyright 2018 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 "third_party/blink/renderer/core/layout/ng/ng_outline_utils.h"
#include "third_party/blink/renderer/core/layout/layout_inline.h"
#include "third_party/blink/renderer/core/layout/ng/inline/ng_inline_cursor.h"
#include "third_party/blink/renderer/core/layout/ng/ng_physical_box_fragment.h"
#include "third_party/blink/renderer/core/style/computed_style.h"
namespace blink {
bool NGOutlineUtils::HasPaintedOutline(const ComputedStyle& style,
const Node* node) {
if (!style.HasOutline() || style.Visibility() != EVisibility::kVisible)
return false;
if (style.OutlineStyleIsAuto() &&
!LayoutTheme::GetTheme().ShouldDrawDefaultFocusRing(node, style))
return false;
return true;
}
} // namespace blink