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

Issue 711938 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner: ----
Closed: Aug 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug



Sign in to add a comment

Reflow not triggered when applying negative margin to floating element

Reported by jimmy.th...@gmail.com, Apr 15 2017

Issue description

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

Example URL:
https://jsfiddle.net/979p49be/2/

Steps to reproduce the problem:
1. Go to https://jsfiddle.net/979p49be/2/
2. Click the Start button to start the test (takes 6 seconds to complete)
3. Notice the empty space in the Content area (also see screenshot).
4. Click the Fix button to force the layout to rebuild.

What is the expected behavior?
That the browser triggers reflow when negative margin is applied.

What went wrong?
Negative margin-top applied programmatically does not trigger reflow. This breaks the Designer in Sitemagic CMS (see screenshot).

Does it occur on multiple sites: Yes

Is it a problem with a plugin? No 

Did this work before? Yes Not sure

Does this work in other browsers? Yes

Chrome version: 57.0.2987.133  Channel: stable
OS Version: OS X 10.11.6
Flash Version:
 
Screen Shot 2017-04-15 at 17.17.35.png
343 KB View Download
Screen Shot 2017-04-15 at 17.22.32.png
803 KB View Download
Labels: Needs-Triage-M57
Labels: -Needs-Triage-M57 M-60 OS-Linux OS-Windows
Status: Untriaged (was: Unconfirmed)
Able to reproduce this issue on Windows-10, Ubuntu 14.04 and Mac OS 10.12 using chrome latest stable #57.0.2987.133. By opening the test case link from the original comment, observed the empty space in the Content area and get's fixed by clicking on "Fix buggy layout" button

This issue is observed on chrome older version of #35.0.1849.0 as well, Hence marking it as untriaged.

Comment 3 by bokan@chromium.org, Apr 19 2017

Components: -Blink Blink>Layout

Comment 4 by e...@chromium.org, Apr 24 2017

Cc: robho...@gmail.com
Status: Available (was: Untriaged)
Project Member

Comment 5 by bugdroid1@chromium.org, Apr 26 2017

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

commit 789b5e528fb3bd9ca44341de46547c45355652ab
Author: robhogan <robhogan@gmail.com>
Date: Wed Apr 26 22:12:06 2017

Let siblings layout if an adjacent float may no longer affect them

Negative margin top can move a float up out of the way of siblings/descendants
that are currently avoiding them. We need to account for the position of the child's
current lowest float so that it can try laying out again.

BUG= 711938 

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

[modify] https://crrev.com/789b5e528fb3bd9ca44341de46547c45355652ab/third_party/WebKit/LayoutTests/TestExpectations
[add] https://crrev.com/789b5e528fb3bd9ca44341de46547c45355652ab/third_party/WebKit/LayoutTests/fast/block/float/margin-top-changes.html
[modify] https://crrev.com/789b5e528fb3bd9ca44341de46547c45355652ab/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp

Comment 6 by robho...@gmail.com, Aug 13 2017

Status: Fixed (was: Available)

Sign in to add a comment