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

Issue 2867243004: [LayoutNG] Delay layout of floats until fragmentation is known. (Closed)

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

Description

[LayoutNG] Delay layout of floats until fragmentation is known. There a quite a few related changes in this patch: - Renames NGFloatingObject -> NGUnpositionedFloat. - Additionally remove some additional fields now that we have the node. - Delays the layout of a same writing mode fragment until after we have positioned it. - Float which are in different writing modes have layout performed on them eagerly as they don't need to wait for their position to know their fragmentation offset. BUG=635619 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_layout_ng Review-Url: https://codereview.chromium.org/2867243004 Cr-Commit-Position: refs/heads/master@{#472623} Committed: https://chromium.googlesource.com/chromium/src/+/d1e715f97c48ae097e623c505f754a54ffdd3795

Patch Set 1 #

Patch Set 2 : MOAR. #

Patch Set 3 : tmp upload #

Patch Set 4 : rebase #

Patch Set 5 : moar. #

Patch Set 6 : rawr. #

Patch Set 7 : comments. #

Total comments: 36

Patch Set 8 : address comments. #

Total comments: 6

Patch Set 9 : address comments. #

Patch Set 10 : rework test. #

Patch Set 11 : fix DCHECK build. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+590 lines, -325 lines) Patch
M third_party/WebKit/Source/core/layout/BUILD.gn View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/ng/inline/ng_inline_layout_algorithm.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +18 lines, -38 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/inline/ng_inline_layout_algorithm_test.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/inline/ng_inline_node.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/inline/ng_inline_node_test.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/inline/ng_physical_line_box_fragment.cc View 1 2 3 4 5 6 7 1 chunk +0 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/inline/ng_physical_text_fragment.h View 1 2 3 4 5 6 7 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/ng/layout_ng_block_flow.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_base_layout_algorithm_test.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.h View 1 2 3 4 1 chunk +2 lines, -2 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 8 12 chunks +46 lines, -28 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 7 8 9 9 chunks +214 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_block_node.h View 1 2 3 4 5 6 7 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_block_node.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -2 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_box_fragment.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_constraint_space.h View 4 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_constraint_space.cc View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_constraint_space_builder.h View 3 chunks +3 lines, -3 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 8 1 chunk +1 line, -1 line 0 comments Download
D third_party/WebKit/Source/core/layout/ng/ng_floating_object.h View 1 2 1 chunk +0 lines, -115 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_floats_utils.h View 1 2 3 4 5 1 chunk +12 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_floats_utils.cc View 1 2 3 4 5 6 7 8 9 10 6 chunks +166 lines, -38 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_fragment.h View 1 2 3 4 5 6 7 2 chunks +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_fragment.cc View 1 2 3 4 5 6 7 8 9 2 chunks +7 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_fragment_builder.h View 1 2 3 4 5 6 7 4 chunks +8 lines, -10 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_fragment_builder.cc View 1 2 3 4 5 6 7 3 chunks +11 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_layout_opportunity_iterator.h View 1 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_layout_opportunity_iterator.cc View 1 2 3 4 5 6 7 1 chunk +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_layout_result.h View 1 2 3 4 5 6 7 3 chunks +6 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_layout_result.cc View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_out_of_flow_layout_part.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_out_of_flow_layout_part_test.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_physical_box_fragment.h View 1 2 3 4 5 6 7 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_physical_box_fragment.cc View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_positioned_float.h View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_space_utils.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
A + third_party/WebKit/Source/core/layout/ng/ng_unpositioned_float.h View 1 2 3 4 5 6 7 2 chunks +43 lines, -46 lines 0 comments Download
A third_party/WebKit/Source/core/layout/ng/ng_unpositioned_float.cc View 1 1 chunk +20 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/tests/NGInlineLayoutTest.cpp View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 40 (23 generated)
ikilpatrick
I wanted to get at least some barebones logic in for this just so we ...
3 years, 7 months ago (2017-05-12 23:43:58 UTC) #3
Gleb Lanbin
lgtm https://codereview.chromium.org/2867243004/diff/120001/third_party/WebKit/Source/core/layout/ng/ng_unpositioned_float.h File third_party/WebKit/Source/core/layout/ng/ng_unpositioned_float.h (right): https://codereview.chromium.org/2867243004/diff/120001/third_party/WebKit/Source/core/layout/ng/ng_unpositioned_float.h#newcode31 third_party/WebKit/Source/core/layout/ng/ng_unpositioned_float.h:31: NGBlockBreakToken* token) { should we make this optional?
3 years, 7 months ago (2017-05-15 17:38:19 UTC) #6
mstensho (USE GERRIT)
https://codereview.chromium.org/2867243004/diff/120001/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_layout_algorithm.cc File third_party/WebKit/Source/core/layout/ng/inline/ng_inline_layout_algorithm.cc (right): https://codereview.chromium.org/2867243004/diff/120001/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_layout_algorithm.cc#newcode369 third_party/WebKit/Source/core/layout/ng/inline/ng_inline_layout_algorithm.cc:369: bool float_does_not_fit = end_position + inline_size + margins.InlineSum() > ...
3 years, 7 months ago (2017-05-15 19:59:57 UTC) #7
ikilpatrick
Fwd declares - went down the rabbit hole of fixing a few includes. https://codereview.chromium.org/2867243004/diff/120001/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_layout_algorithm.cc File ...
3 years, 7 months ago (2017-05-16 05:02:27 UTC) #9
mstensho (USE GERRIT)
Awesome, thanks for the include fixes! This will reduce everyone's power bills. :) https://codereview.chromium.org/2867243004/diff/120001/third_party/WebKit/Source/core/layout/ng/ng_floats_utils.cc File ...
3 years, 7 months ago (2017-05-16 09:17:30 UTC) #10
ikilpatrick
https://codereview.chromium.org/2867243004/diff/120001/third_party/WebKit/Source/core/layout/ng/ng_floats_utils.cc File third_party/WebKit/Source/core/layout/ng/ng_floats_utils.cc (right): https://codereview.chromium.org/2867243004/diff/120001/third_party/WebKit/Source/core/layout/ng/ng_floats_utils.cc#newcode189 third_party/WebKit/Source/core/layout/ng/ng_floats_utils.cc:189: .InlineSize(); On 2017/05/16 09:17:30, mstensho wrote: > On 2017/05/16 ...
3 years, 7 months ago (2017-05-16 18:03:42 UTC) #11
ikilpatrick
sorry just uploaded the patch then.... was waiting for a description.
3 years, 7 months ago (2017-05-16 19:51:40 UTC) #12
mstensho (USE GERRIT)
So I still have ~one unresolved issue, but maybe you just want to land this ...
3 years, 7 months ago (2017-05-16 20:08:06 UTC) #13
ikilpatrick
Thanks, yeah I'll rework the current test to be forced down when it doesn't fit. ...
3 years, 7 months ago (2017-05-16 20:16:24 UTC) #14
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/2867243004/180001
3 years, 7 months ago (2017-05-17 04:09:12 UTC) #21
commit-bot: I haz the power
Try jobs failed on following builders: chromeos_amd64-generic_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_amd64-generic_chromium_compile_only_ng/builds/341185)
3 years, 7 months ago (2017-05-17 04:44:49 UTC) #23
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/2867243004/200001
3 years, 7 months ago (2017-05-17 18:34:45 UTC) #29
commit-bot: I haz the power
Try jobs failed on following builders: linux_layout_tests_layout_ng on master.tryserver.chromium.linux (JOB_TIMED_OUT, build has not started yet; ...
3 years, 7 months ago (2017-05-17 20:44:27 UTC) #31
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/2867243004/200001
3 years, 7 months ago (2017-05-17 22:00:38 UTC) #33
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/458169)
3 years, 7 months ago (2017-05-18 00:17:28 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/2867243004/200001
3 years, 7 months ago (2017-05-18 00:21:00 UTC) #37
commit-bot: I haz the power
3 years, 7 months ago (2017-05-18 01:39:55 UTC) #40
Message was sent while issue was closed.
Committed patchset #11 (id:200001) as
https://chromium.googlesource.com/chromium/src/+/d1e715f97c48ae097e623c505f75...

Powered by Google App Engine
This is Rietveld 408576698