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 2679343004: Add left_offset to NGFloatingObject and set it on legacy FloatingObject (Closed)

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

Description

Add left_offset to NGFloatingObject and set it on legacy FloatingObject This patch adds the support of the next use case: When a float are surrounded by a bunch of empty divs we attach it to the next in-flow child that can determine its position in space. We need to copy 2 offsets to the legacy tree: 1) Float's LayoutObject offset relative to its gunuine parent 2) Float's FloatingObject offset relative to its real parent so BlockFlowPainter can paint it correctly List of changes: - Add left_offset to NGFloatingObject. This will be set to FloatingObject - Add parent_space to NGFloatingObject. This is used to calculate offset relative to the genuine parent. - PositionFloat uses origin_point/from_offset with inline_offset that comes from float's and float's parent constraint spaces. - Enable NGBlockLayoutAlgorithmTest::PositionFloatInsideEmptyBlocks BUG=635619 TEST=NGBlockLayoutAlgorithmTest::PositionFloatInsideEmptyBlocks Review-Url: https://codereview.chromium.org/2679343004 Cr-Commit-Position: refs/heads/master@{#449774} Committed: https://chromium.googlesource.com/chromium/src/+/57ac6dc1c5b8d3ffa431bc641a6ccab3200751d3

Patch Set 1 #

Total comments: 6

Patch Set 2 : fix comments #

Total comments: 8

Patch Set 3 : fix comments #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+78 lines, -28 lines) Patch
M third_party/WebKit/LayoutTests/TestExpectations View 1 2 2 chunks +3 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc View 1 2 9 chunks +49 lines, -16 lines 6 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm_test.cc View 2 chunks +3 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_block_node.cc View 2 chunks +3 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_floating_object.h View 1 2 2 chunks +20 lines, -1 line 0 comments Download

Messages

Total messages: 28 (17 generated)
Gleb Lanbin
3 years, 10 months ago (2017-02-08 21:05:28 UTC) #3
cbiesinger
It seems you're mixing left and inline in this patch. Doesn't this cause wrong results ...
3 years, 10 months ago (2017-02-08 22:39:01 UTC) #6
Gleb Lanbin
PTAL https://codereview.chromium.org/2679343004/diff/20001/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/2679343004/diff/20001/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc#newcode232 third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc:232: void UpdateFloatingObjectLeftOffset( On 2017/02/08 22:39:01, cbiesinger wrote: > ...
3 years, 10 months ago (2017-02-09 18:39:25 UTC) #9
ikilpatrick
https://codereview.chromium.org/2679343004/diff/40001/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 (left): https://codereview.chromium.org/2679343004/diff/40001/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc#oldcode778 third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc:778: if (ConstraintSpace().IsNewFormattingContext()) { I assume this was intentional? Don't ...
3 years, 10 months ago (2017-02-10 01:53:42 UTC) #14
Gleb Lanbin
https://codereview.chromium.org/2679343004/diff/40001/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 (left): https://codereview.chromium.org/2679343004/diff/40001/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc#oldcode778 third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc:778: if (ConstraintSpace().IsNewFormattingContext()) { On 2017/02/10 01:53:41, ikilpatrick wrote: > ...
3 years, 10 months ago (2017-02-10 20:11:12 UTC) #17
ikilpatrick
lgtm https://codereview.chromium.org/2679343004/diff/60001/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/2679343004/diff/60001/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc#newcode229 third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc:229: void UpdateFloatingObjectLeftOffset( i find this a little weird ...
3 years, 10 months ago (2017-02-10 22:43:42 UTC) #20
ikilpatrick
lgtm
3 years, 10 months ago (2017-02-10 22:43:44 UTC) #21
Gleb Lanbin
thanks for the review https://codereview.chromium.org/2679343004/diff/60001/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/2679343004/diff/60001/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc#newcode229 third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc:229: void UpdateFloatingObjectLeftOffset( On 2017/02/10 22:43:42, ...
3 years, 10 months ago (2017-02-10 22:58:39 UTC) #22
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/2679343004/60001
3 years, 10 months ago (2017-02-10 22:59:18 UTC) #24
ikilpatrick
https://codereview.chromium.org/2679343004/diff/60001/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/2679343004/diff/60001/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc#newcode229 third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc:229: void UpdateFloatingObjectLeftOffset( On 2017/02/10 22:58:39, Gleb Lanbin wrote: > ...
3 years, 10 months ago (2017-02-10 23:01:40 UTC) #25
commit-bot: I haz the power
3 years, 10 months ago (2017-02-10 23:04:23 UTC) #28
Message was sent while issue was closed.
Committed patchset #3 (id:60001) as
https://chromium.googlesource.com/chromium/src/+/57ac6dc1c5b8d3ffa431bc641a6c...

Powered by Google App Engine
This is Rietveld 408576698