New issue
Advanced search Search tips

Issue 895611 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner: ----
Closed: Oct 30
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

[LayoutNG] fast/inline/outline-offset.html margins+inline+replaced cause render difference

Project Member Reported by atotic@chromium.org, Oct 15

Issue description

This is not an outline bug. The way margins are handled causes the bug.

Simplified test case:

<span style="outline:black solid 1px"><textarea style="margin-left:100px;width:40px;height:100px"></textarea></span>

 
This is another case of empty line + continuation.
Cc: kojii@chromium.org
Components: Blink>Layout
Owner: ----
Status: Available (was: Untriaged)
This is not the same bug at #889721. The margins are the problem here. Margins + continuations?

It can be demonstrated without any outlines:

<span style="background-color: yellow;"><textarea style="margin-left:100px;width:40px;height:100px;background-color:green"></textarea></span>
Yeah, it fails because the continuation is an empty line, and we handle empty line box incorrectly. If you make them non-empty, it works as expected.
Ah, wait, textarea is not needed, just inline-block can reproduce, so not about continuations.
👍🏾
Legacy and WebKit look incorrect too, the height of the line box should include the height of atomic inline. Gecko and Edge does this correctly.
Project Member

Comment 8 by bugdroid1@chromium.org, Oct 30

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

commit c0ebd8f1443a2876284f0253bc9f00baaaa273fc
Author: Koji Ishii <kojii@chromium.org>
Date: Tue Oct 30 13:54:37 2018

[LayoutNG] Fix inline boxes when the first child has left margin

This patch fixes the left edge of inline boxes when its first
child is an atomic inline that has left margin. Inline boxes
without children are handled in the same way and that this
patch fixes them too.

NGInlineLayoutAlgorithm uses left margin when it computes the
border box of children. However, when creating boxes that wrap
such child, margin edge is needed.

Bug:  895611 , 636993
Change-Id: I4ffb67b5903a1f0ef90c1da741f1a3a33aa9c1af
Reviewed-on: https://chromium-review.googlesource.com/c/1306968
Reviewed-by: Emil A Eklund <eae@chromium.org>
Commit-Queue: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#603883}
[modify] https://crrev.com/c0ebd8f1443a2876284f0253bc9f00baaaa273fc/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
[modify] https://crrev.com/c0ebd8f1443a2876284f0253bc9f00baaaa273fc/third_party/blink/renderer/core/layout/ng/inline/ng_inline_box_state.cc
[modify] https://crrev.com/c0ebd8f1443a2876284f0253bc9f00baaaa273fc/third_party/blink/renderer/core/layout/ng/inline/ng_line_box_fragment_builder.h

Labels: -Pri-3 Pri-2
Status: Fixed (was: Available)
\o/

Sign in to add a comment