New issue
Advanced search Search tips

Issue 919692 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

[LayoutNG] css3-modsel-61.xml failure cause: we need more invalidation

Project Member Reported by atotic@chromium.org, Jan 8

Issue description

I've looked into cause of failure for 
css3/selectors3/xml/css3-modsel-61.xml

What happens is that a background specified by:
div.stub *:not(:link) { background-color : lime }

does not get painted. The bug is timing dependent, sometimes it happens, sometimes not. CSS is in external stylesheet, that is what causes the flakiness.

The fragment trees generated when bug happens, and when rendering is correct differ:

FAIL:
.:: LayoutNG Physical Fragment Tree ::.
  Box (block-flow children-inline) offset:unplaced size:800x18   LayoutNGBlockFlow div class='stub'
    LineBox offset:0,0 size:287x18  
      Text offset:0,0 size:287x17  start: 0 end: 42

SUCCESS

.:: LayoutNG Physical Fragment Tree ::.
  Box (block-flow children-inline) LayoutNGBlockFlow div class='stub'
    LineBox offset:0,0 size:287x18  
      Box (inline children-inline)  LayoutInline a
        Text offset:0,0 size:287x17   start: 0 end: 42


I think what happens is that when the stylesheet loads, there is only paint invalidation. Because in NG, BoxFragment is optimized out
if there is no background, for NG we would either need 
- layout invalidation when backround color changes for inlines
- stop optimizing fragments away if there is no background.



 
Status: Assigned (was: Untriaged)

Comment 2 by mstensho@chromium.org, Jan 18 (4 days ago)

Cc: mstensho@chromium.org
Attaching non-flaky test.
tc.html
255 bytes View Download
Project Member

Comment 3 by bugdroid1@chromium.org, Yesterday (46 hours ago)

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

commit 939eb864237a673b9a75467bd569079347dc1df8
Author: Ian Kilpatrick <ikilpatrick@chromium.org>
Date: Mon Jan 21 08:26:09 2019

[LayoutNG] Fix invalidation of background on LayoutInline.

We weren't marking the LayoutInline as needed layout or paint
invalidation to correctly generate the box-fragments.

This adds this!

Legacy has the same invalidation logic.

Bug: 919692
Change-Id: I3b219a3915033db219c9afbe3f9132ad33d76569
Reviewed-on: https://chromium-review.googlesource.com/c/1422841
Reviewed-by: Emil A Eklund <eae@chromium.org>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#624530}
[modify] https://crrev.com/939eb864237a673b9a75467bd569079347dc1df8/third_party/blink/renderer/core/layout/layout_inline.cc
[modify] https://crrev.com/939eb864237a673b9a75467bd569079347dc1df8/third_party/blink/web_tests/FlagExpectations/enable-blink-features=LayoutNG

Sign in to add a comment