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

Issue 2525033002: Deprecate NGPhysicalConstraintSpace (Closed)

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

Description

Deprecate NGPhysicalConstraintSpace This patch deprecates NGPhysicalConstraintSpace and changes the LayoutNG code to use NGConstraintSpace and its builder everywhere instead. List of changes: 1) NGConstraintSpaceBuilder::ToConstraintSpace returns NGConstraintSpace 2) NGPhysicalConstraintSpace is removed 3) Introduced NGExclusions to store the list of exclusions and last left/right floating exclusions. 4) NGConstraintSpace constructor is moved to private, so NGConstraintSpace can be only created via its builder. 5) Switching between inline/block happens in NGConstraintSpaceBuilder::ToConstraintSpace 6) Exclusions is shared with shared_ptr. A new exclusions list is created if there is no parent_space or when a new FC is established. BUG=635619 Committed: https://crrev.com/3d12834fa3981ef5f09b4c207c7cc17c56f5069f Cr-Commit-Position: refs/heads/master@{#435712}

Patch Set 1 #

Total comments: 12

Patch Set 2 : delete leftover setters #

Total comments: 4

Patch Set 3 : Set the correct exclusion list for each child #

Total comments: 8

Patch Set 4 : fixed a bit more comments #

Patch Set 5 : git rebase-update #

Patch Set 6 : add copy constructor and assignment operator to make win_clang happy #

Patch Set 7 : git rebase-update #

Patch Set 8 : update TestExpectations #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+339 lines, -472 lines) Patch
M third_party/WebKit/LayoutTests/TestExpectations View 1 2 3 4 5 6 7 1 chunk +5 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/layout/BUILD.gn View 1 2 3 4 5 6 1 chunk +0 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_absolute_utils_test.cc View 1 2 3 4 5 6 7 1 chunk +13 lines, -12 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc View 1 2 3 4 5 6 7 3 chunks +4 lines, -13 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm_test.cc View 1 2 3 4 5 6 2 chunks +13 lines, -13 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_block_node.cc View 1 2 3 4 5 6 2 chunks +11 lines, -10 lines 2 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_constraint_space.h View 1 2 3 4 5 6 7 4 chunks +70 lines, -42 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_constraint_space.cc View 1 2 3 4 5 6 3 chunks +39 lines, -75 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_constraint_space_builder.h View 1 2 3 4 chunks +13 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_constraint_space_builder.cc View 1 2 3 4 5 6 7 3 chunks +65 lines, -21 lines 2 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_constraint_space_test.cc View 1 2 3 4 5 6 7 9 chunks +34 lines, -103 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_fragment_base.h View 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_inline_node.cc View 1 2 3 4 5 6 1 chunk +4 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_layout_opportunity_iterator.cc View 3 chunks +3 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_length_utils.cc View 1 2 3 4 5 6 2 chunks +11 lines, -12 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_length_utils_test.cc View 1 2 3 4 5 6 1 chunk +3 lines, -6 lines 0 comments Download
D third_party/WebKit/Source/core/layout/ng/ng_physical_constraint_space.h View 1 2 3 4 5 6 1 chunk +0 lines, -90 lines 0 comments Download
D third_party/WebKit/Source/core/layout/ng/ng_physical_constraint_space.cc View 1 2 3 4 5 6 1 chunk +0 lines, -48 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_units.h View 1 2 3 4 5 6 1 chunk +19 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_units.cc View 1 2 3 4 5 6 7 1 chunk +26 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/tests/NGInlineLayoutTest.cpp View 1 chunk +6 lines, -9 lines 0 comments Download

Messages

Total messages: 57 (39 generated)
Gleb Lanbin
4 years ago (2016-11-23 17:19:00 UTC) #3
ikilpatrick
very quick pass :) https://codereview.chromium.org/2525033002/diff/20001/third_party/WebKit/Source/core/layout/ng/ng_constraint_space.h File third_party/WebKit/Source/core/layout/ng/ng_constraint_space.h (right): https://codereview.chromium.org/2525033002/diff/20001/third_party/WebKit/Source/core/layout/ng/ng_constraint_space.h#newcode94 third_party/WebKit/Source/core/layout/ng/ng_constraint_space.h:94: bool SetIsInlineDirectionTriggersScrollbar( we don't need ...
4 years ago (2016-11-23 17:40:38 UTC) #9
Gleb Lanbin
https://codereview.chromium.org/2525033002/diff/20001/third_party/WebKit/Source/core/layout/ng/ng_constraint_space.h File third_party/WebKit/Source/core/layout/ng/ng_constraint_space.h (right): https://codereview.chromium.org/2525033002/diff/20001/third_party/WebKit/Source/core/layout/ng/ng_constraint_space.h#newcode94 third_party/WebKit/Source/core/layout/ng/ng_constraint_space.h:94: bool SetIsInlineDirectionTriggersScrollbar( On 2016/11/23 17:40:38, ikilpatrick wrote: > we ...
4 years ago (2016-11-23 18:59:50 UTC) #10
ikilpatrick
https://codereview.chromium.org/2525033002/diff/40001/third_party/WebKit/Source/core/layout/ng/ng_constraint_space_builder.cc File third_party/WebKit/Source/core/layout/ng/ng_constraint_space_builder.cc (right): https://codereview.chromium.org/2525033002/diff/40001/third_party/WebKit/Source/core/layout/ng/ng_constraint_space_builder.cc#newcode93 third_party/WebKit/Source/core/layout/ng/ng_constraint_space_builder.cc:93: exclusions_.reset(new NGExclusions()); you'll want to do this when you ...
4 years ago (2016-11-23 20:05:25 UTC) #15
Gleb Lanbin
thanks. PTAL https://codereview.chromium.org/2525033002/diff/40001/third_party/WebKit/Source/core/layout/ng/ng_constraint_space_builder.cc File third_party/WebKit/Source/core/layout/ng/ng_constraint_space_builder.cc (right): https://codereview.chromium.org/2525033002/diff/40001/third_party/WebKit/Source/core/layout/ng/ng_constraint_space_builder.cc#newcode93 third_party/WebKit/Source/core/layout/ng/ng_constraint_space_builder.cc:93: exclusions_.reset(new NGExclusions()); On 2016/11/23 20:05:24, ikilpatrick wrote: ...
4 years ago (2016-11-28 23:55:00 UTC) #17
ikilpatrick
\o/ lgtm https://codereview.chromium.org/2525033002/diff/80001/third_party/WebKit/Source/core/layout/ng/ng_constraint_space.h File third_party/WebKit/Source/core/layout/ng/ng_constraint_space.h (right): https://codereview.chromium.org/2525033002/diff/80001/third_party/WebKit/Source/core/layout/ng/ng_constraint_space.h#newcode73 third_party/WebKit/Source/core/layout/ng/ng_constraint_space.h:73: void SetOffset(const NGLogicalOffset& offset) { offset_ = ...
4 years ago (2016-11-29 00:10:28 UTC) #18
Gleb Lanbin
https://codereview.chromium.org/2525033002/diff/80001/third_party/WebKit/Source/core/layout/ng/ng_constraint_space.h File third_party/WebKit/Source/core/layout/ng/ng_constraint_space.h (right): https://codereview.chromium.org/2525033002/diff/80001/third_party/WebKit/Source/core/layout/ng/ng_constraint_space.h#newcode73 third_party/WebKit/Source/core/layout/ng/ng_constraint_space.h:73: void SetOffset(const NGLogicalOffset& offset) { offset_ = offset; } ...
4 years ago (2016-12-01 20:41:53 UTC) #35
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/2525033002/180001
4 years ago (2016-12-01 20:42:42 UTC) #38
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/316697)
4 years ago (2016-12-01 20:53:15 UTC) #40
Gleb Lanbin
4 years ago (2016-12-01 20:56:46 UTC) #42
Gleb Lanbin
4 years ago (2016-12-01 20:56:50 UTC) #43
Gleb Lanbin
On 2016/12/01 20:56:50, Gleb Lanbin wrote: Dirk, could you lgtm build.gn file?
4 years ago (2016-12-01 20:57:28 UTC) #44
Dirk Pranke
lgtm
4 years ago (2016-12-01 20:59:16 UTC) #45
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/2525033002/180001
4 years ago (2016-12-01 21:01:45 UTC) #47
commit-bot: I haz the power
Committed patchset #8 (id:180001)
4 years ago (2016-12-01 21:09:46 UTC) #50
cbiesinger
https://codereview.chromium.org/2525033002/diff/180001/third_party/WebKit/Source/core/layout/ng/ng_block_node.cc File third_party/WebKit/Source/core/layout/ng/ng_block_node.cc (right): https://codereview.chromium.org/2525033002/diff/180001/third_party/WebKit/Source/core/layout/ng/ng_block_node.cc#newcode100 third_party/WebKit/Source/core/layout/ng/ng_block_node.cc:100: // TODO(layoutng): Use builder.ToConstraintSpace.ToLogicalConstraintSpace This TODO can be removed ...
4 years ago (2016-12-01 21:11:37 UTC) #52
commit-bot: I haz the power
Patchset 8 (id:??) landed as https://crrev.com/3d12834fa3981ef5f09b4c207c7cc17c56f5069f Cr-Commit-Position: refs/heads/master@{#435712}
4 years ago (2016-12-01 21:11:58 UTC) #54
Gleb Lanbin
4 years ago (2016-12-05 17:46:53 UTC) #55
Message was sent while issue was closed.
https://codereview.chromium.org/2525033002/diff/180001/third_party/WebKit/Sou...
File third_party/WebKit/Source/core/layout/ng/ng_block_node.cc (right):

https://codereview.chromium.org/2525033002/diff/180001/third_party/WebKit/Sou...
third_party/WebKit/Source/core/layout/ng/ng_block_node.cc:100: //
TODO(layoutng): Use builder.ToConstraintSpace.ToLogicalConstraintSpace
On 2016/12/01 21:11:37, cbiesinger wrote:
> This TODO can be removed now.

done http://crrev.com/2557463002

https://codereview.chromium.org/2525033002/diff/180001/third_party/WebKit/Sou...
File third_party/WebKit/Source/core/layout/ng/ng_constraint_space_builder.cc
(right):

https://codereview.chromium.org/2525033002/diff/180001/third_party/WebKit/Sou...
third_party/WebKit/Source/core/layout/ng/ng_constraint_space_builder.cc:15:
is_fixed_size_inline_(false),
On 2016/12/01 21:11:37, cbiesinger wrote:
> Why not copy these values? This isn't really a "parent" space in the callers,
is
> it? This constructor is just used to flip the writing modes, and thus should
> copy everything, no?

per Ian's comment from https://codereview.chromium.org/2525033002/#msg35 this
was changed to use the default values

Powered by Google App Engine
This is Rietveld 408576698