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

Issue 670660 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
NOT IN USE
Closed: Dec 2016
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Appearing scrollbar confuses fragmentation

Reported by msten...@opera.com, Dec 2 2016

Issue description

This has to do with the PaintLayerScrollableArea::FreezeScrollbarsScope mechanism in LayoutBlockFlow::layoutBlockFlow().

We push LayoutState for the same object twice when a scrollbar appears during layout, so the pagination offset becomes wrong.
 
tc.html
786 bytes View Download
Project Member

Comment 1 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 2 by msten...@opera.com, Dec 5 2016

Status: Fixed (was: Assigned)

Sign in to add a comment