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 1465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1476 validPrimitive = (!id && validUnit(value, FLength | FPercent | FNonNeg))
; | 1476 validPrimitive = (!id && validUnit(value, FLength | FPercent | FNonNeg))
; |
1477 break; | 1477 break; |
1478 case CSSPropertyShapeImageThreshold: | 1478 case CSSPropertyShapeImageThreshold: |
1479 validPrimitive = (!id && validUnit(value, FNumber)); | 1479 validPrimitive = (!id && validUnit(value, FNumber)); |
1480 break; | 1480 break; |
1481 | 1481 |
1482 case CSSPropertyTouchAction: | 1482 case CSSPropertyTouchAction: |
1483 parsedValue = parseTouchAction(); | 1483 parsedValue = parseTouchAction(); |
1484 break; | 1484 break; |
1485 | 1485 |
| 1486 case CSSPropertyScrollBlocksOn: |
| 1487 parsedValue = parseScrollBlocksOn(); |
| 1488 break; |
| 1489 |
1486 case CSSPropertyAlignSelf: | 1490 case CSSPropertyAlignSelf: |
1487 ASSERT(RuntimeEnabledFeatures::cssGridLayoutEnabled()); | 1491 ASSERT(RuntimeEnabledFeatures::cssGridLayoutEnabled()); |
1488 return parseItemPositionOverflowPosition(propId, important); | 1492 return parseItemPositionOverflowPosition(propId, important); |
1489 | 1493 |
1490 case CSSPropertyAlignItems: | 1494 case CSSPropertyAlignItems: |
1491 ASSERT(RuntimeEnabledFeatures::cssGridLayoutEnabled()); | 1495 ASSERT(RuntimeEnabledFeatures::cssGridLayoutEnabled()); |
1492 return parseItemPositionOverflowPosition(propId, important); | 1496 return parseItemPositionOverflowPosition(propId, important); |
1493 | 1497 |
1494 // Properties below are validated inside parseViewportProperty, because we | 1498 // Properties below are validated inside parseViewportProperty, because we |
1495 // check for parser state. We need to invalidate if someone adds them outsid
e | 1499 // check for parser state. We need to invalidate if someone adds them outsid
e |
(...skipping 5882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7378 } | 7382 } |
7379 value = m_valueList->next(); | 7383 value = m_valueList->next(); |
7380 } | 7384 } |
7381 | 7385 |
7382 if (list->length()) | 7386 if (list->length()) |
7383 return list.release(); | 7387 return list.release(); |
7384 | 7388 |
7385 return nullptr; | 7389 return nullptr; |
7386 } | 7390 } |
7387 | 7391 |
| 7392 PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseScrollBlocksOn() |
| 7393 { |
| 7394 CSSParserValue* value = m_valueList->current(); |
| 7395 if (value->id == CSSValueNone) { |
| 7396 m_valueList->next(); |
| 7397 return cssValuePool().createIdentifierValue(CSSValueNone); |
| 7398 } |
| 7399 |
| 7400 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated()
; |
| 7401 while (value) { |
| 7402 switch (value->id) { |
| 7403 case CSSValueStartTouch: |
| 7404 case CSSValueWheelEvent: |
| 7405 case CSSValueScrollEvent: { |
| 7406 RefPtrWillBeRawPtr<CSSValue> flagValue = cssValuePool().createIdenti
fierValue(value->id); |
| 7407 if (list->hasValue(flagValue.get())) |
| 7408 return nullptr; |
| 7409 list->append(flagValue.release()); |
| 7410 break; |
| 7411 } |
| 7412 default: |
| 7413 return nullptr; |
| 7414 } |
| 7415 value = m_valueList->next(); |
| 7416 } |
| 7417 |
| 7418 ASSERT(list->length()); |
| 7419 return list.release(); |
| 7420 } |
| 7421 |
7388 void CSSPropertyParser::addTextDecorationProperty(CSSPropertyID propId, PassRefP
trWillBeRawPtr<CSSValue> value, bool important) | 7422 void CSSPropertyParser::addTextDecorationProperty(CSSPropertyID propId, PassRefP
trWillBeRawPtr<CSSValue> value, bool important) |
7389 { | 7423 { |
7390 // The text-decoration-line property takes priority over text-decoration, un
less the latter has important priority set. | 7424 // The text-decoration-line property takes priority over text-decoration, un
less the latter has important priority set. |
7391 if (propId == CSSPropertyTextDecoration && !important && !inShorthand()) { | 7425 if (propId == CSSPropertyTextDecoration && !important && !inShorthand()) { |
7392 for (unsigned i = 0; i < m_parsedProperties.size(); ++i) { | 7426 for (unsigned i = 0; i < m_parsedProperties.size(); ++i) { |
7393 if (m_parsedProperties[i].id() == CSSPropertyTextDecorationLine) | 7427 if (m_parsedProperties[i].id() == CSSPropertyTextDecorationLine) |
7394 return; | 7428 return; |
7395 } | 7429 } |
7396 } | 7430 } |
7397 addProperty(propId, value, important); | 7431 addProperty(propId, value, important); |
(...skipping 1029 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8427 return nullptr; | 8461 return nullptr; |
8428 a = args->next(); | 8462 a = args->next(); |
8429 | 8463 |
8430 argNumber++; | 8464 argNumber++; |
8431 } | 8465 } |
8432 | 8466 |
8433 return transformValue.release(); | 8467 return transformValue.release(); |
8434 } | 8468 } |
8435 | 8469 |
8436 } // namespace blink | 8470 } // namespace blink |
OLD | NEW |