Commit 8927190d authored by Xiaocheng Hu's avatar Xiaocheng Hu Committed by Commit Bot

[LayoutNG] Stop PositionForPointInInlineFormattingContext() from entering non-line-box children

The above mentioned function is supposed to enter a line box child to
find positions in inline descendants. In some situations, the inline
formatting context have have direct non-inline child (e.g., abs-pos
float), which should be ignored.

This patch removes the existing redundant branch that enters non-line-
box children, to fix failure in
fast/shapes/shape-outside-floats/shape-outside-clip-path-selection.html.

Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng;luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I834544692d6cc8d9fc4340fb55ffb1bbe53f1276
Reviewed-on: https://chromium-review.googlesource.com/1151947
Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
Commit-Queue: Emil A Eklund <eae@chromium.org>
Reviewed-by: default avatarEmil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#578471}
parent 108c1307
......@@ -548,7 +548,6 @@ crbug.com/591099 fast/ruby/position-after.html [ Failure ]
crbug.com/591099 fast/scrolling/content-box-smaller-than-scrollbar.html [ Failure ]
crbug.com/591099 fast/scrolling/jquery-rtl-scroll-type.html [ Failure ]
crbug.com/591099 fast/scrolling/scrollbar-tickmarks-hittest.html [ Failure Pass ]
crbug.com/591099 fast/shapes/shape-outside-floats/shape-outside-clip-path-selection.html [ Failure ]
crbug.com/591099 fast/sub-pixel/inline-block-with-padding.html [ Failure ]
crbug.com/591099 fast/sub-pixel/repaint-subpixel-layer-in-subpixel-composited-layer.html [ Failure ]
crbug.com/591099 fast/sub-pixel/sub-pixel-border-2.html [ Failure ]
......
......@@ -559,18 +559,6 @@ PositionWithAffinity NGPaintFragment::PositionForPointInInlineFormattingContext(
LayoutUnit closest_line_after_block_offset = LayoutUnit::Max();
for (const auto& child : Children()) {
// Try to resolve if |point| falls in a non-line-box child completely.
if (!child->PhysicalFragment().IsLineBox()) {
if (point.left >= child->Offset().left &&
point.left <= child->Offset().left + child->Size().width &&
point.top >= child->Offset().top &&
point.top <= child->Offset().top + child->Size().height) {
if (auto child_position = PositionForPointInChild(*child, point))
return child_position.value();
}
continue;
}
if (!child->PhysicalFragment().IsLineBox() || child->Children().IsEmpty())
continue;
......@@ -617,7 +605,7 @@ PositionWithAffinity NGPaintFragment::PositionForPointInInlineFormattingContext(
// TODO(xiaochengh): Looking at only the closest lines may not be enough,
// when we have multiple lines full of pseudo elements. Fix it.
// TODO(xiaochengh): Consider floats.
// TODO(xiaochengh): Consider floats. See crbug.com/758526.
return PositionWithAffinity();
}
......
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