New issue
Advanced search Search tips

Issue 682093 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner: ----
Closed: Jan 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 3
Type: Bug



Sign in to add a comment

Test RenderTextHarfBuzzTest.GetSubstringBoundsMultiline/HarfBuzz is failing on Ubuntu 16.04

Project Member Reported by karandeepb@chromium.org, Jan 18 2017

Issue description

Copying c#10 from  issue 650120 


Value of: GetSelectionBoundsUnion()
  Actual: 0,491 3x17
Expected: expected_line_bounds
Which is: 0,491 3x18


I think this is caused by the following:

- for calculating expected_line_bounds in test, std::ceil is used for both, width and height

https://cs.chromium.org/chromium/src/ui/gfx/render_text_unittest.cc?l=4253

const Size line_size(std::ceil(line.size.width()),
                         std::ceil(line.size.height()));

dbg info:
line.size.height(): 17,760000, ceil(line.size.height()): 18,000000


- but in RenderTextHarfBuzz::GetSubstringBounds() function, std::ceil is used only for width

https://cs.chromium.org/chromium/src/ui/gfx/render_text_harfbuzz.cc?l=1111

int end_x = std::ceil(x + width);
int start_x = std::ceil(x);
gfx::Rect rect(start_x, 0, end_x - start_x, line.size.height());

dbg info:
line.size.height() : 17,760000
rect.height(): 17
 
Components: UI>Input>Text
Labels: OS-Linux
Owner: ----
Status: Untriaged (was: Assigned)
Un-assigning myself since I am no longer working on Views. 
This issue is still present in Chromium r519765.
Cc: thomasanderson@chromium.org
karandeepb@ I'm working on getting some 16.04 bots up and running.  Not sure why the proposed patch never landed, but I'm going to try to merge it.
Project Member

Comment 4 by bugdroid1@chromium.org, Jan 3 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8bfe36ccfa011624fd280b8c71b5abc5cb830eca

commit 8bfe36ccfa011624fd280b8c71b5abc5cb830eca
Author: Tom Anderson <thomasanderson@chromium.org>
Date: Wed Jan 03 23:02:32 2018

Fix GetSubstringBoundsMultiline/HarfBuzz on Ubuntu 16.04

BUG= 682093 
R=msw@chromium.org

Change-Id: I4f905746fac4c48ca99c183d824967f7f4f3ba80
Reviewed-on: https://chromium-review.googlesource.com/848495
Reviewed-by: Michael Wasserman <msw@chromium.org>
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#526850}
[modify] https://crrev.com/8bfe36ccfa011624fd280b8c71b5abc5cb830eca/ui/gfx/render_text_harfbuzz.cc

Status: Fixed (was: Untriaged)

Sign in to add a comment