[css-grid] Different width of grid container between initial load and refresh |
||
Issue descriptionIf you open the following Layout Test [1]: LayoutTests/fast/css-grid-layout/grid-track-sizing-with-percentages-and-orthogonal-flows.html The first time the width of the first grid container is 110px, but if you resize the window or reload the page, the width is 120px. We should investigate why we're getting different results depending on the layout. I tried to create a reduced test case but it seems that I cannot reproduce it without the JavaScript involved on the test. I managed to reproduce it inside JS Bin too (resize the output frame to see it): http://jsbin.com/milawa/edit?html,output [1] https://chromium.googlesource.com/chromium/src.git/+/f7dbf39be31d8aa9214d5d84da613508d4e06491/third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-track-sizing-with-percentages-and-orthogonal-flows.html
,
Oct 10 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/45a34a1a8f382bcaa36e8d1c58575f34f2832237 commit 45a34a1a8f382bcaa36e8d1c58575f34f2832237 Author: jfernandez <jfernandez@igalia.com> Date: Mon Oct 10 21:36:11 2016 [css-grid] Clearing override sizes before running grid's layout logic. Grid's layout logic manages two different override sizes; one it's designed to implement the grid item's stretching behavior, identified with the concept of 'overrideContentLogicalSize'; there is another override size, known as overrideContainingBlockContentLogicalSize, used to implement the Grid Area abstraction, which will behave as the actual containing block of any grid item. During grid's layout logic these override sizes are set according to the CSS style rules. This affects how the grid container and its children are going to be sized during layout. Grid Tracks sizing algorithm depend on these override sizes. In order to ensure that the tracks sizing algorithm produces the same results when it's run consecutively several times, we need to clear these override sizes and performs a layout of the affected grid items. Otherwise, the affected items will return sizing values which depend on the override values set in the previous layout, which in some cases, like orthogonal flows, may change through different runs of the sizing algorithm. BUG= 628565 Review-Url: https://codereview.chromium.org/2361373002 Cr-Commit-Position: refs/heads/master@{#424250} [modify] https://crrev.com/45a34a1a8f382bcaa36e8d1c58575f34f2832237/third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-track-sizing-with-percentages-and-orthogonal-flows.html [add] https://crrev.com/45a34a1a8f382bcaa36e8d1c58575f34f2832237/third_party/WebKit/LayoutTests/fast/css-grid-layout/repeating-layout-must-produce-the-same-results.html [modify] https://crrev.com/45a34a1a8f382bcaa36e8d1c58575f34f2832237/third_party/WebKit/Source/core/layout/LayoutGrid.cpp [modify] https://crrev.com/45a34a1a8f382bcaa36e8d1c58575f34f2832237/third_party/WebKit/Source/core/layout/LayoutGrid.h
,
Oct 11 2016
This issue should be FIXED now. |
||
►
Sign in to add a comment |
||
Comment 1 by svil...@igalia.com
, Jul 29 2016