Commit f1198e4d authored by Xianzhu Wang's avatar Xianzhu Wang Committed by Commit Bot

[CI] Remove an unused variable in InlineTextBoxPainter::Paint

I have confirmed that the unused adjusted_paint_offset is not a code
error. It had been used to calculate bounds of DrawingRecorder before
https://chromium-review.googlesource.com/729322.

Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Id9f0c71e36842e30f9c96fd093f209c90a276209
Reviewed-on: https://chromium-review.googlesource.com/1122965Reviewed-by: default avatarPhilip Rogers <pdr@chromium.org>
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#571961}
parent 8e49de80
......@@ -127,16 +127,11 @@ void InlineTextBoxPainter::Paint(const PaintInfo& paint_info,
(inline_text_box_.IsHorizontal() ? paint_offset.X() : paint_offset.Y());
LayoutUnit logical_extent = logical_visual_overflow.Width();
// We round the y-axis to ensure consistent line heights.
LayoutPoint adjusted_paint_offset(paint_offset);
if (inline_text_box_.IsHorizontal()) {
adjusted_paint_offset.SetY(LayoutUnit(adjusted_paint_offset.Y().Round()));
if (!paint_info.GetCullRect().IntersectsHorizontalRange(
logical_start, logical_start + logical_extent))
return;
} else {
adjusted_paint_offset.SetX(LayoutUnit(adjusted_paint_offset.X().Round()));
if (!paint_info.GetCullRect().IntersectsVerticalRange(
logical_start, logical_start + logical_extent))
return;
......@@ -173,6 +168,7 @@ void InlineTextBoxPainter::Paint(const PaintInfo& paint_info,
LayoutPoint box_origin(inline_text_box_.PhysicalLocation() + paint_offset);
// We round the y-axis to ensure consistent line heights.
if (inline_text_box_.IsHorizontal()) {
box_origin.SetY(LayoutUnit(box_origin.Y().Round()));
} else {
......
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