OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2003 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2003 Lars Knoll (knoll@kde.org) |
3 * Copyright (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) | 3 * Copyright (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) |
4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc.
All rights reserved. | 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc.
All rights reserved. |
5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> | 5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> |
6 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> | 6 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> |
7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
8 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved. | 8 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved. |
9 * Copyright (C) 2012 Intel Corporation. All rights reserved. | 9 * Copyright (C) 2012 Intel Corporation. All rights reserved. |
10 * | 10 * |
(...skipping 1322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1333 else | 1333 else |
1334 validPrimitive = validUnit(value, FLength | FNonNeg); | 1334 validPrimitive = validUnit(value, FLength | FNonNeg); |
1335 break; | 1335 break; |
1336 case CSSPropertyWebkitColumnSpan: // none | all | 1 (will be dropped in the
unprefixed property) | 1336 case CSSPropertyWebkitColumnSpan: // none | all | 1 (will be dropped in the
unprefixed property) |
1337 validPrimitive = id == CSSValueAll || id == CSSValueNone || (value->unit
== CSSPrimitiveValue::CSS_NUMBER && value->fValue == 1); | 1337 validPrimitive = id == CSSValueAll || id == CSSValueNone || (value->unit
== CSSPrimitiveValue::CSS_NUMBER && value->fValue == 1); |
1338 break; | 1338 break; |
1339 case CSSPropertyWebkitColumnWidth: // auto | <length> | 1339 case CSSPropertyWebkitColumnWidth: // auto | <length> |
1340 parsedValue = parseColumnWidth(); | 1340 parsedValue = parseColumnWidth(); |
1341 break; | 1341 break; |
1342 case CSSPropertyWillChange: | 1342 case CSSPropertyWillChange: |
1343 if (!RuntimeEnabledFeatures::cssWillChangeEnabled()) | |
1344 return false; | |
1345 return parseWillChange(important); | 1343 return parseWillChange(important); |
1346 // End of CSS3 properties | 1344 // End of CSS3 properties |
1347 | 1345 |
1348 // Apple specific properties. These will never be standardized and are pure
ly to | 1346 // Apple specific properties. These will never be standardized and are pure
ly to |
1349 // support custom WebKit-based Apple applications. | 1347 // support custom WebKit-based Apple applications. |
1350 case CSSPropertyWebkitLineClamp: | 1348 case CSSPropertyWebkitLineClamp: |
1351 // When specifying number of lines, don't allow 0 as a valid value | 1349 // When specifying number of lines, don't allow 0 as a valid value |
1352 // When specifying either type of unit, require non-negative integers | 1350 // When specifying either type of unit, require non-negative integers |
1353 validPrimitive = (!id && (value->unit == CSSPrimitiveValue::CSS_PERCENTA
GE || value->fValue) && validUnit(value, FInteger | FPercent | FNonNeg, HTMLQuir
ksMode)); | 1351 validPrimitive = (!id && (value->unit == CSSPrimitiveValue::CSS_PERCENTA
GE || value->fValue) && validUnit(value, FInteger | FPercent | FNonNeg, HTMLQuir
ksMode)); |
1354 break; | 1352 break; |
(...skipping 5919 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7274 | 7272 |
7275 // Skip the comma and move on to the next argument. | 7273 // Skip the comma and move on to the next argument. |
7276 arg = functionArgs->next(); | 7274 arg = functionArgs->next(); |
7277 } | 7275 } |
7278 | 7276 |
7279 return imageSet.release(); | 7277 return imageSet.release(); |
7280 } | 7278 } |
7281 | 7279 |
7282 bool CSSPropertyParser::parseWillChange(bool important) | 7280 bool CSSPropertyParser::parseWillChange(bool important) |
7283 { | 7281 { |
7284 ASSERT(RuntimeEnabledFeatures::cssWillChangeEnabled()); | |
7285 | |
7286 RefPtrWillBeRawPtr<CSSValueList> values = CSSValueList::createCommaSeparated
(); | 7282 RefPtrWillBeRawPtr<CSSValueList> values = CSSValueList::createCommaSeparated
(); |
7287 if (m_valueList->current()->id == CSSValueAuto) { | 7283 if (m_valueList->current()->id == CSSValueAuto) { |
7288 if (m_valueList->next()) | 7284 if (m_valueList->next()) |
7289 return false; | 7285 return false; |
7290 } | 7286 } |
7291 | 7287 |
7292 // Every comma-separated list of CSS_IDENTs is a valid will-change value, | 7288 // Every comma-separated list of CSS_IDENTs is a valid will-change value, |
7293 // unless the list includes an explicitly disallowed CSS_IDENT. | 7289 // unless the list includes an explicitly disallowed CSS_IDENT. |
7294 bool expectComma = false; | 7290 bool expectComma = false; |
7295 for (CSSParserValue* currentValue = m_valueList->current(); currentValue; cu
rrentValue = m_valueList->next()) { | 7291 for (CSSParserValue* currentValue = m_valueList->current(); currentValue; cu
rrentValue = m_valueList->next()) { |
(...skipping 1183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8479 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueFill)); | 8475 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueFill)); |
8480 if (!seenStroke) | 8476 if (!seenStroke) |
8481 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueStroke)
); | 8477 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueStroke)
); |
8482 if (!seenMarkers) | 8478 if (!seenMarkers) |
8483 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueMarkers
)); | 8479 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueMarkers
)); |
8484 | 8480 |
8485 return parsedValues.release(); | 8481 return parsedValues.release(); |
8486 } | 8482 } |
8487 | 8483 |
8488 } // namespace blink | 8484 } // namespace blink |
OLD | NEW |