|
|
Created:
4 years ago by atotic Modified:
4 years ago CC:
atotic+reviews_chromium.org, blink-reviews, blink-reviews-layout_chromium.org, cbiesinger, chromium-reviews, eae+blinkwatch, glebl+reviews_chromium.org, jchaffraix+rendering, leviw+renderwatch, ojan+watch_chromium.org, pdr+renderingwatchlist_chromium.org, szager+layoutwatch_chromium.org, zoltan1 Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionAdd StaticPosition to ComputeVertical/Horizontal
Static position part of https://codereview.chromium.org/2568743005
BUG=635619
Committed: https://crrev.com/2ac84260d9bd99d9e0f44616fbe2ad86ddbffe7e
Cr-Commit-Position: refs/heads/master@{#438375}
Patch Set 1 : Add StaticPosition to ComputeVertical/Horizontal #
Total comments: 10
Patch Set 2 : CR fixes #
Total comments: 2
Patch Set 3 : cr nit #
Total comments: 4
Patch Set 4 : CR fixes #
Messages
Total messages: 23 (10 generated)
Description was changed from ========== Add StaticPosition to ComputeVertical/Horizontal BUG=635619 ========== to ========== Add StaticPosition to ComputeVertical/Horizontal Static position part of https://codereview.chromium.org/2568743005 BUG=635619 ==========
atotic@chromium.org changed reviewers: + ikilpatrick@chromium.org
ptal
ikilpatrick@chromium.org changed reviewers: + cbiesinger@chromium.org
+christian, just some minor things :) https://codereview.chromium.org/2570593004/diff/1/third_party/WebKit/Source/c... File third_party/WebKit/Source/core/layout/ng/ng_units.h (right): https://codereview.chromium.org/2570593004/diff/1/third_party/WebKit/Source/c... third_party/WebKit/Source/core/layout/ng/ng_units.h:309: LayoutUnit GenericPosition(bool position_matches, can you move GenericPosition, IsTop, IsLeft to the bottom and bmake private: ? https://codereview.chromium.org/2570593004/diff/1/third_party/WebKit/Source/c... third_party/WebKit/Source/core/layout/ng/ng_units.h:321: DCHECK_GE(margin_end, LayoutUnit()); move these out of else? (should always be true?) up to you. Would just prefer to fail earlier in more cases here if that makes sense. https://codereview.chromium.org/2570593004/diff/1/third_party/WebKit/Source/c... third_party/WebKit/Source/core/layout/ng/ng_units.h:346: LayoutUnit BottomPosition(LayoutUnit container_size, i'd remove this if it isn't used.
looks reasonable in principle. two comments below, and I agree with Ian's comments as well. https://codereview.chromium.org/2570593004/diff/1/third_party/WebKit/Source/c... File third_party/WebKit/Source/core/layout/ng/ng_units.h (right): https://codereview.chromium.org/2570593004/diff/1/third_party/WebKit/Source/c... third_party/WebKit/Source/core/layout/ng/ng_units.h:307: bool IsTop() const { return type == kTopLeft || type == kTopRight; } Is -> Has, maybe? Since the type is a combination of two things, so Is seems not quite appropriate. https://codereview.chromium.org/2570593004/diff/1/third_party/WebKit/Source/c... third_party/WebKit/Source/core/layout/ng/ng_units.h:325: LayoutUnit LeftPosition(LayoutUnit container_size, I would add a comment describing all of these.
ptal https://codereview.chromium.org/2570593004/diff/1/third_party/WebKit/Source/c... File third_party/WebKit/Source/core/layout/ng/ng_units.h (right): https://codereview.chromium.org/2570593004/diff/1/third_party/WebKit/Source/c... third_party/WebKit/Source/core/layout/ng/ng_units.h:307: bool IsTop() const { return type == kTopLeft || type == kTopRight; } On 2016/12/13 at 18:35:05, cbiesinger wrote: > Is -> Has, maybe? Since the type is a combination of two things, so Is seems not quite appropriate. done. It does seem more fitting. https://codereview.chromium.org/2570593004/diff/1/third_party/WebKit/Source/c... third_party/WebKit/Source/core/layout/ng/ng_units.h:309: LayoutUnit GenericPosition(bool position_matches, On 2016/12/13 at 18:26:53, ikilpatrick wrote: > can you move GenericPosition, IsTop, IsLeft to the bottom and bmake private: ? done https://codereview.chromium.org/2570593004/diff/1/third_party/WebKit/Source/c... third_party/WebKit/Source/core/layout/ng/ng_units.h:321: DCHECK_GE(margin_end, LayoutUnit()); On 2016/12/13 at 18:26:53, ikilpatrick wrote: > move these out of else? (should always be true?) up to you. > > Would just prefer to fail earlier in more cases here if that makes sense. done. for keeping as is: - sometimes we do not compute values unless they are needed. This is not the case here. against: - this code will run infrequently, only in vertical writing modes, so we might not hit asserts until too late. https://codereview.chromium.org/2570593004/diff/1/third_party/WebKit/Source/c... third_party/WebKit/Source/core/layout/ng/ng_units.h:325: LayoutUnit LeftPosition(LayoutUnit container_size, On 2016/12/13 at 18:35:05, cbiesinger wrote: > I would add a comment describing all of these. done. // Left/Right/TopPosition functions map static position to // left/right/top distance wrt container space. // The function arguments are required to solve the equations: // contaner_size = left + margin_left + width + margin_right + right https://codereview.chromium.org/2570593004/diff/1/third_party/WebKit/Source/c... third_party/WebKit/Source/core/layout/ng/ng_units.h:346: LayoutUnit BottomPosition(LayoutUnit container_size, On 2016/12/13 at 18:26:53, ikilpatrick wrote: > i'd remove this if it isn't used. doen
looks good (except for nit below), but I'll let Ian give the final l-g-t-m https://codereview.chromium.org/2570593004/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/layout/ng/ng_units.h (right): https://codereview.chromium.org/2570593004/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/core/layout/ng/ng_units.h:349: else { Don't put braces only on one branch of the if
https://codereview.chromium.org/2570593004/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/layout/ng/ng_units.h (right): https://codereview.chromium.org/2570593004/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/core/layout/ng/ng_units.h:349: else { On 2016/12/13 at 20:11:55, cbiesinger wrote: > Don't put braces only on one branch of the if fixed. Moving those DCHECKs out got me.
lgtm with nits. https://codereview.chromium.org/2570593004/diff/40001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/layout/ng/ng_units.h (right): https://codereview.chromium.org/2570593004/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/core/layout/ng/ng_units.h:309: // left/right/top distance wrt container space. .net s/distance/edge ? e.g. left/right/top edge of the container space. ? https://codereview.chromium.org/2570593004/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/core/layout/ng/ng_units.h:310: // The function arguments are required to solve the equations: .net s/equations/equation (singular).
https://codereview.chromium.org/2570593004/diff/40001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/layout/ng/ng_units.h (right): https://codereview.chromium.org/2570593004/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/core/layout/ng/ng_units.h:309: // left/right/top distance wrt container space. On 2016/12/13 at 20:42:36, ikilpatrick wrote: > .net s/distance/edge ? > > e.g. > > left/right/top edge of the container space. ? done https://codereview.chromium.org/2570593004/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/core/layout/ng/ng_units.h:310: // The function arguments are required to solve the equations: On 2016/12/13 at 20:42:36, ikilpatrick wrote: > .net s/equations/equation (singular). done
The CQ bit was checked by atotic@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/2570593004/#ps60001 (title: "CR fixes")
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 atotic@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": 60001, "attempt_start_ts": 1481677443031740, "parent_rev": "df65e73e60115e9e06cb3aeba0ff7e26a3877beb", "commit_rev": "e285f45ae4b0de4684424618a83c4ec6c6164d00"}
Message was sent while issue was closed.
Description was changed from ========== Add StaticPosition to ComputeVertical/Horizontal Static position part of https://codereview.chromium.org/2568743005 BUG=635619 ========== to ========== Add StaticPosition to ComputeVertical/Horizontal Static position part of https://codereview.chromium.org/2568743005 BUG=635619 Review-Url: https://codereview.chromium.org/2570593004 ==========
Message was sent while issue was closed.
Committed patchset #4 (id:60001)
Message was sent while issue was closed.
Description was changed from ========== Add StaticPosition to ComputeVertical/Horizontal Static position part of https://codereview.chromium.org/2568743005 BUG=635619 Review-Url: https://codereview.chromium.org/2570593004 ========== to ========== Add StaticPosition to ComputeVertical/Horizontal Static position part of https://codereview.chromium.org/2568743005 BUG=635619 Committed: https://crrev.com/2ac84260d9bd99d9e0f44616fbe2ad86ddbffe7e Cr-Commit-Position: refs/heads/master@{#438375} ==========
Message was sent while issue was closed.
Patchset 4 (id:??) landed as https://crrev.com/2ac84260d9bd99d9e0f44616fbe2ad86ddbffe7e Cr-Commit-Position: refs/heads/master@{#438375} |