diff --git a/dom/interfaces/css/nsIDOMCSS2Properties.idl b/dom/interfaces/css/nsIDOMCSS2Properties.idl index 2942e572dfe..c841ebdf426 100644 --- a/dom/interfaces/css/nsIDOMCSS2Properties.idl +++ b/dom/interfaces/css/nsIDOMCSS2Properties.idl @@ -51,7 +51,7 @@ * http://www.w3.org/TR/DOM-Level-2-Style */ -[builtinclass, scriptable, uuid(0a6fc4c6-a62a-4f52-9ab6-3d398b958843)] +[builtinclass, scriptable, uuid(b4afb8f4-d9ab-44d9-9d0c-f765c47d57c2)] interface nsIDOMCSS2Properties : nsISupports { attribute DOMString background; @@ -532,6 +532,9 @@ interface nsIDOMCSS2Properties : nsISupports attribute DOMString MozColumnWidth; // raises(DOMException) on setting + attribute DOMString MozColumnFill; + // raises(DOMException) on setting + attribute DOMString MozColumnGap; // raises(DOMException) on setting diff --git a/layout/base/nsStyleConsts.h b/layout/base/nsStyleConsts.h index 14463034697..d9946f21c07 100644 --- a/layout/base/nsStyleConsts.h +++ b/layout/base/nsStyleConsts.h @@ -789,6 +789,9 @@ static inline mozilla::css::Side operator++(mozilla::css::Side& side, int) { #define NS_STYLE_COLUMN_COUNT_AUTO 0 #define NS_STYLE_COLUMN_COUNT_UNLIMITED (-1) +#define NS_STYLE_COLUMN_FILL_AUTO 0 +#define NS_STYLE_COLUMN_FILL_BALANCE 1 + // See nsStyleUIReset #define NS_STYLE_IME_MODE_AUTO 0 #define NS_STYLE_IME_MODE_NORMAL 1 diff --git a/layout/generic/crashtests/399412-1.html b/layout/generic/crashtests/399412-1.html index 5ff99d37f56..bda3b38f500 100644 --- a/layout/generic/crashtests/399412-1.html +++ b/layout/generic/crashtests/399412-1.html @@ -17,6 +17,7 @@ body { width: 300px; -moz-column-width: 50px; -moz-column-gap: 1px; + -moz-column-fill: auto; } diff --git a/layout/generic/crashtests/673770.html b/layout/generic/crashtests/673770.html index ab5018c37ae..9c0fe3b1ef4 100644 --- a/layout/generic/crashtests/673770.html +++ b/layout/generic/crashtests/673770.html @@ -13,7 +13,7 @@ } - +
diff --git a/layout/generic/nsColumnSetFrame.cpp b/layout/generic/nsColumnSetFrame.cpp index ecf95042fc6..2ffca49c447 100644 --- a/layout/generic/nsColumnSetFrame.cpp +++ b/layout/generic/nsColumnSetFrame.cpp @@ -416,18 +416,22 @@ nsColumnSetFrame::ChooseColumnStrategy(const nsHTMLReflowState& aReflowState) expectedWidthLeftOver = extraSpace - (extraToColumns*numColumns); } - // NOTE that the non-balancing behavior for non-auto computed height - // is not in the CSS3 columns draft as of 18 January 2001 - if (aReflowState.ComputedHeight() == NS_INTRINSICSIZE) { + // If column-fill is set to 'balance', then we want to balance the columns. + if (colStyle->mColumnFill == NS_STYLE_COLUMN_FILL_BALANCE) { // Balancing! + if (numColumns <= 0) { // Hmm, auto column count, column width or available width is unknown, // and balancing is required. Let's just use one column then. numColumns = 1; } - colHeight = NS_MIN(mLastBalanceHeight, GetAvailableContentHeight(aReflowState)); + + colHeight = NS_MIN(mLastBalanceHeight, + GetAvailableContentHeight(aReflowState)); } else { + // This is the case when the column-fill property is set to 'auto'. // No balancing, so don't limit the column count + numColumns = PR_INT32_MAX; } diff --git a/layout/reftests/bugs/368020-1-ref.html b/layout/reftests/bugs/368020-1-ref.html index d6edf2c3991..b8512cc0e45 100644 --- a/layout/reftests/bugs/368020-1-ref.html +++ b/layout/reftests/bugs/368020-1-ref.html @@ -5,7 +5,7 @@ -
+
diff --git a/layout/reftests/bugs/368020-1.html b/layout/reftests/bugs/368020-1.html index 65a6370ce47..f79362274a1 100644 --- a/layout/reftests/bugs/368020-1.html +++ b/layout/reftests/bugs/368020-1.html @@ -5,7 +5,7 @@ -
+
diff --git a/layout/reftests/bugs/379349-2-ref.xhtml b/layout/reftests/bugs/379349-2-ref.xhtml index 8333f7626f3..55e9c98cb49 100644 --- a/layout/reftests/bugs/379349-2-ref.xhtml +++ b/layout/reftests/bugs/379349-2-ref.xhtml @@ -41,6 +41,7 @@ width: 300pt; -moz-column-width: 100pt; -moz-column-gap: 0; + -moz-column-fill: auto; border: solid gray; position: relative; } diff --git a/layout/reftests/bugs/379349-2a.xhtml b/layout/reftests/bugs/379349-2a.xhtml index 96cf828a5b7..efecf7398ee 100644 --- a/layout/reftests/bugs/379349-2a.xhtml +++ b/layout/reftests/bugs/379349-2a.xhtml @@ -48,6 +48,7 @@ width: 300pt; -moz-column-width: 100pt; -moz-column-gap: 0; + -moz-column-fill: auto; border: solid gray; } diff --git a/layout/reftests/bugs/379349-2b.xhtml b/layout/reftests/bugs/379349-2b.xhtml index 09daa1827ab..6c4201eff06 100644 --- a/layout/reftests/bugs/379349-2b.xhtml +++ b/layout/reftests/bugs/379349-2b.xhtml @@ -48,6 +48,7 @@ width: 300pt; -moz-column-width: 100pt; -moz-column-gap: 0; + -moz-column-fill: auto; border: solid gray; } diff --git a/layout/reftests/bugs/563584-9c.html b/layout/reftests/bugs/563584-9c.html index 8018b36e5a8..46e22b2ef4f 100644 --- a/layout/reftests/bugs/563584-9c.html +++ b/layout/reftests/bugs/563584-9c.html @@ -1,6 +1,6 @@ Test for pushing of floats to next column when float breaking in columns is disabled - +
diff --git a/layout/reftests/bugs/563584-9d.html b/layout/reftests/bugs/563584-9d.html index ed6727586db..0317e5923eb 100644 --- a/layout/reftests/bugs/563584-9d.html +++ b/layout/reftests/bugs/563584-9d.html @@ -1,6 +1,6 @@ Test for pushing of floats to next column when float breaking in columns is disabled - +
diff --git a/layout/reftests/columns/ahem.css b/layout/reftests/columns/ahem.css new file mode 100644 index 00000000000..884a41198b8 --- /dev/null +++ b/layout/reftests/columns/ahem.css @@ -0,0 +1,4 @@ +@font-face { + font-family: "Ahem"; + src: url(../fonts/Ahem.ttf); +} diff --git a/layout/reftests/columns/columnfill-auto-ref.html b/layout/reftests/columns/columnfill-auto-ref.html new file mode 100644 index 00000000000..0f59ca9ae70 --- /dev/null +++ b/layout/reftests/columns/columnfill-auto-ref.html @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + +
+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed feugiat libero vel diam.Pellentesque pulvinar commodo lacus. Sed fringilla. Sed lectus. Praesent laoreet orcivitae nisi. Duis venenatis tristique massa. Sed commodo diam at mauris.
+ diff --git a/layout/reftests/columns/columnfill-auto.html b/layout/reftests/columns/columnfill-auto.html new file mode 100644 index 00000000000..7ef8245cfc7 --- /dev/null +++ b/layout/reftests/columns/columnfill-auto.html @@ -0,0 +1,17 @@ + + + + + + +
+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed feugiat libero vel diam. Pellentesque pulvinar commodo lacus. Sed fringilla. Sed lectus. Praesent laoreet orci vitae nisi. Duis venenatis tristique massa. Sed commodo diam at mauris. +
+ + diff --git a/layout/reftests/columns/columnfill-balance-ref.html b/layout/reftests/columns/columnfill-balance-ref.html new file mode 100644 index 00000000000..51284a681cc --- /dev/null +++ b/layout/reftests/columns/columnfill-balance-ref.html @@ -0,0 +1,33 @@ + + + + + + + + + + + + + +
+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed feugiat libero vel diam. + Pellentesque pulvinar commodo lacus. Sed fringilla. Sed lectus. Praesent laoreet orci + vitae nisi. Duis venenatis tristique massa. Sed commodo diam at mauris. +
+ + diff --git a/layout/reftests/columns/columnfill-balance.html b/layout/reftests/columns/columnfill-balance.html new file mode 100644 index 00000000000..27aafb3d6a9 --- /dev/null +++ b/layout/reftests/columns/columnfill-balance.html @@ -0,0 +1,16 @@ + + + + + +
+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed feugiat libero vel diam. Pellentesque pulvinar commodo lacus. Sed fringilla. Sed lectus. Praesent laoreet orci vitae nisi. Duis venenatis tristique massa. Sed commodo diam at mauris. +
+ + diff --git a/layout/reftests/columns/reftest.list b/layout/reftests/columns/reftest.list index a6fae9db23d..1d7e9bd8943 100644 --- a/layout/reftests/columns/reftest.list +++ b/layout/reftests/columns/reftest.list @@ -16,6 +16,9 @@ == column-balancing-002.html column-balancing-002.ref.html == column-balancing-003.html column-balancing-000.ref.html == column-balancing-004.html column-balancing-004.ref.html +HTTP(..) == columnfill-balance.html columnfill-balance-ref.html +HTTP(..) == columnfill-auto.html columnfill-auto-ref.html +HTTP(..) == columnfill-change.html columnfill-change-ref.html == columnrule-basic.html columnrule-basic-ref.html == columnrule-complex.html columnrule-complex-ref.html != columnrule-linestyles.html columnrule-linestyles-notref.html diff --git a/layout/reftests/pagination/abspos-overflow-01-cols.xhtml b/layout/reftests/pagination/abspos-overflow-01-cols.xhtml index 1d9baf053de..71eb6e68c1e 100644 --- a/layout/reftests/pagination/abspos-overflow-01-cols.xhtml +++ b/layout/reftests/pagination/abspos-overflow-01-cols.xhtml @@ -34,6 +34,7 @@ height: 2in; -moz-column-count: 3; -moz-column-gap: 0; + -moz-column-fill: auto; border: silver 2pt; border-style: none solid; } diff --git a/layout/reftests/pagination/border-breaking-000-cols.xhtml b/layout/reftests/pagination/border-breaking-000-cols.xhtml index 0f8c52f9ef3..91283dc1620 100644 --- a/layout/reftests/pagination/border-breaking-000-cols.xhtml +++ b/layout/reftests/pagination/border-breaking-000-cols.xhtml @@ -25,6 +25,7 @@ width: 300px; -moz-column-width: 150px; -moz-column-gap: 0; + -moz-column-fill: auto; border: solid silver; border-style: none solid; } diff --git a/layout/reftests/pagination/border-breaking-001-cols.ref.xhtml b/layout/reftests/pagination/border-breaking-001-cols.ref.xhtml index 0673dcca0fc..37b035e3dff 100644 --- a/layout/reftests/pagination/border-breaking-001-cols.ref.xhtml +++ b/layout/reftests/pagination/border-breaking-001-cols.ref.xhtml @@ -20,6 +20,7 @@ width: 300px; -moz-column-width: 100px; -moz-column-gap: 0; + -moz-column-fill: auto; border: solid silver; border-style: none solid; background: yellow; diff --git a/layout/reftests/pagination/border-breaking-001-cols.xhtml b/layout/reftests/pagination/border-breaking-001-cols.xhtml index 88feaa6ab19..5eeee0665c8 100644 --- a/layout/reftests/pagination/border-breaking-001-cols.xhtml +++ b/layout/reftests/pagination/border-breaking-001-cols.xhtml @@ -49,6 +49,7 @@ width: 300px; -moz-column-width: 100px; -moz-column-gap: 0; + -moz-column-fill: auto; border: solid silver; border-style: none solid; } diff --git a/layout/reftests/pagination/border-breaking-002-cols.ref.xhtml b/layout/reftests/pagination/border-breaking-002-cols.ref.xhtml index 9e5c989b10e..2c1c1d28642 100644 --- a/layout/reftests/pagination/border-breaking-002-cols.ref.xhtml +++ b/layout/reftests/pagination/border-breaking-002-cols.ref.xhtml @@ -16,6 +16,7 @@ width: 300px; -moz-column-width: 150px; -moz-column-gap: 0; + -moz-column-fill: auto; border: solid silver; } diff --git a/layout/reftests/pagination/border-breaking-002-cols.xhtml b/layout/reftests/pagination/border-breaking-002-cols.xhtml index d80cb73b34a..0090702226d 100644 --- a/layout/reftests/pagination/border-breaking-002-cols.xhtml +++ b/layout/reftests/pagination/border-breaking-002-cols.xhtml @@ -17,6 +17,7 @@ width: 300px; -moz-column-width: 150px; -moz-column-gap: 0; + -moz-column-fill: auto; border: solid silver; } diff --git a/layout/reftests/pagination/border-breaking-003-cols.xhtml b/layout/reftests/pagination/border-breaking-003-cols.xhtml index 16095168d56..1fbb7ff28a1 100644 --- a/layout/reftests/pagination/border-breaking-003-cols.xhtml +++ b/layout/reftests/pagination/border-breaking-003-cols.xhtml @@ -20,6 +20,7 @@ width: 300px; -moz-column-width: 150px; -moz-column-gap: 0; + -moz-column-fill: auto; border: solid silver; } diff --git a/layout/reftests/pagination/content-inserted-002.ref.xhtml b/layout/reftests/pagination/content-inserted-002.ref.xhtml index a2a4f77afa7..c8bfaf8f4db 100644 --- a/layout/reftests/pagination/content-inserted-002.ref.xhtml +++ b/layout/reftests/pagination/content-inserted-002.ref.xhtml @@ -13,6 +13,7 @@ width: 450px; -moz-column-width: 150px; -moz-column-gap: 0; + -moz-column-fill: auto; border: 3px solid silver; } diff --git a/layout/reftests/pagination/content-inserted-002.xhtml b/layout/reftests/pagination/content-inserted-002.xhtml index f5907f63990..2cddd6d1b97 100644 --- a/layout/reftests/pagination/content-inserted-002.xhtml +++ b/layout/reftests/pagination/content-inserted-002.xhtml @@ -13,6 +13,7 @@ width: 450px; -moz-column-width: 150px; -moz-column-gap: 0; + -moz-column-fill: auto; border: 3px solid silver; } diff --git a/layout/reftests/pagination/content-inserted-003.xhtml b/layout/reftests/pagination/content-inserted-003.xhtml index 913b82646f2..365194fee6b 100644 --- a/layout/reftests/pagination/content-inserted-003.xhtml +++ b/layout/reftests/pagination/content-inserted-003.xhtml @@ -13,6 +13,7 @@ width: 450px; -moz-column-width: 150px; -moz-column-gap: 0; + -moz-column-fill: auto; border: 3px solid silver; } diff --git a/layout/reftests/pagination/content-inserted-004.xhtml b/layout/reftests/pagination/content-inserted-004.xhtml index 2148be98776..d303d8ed716 100644 --- a/layout/reftests/pagination/content-inserted-004.xhtml +++ b/layout/reftests/pagination/content-inserted-004.xhtml @@ -13,6 +13,7 @@ width: 450px; -moz-column-width: 150px; -moz-column-gap: 0; + -moz-column-fill: auto; border: 3px solid silver; } diff --git a/layout/reftests/pagination/content-inserted-005.xhtml b/layout/reftests/pagination/content-inserted-005.xhtml index f83f4d43311..1947b3cdbcb 100644 --- a/layout/reftests/pagination/content-inserted-005.xhtml +++ b/layout/reftests/pagination/content-inserted-005.xhtml @@ -13,6 +13,7 @@ width: 450px; -moz-column-width: 150px; -moz-column-gap: 0; + -moz-column-fill: auto; border: 3px solid silver; } diff --git a/layout/reftests/pagination/content-inserted-006.xhtml b/layout/reftests/pagination/content-inserted-006.xhtml index 513638577d4..fbb4c95a7fb 100644 --- a/layout/reftests/pagination/content-inserted-006.xhtml +++ b/layout/reftests/pagination/content-inserted-006.xhtml @@ -13,6 +13,7 @@ width: 450px; -moz-column-width: 150px; -moz-column-gap: 0; + -moz-column-fill: auto; border: 3px solid silver; } diff --git a/layout/reftests/pagination/content-inserted-007.xhtml b/layout/reftests/pagination/content-inserted-007.xhtml index f7e217914cb..0a447ae998d 100644 --- a/layout/reftests/pagination/content-inserted-007.xhtml +++ b/layout/reftests/pagination/content-inserted-007.xhtml @@ -13,6 +13,7 @@ width: 450px; -moz-column-width: 150px; -moz-column-gap: 0; + -moz-column-fill: auto; border: 3px solid silver; } diff --git a/layout/reftests/pagination/content-inserted-009.xhtml b/layout/reftests/pagination/content-inserted-009.xhtml index 031b27217b9..1bb95d79288 100644 --- a/layout/reftests/pagination/content-inserted-009.xhtml +++ b/layout/reftests/pagination/content-inserted-009.xhtml @@ -13,6 +13,7 @@ width: 450px; -moz-column-width: 150px; -moz-column-gap: 0; + -moz-column-fill: auto; border: 3px solid silver; } diff --git a/layout/style/nsCSSKeywordList.h b/layout/style/nsCSSKeywordList.h index 671945705dc..4da52965c7e 100644 --- a/layout/style/nsCSSKeywordList.h +++ b/layout/style/nsCSSKeywordList.h @@ -198,6 +198,7 @@ CSS_KEY(auto, auto) CSS_KEY(avoid, avoid) CSS_KEY(background, background) CSS_KEY(backwards, backwards) +CSS_KEY(balance, balance) CSS_KEY(baseline, baseline) CSS_KEY(bidi-override, bidi_override) CSS_KEY(blink, blink) diff --git a/layout/style/nsCSSPropList.h b/layout/style/nsCSSPropList.h index 69268eee5a4..3b2b7a00ff5 100644 --- a/layout/style/nsCSSPropList.h +++ b/layout/style/nsCSSPropList.h @@ -1256,6 +1256,15 @@ CSS_PROP_COLUMN( nsnull, offsetof(nsStyleColumn, mColumnCount), eStyleAnimType_Custom) +CSS_PROP_COLUMN( + -moz-column-fill, + _moz_column_fill, + CSS_PROP_DOMPROP_PREFIXED(ColumnFill), + CSS_PROPERTY_PARSE_VALUE, + VARIANT_HK, + kColumnFillKTable, + CSS_PROP_NO_OFFSET, + eStyleAnimType_None) CSS_PROP_COLUMN( -moz-column-width, _moz_column_width, diff --git a/layout/style/nsCSSProps.cpp b/layout/style/nsCSSProps.cpp index 152df6afec0..d833e9f3fae 100644 --- a/layout/style/nsCSSProps.cpp +++ b/layout/style/nsCSSProps.cpp @@ -1468,6 +1468,12 @@ const PRInt32 nsCSSProps::kColorInterpolationKTable[] = { eCSSKeyword_UNKNOWN, -1 }; +const PRInt32 nsCSSProps::kColumnFillKTable[] = { + eCSSKeyword_auto, NS_STYLE_COLUMN_FILL_AUTO, + eCSSKeyword_balance, NS_STYLE_COLUMN_FILL_BALANCE, + eCSSKeyword_UNKNOWN, -1 +}; + bool nsCSSProps::FindKeyword(nsCSSKeyword aKeyword, const PRInt32 aTable[], PRInt32& aResult) { diff --git a/layout/style/nsCSSProps.h b/layout/style/nsCSSProps.h index ab1dc3f9b7d..11e2a08cdac 100644 --- a/layout/style/nsCSSProps.h +++ b/layout/style/nsCSSProps.h @@ -359,6 +359,7 @@ public: static const PRInt32 kTextAnchorKTable[]; static const PRInt32 kTextRenderingKTable[]; static const PRInt32 kColorInterpolationKTable[]; + static const PRInt32 kColumnFillKTable[]; static const PRInt32 kBoxPropSourceKTable[]; static const PRInt32 kBoxShadowTypeKTable[]; static const PRInt32 kBoxSizingKTable[]; diff --git a/layout/style/nsComputedDOMStyle.cpp b/layout/style/nsComputedDOMStyle.cpp index 29a3995b852..3f8b150b853 100644 --- a/layout/style/nsComputedDOMStyle.cpp +++ b/layout/style/nsComputedDOMStyle.cpp @@ -740,6 +740,16 @@ nsComputedDOMStyle::DoGetColumnGap() return val; } +nsIDOMCSSValue* +nsComputedDOMStyle::DoGetColumnFill() +{ + nsROCSSPrimitiveValue *val = GetROCSSPrimitiveValue(); + val->SetIdent( + nsCSSProps::ValueToKeywordEnum(GetStyleColumn()->mColumnFill, + nsCSSProps::kColumnFillKTable)); + return val; +} + nsIDOMCSSValue* nsComputedDOMStyle::DoGetColumnRuleWidth() { @@ -4570,6 +4580,7 @@ nsComputedDOMStyle::GetQueryablePropertyMap(PRUint32* aLength) COMPUTED_STYLE_MAP_ENTRY(box_pack, BoxPack), COMPUTED_STYLE_MAP_ENTRY(box_sizing, BoxSizing), COMPUTED_STYLE_MAP_ENTRY(_moz_column_count, ColumnCount), + COMPUTED_STYLE_MAP_ENTRY(_moz_column_fill, ColumnFill), COMPUTED_STYLE_MAP_ENTRY(_moz_column_gap, ColumnGap), //// COMPUTED_STYLE_MAP_ENTRY(_moz_column_rule, ColumnRule), COMPUTED_STYLE_MAP_ENTRY(_moz_column_rule_color, ColumnRuleColor), diff --git a/layout/style/nsComputedDOMStyle.h b/layout/style/nsComputedDOMStyle.h index d1a432136bd..b9aca94c93a 100644 --- a/layout/style/nsComputedDOMStyle.h +++ b/layout/style/nsComputedDOMStyle.h @@ -365,6 +365,7 @@ private: /* Column properties */ nsIDOMCSSValue* DoGetColumnCount(); + nsIDOMCSSValue* DoGetColumnFill(); nsIDOMCSSValue* DoGetColumnWidth(); nsIDOMCSSValue* DoGetColumnGap(); nsIDOMCSSValue* DoGetColumnRuleWidth(); diff --git a/layout/style/nsRuleNode.cpp b/layout/style/nsRuleNode.cpp index 2918a54b7dd..2ef77de98cb 100644 --- a/layout/style/nsRuleNode.cpp +++ b/layout/style/nsRuleNode.cpp @@ -6496,6 +6496,13 @@ nsRuleNode::ComputeColumnData(void* aStartStruct, column->mColumnRuleColorIsForeground = false; } + // column-fill: enum + SetDiscrete(*aRuleData->ValueForColumnFill(), + column->mColumnFill, canStoreInRuleTree, + SETDSC_ENUMERATED, parent->mColumnFill, + NS_STYLE_COLUMN_FILL_BALANCE, + 0, 0, 0, 0); + COMPUTE_END_RESET(Column, column) } diff --git a/layout/style/nsStyleStruct.cpp b/layout/style/nsStyleStruct.cpp index 8aa5a85e3fe..9d55b3f3b2b 100644 --- a/layout/style/nsStyleStruct.cpp +++ b/layout/style/nsStyleStruct.cpp @@ -776,6 +776,7 @@ nsStyleColumn::nsStyleColumn(nsPresContext* aPresContext) mColumnCount = NS_STYLE_COLUMN_COUNT_AUTO; mColumnWidth.SetAutoValue(); mColumnGap.SetNormalValue(); + mColumnFill = NS_STYLE_COLUMN_FILL_BALANCE; mColumnRuleWidth = (aPresContext->GetBorderWidthTable())[NS_STYLE_BORDER_WIDTH_MEDIUM]; mColumnRuleStyle = NS_STYLE_BORDER_STYLE_NONE; @@ -807,7 +808,8 @@ nsChangeHint nsStyleColumn::CalcDifference(const nsStyleColumn& aOther) const return NS_STYLE_HINT_FRAMECHANGE; if (mColumnWidth != aOther.mColumnWidth || - mColumnGap != aOther.mColumnGap) + mColumnGap != aOther.mColumnGap || + mColumnFill != aOther.mColumnFill) return NS_STYLE_HINT_REFLOW; if (GetComputedColumnRuleWidth() != aOther.GetComputedColumnRuleWidth() || diff --git a/layout/style/nsStyleStruct.h b/layout/style/nsStyleStruct.h index d8114caec12..648421fa890 100644 --- a/layout/style/nsStyleStruct.h +++ b/layout/style/nsStyleStruct.h @@ -2085,6 +2085,8 @@ struct nsStyleColumn { nscolor mColumnRuleColor; // [reset] PRUint8 mColumnRuleStyle; // [reset] + PRUint8 mColumnFill; // [reset] see nsStyleConsts.h + // See https://bugzilla.mozilla.org/show_bug.cgi?id=271586#c43 for why // this is hard to replace with 'currentColor'. bool mColumnRuleColorIsForeground; diff --git a/layout/style/test/property_database.js b/layout/style/test/property_database.js index 7d7f231f566..512734f35b3 100644 --- a/layout/style/test/property_database.js +++ b/layout/style/test/property_database.js @@ -491,6 +491,14 @@ var gCSSProperties = { // negative and zero invalid per editor's draft invalid_values: [ "-1", "0", "3px" ] }, + "-moz-column-fill": { + domProp: "MozColumnFill", + inherited: false, + type: CSS_TYPE_LONGHAND, + initial_values: [ "balance" ], + other_values: [ "auto" ], + invalid_values: [ "2px", "dotted", "5em" ] + }, "-moz-column-gap": { domProp: "MozColumnGap", inherited: false,