Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(207)

Issue 1070143002: [Alignment] Single class for holding the alignment data. (Closed)

Created:
5 years, 8 months ago by jfernandez
Modified:
5 years, 8 months ago
CC:
blink-reviews, blink-reviews-style_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

[Alignment] Single class for holding the alignment data. The new CSS3 Box Alignment specification changed the value of alignment properties, like align-self, align-items and justify-content to be complex values rather than single keywords. We have implemented the new spec by defining different class fields for each kind of keyword, eg. <item-position>, <content-position>, <overflow> and <content-distribution>. This approach has been proved to be fairly inconsitent and buggy, as several Flexbox regressions have shown so far. This patch defines a single class to hold all the alignment data stored before in the different StyleRareNonInherited class fields. This way we can detect style changes more easily, provide more consitent behavior and ensuring backward compatibility with Flexbox implementation. BUG=226252 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=194466

Patch Set 1 #

Total comments: 4

Patch Set 2 : Applied suggested changes. #

Total comments: 10

Patch Set 3 : Using the StyleConverter. #

Total comments: 19

Patch Set 4 : Defining one converter for each property. #

Patch Set 5 : Applied suggested changes. #

Patch Set 6 : Unify inital values and simplify style converter logic. #

Patch Set 7 : Adjusting the StyleRareNonIheritedData class size. #

Total comments: 2

Patch Set 8 : Rebased and got back previous setter names. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+261 lines, -267 lines) Patch
M Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl View 1 2 3 4 5 6 7 1 chunk +0 lines, -64 lines 0 comments Download
M Source/core/core.gypi View 1 2 3 4 5 6 7 2 chunks +2 lines, -0 lines 0 comments Download
M Source/core/css/CSSProperties.in View 1 2 3 4 5 6 7 2 chunks +6 lines, -6 lines 0 comments Download
M Source/core/css/ComputedStyleCSSValueMapping.cpp View 1 2 3 4 5 6 7 3 chunks +6 lines, -6 lines 0 comments Download
M Source/core/css/resolver/StyleAdjuster.cpp View 1 2 3 4 5 6 7 2 chunks +19 lines, -25 lines 0 comments Download
M Source/core/css/resolver/StyleBuilderConverter.h View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/css/resolver/StyleBuilderConverter.cpp View 1 2 3 4 5 6 7 2 chunks +32 lines, -0 lines 0 comments Download
M Source/core/css/resolver/StyleBuilderCustom.cpp View 1 2 1 chunk +0 lines, -34 lines 0 comments Download
M Source/core/layout/LayoutBox.cpp View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M Source/core/layout/LayoutFlexibleBox.cpp View 1 2 3 4 5 6 7 5 chunks +5 lines, -5 lines 0 comments Download
M Source/core/layout/LayoutFullScreen.cpp View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/layout/LayoutGrid.cpp View 1 2 3 4 5 6 7 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/layout/LayoutMenuList.cpp View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/style/ComputedStyle.h View 1 2 3 4 5 6 7 5 chunks +46 lines, -45 lines 0 comments Download
M Source/core/style/ComputedStyle.cpp View 1 2 3 4 5 6 7 3 chunks +9 lines, -13 lines 0 comments Download
A Source/core/style/StyleContentAlignmentData.h View 1 2 3 4 5 1 chunk +49 lines, -0 lines 0 comments Download
M Source/core/style/StyleRareNonInheritedData.h View 1 2 3 4 5 6 7 3 chunks +9 lines, -18 lines 0 comments Download
M Source/core/style/StyleRareNonInheritedData.cpp View 1 2 3 4 5 6 7 chunks +20 lines, -44 lines 0 comments Download
A Source/core/style/StyleSelfAlignmentData.h View 1 2 3 4 5 1 chunk +49 lines, -0 lines 0 comments Download

Messages

Total messages: 20 (4 generated)
Julien - ping for review
It's weird that the style application logic wasn't updated to use the new class. Is ...
5 years, 8 months ago (2015-04-09 15:23:20 UTC) #2
jfernandez
About the issue of not updating the style application, I thought that keeping the different ...
5 years, 8 months ago (2015-04-09 15:55:55 UTC) #3
Timothy Loh
Same as Julien has said, we should update the StyleBuilder logic now. It looks like ...
5 years, 8 months ago (2015-04-10 05:42:44 UTC) #4
jfernandez
https://codereview.chromium.org/1070143002/diff/20001/Source/core/style/StyleAlignmentData.cpp File Source/core/style/StyleAlignmentData.cpp (right): https://codereview.chromium.org/1070143002/diff/20001/Source/core/style/StyleAlignmentData.cpp#newcode1 Source/core/style/StyleAlignmentData.cpp:1: // Copyright (c) 2014 The Chromium Authors. All rights ...
5 years, 8 months ago (2015-04-10 23:34:33 UTC) #5
Timothy Loh
This is looking pretty good now :-) https://codereview.chromium.org/1070143002/diff/40001/Source/core/style/StyleAlignmentData.h File Source/core/style/StyleAlignmentData.h (right): https://codereview.chromium.org/1070143002/diff/40001/Source/core/style/StyleAlignmentData.h#newcode26 Source/core/style/StyleAlignmentData.h:26: bool operator==(ItemPosition ...
5 years, 8 months ago (2015-04-13 00:56:43 UTC) #6
Julien - ping for review
lgtm with the comments fixed. https://codereview.chromium.org/1070143002/diff/40001/Source/core/css/resolver/StyleBuilderConverter.cpp File Source/core/css/resolver/StyleBuilderConverter.cpp (right): https://codereview.chromium.org/1070143002/diff/40001/Source/core/css/resolver/StyleBuilderConverter.cpp#newcode339 Source/core/css/resolver/StyleBuilderConverter.cpp:339: ItemPositionType positionType = NonLegacyPosition; ...
5 years, 8 months ago (2015-04-13 14:46:20 UTC) #7
jfernandez
In order to use the ComputedStyle initial value functions of each property we need to ...
5 years, 8 months ago (2015-04-14 00:18:43 UTC) #8
esprehn
https://codereview.chromium.org/1070143002/diff/40001/Source/core/style/StyleAlignmentData.h File Source/core/style/StyleAlignmentData.h (right): https://codereview.chromium.org/1070143002/diff/40001/Source/core/style/StyleAlignmentData.h#newcode26 Source/core/style/StyleAlignmentData.h:26: bool operator==(ItemPosition position) const On 2015/04/13 at 14:46:20, Julien ...
5 years, 8 months ago (2015-04-14 00:48:55 UTC) #10
jfernandez
I still have to verify how this patch affects to the StyleRareNonInherited class size, as ...
5 years, 8 months ago (2015-04-14 22:56:21 UTC) #11
Timothy Loh
On 2015/04/14 22:56:21, jfernandez wrote: > @timloh could you please give your opinion on the ...
5 years, 8 months ago (2015-04-15 09:47:10 UTC) #12
jfernandez
On 2015/04/15 09:47:10, Timothy Loh wrote: > On 2015/04/14 22:56:21, jfernandez wrote: > > @timloh ...
5 years, 8 months ago (2015-04-15 23:03:04 UTC) #13
Timothy Loh
I don't think there'll be any problems changing things if the specs change. lgtm. https://codereview.chromium.org/1070143002/diff/120001/Source/core/style/ComputedStyle.h ...
5 years, 8 months ago (2015-04-24 10:29:53 UTC) #14
jfernandez
On 2015/04/24 10:29:53, Timothy Loh wrote: > I don't think there'll be any problems changing ...
5 years, 8 months ago (2015-04-26 19:44:15 UTC) #15
jfernandez
After applying the suggested changes, I'll try the CQ now. https://codereview.chromium.org/1070143002/diff/120001/Source/core/style/ComputedStyle.h File Source/core/style/ComputedStyle.h (right): https://codereview.chromium.org/1070143002/diff/120001/Source/core/style/ComputedStyle.h#newcode1241 ...
5 years, 8 months ago (2015-04-26 19:44:54 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1070143002/140001
5 years, 8 months ago (2015-04-26 19:45:35 UTC) #19
commit-bot: I haz the power
5 years, 8 months ago (2015-04-26 21:02:16 UTC) #20
Message was sent while issue was closed.
Committed patchset #8 (id:140001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=194466

Powered by Google App Engine
This is Rietveld 408576698