Reflow not triggered when applying negative margin to floating element
Reported by
jimmy.th...@gmail.com,
Apr 15 2017
|
|||||
Issue descriptionUserAgent: 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:
,
Apr 17 2017
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.
,
Apr 19 2017
,
Apr 24 2017
,
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
,
Aug 13 2017
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by ranjitkan@chromium.org
, Apr 17 2017