Commit c74d9571 authored by Aleks Totic's avatar Aleks Totic Committed by Commit Bot

[LayoutNG] Fix inline focus

Nested LayoutInline outlines were not being painted.

Bug: 967830
Change-Id: I97a8c11192509eb83bd7d0445ea63609a1dcaf9f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1636647
Auto-Submit: Aleks Totic <atotic@chromium.org>
Commit-Queue: Aleks Totic <atotic@chromium.org>
Reviewed-by: default avatarEmil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#665310}
parent 037434ae
...@@ -340,12 +340,8 @@ void NGBoxFragmentPainter::PaintBlockFlowContents( ...@@ -340,12 +340,8 @@ void NGBoxFragmentPainter::PaintBlockFlowContents(
DCHECK(layout_object->IsLayoutBlockFlow()); DCHECK(layout_object->IsLayoutBlockFlow());
const auto& layout_block = To<LayoutBlock>(*layout_object); const auto& layout_block = To<LayoutBlock>(*layout_object);
DCHECK(layout_block.ChildrenInline()); DCHECK(layout_block.ChildrenInline());
if (ShouldPaintDescendantOutlines(paint_info.phase)) { PaintLineBoxChildren(box_fragment_.Children(), paint_info.ForDescendants(),
ObjectPainter(layout_block).PaintInlineChildrenOutlines(paint_info); paint_offset);
} else {
PaintLineBoxChildren(box_fragment_.Children(), paint_info.ForDescendants(),
paint_offset);
}
} }
void NGBoxFragmentPainter::PaintBlockChildren(const PaintInfo& paint_info) { void NGBoxFragmentPainter::PaintBlockChildren(const PaintInfo& paint_info) {
......
<!DOCTYPE html>
<title>CSS-UI test: outline works on nested spans</title>
<link rel="author" href="mailto:atotic@google.com">
<link rel="help" href="https://drafts.csswg.org/css-ui/#outline-props">
<link rel="match" href="../reference/ref-filled-green-100px-square-only.html">
<meta name="flags" content="">
<style>
body {
--outline-width: 10px;
--square-width: 80px;
}
#container {
width: var(--square-width);
padding: var(--outline-width);
}
#target {
font-family: Ahem;
font-size: var(--square-width);
outline: solid var(--outline-width) green;
color: green;
}
</style>
<p>Test passes if there is a filled green square.</p>
<div id="container">
<span>
<span>
<span id="target">x</span>
</span>
</span>
</div>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment