New issue
Advanced search Search tips

Issue 843320 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

[css-contain] contain: layout overflow should be treated as ink overflow

Project Member Reported by r...@igalia.com, May 15 2018

Issue description


If you open the attached example you shouldn't be able to scroll vertically,
as the overflow of the "contain: layout" element should be treated as ink overflow .

Text from the spec (https://drafts.csswg.org/css-contain/#containment-layout):
  If the contents of the element overflow the element,
  they must be treated as ink overflow.

The definition of "ink overflow" (https://www.w3.org/TR/css-overflow-3/#ink-overflow):
  The ink overflow of a box is the part of that box
  and its contents that creates a visual effect outside
  of the box's border box.
  Ink overflow is the overflow of painting effects defined
  to not affect layout or otherwise extend
  the scrollable overflow region, such as box shadows, border images,
  text decoration, overhanging glyphs (with negative side bearings,
  or with ascenders/descenders extending outside the em box), outlines, etc.

 
contain-layout-ink-overflow.html
292 bytes View Download
contain-layout-ink-overflow.png
7.5 KB View Download
Project Member

Comment 1 by bugdroid1@chromium.org, Jun 6 2018

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

commit 4f8f44f272473dfd92257e18dbe86fdf48d61884
Author: Manuel Rego Casasnovas <rego@igalia.com>
Date: Wed Jun 06 08:49:03 2018

[css-contain] Layout containment overflowing contents as ink overflow

Text form the spec
(https://drafts.csswg.org/css-contain/#containment-layout):
  "If the contents of the element overflow the element,
  they must be treated as ink overflow."

The patch modifies LayoutBox::LayoutOverflowRectForPropagation()
so the overflowing contents of an element with "contain: layout"
are treated as ink overflow. That way they don't interfere at all
in the layout of its ancestors.

BUG= 843320 
TEST=external/wpt/css/css-contain/contain-layout-015.html

Change-Id: Iedd47edf46a0e4ce0e4102abe5881d25771fe0fa
Reviewed-on: https://chromium-review.googlesource.com/1087462
Reviewed-by: Morten Stenshorne <mstensho@chromium.org>
Commit-Queue: Manuel Rego Casasnovas <rego@igalia.com>
Cr-Commit-Position: refs/heads/master@{#564826}
[add] https://crrev.com/4f8f44f272473dfd92257e18dbe86fdf48d61884/third_party/WebKit/LayoutTests/external/wpt/css/css-contain/contain-layout-015.html
[modify] https://crrev.com/4f8f44f272473dfd92257e18dbe86fdf48d61884/third_party/blink/renderer/core/layout/layout_box.cc

Comment 2 by r...@igalia.com, Jun 6 2018

Owner: r...@igalia.com
Status: Fixed (was: Available)
This should be fixed now.

Sign in to add a comment