New issue
Advanced search Search tips

Issue 903909 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Nov 20
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

Some monorail pages fail to load fully when using LayoutNG

Project Member Reported by ajp@google.com, Nov 9

Issue description

Chrome Version: 70.0.3538.102 (Official Build) (64-bit)
OS: Linux

What steps will reproduce the problem?
(1) Go to https://bugs.chromium.org/p/chromium/issues/approval?id=902400 (Googler's only)
(2) Observe that there is no description or comments. For some reason they are failing to load.

What is the expected result?

The page should fully load and bug description and comments should be visible.

What happens instead?

Comments never load, eventually Chrome asks if I want to kill the tab.


Notes

If I turn off layout NG everything works.
This only happens for some monorail pages using the new issue UI designer for FLT. But not all. I have no idea what's special about the ones that break.
 
Owner: kojii@chromium.org
Status: Assigned (was: Untriaged)
Thanks for using NG! :) This is a freeze. We never return from here:

#0  blink::NGLineBreaker::BreakLine (this=0x7fffa3d30af8) at ./../../third_party/blink/renderer/core/layout/ng/inline/ng_line_breaker.cc:236
#1  0x00007fffe2f17821 in blink::NGLineBreaker::NextLine (this=0x7fffa3d30af8, line_info=0x7fffa3d30c30) at ./../../third_party/blink/renderer/core/layout/ng/inline/ng_line_breaker.cc:181
#2  0x00007fffe2c91e58 in blink::NGInlineLayoutAlgorithm::Layout (this=0x7fffa3d32428) at ../../third_party/blink/renderer/core/layout/ng/inline/ng_inline_layout_algorithm.cc:746
#3  0x00007fffe2ca1fc0 in blink::NGInlineNode::Layout (this=0x7fffa3d33d58, constraint_space=..., break_token=0x30a7a5b43b30, context=0x7fffa3d35948) at ../../third_party/blink/renderer/core/layout/ng/inline/ng_inline_node.cc:736
#4  0x00007fffe2f62de1 in blink::NGLayoutInputNode::Layout (this=0x7fffa3d33d58, space=..., break_token=0x30a7a5b43b30, context=0x7fffa3d35948) at ./../../third_party/blink/renderer/core/layout/ng/ng_layout_input_node.cc:69
#5  0x00007fffe2caf214 in blink::NGBlockLayoutAlgorithm::HandleInflow (this=0x7fffa3d355a8, child=..., child_break_token=0x30a7a5b43b30, previous_inflow_position=0x7fffa3d34110, previous_inline_break_token=0x7fffa3d34090) at ../../third_party/blink/renderer/core/layout/ng/ng_block_layout_algorithm.cc:1226
#6  0x00007fffe2cabbea in blink::NGBlockLayoutAlgorithm::Layout (this=0x7fffa3d355a8) at ../../third_party/blink/renderer/core/layout/ng/ng_block_layout_algorithm.cc:526
#7  0x00007fffe2cbc8c9 in blink::(anonymous namespace)::LayoutWithAlgorithm (node=..., space=..., break_token=0x0) at ../../third_party/blink/renderer/core/layout/ng/ng_block_node.cc:74
#8  0x00007fffe2cbb4f1 in blink::NGBlockNode::Layout (this=0x7fffa3d37fb8, constraint_space=..., break_token=0x0) at ../../third_party/blink/renderer/core/layout/ng/ng_block_node.cc:241
#9  0x00007fffe2f62e03 in blink::NGLayoutInputNode::Layout (this=0x7fffa3d37fb8, space=..., break_token=0x0, context=0x7fffa3d39ba8) at ./../../third_party/blink/renderer/core/layout/ng/ng_layout_input_node.cc:70
#10 0x00007fffe2caf214 in blink::NGBlockLayoutAlgorithm::HandleInflow (this=0x7fffa3d39808, child=..., child_break_token=0x0, previous_inflow_position=0x7fffa3d38370, previous_inline_break_token=0x7fffa3d382f0) at ../../third_party/blink/renderer/core/layout/ng/ng_block_layout_algorithm.cc:1226
#11 0x00007fffe2cabbea in blink::NGBlockLayoutAlgorithm::Layout (this=0x7fffa3d39808) at ../../third_party/blink/renderer/core/layout/ng/ng_block_layout_algorithm.cc:526
#12 0x00007fffe2cbc8c9 in blink::(anonymous namespace)::LayoutWithAlgorithm (node=..., space=..., break_token=0x0) at ../../third_party/blink/renderer/core/layout/ng/ng_block_node.cc:74
#13 0x00007fffe2cbb4f1 in blink::NGBlockNode::Layout (this=0x7fffa3d3b190, constraint_space=..., break_token=0x0) at ../../third_party/blink/renderer/core/layout/ng/ng_block_node.cc:241
#14 0x00007fffe2ca66d6 in blink::LayoutNGBlockFlow::UpdateBlockLayout (this=0x11fa7f50cba8, relayout_children=false) at ../../third_party/blink/renderer/core/layout/ng/layout_ng_block_flow.cc:66
#15 0x00007fffe2d1e670 in blink::LayoutBlock::UpdateLayout (this=0x11fa7f50cba8) at ./../../third_party/blink/renderer/core/layout/layout_block.cc:444
#16 0x00007fffe2e50344 in blink::LayoutObject::ForceChildLayout (this=0x11fa7f50cba8) at ./../../third_party/blink/renderer/core/layout/layout_object.cc:3504
#17 0x00007fffe2d83269 in blink::LayoutFlexibleBox::ConstructAndAppendFlexItem (this=0x11fa7f4e50e8, algorithm=0x7fffa3d3ba00, child=..., layout_type=blink::LayoutFlexibleBox::kLayoutIfNeeded) at ./../../third_party/blink/renderer/core/layout/layout_flexible_box.cc:1125
#18 0x00007fffe2d7f58c in blink::LayoutFlexibleBox::LayoutFlexItems (this=0x11fa7f4e50e8, relayout_children=false, layout_scope=...) at ./../../third_party/blink/renderer/core/layout/layout_flexible_box.cc:830
#19 0x00007fffe2d7f046 in blink::LayoutFlexibleBox::UpdateBlockLayout (this=0x11fa7f4e50e8, relayout_children=false) at ./../../third_party/blink/renderer/core/layout/layout_flexible_box.cc:338
#20 0x00007fffe2d1e670 in blink::LayoutBlock::UpdateLayout (this=0x11fa7f4e50e8) at ./../../third_party/blink/renderer/core/layout/layout_block.cc:444
#21 0x00007fffe2e50344 in blink::LayoutObject::ForceChildLayout (this=0x11fa7f4e50e8) at ./../../third_party/blink/renderer/core/layout/layout_object.cc:3504
#22 0x00007fffe2d82d8c in blink::LayoutFlexibleBox::ComputeInnerFlexBaseSizeForChild (this=0x11fa7f4e4f60, child=..., main_axis_border_and_padding=0px, child_layout_type=blink::LayoutFlexibleBox::kLayoutIfNeeded) at ./../../third_party/blink/renderer/core/layout/layout_flexible_box.cc:799
#23 0x00007fffe2d832e9 in blink::LayoutFlexibleBox::ConstructAndAppendFlexItem (this=0x11fa7f4e4f60, algorithm=0x7fffa3d3c9f0, child=..., layout_type=blink::LayoutFlexibleBox::kLayoutIfNeeded) at ./../../third_party/blink/renderer/core/layout/layout_flexible_box.cc:1137
#24 0x00007fffe2d7f58c in blink::LayoutFlexibleBox::LayoutFlexItems (this=0x11fa7f4e4f60, relayout_children=false, layout_scope=...) at ./../../third_party/blink/renderer/core/layout/layout_flexible_box.cc:830
#25 0x00007fffe2d7f046 in blink::LayoutFlexibleBox::UpdateBlockLayout (this=0x11fa7f4e4f60, relayout_children=false) at ./../../third_party/blink/renderer/core/layout/layout_flexible_box.cc:338
#26 0x00007fffe2d1e670 in blink::LayoutBlock::UpdateLayout (this=0x11fa7f4e4f60) at ./../../third_party/blink/renderer/core/layout/layout_block.cc:444
#27 0x00007fffe2da8f26 in blink::LayoutObject::LayoutIfNeeded (this=0x11fa7f4e4f60) at ../../third_party/blink/renderer/core/layout/layout_object.h:1289
#28 0x00007fffe2d83938 in blink::LayoutFlexibleBox::LayoutLineItems (this=0x11fa7f4e4ac8, current_line=0xafea0cdef10, relayout_children=false, layout_scope=...) at ./../../third_party/blink/renderer/core/layout/layout_flexible_box.cc:1422
#29 0x00007fffe2d7f898 in blink::LayoutFlexibleBox::LayoutFlexItems (this=0x11fa7f4e4ac8, relayout_children=false, layout_scope=...) at ./../../third_party/blink/renderer/core/layout/layout_flexible_box.cc:847
#30 0x00007fffe2d7f046 in blink::LayoutFlexibleBox::UpdateBlockLayout (this=0x11fa7f4e4ac8, relayout_children=false) at ./../../third_party/blink/renderer/core/layout/layout_flexible_box.cc:338
#31 0x00007fffe2d1e670 in blink::LayoutBlock::UpdateLayout (this=0x11fa7f4e4ac8) at ./../../third_party/blink/renderer/core/layout/layout_block.cc:444
#32 0x00007fffe2e50302 in blink::LayoutObject::ForceLayout (this=0x11fa7f4e4ac8) at ./../../third_party/blink/renderer/core/layout/layout_object.cc:3495
#33 0x00007fffe2cbbc1f in blink::NGBlockNode::RunOldLayout (this=0x7fffa3d3f780, constraint_space=...) at ../../third_party/blink/renderer/core/layout/ng/ng_block_node.cc:870
#34 0x00007fffe2cbb1a7 in blink::NGBlockNode::Layout (this=0x7fffa3d3f780, constraint_space=..., break_token=0x0) at ../../third_party/blink/renderer/core/layout/ng/ng_block_node.cc:179
#35 0x00007fffe2cb3aa5 in blink::NGBlockLayoutAlgorithm::LayoutNewFormattingContext (this=0x7fffa3d42558, child=..., child_break_token=0x0, child_data=..., origin_offset=..., abort_if_cleared=false) at ../../third_party/blink/renderer/core/layout/ng/ng_block_layout_algorithm.cc:1158
#36 0x00007fffe2cadb15 in blink::NGBlockLayoutAlgorithm::HandleNewFormattingContext (this=0x7fffa3d42558, child=..., child_break_token=0x0, previous_inflow_position=0x7fffa3d410c0, previous_inline_break_token=0x7fffa3d41040) at ../../third_party/blink/renderer/core/layout/ng/ng_block_layout_algorithm.cc:957
#37 0x00007fffe2cabb94 in blink::NGBlockLayoutAlgorithm::Layout (this=0x7fffa3d42558) at ../../third_party/blink/renderer/core/layout/ng/ng_block_layout_algorithm.cc:523
#38 0x00007fffe2cbc8c9 in blink::(anonymous namespace)::LayoutWithAlgorithm (node=..., space=..., break_token=0x0) at ../../third_party/blink/renderer/core/layout/ng/ng_block_node.cc:74
[...]
Labels: Pri-2 Type-Bug
Project Member

Comment 3 by bugdroid1@chromium.org, Nov 20

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

commit 40525a189cfe4f55ac5e066f0035a429b6e9eb96
Author: Koji Ishii <kojii@chromium.org>
Date: Tue Nov 20 15:16:06 2018

[LayoutNG] Fix line breaker when spaces are across elements

This patch fixes NGLineBreaker not to freeze when all of the
following conditions met:
* 'word-wrap: break-word' is set.
* 'whitespace: pre-wrap' is set.
* Two or more adjacent preserved spaces are split to two or
  more elements, and is the last space to fit in the line.

e.g.,
<div style="whitespace: pre-wrap; word-break: break-word">
  <span>xxx <span> yyyy
</div>
and "yyyy" does not fit.

We need to handle trailing spaces not only when spaces follow
a break opportunity but also spaces are after spaces.

Bug:  903909 
Change-Id: Ie4346a670ec22d35cca3a290b9a423161537e4e8
Reviewed-on: https://chromium-review.googlesource.com/c/1343466
Reviewed-by: Morten Stenshorne <mstensho@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#609709}
[modify] https://crrev.com/40525a189cfe4f55ac5e066f0035a429b6e9eb96/third_party/blink/renderer/core/layout/ng/inline/ng_line_breaker.cc
[modify] https://crrev.com/40525a189cfe4f55ac5e066f0035a429b6e9eb96/third_party/blink/renderer/core/layout/ng/inline/ng_line_breaker_test.cc

Status: Fixed (was: Assigned)
Thank you for reporting the problem to us!

Sign in to add a comment