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

Issue 2828453002: Add NeedsPreferredWidthsRecalculation() for block (Closed)

Created:
3 years, 8 months ago by Sunghoon Kim
Modified:
3 years, 8 months ago
CC:
blink-reviews, blink-reviews-layout_chromium.org, chromium-reviews, eae+blinkwatch, jchaffraix+rendering, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, szager+layoutwatch_chromium.org, zoltan1
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Add NeedsPreferredWidthsRecalculation() for block In the case the block has relative height and width is auto and it has an image which should keep the aspect ratio, it needs preferred width recalculation if the parent changes the height. To cover this, add NeedsPreferredWidthsRecalculation() for LayoutBlock. BUG=707151, 514663, 709233 Review-Url: https://codereview.chromium.org/2828453002 Cr-Commit-Position: refs/heads/master@{#466934} Committed: https://chromium.googlesource.com/chromium/src/+/76e307f44292b2999535aa8c5605cfd9129e9c12

Patch Set 1 #

Patch Set 2 : Make inline-block container's width update #

Total comments: 1

Patch Set 3 : Make inline-block container's width update #

Patch Set 4 : change commit message #

Total comments: 4

Patch Set 5 : Add NeedsPreferredWidthRecalculation() for block #

Patch Set 6 : rebased code and added tc #

Total comments: 3

Patch Set 7 : Add NeedsPreferredWidthsRecalculation() for block #

Unified diffs Side-by-side diffs Delta from patch set Stats (+61 lines, -0 lines) Patch
A third_party/WebKit/LayoutTests/fast/block/block-width-recalc-with-relative-height.html View 1 2 3 4 5 6 1 chunk +54 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutBlock.h View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutBlock.cpp View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 24 (11 generated)
Sunghoon Kim
Could you please to review this? Thanks.
3 years, 8 months ago (2017-04-18 05:05:19 UTC) #2
fs
+mstensho
3 years, 8 months ago (2017-04-18 08:01:25 UTC) #4
rhogan
https://codereview.chromium.org/2828453002/diff/20001/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp File third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp (right): https://codereview.chromium.org/2828453002/diff/20001/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp#newcode2942 third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp:2942: child.SetPreferredLogicalWidthsDirty(kMarkContainerChain); If someone called SetPreferredLogicalWidthsDirty on child, why didn't ...
3 years, 8 months ago (2017-04-18 18:46:30 UTC) #6
Sunghoon Kim
If the block is inline-block and the preferred width of child needs to be recalculated, ...
3 years, 8 months ago (2017-04-19 00:51:30 UTC) #7
mstensho (USE GERRIT)
https://codereview.chromium.org/2828453002/diff/60001/third_party/WebKit/LayoutTests/fast/inline-block/inline-block-update-width.html File third_party/WebKit/LayoutTests/fast/inline-block/inline-block-update-width.html (right): https://codereview.chromium.org/2828453002/diff/60001/third_party/WebKit/LayoutTests/fast/inline-block/inline-block-update-width.html#newcode13 third_party/WebKit/LayoutTests/fast/inline-block/inline-block-update-width.html:13: width: auto; width and height are initially auto, so ...
3 years, 8 months ago (2017-04-19 10:58:47 UTC) #9
Yiorsi
What about inline-flex(-webkit-inline-box) or inline-grid?
3 years, 8 months ago (2017-04-20 05:36:40 UTC) #10
Sunghoon Kim
The problem was, i think, the block which has relative height and width auto was ...
3 years, 8 months ago (2017-04-20 23:19:14 UTC) #12
mstensho (USE GERRIT)
This looks like an excellent solution! Before landing, though: Could you proof-read the commit message? ...
3 years, 8 months ago (2017-04-24 09:08:35 UTC) #13
Sunghoon Kim
Thanks for your review. I added nested block case in the tc and tc moved ...
3 years, 8 months ago (2017-04-25 00:23:34 UTC) #15
mstensho (USE GERRIT)
lgtm with nits. https://codereview.chromium.org/2828453002/diff/100001/third_party/WebKit/LayoutTests/fast/block/block-width-recalc-with-relative-height.html File third_party/WebKit/LayoutTests/fast/block/block-width-recalc-with-relative-height.html (right): https://codereview.chromium.org/2828453002/diff/100001/third_party/WebKit/LayoutTests/fast/block/block-width-recalc-with-relative-height.html#newcode28 third_party/WebKit/LayoutTests/fast/block/block-width-recalc-with-relative-height.html:28: <img src='data:image/svg+xml;utf8,<svg height="2px" width="1px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" ...
3 years, 8 months ago (2017-04-25 07:52:51 UTC) #17
Sunghoon Kim
Thanks for review. Ran CQ.
3 years, 8 months ago (2017-04-25 08:06:56 UTC) #18
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/2828453002/120001
3 years, 8 months ago (2017-04-25 08:07:23 UTC) #21
commit-bot: I haz the power
3 years, 8 months ago (2017-04-25 09:37:55 UTC) #24
Message was sent while issue was closed.
Committed patchset #7 (id:120001) as
https://chromium.googlesource.com/chromium/src/+/76e307f44292b2999535aa8c5605...

Powered by Google App Engine
This is Rietveld 408576698