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

Issue 993153003: Prevent infinite loop about itemizing text in RenderTextHarfBuzz.

Created:
5 years, 9 months ago by Jun Mukai
Modified:
5 years, 9 months ago
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Prevent infinite loop about itemizing text in RenderTextHarfBuzz. BUG=403892 TEST=the new test case covers

Patch Set 1 #

Total comments: 2

Patch Set 2 : comment #

Total comments: 2

Patch Set 3 : fix #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+15 lines, -1 line) Patch
M ui/gfx/render_text_harfbuzz.cc View 1 2 1 chunk +5 lines, -1 line 2 comments Download
M ui/gfx/render_text_unittest.cc View 1 2 1 chunk +10 lines, -0 lines 0 comments Download

Messages

Total messages: 7 (2 generated)
Daniel Erat
lgtm, but adding others more familiar with this code https://codereview.chromium.org/993153003/diff/1/ui/gfx/render_text_unittest.cc File ui/gfx/render_text_unittest.cc (right): https://codereview.chromium.org/993153003/diff/1/ui/gfx/render_text_unittest.cc#newcode2580 ui/gfx/render_text_unittest.cc:2580: ...
5 years, 9 months ago (2015-03-17 23:26:00 UTC) #2
Jun Mukai
https://codereview.chromium.org/993153003/diff/1/ui/gfx/render_text_unittest.cc File ui/gfx/render_text_unittest.cc (right): https://codereview.chromium.org/993153003/diff/1/ui/gfx/render_text_unittest.cc#newcode2580 ui/gfx/render_text_unittest.cc:2580: TEST_F(RenderTextTest, HarfBuzz_InfiniteLoop) { On 2015/03/17 23:26:00, Daniel Erat (OOO ...
5 years, 9 months ago (2015-03-18 01:32:05 UTC) #3
msw
https://codereview.chromium.org/993153003/diff/20001/ui/gfx/render_text_harfbuzz.cc File ui/gfx/render_text_harfbuzz.cc (right): https://codereview.chromium.org/993153003/diff/20001/ui/gfx/render_text_harfbuzz.cc#newcode1187 ui/gfx/render_text_harfbuzz.cc:1187: if (run_break <= run->range.start()) Why does this ever happen? ...
5 years, 9 months ago (2015-03-18 16:21:36 UTC) #4
Jun Mukai
https://codereview.chromium.org/993153003/diff/20001/ui/gfx/render_text_harfbuzz.cc File ui/gfx/render_text_harfbuzz.cc (right): https://codereview.chromium.org/993153003/diff/20001/ui/gfx/render_text_harfbuzz.cc#newcode1187 ui/gfx/render_text_harfbuzz.cc:1187: if (run_break <= run->range.start()) On 2015/03/18 16:21:36, msw wrote: ...
5 years, 9 months ago (2015-03-23 23:14:06 UTC) #5
msw
5 years, 9 months ago (2015-03-24 01:56:31 UTC) #7
+oshima for new RenderText layout/display text use.

https://codereview.chromium.org/993153003/diff/40001/ui/gfx/render_text_harfb...
File ui/gfx/render_text_harfbuzz.cc (right):

https://codereview.chromium.org/993153003/diff/40001/ui/gfx/render_text_harfb...
ui/gfx/render_text_harfbuzz.cc:1158: empty_colors.SetMax(this->text().length());
Just use colors().max() and remove this comment.

https://codereview.chromium.org/993153003/diff/40001/ui/gfx/render_text_harfb...
ui/gfx/render_text_harfbuzz.cc:1191:
style.UpdatePosition(DisplayIndexToTextIndex(run_break));
ItemizeTextToRuns is called with the layout text and the display text as the
|text| argument at different times. The use of DisplayIndexToTextIndex will be
wrong in the case of layout text... Perhaps that's [part of] the defect?

Powered by Google App Engine
This is Rietveld 408576698