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

Issue 2850893003: Add container_block_offset,top_offset to NGFloatingObject. (Closed)

Created:
3 years, 7 months ago by Gleb Lanbin
Modified:
3 years, 7 months ago
Reviewers:
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/heads/master
Project:
chromium
Visibility:
Public.

Description

Add container_block_offset,top_offset to NGFloatingObject. To correctly paint a float from LayoutNG we need to know the BFC offset of the container to which we are attaching this float. It's used to calculate {@code left_offset}, {@code top_offset}. In most situations {@code (left|top)_offset} equals to float's logical offset except the cases where a float needs to be re-attached to a non-zero height parent. Example: <body> <p style="height: 60px">Example</p> <div id="zero-height-div"><float></div> Here the float's logical offset is 0 relative to its #zero-height-div parent. Because of the "zero height" div this float is re-attached to the 1st non-empty parent => body. To paint this float correctly we provide the modified {@code (top|left)_offset} which is relative to the float's new parent. I.e. for our example {@code top_offset} == #zero-height-div's BFC offset - body's BFC offset + float's logical offset BUG=635619 TESTS=Fixes 8 tests in CSS2/floats-clear, 1 in CSS2/floats, 1 in CSS2/positioning, 2 in fast/block/margin-collapse, 2 in fast/block/float. Total: 14 Review-Url: https://codereview.chromium.org/2850893003 Cr-Commit-Position: refs/heads/master@{#471134} Committed: https://chromium.googlesource.com/chromium/src/+/d2f276e5c8e098ab9cc16d77315a2475e94a2582

Patch Set 1 #

Total comments: 1

Patch Set 2 : fix merge conflicts #

Patch Set 3 : update TestExpectations #

Total comments: 6

Patch Set 4 : fix comments #

Patch Set 5 : add-inline-to-block-flow-with-block-children-that-do-not-need-anonymous-boxes.html is still broken #

Messages

Total messages: 62 (38 generated)
Gleb Lanbin
3 years, 7 months ago (2017-04-29 00:14:48 UTC) #2
ikilpatrick
lgtm https://codereview.chromium.org/2850893003/diff/1/third_party/WebKit/Source/core/layout/ng/ng_floating_object.h File third_party/WebKit/Source/core/layout/ng/ng_floating_object.h (right): https://codereview.chromium.org/2850893003/diff/1/third_party/WebKit/Source/core/layout/ng/ng_floating_object.h#newcode94 third_party/WebKit/Source/core/layout/ng/ng_floating_object.h:94: // would be attached. does this comment block ...
3 years, 7 months ago (2017-05-01 17:48:32 UTC) #7
ikilpatrick
lgtm https://codereview.chromium.org/2850893003/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 (right): https://codereview.chromium.org/2850893003/diff/40001/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc#newcode90 third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc:90: void PositionPendingFloatsFromOffset(LayoutUnit origin_block_offset, is it worth splitting this ...
3 years, 7 months ago (2017-05-09 22:45:23 UTC) #11
Gleb Lanbin
https://codereview.chromium.org/2850893003/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 (right): https://codereview.chromium.org/2850893003/diff/40001/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc#newcode90 third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc:90: void PositionPendingFloatsFromOffset(LayoutUnit origin_block_offset, On 2017/05/09 22:45:23, ikilpatrick wrote: > ...
3 years, 7 months ago (2017-05-09 23:12:07 UTC) #13
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/2850893003/80001
3 years, 7 months ago (2017-05-10 16:16:42 UTC) #23
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/450369)
3 years, 7 months ago (2017-05-10 18:35:35 UTC) #25
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/2850893003/80001
3 years, 7 months ago (2017-05-10 19:05:29 UTC) #27
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/450561)
3 years, 7 months ago (2017-05-10 21:13:24 UTC) #29
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/2850893003/80001
3 years, 7 months ago (2017-05-10 21:17:49 UTC) #31
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/450896)
3 years, 7 months ago (2017-05-10 23:38:19 UTC) #33
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/2850893003/80001
3 years, 7 months ago (2017-05-10 23:54:10 UTC) #35
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/451029)
3 years, 7 months ago (2017-05-11 03:04:34 UTC) #37
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/2850893003/80001
3 years, 7 months ago (2017-05-11 03:11:35 UTC) #39
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/451302)
3 years, 7 months ago (2017-05-11 05:34:18 UTC) #41
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/2850893003/80001
3 years, 7 months ago (2017-05-11 12:39:40 UTC) #43
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/451754)
3 years, 7 months ago (2017-05-11 15:03:42 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/2850893003/80001
3 years, 7 months ago (2017-05-11 15:57:36 UTC) #47
commit-bot: I haz the power
Try jobs failed on following builders: android_n5x_swarming_rel on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_n5x_swarming_rel/builds/176056)
3 years, 7 months ago (2017-05-11 17:30:17 UTC) #49
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/2850893003/80001
3 years, 7 months ago (2017-05-11 17:44:13 UTC) #51
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/452136)
3 years, 7 months ago (2017-05-11 19:48:20 UTC) #53
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/2850893003/80001
3 years, 7 months ago (2017-05-11 19:54:59 UTC) #55
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/452320)
3 years, 7 months ago (2017-05-11 22:51:49 UTC) #57
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/2850893003/80001
3 years, 7 months ago (2017-05-11 22:53:30 UTC) #59
commit-bot: I haz the power
3 years, 7 months ago (2017-05-12 00:12:49 UTC) #62
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as
https://chromium.googlesource.com/chromium/src/+/d2f276e5c8e098ab9cc16d77315a...

Powered by Google App Engine
This is Rietveld 408576698