commit | 410e3c8647845befdc9a93c3100f632062bd2740 | [log] [tgz] |
---|---|---|
author | Koji Ishii <[email protected]> | Sat Oct 17 22:01:51 2020 |
committer | Commit Bot <[email protected]> | Sat Oct 17 22:01:51 2020 |
tree | 18acac2e0423070818d408c41f6fddac358990c0 | |
parent | 4ef2ed9cafd2c8206f3d9c784d6e9478c1e410be [diff] |
Fix NGLineBreaker hang This is a regression in r796465 crrev.com/c/2344431 but the issue reproduces only in M86. This CL minimizes the change to make the merge easier. Clean up CL will follow. Bug: 1139513 Change-Id: Ie55ebd286534f27df245587f11f03b108b50305c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2482623 Reviewed-by: Krishna Govind <[email protected]> Commit-Queue: Krishna Govind <[email protected]> Cr-Commit-Position: refs/branch-heads/4240@{#1266} Cr-Branched-From: f297677702651916bbf65e59c0d4bbd4ce57d1ee-refs/heads/master@{#800218}
diff --git a/third_party/blink/renderer/core/layout/ng/inline/ng_line_breaker.cc b/third_party/blink/renderer/core/layout/ng/inline/ng_line_breaker.cc index 568bec8..356404f 100644 --- a/third_party/blink/renderer/core/layout/ng/inline/ng_line_breaker.cc +++ b/third_party/blink/renderer/core/layout/ng/inline/ng_line_breaker.cc
@@ -1008,8 +1008,10 @@ if (item_index_ >= items.size()) return; const NGInlineItem& item = items[item_index_]; - if (const ShapeResult* shape_result = item.TextShapeResult()) - HandleTrailingSpaces(item, *shape_result, line_info); + const ShapeResult* shape_result = item.TextShapeResult(); + // TODO(kojii): We need to call |HandleTrailingSpaces| even when + // |shape_result| is |nullptr|. Clean this up. + HandleTrailingSpaces(item, *shape_result, line_info); } inline void NGLineBreaker::HandleTrailingSpaces(const NGInlineItem& item,