Commit 467dd283 authored by Morten Stenshorne's avatar Morten Stenshorne Committed by Commit Bot

[LayoutNG] Pixel-snap column rules.

Bug: 829028
Change-Id: I252901109502256f14bc68e64d4303006db50a13
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1944350
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Reviewed-by: default avatarXianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#720302}
parent 1320c3c6
......@@ -904,9 +904,11 @@ void NGBoxFragmentPainter::PaintColumnRules(
// specified and columns are balanced).
rule.Move(paint_offset);
ObjectPainter::DrawLineForBoxSide(paint_info.context, rule.X(), rule.Y(),
rule.Right(), rule.Bottom(), box_side,
rule_color, rule_style, 0, 0, true);
IntRect snapped_rule = PixelSnappedIntRect(rule);
ObjectPainter::DrawLineForBoxSide(paint_info.context, snapped_rule.X(),
snapped_rule.Y(), snapped_rule.MaxX(),
snapped_rule.MaxY(), box_side, rule_color,
rule_style, 0, 0, true);
previous_column = current_column;
}
......
<!DOCTYPE html>
<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
<link rel="help" href="https://www.w3.org/TR/css-multicol-1/#column-gaps-and-rules">
<link rel="match" href="../reference/ref-filled-green-100px-square.xht">
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div style="columns:8; column-fill:auto; column-gap:5px; column-rule:5px solid green; width:100px; height:100px; background:red;">
<div style="height:800px; background:green;"></div>
</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