Chromium Code Reviews
Help | Chromium Project | Gerrit Changes | Sign in
(10)

Issue 1136283006: [CSS Grid Layout] Avoid using StyleAdjuster to resolve 'auto' values. (Closed)

Created:
4 years, 11 months ago by jfernandez
Modified:
3 years, 8 months ago
CC:
darktears, apavlov+blink_chromium.org, blink-reviews, blink-reviews-css, blink-reviews-rendering, blink-reviews-style_chromium.org, dglazkov+blink, eae+blinkwatch, ed+blinkwatch_opera.com, jchaffraix+rendering, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, Manuel Rego, rwlbuis, svillar, zoltan1
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

[CSS Grid Layout] Avoid using StyleAdjuster to resolve 'auto' values. CSS Box Alignment specification defines a particular way of resolving 'auto' values for the alignment properties, resulting in different values depending on the kind of the styled element. Because of this, we were resolving such values during the style cascade resolution. This approach implies that we need to Reattach the style whenever a change is made in the value of these properties, in order to perform again the style cascade resolution. The Reattach causes many issues so we need to explore a different approach to perform the 'auto' values resolution. This patch delegates this logic to the appropriated LayoutObjects during the layout, where these values are actually used. The cons of this approach is that we need to duplicated part of this code to implement the computed style logic for these properties, which I think is something we can assume. BUG=249451, 376823

Patch Set 1 #

Patch Set 2 : Patch rebased. #

Patch Set 3 : Adjusting repaint tests expected invalidations. #

Patch Set 4 : Added changes on slimmingpaint test expectations. #

Patch Set 5 : Update repaint tests expectations based on the new tests. #

Patch Set 6 : Don't use the defaultJustifyItems #

Patch Set 7 : Rebasing and updating some repaint layout tests. #

Patch Set 8 : Fixed some layout tests failures. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+239 lines, -289 lines) Patch
M LayoutTests/TestExpectations View 1 2 3 4 5 6 1 chunk +0 lines, -5 lines 0 comments Download
M LayoutTests/css3/flexbox/css-properties.html View 3 chunks +5 lines, -5 lines 0 comments Download
M LayoutTests/css3/flexbox/css-properties-expected.txt View 3 chunks +4 lines, -4 lines 0 comments Download
M LayoutTests/fast/alignment/parse-align-self.html View 1 chunk +3 lines, -3 lines 0 comments Download
M LayoutTests/fast/alignment/parse-align-self-expected.txt View 1 chunk +3 lines, -3 lines 0 comments Download
M LayoutTests/fast/alignment/parse-justify-content.html View 2 chunks +2 lines, -2 lines 0 comments Download
M LayoutTests/fast/alignment/parse-justify-content-expected.txt View 2 chunks +2 lines, -2 lines 0 comments Download
M LayoutTests/fast/alignment/parse-justify-items.html View 1 chunk +3 lines, -3 lines 0 comments Download
M LayoutTests/fast/alignment/parse-justify-items-expected.txt View 1 chunk +3 lines, -3 lines 0 comments Download
M LayoutTests/fast/alignment/parse-justify-self.html View 1 chunk +3 lines, -3 lines 0 comments Download
M LayoutTests/fast/alignment/parse-justify-self-expected.txt View 1 chunk +3 lines, -3 lines 0 comments Download
M LayoutTests/fast/alignment/resources/alignment-parsing-utils.js View 1 chunk +6 lines, -5 lines 0 comments Download
M LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-listing-expected.txt View 1 2 3 4 5 6 7 2 chunks +4 lines, -4 lines 0 comments Download
M LayoutTests/fast/repaint/align-content-distribution-change-grid-expected.txt View 1 2 3 4 1 chunk +0 lines, -1 line 0 comments Download
M LayoutTests/fast/repaint/align-content-position-change-grid-expected.txt View 1 2 3 4 5 6 1 chunk +0 lines, -1 line 0 comments Download
M LayoutTests/fast/repaint/align-items-change-expected.txt View 1 2 1 chunk +4 lines, -10 lines 0 comments Download
A + LayoutTests/fast/repaint/align-items-change-keeping-geometry.html View 1 2 3 4 5 6 2 chunks +2 lines, -3 lines 0 comments Download
A + LayoutTests/fast/repaint/align-items-change-keeping-geometry-expected.txt View 1 2 3 4 5 6 0 chunks +-1 lines, --1 lines 0 comments Download
A + LayoutTests/fast/repaint/align-items-change-keeping-geometry-grid.html View 1 2 3 4 5 6 2 chunks +3 lines, -3 lines 0 comments Download
A + LayoutTests/fast/repaint/align-items-change-keeping-geometry-grid-expected.txt View 1 2 3 4 5 6 0 chunks +-1 lines, --1 lines 0 comments Download
M LayoutTests/fast/repaint/align-items-overflow-change-expected.txt View 1 2 3 4 1 chunk +0 lines, -4 lines 0 comments Download
M LayoutTests/fast/repaint/align-self-change-grid-expected.txt View 1 2 3 4 1 chunk +1 line, -2 lines 0 comments Download
M LayoutTests/fast/repaint/align-self-overflow-change-expected.txt View 1 2 3 4 1 chunk +0 lines, -1 line 0 comments Download
M LayoutTests/fast/repaint/justify-content-distribution-change-grid-expected.txt View 1 2 3 4 1 chunk +0 lines, -1 line 0 comments Download
M LayoutTests/fast/repaint/justify-content-position-change-grid-expected.txt View 1 2 3 4 1 chunk +0 lines, -1 line 0 comments Download
M LayoutTests/fast/repaint/justify-items-change-expected.txt View 1 2 3 4 1 chunk +0 lines, -2 lines 0 comments Download
A + LayoutTests/fast/repaint/justify-items-change-keeping-geometry.html View 1 2 3 4 5 6 2 chunks +5 lines, -3 lines 0 comments Download
A + LayoutTests/fast/repaint/justify-items-change-keeping-geometry-expected.txt View 1 2 3 4 5 6 0 chunks +-1 lines, --1 lines 0 comments Download
M LayoutTests/fast/repaint/justify-items-legacy-change-expected.txt View 1 2 3 4 1 chunk +0 lines, -4 lines 0 comments Download
M LayoutTests/fast/repaint/justify-items-overflow-change-expected.txt View 1 2 3 4 5 6 1 chunk +0 lines, -4 lines 0 comments Download
M LayoutTests/fast/repaint/justify-self-overflow-change-expected.txt View 1 2 3 4 1 chunk +0 lines, -1 line 0 comments Download
M LayoutTests/virtual/slimmingpaint/fast/repaint/align-content-distribution-change-grid-expected.txt View 1 2 3 4 1 chunk +0 lines, -2 lines 0 comments Download
M LayoutTests/virtual/slimmingpaint/fast/repaint/align-content-position-change-grid-expected.txt View 1 2 3 4 5 6 1 chunk +0 lines, -2 lines 0 comments Download
M LayoutTests/virtual/slimmingpaint/fast/repaint/align-items-change-expected.txt View 1 2 3 1 chunk +5 lines, -19 lines 0 comments Download
A + LayoutTests/virtual/slimmingpaint/fast/repaint/align-items-change-keeping-geometry-expected.txt View 1 2 3 4 5 6 0 chunks +-1 lines, --1 lines 0 comments Download
A + LayoutTests/virtual/slimmingpaint/fast/repaint/align-items-change-keeping-geometry-grid-expected.txt View 1 2 3 4 5 6 0 chunks +-1 lines, --1 lines 0 comments Download
M LayoutTests/virtual/slimmingpaint/fast/repaint/align-items-overflow-change-expected.txt View 1 2 3 4 2 chunks +0 lines, -11 lines 0 comments Download
M LayoutTests/virtual/slimmingpaint/fast/repaint/align-self-change-grid-expected.txt View 1 2 3 4 1 chunk +1 line, -2 lines 0 comments Download
M LayoutTests/virtual/slimmingpaint/fast/repaint/align-self-overflow-change-expected.txt View 1 2 3 4 2 chunks +1 line, -3 lines 0 comments Download
M LayoutTests/virtual/slimmingpaint/fast/repaint/justify-content-distribution-change-grid-expected.txt View 1 2 3 4 1 chunk +0 lines, -2 lines 0 comments Download
M LayoutTests/virtual/slimmingpaint/fast/repaint/justify-content-position-change-grid-expected.txt View 1 2 3 4 1 chunk +0 lines, -2 lines 0 comments Download
M LayoutTests/virtual/slimmingpaint/fast/repaint/justify-items-change-expected.txt View 1 2 3 4 1 chunk +0 lines, -6 lines 0 comments Download
A + LayoutTests/virtual/slimmingpaint/fast/repaint/justify-items-change-keeping-geometry-expected.txt View 1 2 3 4 5 6 0 chunks +-1 lines, --1 lines 0 comments Download
M LayoutTests/virtual/slimmingpaint/fast/repaint/justify-items-legacy-change-expected.txt View 1 2 3 1 chunk +0 lines, -12 lines 0 comments Download
M LayoutTests/virtual/slimmingpaint/fast/repaint/justify-items-overflow-change-expected.txt View 1 2 3 4 5 6 2 chunks +0 lines, -11 lines 0 comments Download
M LayoutTests/virtual/slimmingpaint/fast/repaint/justify-self-overflow-change-expected.txt View 1 2 3 4 2 chunks +1 line, -3 lines 0 comments Download
M Source/core/css/ComputedStyleCSSValueMapping.cpp View 1 2 3 4 5 6 5 chunks +55 lines, -24 lines 0 comments Download
M Source/core/css/resolver/StyleAdjuster.h View 1 chunk +0 lines, -1 line 0 comments Download
M Source/core/css/resolver/StyleAdjuster.cpp View 1 2 3 4 5 6 7 2 chunks +5 lines, -73 lines 0 comments Download
M Source/core/layout/LayoutBox.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/layout/LayoutBox.cpp View 1 2 3 4 5 6 3 chunks +19 lines, -1 line 0 comments Download
M Source/core/layout/LayoutFlexibleBox.cpp View 1 8 chunks +21 lines, -12 lines 0 comments Download
M Source/core/layout/LayoutGrid.cpp View 1 2 3 4 5 6 11 chunks +18 lines, -14 lines 0 comments Download
M Source/core/style/ComputedStyle.h View 1 2 3 4 5 6 1 chunk +8 lines, -2 lines 0 comments Download
M Source/core/style/ComputedStyle.cpp View 1 2 3 4 5 6 4 chunks +54 lines, -7 lines 0 comments Download

Messages

Total messages: 14 (3 generated)
jfernandez
4 years, 11 months ago (2015-05-14 10:53:21 UTC) #2
jfernandez
The patch for this issue changes considerably the repaint area caused by alignment style changes. ...
4 years, 11 months ago (2015-05-14 14:20:45 UTC) #3
jfernandez
Patch Set 6 provides a small optimization, since calling to defaultJustifyItems causes a performance regression ...
4 years, 11 months ago (2015-05-15 11:07:05 UTC) #4
rune
Drive-by-comments: I haven't looked at the code in detail yet, but not doing the adjustments ...
4 years, 11 months ago (2015-05-15 14:53:16 UTC) #6
esprehn
What are the problems with reattach? Going through a reattach should be largely transparent except ...
4 years, 11 months ago (2015-05-15 15:06:49 UTC) #7
jfernandez
On 2015/05/15 14:53:16, rune wrote: > Drive-by-comments: > > I haven't looked at the code ...
4 years, 11 months ago (2015-05-15 16:00:19 UTC) #8
jfernandez
On 2015/05/15 15:06:49, esprehn wrote: > What are the problems with reattach? Going through a ...
4 years, 11 months ago (2015-05-15 16:10:59 UTC) #9
cbiesinger
My opinion is that putting the code in StyleAdjuster is essentially duplicating a lot of ...
4 years, 11 months ago (2015-05-18 23:06:20 UTC) #10
jfernandez
On 2015/05/18 23:06:20, cbiesinger wrote: > My opinion is that putting the code in StyleAdjuster ...
4 years, 11 months ago (2015-05-19 08:35:36 UTC) #11
dsinclair
4 years, 9 months ago (2015-08-05 18:10:38 UTC) #13
jfernandez
3 years, 8 months ago (2016-08-23 08:11:20 UTC) #14
We don't need to land this patch because we have decided to implement a
different approach.

Powered by Google App Engine
This is Rietveld 408576698