New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 669039 link

Starred by 6 users

Issue metadata

Status: Fixed
Owner:
NOT IN USE
Closed: Dec 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug



Sign in to add a comment

Containing block size-dependent absolutely positioned block doesn't resize when content changes and scrollbar appears

Reported by lo...@yandex-team.ru, Nov 28 2016

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 YaBrowser/16.10.0.2309 Safari/537.36

Example URL:
https://jsfiddle.net/xt9js57a/1/

Steps to reproduce the problem:
1. Open https://jsfiddle.net/xt9js57a/1/
2. Click twice on "click"

What is the expected behavior?

What went wrong?
Visual bug

Does it occur on multiple sites: Yes

Is it a problem with a plugin? No 

Did this work before? N/A 

Does this work in other browsers? N/A

Chrome version: 53.0.2785.116  Channel: stable
OS Version: OS X 10.11.6
Flash Version: Shockwave Flash 24.0 r0
 
bug.png
31.3 KB View Download

Comment 1 by rbyers@chromium.org, Nov 28 2016

Components: -Blink Blink>Layout
Labels: -OS-Mac Hotlist-Interop OS-All
Status: Untriaged (was: Unconfirmed)
Summary: ::before pseudo element doesn't resize (was: Popup height bug)
Reproduced in 56.0.2924.3 on Linux
Works fine in Firefox and Edge

Looks like the ::before element that's supposed to be sized with it's container isn't getting resized when it's container gets resized.

Comment 2 by e...@chromium.org, Dec 2 2016

Cc: msten...@opera.com kojii@chromium.org
Status: Available (was: Untriaged)

Comment 3 by msten...@opera.com, Dec 2 2016

Cc: szager@chromium.org
Owner: msten...@opera.com
Status: Assigned (was: Available)
Summary: Containing block size-dependent absolutely positioned block doesn't resize when content changes and scrollbar appears (was: ::before pseudo element doesn't resize)
This has to do with the PaintLayerScrollableArea::FreezeScrollbarsScope mechanism in LayoutBlockFlow::layoutBlockFlow(). We fail to detect the height change, because we trigger a re-layout due to the new scrollbar, and in the second layout pass, height doesn't change, so we won't lay out the absolutely positioned descendants.

I have a patch in the works that refactors the code in layoutBlock() and layoutBlockFlow(), which also happens to fix this bug.
tc.html
628 bytes View Download
Project Member

Comment 4 by bugdroid1@chromium.org, Dec 5 2016

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

commit 9d96126f67850daf3c07586dc09fa334d592529c
Author: mstensho <mstensho@opera.com>
Date: Mon Dec 05 21:31:06 2016

Refactor layoutBlock() and layoutBlockFlow(). Happens to fix bugs.

Move what only needs to be done once into layoutBlock(). Rename
layoutBlockFlow() to layoutChildren(). Establish LayoutState once, and compare
with the actual previous height to properly detect height changes.

This fixes two issues with the PaintLayerScrollableArea::FreezeScrollbarsScope
mechanism. Tests added.

1. We used to push LayoutState for the same object twice when freezing
scrollbars, which confused the fragmentation machinery.

2. We failed to detect height changes when freezing scrollbars, because we were
unable to compare against the original height (we compared against the height
we had when entering the second layout pass, rather than comparing against the
one we had when entering the first layout pass). We might therefore end up
skipping necessary re-layout of absolutely positioned descendants.

BUG= 669039 , 670660 

Review-Url: https://codereview.chromium.org/2553833002
Cr-Commit-Position: refs/heads/master@{#436414}

[add] https://crrev.com/9d96126f67850daf3c07586dc09fa334d592529c/third_party/WebKit/LayoutTests/fast/block/shrink-to-fit-with-height-stretched-abspos-and-auto-scrollbar-sibling.html
[add] https://crrev.com/9d96126f67850daf3c07586dc09fa334d592529c/third_party/WebKit/LayoutTests/fragmentation/auto-scrollbar-shrink-to-fit.html
[modify] https://crrev.com/9d96126f67850daf3c07586dc09fa334d592529c/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp
[modify] https://crrev.com/9d96126f67850daf3c07586dc09fa334d592529c/third_party/WebKit/Source/core/layout/LayoutBlockFlow.h

Comment 5 by msten...@opera.com, Dec 5 2016

Status: Fixed (was: Assigned)

Comment 6 by msten...@opera.com, Feb 13 2017

Cc: sureshkumari@chromium.org cbiesin...@chromium.org
 Issue 686391  has been merged into this issue.

Sign in to add a comment