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

Issue 2346403002: [layoutng] Create correct constraint spaces for children (Closed)

Created:
4 years, 3 months ago by cbiesinger
Modified:
4 years, 3 months ago
CC:
chromium-reviews, ojan+watch_chromium.org, szager+layoutwatch_chromium.org, glebl+reviews_chromium.org, zoltan1, blink-reviews-layout_chromium.org, pdr+renderingwatchlist_chromium.org, eae+blinkwatch, leviw+renderwatch, jchaffraix+rendering, blink-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[layoutng] Create correct constraint spaces for children This does a couple of things: - Rationalizes the constructors for the NGConstraintSpace. We need the following: - A constructor for use by the layout opportunity iterator. The only thing this constructor changes is the size and the offset: NGConstraintSpace(const NGConstraintSpace&, NGLogicalOffset, NGLogicalSize); - A constructor for use by layout algorithms, as a basis for finding layout opportunities. This should reset the offset, set the container size, writing mode and direction and reset the fixed size properties: NGConstraintSpace(NGWritingMode, NGDirection, const NGConstraintSpace&, NGLogicalSize); - A constructor for tests and the root constraint space: NGConstraintSpace(NGWritingMode, NGDirection, NGLogicalSize); - Makes sure to clamp inline and block sizes to zero after we subtract border and padding - Make sure not to subtract border and padding from an indefinite size R=eae@chromium.org, ikilpatrick@chromium.org, mstensho@opera.com BUG=635619 Committed: https://chromium.googlesource.com/chromium/src/+/761988cdc921282f5a7baa7e56b511456c4e1843

Patch Set 1 #

Total comments: 6

Patch Set 2 : review comments #

Patch Set 3 : fix assert failures #

Unified diffs Side-by-side diffs Delta from patch set Stats (+109 lines, -39 lines) Patch
M third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc View 1 1 chunk +12 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm_test.cc View 1 chunk +23 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_constraint_space.h View 1 chunk +13 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_constraint_space.cc View 3 chunks +12 lines, -14 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_length_utils.cc View 1 2 8 chunks +31 lines, -15 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_length_utils_test.cc View 1 2 chunks +18 lines, -0 lines 0 comments Download

Messages

Total messages: 23 (14 generated)
cbiesinger
4 years, 3 months ago (2016-09-19 22:21:55 UTC) #1
eae
LGTM w/nit https://codereview.chromium.org/2346403002/diff/1/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm_test.cc File third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm_test.cc (right): https://codereview.chromium.org/2346403002/diff/1/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm_test.cc#newcode426 third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm_test.cc:426: EXPECT_EQ(child->Width(), LayoutUnit(12)); You might want an EXPECT_EQ(frag->Children().size(), ...
4 years, 3 months ago (2016-09-20 08:09:38 UTC) #10
ikilpatrick
lgtm https://codereview.chromium.org/2346403002/diff/1/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc File third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc (right): https://codereview.chromium.org/2346403002/diff/1/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc#newcode52 third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc:52: if (adjusted_block_size != NGSizeIndefinite) { is a comment ...
4 years, 3 months ago (2016-09-20 10:47:10 UTC) #11
mstensho (USE GERRIT)
https://codereview.chromium.org/2346403002/diff/1/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc File third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc (right): https://codereview.chromium.org/2346403002/diff/1/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc#newcode46 third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc:46: (inline_size - border_and_padding_.InlineSum()).clampNegativeToZero(); Shouldn't computeInlineSizeForFragment() make sure that inline_size ...
4 years, 3 months ago (2016-09-20 11:30:17 UTC) #12
cbiesinger
https://codereview.chromium.org/2346403002/diff/1/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc File third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc (right): https://codereview.chromium.org/2346403002/diff/1/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc#newcode46 third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc:46: (inline_size - border_and_padding_.InlineSum()).clampNegativeToZero(); On 2016/09/20 11:30:17, mstensho wrote: > ...
4 years, 3 months ago (2016-09-20 13:43:37 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2346403002/20001
4 years, 3 months ago (2016-09-20 13:43:48 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2346403002/40001
4 years, 3 months ago (2016-09-20 14:54:46 UTC) #19
commit-bot: I haz the power
Patchset 3 (id:??) landed as https://crrev.com/761988cdc921282f5a7baa7e56b511456c4e1843 Cr-Commit-Position: refs/heads/master@{#419787}
4 years, 3 months ago (2016-09-20 16:30:32 UTC) #21
cbiesinger
4 years, 3 months ago (2016-09-20 16:31:36 UTC) #23
Message was sent while issue was closed.
Committed patchset #3 (id:40001) manually as
761988cdc921282f5a7baa7e56b511456c4e1843 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698