|
|
Chromium Code Reviews|
Created:
3 years, 8 months ago by facetothefate Modified:
3 years, 7 months ago CC:
chromium-reviews, pdr+renderingwatchlist_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. |
DescriptionResolve inline margins in over-constrained situations correctly.
In regular block layout, the width of a child's margin box should always
be equal to that of its containing block.
BUG=708751
Review-Url: https://codereview.chromium.org/2841823006
Cr-Commit-Position: refs/heads/master@{#472619}
Committed: https://chromium.googlesource.com/chromium/src/+/34d81295269809c64d9e12a5921db3ada416a043
Patch Set 1 : In regular block layout, the width of a child's margin box should always be equal to that of its containing block #
Total comments: 1
Patch Set 2 : In regular block layout, the width of a child's margin box should always be equal to that of its containing block #
Total comments: 2
Patch Set 3 : In regular block layout, the width of a child's margin box should always be equal to that of its co… #Patch Set 4 : In regular block layout, the width of a child's margin box should always be equal to that of its co… #Patch Set 5 : In regular block layout, the width of a child's margin box should always be equal to that of its co… #Patch Set 6 : In regular block layout, the width of a child's margin box should always be equal to that of its co… #Patch Set 7 : In regular block layout, the width of a child's margin box should always be equal to that of its co… #
Total comments: 2
Patch Set 8 : Resolve inline margins in over-constrained situations correctly. #Patch Set 9 : Resolve inline margins in over-constrained situations correctly. #Patch Set 10 : Resolve inline margins in over-constrained situations correctly. #
Messages
Total messages: 56 (27 generated)
wangxianzhu@chromium.org changed reviewers: + mstensho@opera.com, wangxianzhu@chromium.org
facetothefate@gmail.com, thanks for the change. Please add a test for the change in LayoutBoxTest.cpp. +mstensho@opera.com for review.
== no need to do the following, the old behavior is only happen > or < https://codereview.chromium.org/2841823006/diff/1/third_party/WebKit/Source/c... File third_party/WebKit/Source/core/layout/LayoutBox.cpp (right): https://codereview.chromium.org/2841823006/diff/1/third_party/WebKit/Source/c... third_party/WebKit/Source/core/layout/LayoutBox.cpp:2713: container_logical_width >= To keep the old behavior, should be > I guess
I reviewed this, and then realized that the bug may actually be invalid. Let's discuss that in the bug report. We can get back to this CL if we end up agreeing that the bug is actually valid after all. https://codereview.chromium.org/2841823006/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/layout/LayoutBox.cpp (right): https://codereview.chromium.org/2841823006/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/core/layout/LayoutBox.cpp:2711: // width >= children width You could remove that last sentence (or at least write "width > children width"). https://codereview.chromium.org/2841823006/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/layout/LayoutBoxTest.cpp (right): https://codereview.chromium.org/2841823006/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/core/layout/LayoutBoxTest.cpp:266: TEST_F(LayoutBoxTest, ChildWidthBiggerThanParentAutoMarign) { *Margin* But I really wonder if you could write a LayoutTest instead. LayoutTests/fast/block/ is probably a suitable home for it. This isn't really a unit test, and besides, if you write a LayoutTest, it will also be testable in the upcoming layout engine (NG). It should be possible to use getComputedStyle(target).marginRight I see that this is your first commit ever (Welcome!), so if you wonder how we prefer layout tests to be written these days, you can for example take a look at LayoutTests/fast/block/scrollbar-wider-than-border-box.html Bonus point if you also write an additional test for direction:rtl and margin-left. :)
Thanks, I'd like to be a part-time chromium developer. Let met introduce myself a little bit: I am currently a senior software engineer in Juniper Networks. I am a full stack developer, I wrote code from front end to back end and also to the router and OS. I will just contruibute code on behalf myself. I will take a look about how to write down the layout test, thanks! Will upload a new change set later, cause I found a new issue. Zhifei Fang 方之斐[image: View Zhifei Fang's LinkedIn profile]View Zhifei Fang's profile <http://ca.linkedin.com/in/zhifeifang> <http://thefaceteam.org/> 2017-04-27 8:37 GMT-04:00 <mstensho@opera.com>: > I reviewed this, and then realized that the bug may actually be invalid. > Let's > discuss that in the bug report. We can get back to this CL if we end up > agreeing > that the bug is actually valid after all. > > > https://codereview.chromium.org/2841823006/diff/20001/ > third_party/WebKit/Source/core/layout/LayoutBox.cpp > File third_party/WebKit/Source/core/layout/LayoutBox.cpp (right): > > https://codereview.chromium.org/2841823006/diff/20001/ > third_party/WebKit/Source/core/layout/LayoutBox.cpp#newcode2711 > third_party/WebKit/Source/core/layout/LayoutBox.cpp:2711: // width >= > children width > You could remove that last sentence (or at least write "width > children > width"). > > https://codereview.chromium.org/2841823006/diff/20001/ > third_party/WebKit/Source/core/layout/LayoutBoxTest.cpp > File third_party/WebKit/Source/core/layout/LayoutBoxTest.cpp (right): > > https://codereview.chromium.org/2841823006/diff/20001/ > third_party/WebKit/Source/core/layout/LayoutBoxTest.cpp#newcode266 > third_party/WebKit/Source/core/layout/LayoutBoxTest.cpp:266: > TEST_F(LayoutBoxTest, ChildWidthBiggerThanParentAutoMarign) { > *Margin* > > But I really wonder if you could write a LayoutTest instead. > LayoutTests/fast/block/ is probably a suitable home for it. This isn't > really a unit test, and besides, if you write a LayoutTest, it will also > be testable in the upcoming layout engine (NG). > > It should be possible to use getComputedStyle(target).marginRight > > I see that this is your first commit ever (Welcome!), so if you wonder > how we prefer layout tests to be written these days, you can for example > take a look at > LayoutTests/fast/block/scrollbar-wider-than-border-box.html > > Bonus point if you also write an additional test for direction:rtl and > margin-left. :) > > https://codereview.chromium.org/2841823006/ > -- You received this message because you are subscribed to the Google Groups "Blink Reviews" group. To unsubscribe from this group and stop receiving emails from it, send an email to blink-reviews+unsubscribe@chromium.org.
Thanks, I'd like to be a part-time chromium developer. Let met introduce myself a little bit: I am currently a senior software engineer in Juniper Networks. I am a full stack developer, I wrote code from front end to back end and also to the router and OS. I will just contruibute code on behalf myself. I will take a look about how to write down the layout test, thanks! Will upload a new change set later, cause I found a new issue. Zhifei Fang 方之斐[image: View Zhifei Fang's LinkedIn profile]View Zhifei Fang's profile <http://ca.linkedin.com/in/zhifeifang> <http://thefaceteam.org/> 2017-04-27 8:37 GMT-04:00 <mstensho@opera.com>: > I reviewed this, and then realized that the bug may actually be invalid. > Let's > discuss that in the bug report. We can get back to this CL if we end up > agreeing > that the bug is actually valid after all. > > > https://codereview.chromium.org/2841823006/diff/20001/ > third_party/WebKit/Source/core/layout/LayoutBox.cpp > File third_party/WebKit/Source/core/layout/LayoutBox.cpp (right): > > https://codereview.chromium.org/2841823006/diff/20001/ > third_party/WebKit/Source/core/layout/LayoutBox.cpp#newcode2711 > third_party/WebKit/Source/core/layout/LayoutBox.cpp:2711: // width >= > children width > You could remove that last sentence (or at least write "width > children > width"). > > https://codereview.chromium.org/2841823006/diff/20001/ > third_party/WebKit/Source/core/layout/LayoutBoxTest.cpp > File third_party/WebKit/Source/core/layout/LayoutBoxTest.cpp (right): > > https://codereview.chromium.org/2841823006/diff/20001/ > third_party/WebKit/Source/core/layout/LayoutBoxTest.cpp#newcode266 > third_party/WebKit/Source/core/layout/LayoutBoxTest.cpp:266: > TEST_F(LayoutBoxTest, ChildWidthBiggerThanParentAutoMarign) { > *Margin* > > But I really wonder if you could write a LayoutTest instead. > LayoutTests/fast/block/ is probably a suitable home for it. This isn't > really a unit test, and besides, if you write a LayoutTest, it will also > be testable in the upcoming layout engine (NG). > > It should be possible to use getComputedStyle(target).marginRight > > I see that this is your first commit ever (Welcome!), so if you wonder > how we prefer layout tests to be written these days, you can for example > take a look at > LayoutTests/fast/block/scrollbar-wider-than-border-box.html > > Bonus point if you also write an additional test for direction:rtl and > margin-left. :) > > https://codereview.chromium.org/2841823006/ > -- You received this message because you are subscribed to the Google Groups "Chromium-reviews" group. To unsubscribe from this group and stop receiving emails from it, send an email to chromium-reviews+unsubscribe@chromium.org.
I'll review this as soon as I can. Sorry about the delay. In the meantime, could you please update the commit comment? You need to it here in the web UI. Uploading patch sets doesn't change the final commit message (and it looks to me that you attempted to change it that way).
The CQ bit was checked by facetothefate@gmail.com 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: No L-G-T-M from a valid reviewer yet. CQ run can only be started once the patch has received an L-G-T-M from a full committer. Even if an L-G-T-M may have been provided, it was from a non-committer,_not_ a full super star committer. Committers are members of the group "project-chromium-committers". Note that this has nothing to do with OWNERS files.
I think the code changes look mighty good, but you need to update the commit message and get rid of the unit tests. If you feel that you need better test coverage, please add more LayoutTests. https://codereview.chromium.org/2841823006/diff/120001/third_party/WebKit/Sou... File third_party/WebKit/Source/core/layout/LayoutBoxTest.cpp (right): https://codereview.chromium.org/2841823006/diff/120001/third_party/WebKit/Sou... third_party/WebKit/Source/core/layout/LayoutBoxTest.cpp:266: TEST_F(LayoutBoxTest, OverConstrainedAutoMarginLtr) { Let's use LayoutTests only for this.
The CQ bit was unchecked by facetothefate@gmail.com
The CQ bit was checked by facetothefate@gmail.com
The CQ bit was unchecked by facetothefate@gmail.com
https://codereview.chromium.org/2841823006/diff/120001/third_party/WebKit/Sou... File third_party/WebKit/Source/core/layout/LayoutBoxTest.cpp (right): https://codereview.chromium.org/2841823006/diff/120001/third_party/WebKit/Sou... third_party/WebKit/Source/core/layout/LayoutBoxTest.cpp:266: TEST_F(LayoutBoxTest, OverConstrainedAutoMarginLtr) { On 2017/05/12 11:07:20, mstensho wrote: > Let's use LayoutTests only for this. Acknowledged.
Description was changed from ========== Fix child auto margin right is not 0 when child width bigger than parent width BUG=708751 ========== to ========== In regular block layout, the width of a child's margin box should always be equal to that of its containing block BUG=708751 ==========
Commit comments usually go like this: " Short description on one line. <blank line> More elaborate description, on as many lines as needed, divided into paragraphs separated by blank lines, if necessary. <blank line> BUG=xxxx " We usually wrap lines at 80 chars (or even slightly less). It looks like the first line is too wide (even the review tool truncated it). I'd do something like this, maybe (find a shorter title): " Resolve inline margins in over-constrained situations correctly. In regular block layout, the width of a child's margin box should always be equal to that of its containing block. BUG=708751 "
Got it.! <mstensho@opera.com>于2017年5月12日周五 14:24写道: > Commit comments usually go like this: > > " > Short description on one line. > <blank line> > More elaborate description, on as many lines as needed, divided into > paragraphs separated by blank lines, if necessary. > <blank line> > BUG=xxxx > " > > We usually wrap lines at 80 chars (or even slightly less). > It looks like the first line is too wide (even the review tool truncated > it). > I'd do something like this, maybe (find a shorter title): > > " > Resolve inline margins in over-constrained situations correctly. > > In regular block layout, the width of a child's margin box should always > be equal to that of its containing block. > > BUG=708751 > " > > https://codereview.chromium.org/2841823006/ > -- You received this message because you are subscribed to the Google Groups "Blink Reviews" group. To unsubscribe from this group and stop receiving emails from it, send an email to blink-reviews+unsubscribe@chromium.org.
Got it.! <mstensho@opera.com>于2017年5月12日周五 14:24写道: > Commit comments usually go like this: > > " > Short description on one line. > <blank line> > More elaborate description, on as many lines as needed, divided into > paragraphs separated by blank lines, if necessary. > <blank line> > BUG=xxxx > " > > We usually wrap lines at 80 chars (or even slightly less). > It looks like the first line is too wide (even the review tool truncated > it). > I'd do something like this, maybe (find a shorter title): > > " > Resolve inline margins in over-constrained situations correctly. > > In regular block layout, the width of a child's margin box should always > be equal to that of its containing block. > > BUG=708751 > " > > https://codereview.chromium.org/2841823006/ > -- You received this message because you are subscribed to the Google Groups "Chromium-reviews" group. To unsubscribe from this group and stop receiving emails from it, send an email to chromium-reviews+unsubscribe@chromium.org.
Description was changed from ========== In regular block layout, the width of a child's margin box should always be equal to that of its containing block BUG=708751 ========== to ========== Resolve inline margins in over-constrained situations correctly. In regular block layout, the width of a child's margin box should always be equal to that of its containing block. BUG=708751 ==========
On 2017/05/12 18:24:59, mstensho wrote: > Commit comments usually go like this: > > " > Short description on one line. > <blank line> > More elaborate description, on as many lines as needed, divided into > paragraphs separated by blank lines, if necessary. > <blank line> > BUG=xxxx > " > > We usually wrap lines at 80 chars (or even slightly less). > It looks like the first line is too wide (even the review tool truncated it). > I'd do something like this, maybe (find a shorter title): > > " > Resolve inline margins in over-constrained situations correctly. > > In regular block layout, the width of a child's margin box should always > be equal to that of its containing block. > > BUG=708751 > " Hi, I haven't found the layoutTest class, so I just remove them, just use the html I think should be fine
lgtm - this is ready for landing (but you probably need to rebase first), if you have completed your CLA paperwork with Google.
The CQ bit was checked by facetothefate@gmail.com
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: android_arm64_dbg_recipe on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_arm6...) mac_chromium_compile_dbg_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_comp...) mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_...)
Will rebase when I home Zhifei Fang 方之斐[image: View Zhifei Fang's LinkedIn profile]View Zhifei Fang's profile <http://ca.linkedin.com/in/zhifeifang> <http://thefaceteam.org/> 2017-05-16 15:00 GMT-04:00 commit-bot@chromium.org via codereview.chromium.org <reply@chromiumcodereview-hr.appspotmail.com>: > 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_arm64_dbg_recipe/builds/269383) > mac_chromium_compile_dbg_ng on master.tryserver.chromium.mac (JOB_FAILED, > http://build.chromium.org/p/tryserver.chromium.mac/ > builders/mac_chromium_compile_dbg_ng/builds/420353) > mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, > http://build.chromium.org/p/tryserver.chromium.mac/ > builders/mac_chromium_rel_ng/builds/455092) > > https://codereview.chromium.org/2841823006/ > -- You received this message because you are subscribed to the Google Groups "Blink Reviews" group. To unsubscribe from this group and stop receiving emails from it, send an email to blink-reviews+unsubscribe@chromium.org.
Will rebase when I home Zhifei Fang 方之斐[image: View Zhifei Fang's LinkedIn profile]View Zhifei Fang's profile <http://ca.linkedin.com/in/zhifeifang> <http://thefaceteam.org/> 2017-05-16 15:00 GMT-04:00 commit-bot@chromium.org via codereview.chromium.org <reply@chromiumcodereview-hr.appspotmail.com>: > 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_arm64_dbg_recipe/builds/269383) > mac_chromium_compile_dbg_ng on master.tryserver.chromium.mac (JOB_FAILED, > http://build.chromium.org/p/tryserver.chromium.mac/ > builders/mac_chromium_compile_dbg_ng/builds/420353) > mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, > http://build.chromium.org/p/tryserver.chromium.mac/ > builders/mac_chromium_rel_ng/builds/455092) > > https://codereview.chromium.org/2841823006/ > -- You received this message because you are subscribed to the Google Groups "Chromium-reviews" group. To unsubscribe from this group and stop receiving emails from it, send an email to chromium-reviews+unsubscribe@chromium.org.
The CQ bit was checked by facetothefate@gmail.com
The patchset sent to the CQ was uploaded after l-g-t-m from mstensho@opera.com Link to the patchset: https://codereview.chromium.org/2841823006/#ps160001 (title: "Resolve inline margins in over-constrained situations correctly.")
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: android_arm64_dbg_recipe on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_arm6...) android_clang_dbg_recipe on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_clan...) 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_linux on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linu...) 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-...) chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presub...) linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by facetothefate@gmail.com
The patchset sent to the CQ was uploaded after l-g-t-m from mstensho@opera.com Link to the patchset: https://codereview.chromium.org/2841823006/#ps180001 (title: "Resolve inline margins in over-constrained situations correctly.")
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: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by facetothefate@gmail.com
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: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by facetothefate@gmail.com
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: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by facetothefate@gmail.com
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: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by facetothefate@gmail.com
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": 180001, "attempt_start_ts": 1495060802464400,
"parent_rev": "47137024bf6d15127330336310406d3f27a3391a", "commit_rev":
"34d81295269809c64d9e12a5921db3ada416a043"}
Message was sent while issue was closed.
Description was changed from ========== Resolve inline margins in over-constrained situations correctly. In regular block layout, the width of a child's margin box should always be equal to that of its containing block. BUG=708751 ========== to ========== Resolve inline margins in over-constrained situations correctly. In regular block layout, the width of a child's margin box should always be equal to that of its containing block. BUG=708751 Review-Url: https://codereview.chromium.org/2841823006 Cr-Commit-Position: refs/heads/master@{#472619} Committed: https://chromium.googlesource.com/chromium/src/+/34d81295269809c64d9e12a5921d... ==========
Message was sent while issue was closed.
Committed patchset #10 (id:180001) as https://chromium.googlesource.com/chromium/src/+/34d81295269809c64d9e12a5921d... |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
