New issue
Advanced search Search tips

Issue 916511 link

Starred by 2 users

Issue metadata

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

Blocking:
issue 524134



Sign in to add a comment

LayoutNG + CompositeAfterPaint cause trouble for background-attachment:local

Project Member Reported by mstensho@chromium.org, Dec 19

Issue description

Running with --enable-blink-features=LayoutNG,CompositeAfterPaint causes virtual/composite-after-paint/paint/background/scrolling-background-with-negative-z-child.html to fail. Attaching a simplified test case.

It almost looks like there's some code somewhere that doesn't understand that an out-of-flow object may actually cause scrollable overflow in an parent. But, then again, the test passes without LayoutNG, so maybe it's NG that forgets to write back some critical information back to legacy layout.

If we modify my attached test to contain *any* in-flow content at all (even an empty zero-height DIV next to the abspos will do the trick), the test passes.
 
tc.html
585 bytes View Download
Project Member

Comment 1 by bugdroid1@chromium.org, Dec 19

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

commit 2f317c76a573f90003987b92df6deb88f9b2d02f
Author: Morten Stenshorne <mstensho@chromium.org>
Date: Wed Dec 19 13:21:53 2018

[LayoutNG] Dedicated bug for ComposeAfterPaint problems.

LayoutNG + ComposeAfterPaint + background-attachment:local = trouble.

TBR=kojii@chromium.org

Bug: 916511
Change-Id: I05229a9163175138bdd43aec38540fa41ab2d051
Reviewed-on: https://chromium-review.googlesource.com/c/1384028
Reviewed-by: Morten Stenshorne <mstensho@chromium.org>
Commit-Queue: Morten Stenshorne <mstensho@chromium.org>
Cr-Commit-Position: refs/heads/master@{#617814}
[modify] https://crrev.com/2f317c76a573f90003987b92df6deb88f9b2d02f/third_party/blink/web_tests/FlagExpectations/enable-blink-features=LayoutNG

Cc: wangxianzhu@chromium.org
There are two issues that cause this test failure:
1) NGBoxFragmentPainter::Paint differs from BlockPainter::Paint. In BlockPainter::Paint, with CompositeAfterPaint, SetIsPaintingScrollingBackground is called before painting the background. We'll need to implement LayoutBlock::GetBackgroundPaintLocation for LayoutNG.
2) NGBoxFragmentPainter::IsPaintingScrollingBackground differs from BoxModelObjectPainter::IsPaintingScrollingBackground. In BoxModelObjectPainter::IsPaintingScrollingBackground, there is a CompositeAfterPaint conditional that checks PaintInfo::IsPaintingScrollingBackground.

There is a third bug that is related but does not cause this test failure: NGBoxFragmentPainter::PaintObject has a commented out block of code for painting the scroll hit test display item, and this prevents composited scrolling from working (e.g., mouse-wheel scrolling). The scroll hit test display item needs some cleanup so I recommend not worrying about that for now.
Blocking: 524134

Sign in to add a comment