Commit 60ac8700 authored by mstensho's avatar mstensho Committed by Commit bot

Remove support for -webkit-column-span:1

This was an "alias" for -webkit-column-span:none. '1' is not a valid value,
according to the spec. The only valid values are 'none' and 'all'. In an older
version of the spec, '1' and 'all' were the valid values. In the latest version
(2011), '1' was changed to 'none'.

It's highly unlikely that removing this should cause compatibility problems.
The initial value is 'none' (which is what '1' was mapped to), so in order to
cause trouble, one would need a declaration -webkit-column-span:all to be
overridden by a -webkit-column-span:1. I went through httparchive to verify.
No sites were found to do this.

R=timloh@chromium.org

Review URL: https://codereview.chromium.org/1635993002

Cr-Commit-Position: refs/heads/master@{#371773}
parent e7bf5819
column-span only takes the values 'none' and 'all'. '1' is invalid.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS getComputedStyle(document.getElementById('elm')).WebkitColumnSpan is 'all'
PASS successfullyParsed is true
TEST COMPLETE
<!DOCTYPE html>
<script src="../../../resources/js-test.js"></script>
<div id="elm" style="-webkit-column-span:all; -webkit-column-span:1;"></div>
<script>
description("column-span only takes the values 'none' and 'all'. '1' is invalid.");
shouldBe("getComputedStyle(document.getElementById('elm')).WebkitColumnSpan", "'all'");
</script>
......@@ -184,22 +184,16 @@ template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ColumnSpan columnSpan)
template<> inline ColumnSpan CSSPrimitiveValue::convertTo() const
{
// Map 1 to none for compatibility reasons.
if (type() == UnitType::Integer && m_value.num == 1)
return ColumnSpanNone;
ASSERT(isValueID());
switch (m_value.valueID) {
case CSSValueAll:
return ColumnSpanAll;
default:
ASSERT_NOT_REACHED();
// fall-through
case CSSValueNone:
return ColumnSpanNone;
default:
break;
}
ASSERT_NOT_REACHED();
return ColumnSpanNone;
}
......
......@@ -1484,17 +1484,7 @@ static PassRefPtrWillBeRawPtr<CSSValue> consumeColumnGap(CSSParserTokenRange& ra
static PassRefPtrWillBeRawPtr<CSSValue> consumeColumnSpan(CSSParserTokenRange& range, CSSParserMode cssParserMode)
{
CSSValueID id = range.peek().id();
if (id == CSSValueAll || id == CSSValueNone)
return consumeIdent(range);
if (range.peek().type() != NumberToken)
return nullptr;
if (RefPtrWillBeRawPtr<CSSPrimitiveValue> spanValue = consumeInteger(range)) {
// 1 (will be dropped in the unprefixed property).
if (spanValue->getIntValue() == 1)
return spanValue.release();
}
return nullptr;
return consumeIdent<CSSValueAll, CSSValueNone>(range);
}
static PassRefPtrWillBeRawPtr<CSSValue> consumeZoom(CSSParserTokenRange& range, const CSSParserContext& context)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment