New issue
Advanced search Search tips

Issue 837141 link

Starred by 1 user

Issue metadata

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



Sign in to add a comment

[css-grid] Percentage height on replaced item with scrollbar

Project Member Reported by r...@igalia.com, Apr 26 2018

Issue description


If you have a replaced item that has scrollbar and a 100% height,
the height is wrongly computed as it doesn't get subtracted the scrollbar.

In the attached example you shouldn't see any overflow
(so you cannot actually scroll).
 
bug-replaced.html
352 bytes View Download
Project Member

Comment 1 by bugdroid1@chromium.org, Apr 30 2018

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

commit 7dea9b2cbd59a1110af713efb748239352f0437d
Author: Manuel Rego Casasnovas <rego@igalia.com>
Date: Mon Apr 30 19:08:38 2018

[css-grid] Subtract scrollbar in ComputeReplacedLogicalHeightUsing()

In LayoutBox::ComputeReplacedLogicalHeightUsing() we were using
the OverrideContentLogicalHeight() plus scrollbar height,
that was wrong and we should subtract the scrollbar too.
This caused issues to resolve the percentage heights on grid item
replaced children, if the grid item has a scrollbar.

To fix the issue we just need to follow the suggestion in the TODO
and use OverrideContentLogicalHeight() directly.

This was the last place using OverrideContentAndScrollbarLogicalHeight()
so we can get rid of it. The patch removes that method together with
OverrideContentAndScrollbarLogicalWidth() that was no longer used.

BUG= 837141 
TEST=external/wpt/css/css-grid/grid-items/percentage-size-replaced-subitems-001.html

Change-Id: I28cf6e65c21e6314808c4430515f06c07d4a739e
Reviewed-on: https://chromium-review.googlesource.com/1035003
Reviewed-by: Morten Stenshorne <mstensho@chromium.org>
Commit-Queue: Manuel Rego Casasnovas <rego@igalia.com>
Cr-Commit-Position: refs/heads/master@{#554834}
[add] https://crrev.com/7dea9b2cbd59a1110af713efb748239352f0437d/third_party/WebKit/LayoutTests/external/wpt/css/css-grid/grid-items/percentage-size-replaced-subitems-001-ref.html
[add] https://crrev.com/7dea9b2cbd59a1110af713efb748239352f0437d/third_party/WebKit/LayoutTests/external/wpt/css/css-grid/grid-items/percentage-size-replaced-subitems-001.html
[modify] https://crrev.com/7dea9b2cbd59a1110af713efb748239352f0437d/third_party/blink/renderer/core/layout/layout_box.cc
[modify] https://crrev.com/7dea9b2cbd59a1110af713efb748239352f0437d/third_party/blink/renderer/core/layout/layout_box.h

Comment 2 by r...@igalia.com, May 2 2018

Status: Fixed (was: Started)

Sign in to add a comment