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

Unified Diff: Source/core/layout/LayoutMultiColumnSet.cpp

Issue 1145093002: Add a runtime flag for the column-fill property. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Name the runtime flag ColumnFill after all, since that's all it's going to control Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/css/parser/CSSParserFastPaths.cpp ('k') | Source/platform/RuntimeEnabledFeatures.in » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/LayoutMultiColumnSet.cpp
diff --git a/Source/core/layout/LayoutMultiColumnSet.cpp b/Source/core/layout/LayoutMultiColumnSet.cpp
index 76f0c23fdff7d35d2ee1540b1343a08e3386c2e8..709735804061cb6ed0d969b19b860f1c44800d67 100644
--- a/Source/core/layout/LayoutMultiColumnSet.cpp
+++ b/Source/core/layout/LayoutMultiColumnSet.cpp
@@ -30,6 +30,7 @@
#include "core/layout/LayoutMultiColumnFlowThread.h"
#include "core/layout/MultiColumnFragmentainerGroup.h"
#include "core/paint/MultiColumnSetPainter.h"
+#include "platform/RuntimeEnabledFeatures.h"
namespace blink {
@@ -137,8 +138,16 @@ bool LayoutMultiColumnSet::heightIsAuto() const
{
LayoutMultiColumnFlowThread* flowThread = multiColumnFlowThread();
if (!flowThread->isLayoutPagedFlowThread()) {
- if (multiColumnBlockFlow()->style()->columnFill() == ColumnFillBalance)
- return true;
+ // If support for the column-fill property isn't enabled, we want to behave as if
+ // column-fill were auto, so that multicol containers with specified height don't get their
+ // columns balanced (auto-height multicol containers will still get their columns balanced,
+ // even if column-fill isn't 'balance' - in accordance with the spec). Pretending that
+ // column-fill is auto also matches the old multicol implementation, which has no support
+ // for this property.
+ if (RuntimeEnabledFeatures::columnFillEnabled()) {
+ if (multiColumnBlockFlow()->style()->columnFill() == ColumnFillBalance)
+ return true;
+ }
if (LayoutBox* next = nextSiblingBox()) {
if (next->isLayoutMultiColumnSpannerPlaceholder()) {
// If we're followed by a spanner, we need to balance.
« no previous file with comments | « Source/core/css/parser/CSSParserFastPaths.cpp ('k') | Source/platform/RuntimeEnabledFeatures.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698