Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(529)

Issue 614103007: Error in popup on Link (Closed)

Created:
6 years, 2 months ago by Roman Sorokin (ftl)
Modified:
6 years, 1 month ago
CC:
chromium-reviews, extensions-reviews_chromium.org, sadrul, tfarina, chromium-apps-reviews_chromium.org, kalyank, peter+watch_chromium.org, ben+ash_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Fixed Multiprofile Error cutoff/displayed incompletely on Link BUG=415213 TEST=Please see the bug crbug.com/415213 for steps to reproduce. Somehow sum of width of the words is greater by one pixel than width of the concatenation of these words in this particular case ("The administrator for this account has disallowed multiple sign-in." message and Link board). When we try to get preferred size we break the message into two lines and get maximum width of these two strings. We get the width which is smaller by one pixel. And then during rendering again we try to break the message into two lines by adding new words one by one and it does not fit in this width. So it does not fit into the preferred size and lose the last word. Committed: https://crrev.com/370fe4b5db1c9412093225f7a6e1adc18f8aedb2 Cr-Commit-Position: refs/heads/master@{#303650}

Patch Set 1 #

Total comments: 1

Patch Set 2 : Update after review #

Total comments: 4

Patch Set 3 : Update after review and rebase #

Patch Set 4 : Update after review #

Total comments: 1

Patch Set 5 : For testing #

Patch Set 6 : For testing #

Patch Set 7 : Added test #

Total comments: 2

Patch Set 8 : Set test to enabled on all platforms #

Patch Set 9 : Update after review #

Unified diffs Side-by-side diffs Delta from patch set Stats (+18 lines, -0 lines) Patch
M ui/gfx/text_elider_unittest.cc View 1 2 3 4 5 6 7 8 2 chunks +18 lines, -0 lines 0 comments Download

Messages

Total messages: 44 (7 generated)
Roman Sorokin (ftl)
+asvitkine@ Problem is that max width for the error string here https://code.google.com/p/chromium/codesearch#chromium/src/ui/gfx/canvas_skia.cc&q=canvas_skia&sq=package:chromium&type=cs&l=187 and here https://code.google.com/p/chromium/codesearch#chromium/src/ui/gfx/text_elider.cc&cl=GROK&l=692 ...
6 years, 2 months ago (2014-10-02 13:11:47 UTC) #3
Alexei Svitkine (slow)
Can you make the CL description more descriptive and possibly add a TEST= line that ...
6 years, 2 months ago (2014-10-02 16:59:38 UTC) #4
Roman Sorokin (ftl)
Alexei, please review. Is there any way to create test for this case (it is ...
6 years, 2 months ago (2014-10-06 12:09:56 UTC) #5
Alexei Svitkine (slow)
https://codereview.chromium.org/614103007/diff/20001/ui/gfx/canvas_skia.cc File ui/gfx/canvas_skia.cc (right): https://codereview.chromium.org/614103007/diff/20001/ui/gfx/canvas_skia.cc#newcode196 ui/gfx/canvas_skia.cc:196: w = std::max(w, string_size.width()); I actually don't understand your ...
6 years, 2 months ago (2014-10-06 17:59:58 UTC) #6
Roman Sorokin (ftl)
https://codereview.chromium.org/614103007/diff/20001/ui/gfx/canvas_skia.cc File ui/gfx/canvas_skia.cc (right): https://codereview.chromium.org/614103007/diff/20001/ui/gfx/canvas_skia.cc#newcode196 ui/gfx/canvas_skia.cc:196: w = std::max(w, string_size.width()); See the CL description, please ...
6 years, 2 months ago (2014-10-07 09:21:54 UTC) #7
Alexei Svitkine (slow)
Thanks for the description. I don't think this is the right fix. It seems like ...
6 years, 2 months ago (2014-10-07 14:21:01 UTC) #8
Roman Sorokin (ftl)
Thanks for your answer. 1. It is not floating point truncation. Somehow on Link width ...
6 years, 2 months ago (2014-10-09 12:31:44 UTC) #9
Roman Sorokin (ftl)
Please review
6 years, 2 months ago (2014-10-09 12:34:46 UTC) #10
Alexei Svitkine (slow)
Thanks, I like this fix better. Can you write a unit test for your specific ...
6 years, 2 months ago (2014-10-09 13:31:03 UTC) #11
Roman Sorokin (ftl)
Can you help me with this test? It is only reproduces on Link. I believe ...
6 years, 2 months ago (2014-10-09 13:38:28 UTC) #12
Alexei Svitkine (slow)
Can you check if any of our bots do have that font? e.g. write a ...
6 years, 2 months ago (2014-10-09 14:42:25 UTC) #13
Roman Sorokin (ftl)
Sorry for the long response. I made this test https://codereview.chromium.org/614103007/diff/130001/ui/gfx/text_elider_unittest.cc "Noto Sans UI,ui-sans, 12px" is ...
6 years, 2 months ago (2014-10-22 13:42:28 UTC) #17
Alexei Svitkine (slow)
But it does fail on ChromeOS bots? Or not even? On Wed, Oct 22, 2014 ...
6 years, 2 months ago (2014-10-22 13:57:51 UTC) #18
Roman Sorokin (ftl)
I tested on linux_chromium_chromeos_rel - does not fail On 2014/10/22 13:57:51, Alexei Svitkine wrote: > ...
6 years, 2 months ago (2014-10-22 14:02:16 UTC) #19
Alexei Svitkine (slow)
+derat who might be able to help. Daniel, do you know if our bots have ...
6 years, 2 months ago (2014-10-22 14:07:56 UTC) #20
Daniel Erat
The script looks like it's probably outdated (i.e. installing notofonts-20121206.tar.gz even though 20140815 looks like ...
6 years, 2 months ago (2014-10-22 14:26:37 UTC) #21
Roman Sorokin (ftl)
Still does not seem to fail. Are there any other ways we can test this ...
6 years, 1 month ago (2014-10-27 14:59:56 UTC) #22
Daniel Erat
I'd guess that your test is failing due to subpixel positioning, which we only enable ...
6 years, 1 month ago (2014-10-27 15:04:41 UTC) #23
Alexei Svitkine (slow)
Daniel, do you know if we have any tests that run in high-DPI mode? If ...
6 years, 1 month ago (2014-10-27 15:10:53 UTC) #24
Daniel Erat
Oshima might know (whether we run any tests in high-DPI mode, specifically in the context ...
6 years, 1 month ago (2014-10-27 15:20:52 UTC) #25
Roman Sorokin (ftl)
That helped! On 2014/10/27 15:04:41, Daniel Erat wrote: > I'd guess that your test is ...
6 years, 1 month ago (2014-10-27 15:48:41 UTC) #26
Roman Sorokin (ftl)
It seems this helped only on my machine and on bots it still does not ...
6 years, 1 month ago (2014-10-28 08:07:21 UTC) #27
Roman Sorokin (ftl)
Do you have any thoughts how to make it fail on the bots? On 2014/10/28 ...
6 years, 1 month ago (2014-11-05 16:31:38 UTC) #28
Alexei Svitkine (slow)
+oshima Oshima, any idea if we have a way to run HighDPI tests on the ...
6 years, 1 month ago (2014-11-05 16:35:22 UTC) #30
Daniel Erat
I don't know why the same change would be failing on your local machine but ...
6 years, 1 month ago (2014-11-05 16:39:15 UTC) #31
oshima
I replied in the bug. The width of the text changes unlinearly for scale factor ...
6 years, 1 month ago (2014-11-05 18:07:31 UTC) #32
Roman Sorokin (ftl)
Somehow the bug got fixed by itself during this month. I suggest we can leave ...
6 years, 1 month ago (2014-11-06 13:21:15 UTC) #33
Alexei Svitkine (slow)
I wonder if the issue was fixed when Harfbuzz was enabled by default. Having a ...
6 years, 1 month ago (2014-11-06 15:05:47 UTC) #34
Roman Sorokin (ftl)
https://codereview.chromium.org/614103007/diff/170001/ui/gfx/text_elider_unittest.cc File ui/gfx/text_elider_unittest.cc (right): https://codereview.chromium.org/614103007/diff/170001/ui/gfx/text_elider_unittest.cc#newcode688 ui/gfx/text_elider_unittest.cc:688: DISABLED_ElideRectangleTextCheckConcatWidthEqualsSumOfWidths I think no, (have not checked yet). I ...
6 years, 1 month ago (2014-11-06 15:10:07 UTC) #35
oshima
glad that harfbuzz fixed the issue :) On 2014/11/05 16:35:22, Alexei Svitkine wrote: > +oshima ...
6 years, 1 month ago (2014-11-06 15:54:34 UTC) #36
Roman Sorokin (ftl)
Actually it does not work on other platforms since SetFontRenderParamsDeviceScaleFactor is available on ChromeOS only. ...
6 years, 1 month ago (2014-11-07 16:24:23 UTC) #37
Alexei Svitkine (slow)
Then I suggest just putting an ifdef chromeos block around the test, rather than redefining ...
6 years, 1 month ago (2014-11-07 16:29:44 UTC) #38
Roman Sorokin (ftl)
Alexei, please review. Do you think it is still worth to commit my fix? Cause ...
6 years, 1 month ago (2014-11-10 12:43:46 UTC) #39
Alexei Svitkine (slow)
lgtm
6 years, 1 month ago (2014-11-10 15:34:19 UTC) #40
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/614103007/210001
6 years, 1 month ago (2014-11-11 14:27:49 UTC) #42
commit-bot: I haz the power
Committed patchset #9 (id:210001)
6 years, 1 month ago (2014-11-11 15:14:16 UTC) #43
commit-bot: I haz the power
6 years, 1 month ago (2014-11-11 15:15:48 UTC) #44
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/370fe4b5db1c9412093225f7a6e1adc18f8aedb2
Cr-Commit-Position: refs/heads/master@{#303650}

Powered by Google App Engine
This is Rietveld 408576698