|
|
Created:
3 years, 11 months ago by Gleb Lanbin Modified:
3 years, 11 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, 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. |
DescriptionRewrite LayoutNG margin collapsing/floats unit tests
This patch rewrites PositionFloatFragments, CollapsingMarginsCase2WithFloats,
CollapsingMarginsCase1WithFloats and PositionFloatInsideEmptyBlocks(new).
Also it makes NGBlockLayoutAlgorithmTest to be based on RenderingTest. That
allows to use setBodyInnerHTML to set HTML representation of tests and enables
unittests to access old layout objects like FloatingObjects etc.
The tests that are being changed here are temporarily marked as DISABLED.
That's because the old tests are not fully correct. For the new float/margins
collapsing algorithm these new tests will set correct expectations and will
be enabled once the new code checked in.
BUG=635619
Review-Url: https://codereview.chromium.org/2641253002
Cr-Commit-Position: refs/heads/master@{#445900}
Committed: https://chromium.googlesource.com/chromium/src/+/59c1ac58a65bb815893621feb68fe228e051a2b4
Patch Set 1 #Patch Set 2 : git rebase-update #
Total comments: 4
Patch Set 3 : git rebase-update + more tests #
Total comments: 4
Patch Set 4 : fix comments #
Messages
Total messages: 37 (27 generated)
glebl@chromium.org changed reviewers: + ikilpatrick@chromium.org
On 2017/01/19 22:21:25, Gleb Lanbin wrote: this patch is based on http://crrev.com/2642823008(on review).
The CQ bit was checked by glebl@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: android_compile_dbg on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_comp...) android_cronet on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_cron...) cast_shell_android on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/cast_shell_a...) linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_androi...)
tests look good, can i have one last look after you rebase? https://codereview.chromium.org/2641253002/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm_test.cc (right): https://codereview.chromium.org/2641253002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm_test.cc:201: " height: 200px;" remove. https://codereview.chromium.org/2641253002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm_test.cc:243: int float_child_left_block_offset = first_child_block_offset + 10; is this wrong? it's position is based for containers padding, and its margins.
PTAL https://codereview.chromium.org/2641253002/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm_test.cc (right): https://codereview.chromium.org/2641253002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm_test.cc:201: " height: 200px;" On 2017/01/23 23:26:50, ikilpatrick wrote: > remove. Done. https://codereview.chromium.org/2641253002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm_test.cc:243: int float_child_left_block_offset = first_child_block_offset + 10; On 2017/01/23 23:26:50, ikilpatrick wrote: > is this wrong? it's position is based for containers padding, and its margins. I think, it's correct. Here is the layout tree representation produced by legacy code layer at (0,0) size 800x228 LayoutBlockFlow {HTML} at (0,0) size 800x228 LayoutBlockFlow {BODY} at (8,20) size 784x200 LayoutBlockFlow {DIV} at (0,0) size 214x200 [bgcolor=#FF0000] LayoutBlockFlow (floating) {DIV} at (17,10) size 30x30 [bgcolor=#008000] LayoutBlockFlow (floating) {DIV} at (177,0) size 30x30 [bgcolor=#FFC0CB] LayoutBlockFlow {DIV} at (7,0) size 200x10 [bgcolor=#0000FF] you can see that the first floating(#float-child-left) is positioned at body's offset 20 + float-child-left's margin 10.
The CQ bit was checked by glebl@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: android_arm64_dbg_recipe on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_arm6...) linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_androi...) linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) linux_chromium_compile_dbg_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
Patchset #3 (id:40001) has been deleted
The CQ bit was checked by glebl@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
lgtm https://codereview.chromium.org/2641253002/diff/60001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm_test.cc (right): https://codereview.chromium.org/2641253002/diff/60001/third_party/WebKit/Sour... third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm_test.cc:257: // The left float to be positioned at first-child's top. So I was more pushing back on the wording here, it's more positioned at the containers padding box. If that makes sense? (e.g. the position of the float doesn't depend on the first child). https://codereview.chromium.org/2641253002/diff/60001/third_party/WebKit/Sour... third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm_test.cc:263: // The right float to be positioned at first-child's top. and here.
Patchset #4 (id:80001) has been deleted
The CQ bit was checked by glebl@chromium.org to run a CQ dry run
https://codereview.chromium.org/2641253002/diff/60001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm_test.cc (right): https://codereview.chromium.org/2641253002/diff/60001/third_party/WebKit/Sour... third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm_test.cc:257: // The left float to be positioned at first-child's top. On 2017/01/24 22:05:37, ikilpatrick wrote: > So I was more pushing back on the wording here, it's more positioned at the > containers padding box. If that makes sense? > > (e.g. the position of the float doesn't depend on the first child). Done. https://codereview.chromium.org/2641253002/diff/60001/third_party/WebKit/Sour... third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm_test.cc:263: // The right float to be positioned at first-child's top. On 2017/01/24 22:05:37, ikilpatrick wrote: > and here. Done.
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_androi...)
The CQ bit was checked by glebl@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by glebl@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from ikilpatrick@chromium.org Link to the patchset: https://codereview.chromium.org/2641253002/#ps100001 (title: "fix comments")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
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_presub...)
The CQ bit was checked by glebl@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 100001, "attempt_start_ts": 1485307324905650, "parent_rev": "9c67bca9e430b4f5b4f9810d9fa414dbe90dab3e", "commit_rev": "59c1ac58a65bb815893621feb68fe228e051a2b4"}
Message was sent while issue was closed.
Description was changed from ========== Rewrite LayoutNG margin collapsing/floats unit tests This patch rewrites PositionFloatFragments, CollapsingMarginsCase2WithFloats, CollapsingMarginsCase1WithFloats and PositionFloatInsideEmptyBlocks(new). Also it makes NGBlockLayoutAlgorithmTest to be based on RenderingTest. That allows to use setBodyInnerHTML to set HTML representation of tests and enables unittests to access old layout objects like FloatingObjects etc. The tests that are being changed here are temporarily marked as DISABLED. That's because the old tests are not fully correct. For the new float/margins collapsing algorithm these new tests will set correct expectations and will be enabled once the new code checked in. BUG=635619 ========== to ========== Rewrite LayoutNG margin collapsing/floats unit tests This patch rewrites PositionFloatFragments, CollapsingMarginsCase2WithFloats, CollapsingMarginsCase1WithFloats and PositionFloatInsideEmptyBlocks(new). Also it makes NGBlockLayoutAlgorithmTest to be based on RenderingTest. That allows to use setBodyInnerHTML to set HTML representation of tests and enables unittests to access old layout objects like FloatingObjects etc. The tests that are being changed here are temporarily marked as DISABLED. That's because the old tests are not fully correct. For the new float/margins collapsing algorithm these new tests will set correct expectations and will be enabled once the new code checked in. BUG=635619 Review-Url: https://codereview.chromium.org/2641253002 Cr-Commit-Position: refs/heads/master@{#445900} Committed: https://chromium.googlesource.com/chromium/src/+/59c1ac58a65bb815893621feb68f... ==========
Message was sent while issue was closed.
Committed patchset #4 (id:100001) as https://chromium.googlesource.com/chromium/src/+/59c1ac58a65bb815893621feb68f... |