|
|
Created:
4 years, 3 months ago by cbiesinger Modified:
4 years, 3 months ago CC:
chromium-reviews, cbiesinger, ojan+watch_chromium.org, szager+layoutwatch_chromium.org, glebl+reviews_chromium.org, zoltan1, blink-reviews-layout_chromium.org, pdr+renderingwatchlist_chromium.org, eae+blinkwatch, leviw+renderwatch, jchaffraix+rendering, blink-reviews Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
Description[layoutng] Add border and padding when setting the override size
This is necessary to avoid a DCHECK when opening the DOM inspector on
any page (and is also clearly correct)
R=mstensho@chromium.org,eae@chromium.org
BUG=635619
Committed: https://crrev.com/5c2fc8168fc1adeb0029025c6b88b87bc84699d6
Cr-Commit-Position: refs/heads/master@{#420480}
Patch Set 1 #
Total comments: 7
Patch Set 2 : review comments #Messages
Total messages: 19 (9 generated)
The CQ bit was checked by cbiesinger@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...
cbiesinger@google.com changed reviewers: + cbiesinger@google.com, mstensho@opera.com - mstensho@chromium.org
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
https://codereview.chromium.org/2360793002/diff/1/third_party/WebKit/Source/c... File third_party/WebKit/Source/core/layout/ng/ng_constraint_space.cc (right): https://codereview.chromium.org/2360793002/diff/1/third_party/WebKit/Source/c... third_party/WebKit/Source/core/layout/ng/ng_constraint_space.cc:78: container_logical_width = Above, in normal cases, we set container_logical_width to box.containingBlockLogicalWidthForContent(), which is a content box size, not a border box size. But here we set it to a border box size. Isn't that super-confusing? https://codereview.chromium.org/2360793002/diff/1/third_party/WebKit/Source/c... third_party/WebKit/Source/core/layout/ng/ng_constraint_space.cc:84: // used as the final size of the box, so it has to include border and I think I'd just put ONE comment in front of the ifs, instead of duplicated text. https://codereview.chromium.org/2360793002/diff/1/third_party/WebKit/Source/c... third_party/WebKit/Source/core/layout/ng/ng_constraint_space.cc:86: container_logical_width = box.borderAndPaddingLogicalHeight() + Uh, pardon me for asking, but why is it container_logical_*width* here??
https://codereview.chromium.org/2360793002/diff/1/third_party/WebKit/Source/c... File third_party/WebKit/Source/core/layout/ng/ng_constraint_space.cc (right): https://codereview.chromium.org/2360793002/diff/1/third_party/WebKit/Source/c... third_party/WebKit/Source/core/layout/ng/ng_constraint_space.cc:78: container_logical_width = On 2016/09/22 07:11:46, mstensho wrote: > Above, in normal cases, we set container_logical_width to > box.containingBlockLogicalWidthForContent(), which is a content box size, not a > border box size. But here we set it to a border box size. Isn't that > super-confusing? This code is indeed confusing (though I'll point out it's not necessarily used as a content box size, since the semantics are that it's the basis for percentage resolution which could be content-box or border-box). This code sort of dates back to when the container size was the only size we had on the constraint space. Do you have a better idea for how to do this? Maybe that should be a different patch, though. https://codereview.chromium.org/2360793002/diff/1/third_party/WebKit/Source/c... third_party/WebKit/Source/core/layout/ng/ng_constraint_space.cc:84: // used as the final size of the box, so it has to include border and On 2016/09/22 07:11:46, mstensho wrote: > I think I'd just put ONE comment in front of the ifs, instead of duplicated > text. Done. https://codereview.chromium.org/2360793002/diff/1/third_party/WebKit/Source/c... third_party/WebKit/Source/core/layout/ng/ng_constraint_space.cc:86: container_logical_width = box.borderAndPaddingLogicalHeight() + On 2016/09/22 07:11:46, mstensho wrote: > Uh, pardon me for asking, but why is it container_logical_*width* here?? Due to a typo :( Thanks for catching that!
lgtm https://codereview.chromium.org/2360793002/diff/1/third_party/WebKit/Source/c... File third_party/WebKit/Source/core/layout/ng/ng_constraint_space.cc (right): https://codereview.chromium.org/2360793002/diff/1/third_party/WebKit/Source/c... third_party/WebKit/Source/core/layout/ng/ng_constraint_space.cc:78: container_logical_width = On 2016/09/22 16:19:46, cbiesinger wrote: > On 2016/09/22 07:11:46, mstensho wrote: > > Above, in normal cases, we set container_logical_width to > > box.containingBlockLogicalWidthForContent(), which is a content box size, not > a > > border box size. But here we set it to a border box size. Isn't that > > super-confusing? > > This code is indeed confusing (though I'll point out it's not necessarily used > as a content box size, since the semantics are that it's the basis for > percentage resolution which could be content-box or border-box). This code sort > of dates back to when the container size was the only size we had on the > constraint space. > > Do you have a better idea for how to do this? Maybe that should be a different > patch, though. OK, we can get back to that later.
The CQ bit was checked by cbiesinger@chromium.org
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: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_...)
The CQ bit was checked by cbiesinger@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Committed patchset #2 (id:20001)
Message was sent while issue was closed.
Description was changed from ========== [layoutng] Add border and padding when setting the override size This is necessary to avoid a DCHECK when opening the DOM inspector on any page (and is also clearly correct) R=mstensho@chromium.org,eae@chromium.org BUG=635619 ========== to ========== [layoutng] Add border and padding when setting the override size This is necessary to avoid a DCHECK when opening the DOM inspector on any page (and is also clearly correct) R=mstensho@chromium.org,eae@chromium.org BUG=635619 Committed: https://crrev.com/5c2fc8168fc1adeb0029025c6b88b87bc84699d6 Cr-Commit-Position: refs/heads/master@{#420480} ==========
Message was sent while issue was closed.
Patchset 2 (id:??) landed as https://crrev.com/5c2fc8168fc1adeb0029025c6b88b87bc84699d6 Cr-Commit-Position: refs/heads/master@{#420480} |