New issue
Advanced search Search tips

Issue 860516 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jul 10
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 636993



Sign in to add a comment

[layoutng] Tests fail with DCHECK in line breaker

Project Member Reported by cbiesinger@google.com, Jul 5

Issue description

With https://chromium-review.googlesource.com/c/chromium/src/+/1093566, these two tests started failing with dchecks:

http/tests/devtools/console/console-smart-enter.js
http/tests/devtools/console/console-correct-suggestions.js
 
The second one seems to fail consistently, the former more intermittent?

Specifically, it seems that once we get to HandleOverflow and BreakText again we get a different (smaller) inline_size for a node and later DCHECK

I guess something doesn't update line.position_?

https://test-results.appspot.com/data/layout_results/linux_layout_tests_layout_ng/7437/layout-test-results/results.html

STDERR: [1:1:0703/125046.079771:FATAL:ng_line_breaker.cc(306)] Check failed: line_.position == line_info->ComputeWidth() ("63" vs. "7")
STDERR: #0 0x000003c1341c base::debug::StackTrace::StackTrace()
STDERR: #1 0x000003b8bfbb logging::LogMessage::~LogMessage()
STDERR: #2 0x00000623e47a blink::NGLineBreaker::ComputeLineLocation()
STDERR: #3 0x00000623da1d blink::NGLineBreaker::NextLine()
STDERR: #4 0x000006238d4f blink::ComputeContentSize()
STDERR: #5 0x000006238a49 blink::NGInlineNode::ComputeMinMaxSize()
STDERR: #6 0x00000628e0a3 blink::NGLayoutInputNode::ComputeMinMaxSize()
STDERR: #7 0x000006276c15 blink::NGBlockLayoutAlgorithm::ComputeMinMaxSize()
STDERR: #8 0x0000062749cc blink::NGBlockNode::ComputeMinMaxSize()
STDERR: #9 0x00000628e04b blink::NGLayoutInputNode::ComputeMinMaxSize()
STDERR: #10 0x00000629096c blink::ComputeMinAndMaxContentContribution()
STDERR: #11 0x000006276e51 blink::NGBlockLayoutAlgorithm::ComputeMinMaxSize()
STDERR: #12 0x0000062749cc blink::NGBlockNode::ComputeMinMaxSize()
STDERR: #13 0x00000628e04b blink::NGLayoutInputNode::ComputeMinMaxSize()
STDERR: #14 0x00000629096c blink::ComputeMinAndMaxContentContribution()
STDERR: #15 0x000006276e51 blink::NGBlockLayoutAlgorithm::ComputeMinMaxSize()
STDERR: #16 0x0000062749cc blink::NGBlockNode::ComputeMinMaxSize()
STDERR: #17 0x00000628e04b blink::NGLayoutInputNode::ComputeMinMaxSize()
STDERR: #18 0x00000629096c blink::ComputeMinAndMaxContentContribution()
STDERR: #19 0x000006276e51 blink::NGBlockLayoutAlgorithm::ComputeMinMaxSize()
STDERR: #20 0x0000062749cc blink::NGBlockNode::ComputeMinMaxSize()
STDERR: #21 0x00000628e04b blink::NGLayoutInputNode::ComputeMinMaxSize()
STDERR: #22 0x00000629096c blink::ComputeMinAndMaxContentContribution()
STDERR: #23 0x000006276e51 blink::NGBlockLayoutAlgorithm::ComputeMinMaxSize()
STDERR: #24 0x0000062749cc blink::NGBlockNode::ComputeMinMaxSize()
STDERR: #25 0x0000062662d7 blink::LayoutNGBlockFlow::ComputeIntrinsicLogicalWidths()
STDERR: #26 0x0000060c884a blink::LayoutBlock::ComputePreferredLogicalWidths()
STDERR: #27 0x00000610539c blink::LayoutBox::MaxPreferredLogicalWidth()
STDERR: #28 0x00000612c361 blink::LayoutFlexibleBox::ChildIntrinsicLogicalWidth()
STDERR: #29 0x00000612e377 blink::LayoutFlexibleBox::LayoutLineItems()
STDERR: #30 0x00000612a6bf blink::LayoutFlexibleBox::LayoutFlexItems()
STDERR: #31 0x000006129d9c blink::LayoutFlexibleBox::UpdateBlockLayout()
STDERR: #32 0x0000060c3286 blink::LayoutBlock::UpdateLayout()
STDERR: #33 0x00000612d7e2 blink::LayoutFlexibleBox::ComputeInnerFlexBaseSizeForChild()
STDERR: #34 0x00000612de27 blink::LayoutFlexibleBox::ConstructFlexItem()
STDERR: #35 0x00000612a3c8 blink::LayoutFlexibleBox::LayoutFlexItems()
STDERR: #36 0x000006129d9c blink::LayoutFlexibleBox::UpdateBlockLayout()
STDERR: #37 0x0000060c3286 blink::LayoutBlock::UpdateLayout()
STDERR: #38 0x00000612d7e2 blink::LayoutFlexibleBox::ComputeInnerFlexBaseSizeForChild()
STDERR: #39 0x00000612de27 blink::LayoutFlexibleBox::ConstructFlexItem()
STDERR: #40 0x00000612a3c8 blink::LayoutFlexibleBox::LayoutFlexItems()
STDERR: #41 0x000006129d9c blink::LayoutFlexibleBox::UpdateBlockLayout()
STDERR: #42 0x0000060c3286 blink::LayoutBlock::UpdateLayout()
STDERR: #43 0x000005cf2731 blink::LocalFrameView::LayoutFromRootObject()
STDERR: #44 0x000005cf2db2 blink::LocalFrameView::PerformLayout()
STDERR: #45 0x000005cf0e3c blink::LocalFrameView::UpdateLayout()
STDERR: #46 0x0000059c6026 blink::Document::UpdateStyleAndLayout()
STDERR: #47 0x0000059c5e9a blink::Document::UpdateStyleAndLayoutIgnorePendingStylesheets()
STDERR: #48 0x000005b56a97 blink::FrameSelection::ComputeVisibleSelectionInDOMTreeDeprecated()
STDERR: #49 0x000005b5098f blink::Editor::CanPaste()
STDERR: #50 0x000005bf5f79 blink::InputMethodController::TextInputInfo()
STDERR: #51 0x000005d6c64d blink::WebInputMethodControllerImpl::TextInputInfo()
STDERR: #52 0x0000074c9435 content::RenderWidget::UpdateTextInputStateInternal()
STDERR: #53 0x0000074c860e content::RenderWidget::WillBeginCompositorFrame()
STDERR: #54 0x000004c1da64 cc::SingleThreadProxy::DoBeginMainFrame()
STDERR: #55 0x000004c1d793 cc::SingleThreadProxy::CompositeImmediately()
STDERR: #56 0x000004b61e4a cc::LayerTreeHost::Composite()
STDERR: #57 0x000006fdf381 content::RenderWidgetCompositor::SynchronouslyComposite()
STDERR: #58 0x000006fdf7cb content::RenderWidgetCompositor::SynchronouslyCompositeNoRasterForTesting()
STDERR: #59 0x0000076533c0 test_runner::WebWidgetTestClient::AnimateNow()

 
Some data that may or may not be helpful:

(rr) p item_result->may_break_inside
$5 = false
(rr) p override_break_anywhere_
$6 = true
(rr) p item.Style()
$33 = (const blink::ComputedStyle *) 0x11f20aea9f20
(rr) p $33->WordBreak()
$34 = blink::EWordBreak::kNormal
(rr) p $33->WhiteSpace()
$35 = blink::EWhiteSpace::kNowrap
(rr) p $33->FontSize()  
$36 = 11

Koji wrote: "HandleOverflow should re-compute the position, we have a function to do that, probably forgot to call in some cases"
Blocking: -591099 636993
Project Member

Comment 4 by bugdroid1@chromium.org, Jul 10

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

commit 10b87936c878dc0caab465df5758187e74a36a14
Author: Koji Ishii <kojii@chromium.org>
Date: Tue Jul 10 06:23:08 2018

[LayoutNG] Update line position when overflow

This patch fixes position inconsistency when line overflow
occurred, and the end part of the last text item was shorten
but still does not fit, and no previous break opportunities
were found.

Bug:  860516 
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: I848c1d6fc156fa312064078e2b93b2572a66094a
Reviewed-on: https://chromium-review.googlesource.com/1130960
Reviewed-by: Emil A Eklund <eae@chromium.org>
Commit-Queue: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#573631}
[modify] https://crrev.com/10b87936c878dc0caab465df5758187e74a36a14/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
[modify] https://crrev.com/10b87936c878dc0caab465df5758187e74a36a14/third_party/blink/renderer/core/layout/ng/inline/ng_line_breaker.cc

Status: Fixed (was: Assigned)

Sign in to add a comment