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

Issue 23763002: Improve multicol preferred/intrinsic width calculation. (Closed)

Created:
7 years, 3 months ago by mstensho (USE GERRIT)
Modified:
7 years, 3 months ago
Reviewers:
ojan
CC:
blink-reviews, dglazkov+blink, eae+blinkwatch, leviw+renderwatch, jchaffraix+rendering
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Improve multicol preferred/intrinsic width calculation. Using http://dev.w3.org/csswg/css-sizing/#multicol-intrinsic as guidance, but implementing that spec 100% is hard, and probably unnecessary, since it's not finished. While we wait for a perfect intrinsic width calculation spec, all we have is CSS 2.1 ("shrink to fit") and common sense: The idea with preferred/intrinsic minimum width is to allow content to become as narrow as possible without causing overflow (unless it would have caused it no matter what width). The idea with preferred/intrinsic maximum width is to find the narrowest width larger than or equal to minimum width where no avoidable automatic/soft wrapping occurs. We were nowhere close to this behavior for multicol. Now we should be. Note about the LayoutTests/css3/unicode-bidi-isolate-basic.html change: The expectation seems to be that the columns should be as many as necessary and narrow as possible, and that the multicol container's width should be that of one column. The previous CSS didn't really ask for this, although that's how it happened to be rendered without this fix. Added declarations to make sure this is still happening. Also turn LayoutTests/fast/multicol/positioned-with-constrained-height.html into a reftest, rather than requiring a rebaseline, now that rendering has changed. This fix is ported from https://bugs.webkit.org/show_bug.cgi?id=116677 Reviewed in WebKit by David Hyatt. BUG=281451 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=157020

Patch Set 1 #

Total comments: 2

Patch Set 2 : Code review #

Unified diffs Side-by-side diffs Delta from patch set Stats (+186 lines, -830 lines) Patch
M LayoutTests/css3/unicode-bidi-isolate-basic.html View 1 chunk +5 lines, -1 line 0 comments Download
A LayoutTests/fast/css-intrinsic-dimensions/multicol.html View 1 1 chunk +147 lines, -0 lines 0 comments Download
A + LayoutTests/fast/css-intrinsic-dimensions/multicol-expected.txt View 1 1 chunk +0 lines, -1 line 0 comments Download
M LayoutTests/fast/multicol/positioned-with-constrained-height.html View 2 chunks +2 lines, -2 lines 0 comments Download
A + LayoutTests/fast/multicol/positioned-with-constrained-height-expected.html View 2 chunks +2 lines, -2 lines 0 comments Download
D LayoutTests/fast/multicol/positioned-with-constrained-height-expected.txt View 1 chunk +0 lines, -412 lines 0 comments Download
D LayoutTests/platform/linux/fast/multicol/positioned-with-constrained-height-expected.png View Binary file 0 comments Download
D LayoutTests/platform/mac-lion/fast/multicol/positioned-with-constrained-height-expected.png View Binary file 0 comments Download
D LayoutTests/platform/mac-snowleopard/fast/multicol/positioned-with-constrained-height-expected.png View Binary file 0 comments Download
D LayoutTests/platform/mac/fast/multicol/positioned-with-constrained-height-expected.png View Binary file 0 comments Download
D LayoutTests/platform/win/fast/multicol/positioned-with-constrained-height-expected.png View Binary file 0 comments Download
D LayoutTests/platform/win/fast/multicol/positioned-with-constrained-height-expected.txt View 1 chunk +0 lines, -412 lines 0 comments Download
M Source/core/rendering/RenderBlock.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/rendering/RenderBlock.cpp View 2 chunks +29 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
mstensho (USE GERRIT)
7 years, 3 months ago (2013-08-30 09:24:26 UTC) #1
ojan
lgtm https://codereview.chromium.org/23763002/diff/1/LayoutTests/fast/css-intrinsic-dimensions/multicol.html File LayoutTests/fast/css-intrinsic-dimensions/multicol.html (right): https://codereview.chromium.org/23763002/diff/1/LayoutTests/fast/css-intrinsic-dimensions/multicol.html#newcode150 LayoutTests/fast/css-intrinsic-dimensions/multicol.html:150: // non-auto column-count This test would be more ...
7 years, 3 months ago (2013-08-30 17:50:09 UTC) #2
mstensho (USE GERRIT)
Thanks for reviewing! I've addressed the issue you raised together with the lgtm. https://codereview.chromium.org/23763002/diff/1/LayoutTests/fast/css-intrinsic-dimensions/multicol.html File ...
7 years, 3 months ago (2013-08-30 18:42:17 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mstensho@opera.com/23763002/5001
7 years, 3 months ago (2013-08-30 18:42:34 UTC) #4
commit-bot: I haz the power
7 years, 3 months ago (2013-08-30 20:54:30 UTC) #5
Message was sent while issue was closed.
Change committed as 157020

Powered by Google App Engine
This is Rietveld 408576698