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 1466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1477 } else if (value->unit == CSSPrimitiveValue::CSS_URI) { | 1477 } else if (value->unit == CSSPrimitiveValue::CSS_URI) { |
1478 parsedValue = CSSPrimitiveValue::create(value->string, CSSPrimitiveV
alue::CSS_URI); | 1478 parsedValue = CSSPrimitiveValue::create(value->string, CSSPrimitiveV
alue::CSS_URI); |
1479 addProperty(propId, parsedValue.release(), important); | 1479 addProperty(propId, parsedValue.release(), important); |
1480 return true; | 1480 return true; |
1481 } | 1481 } |
1482 break; | 1482 break; |
1483 case CSSPropertyShapeOutside: | 1483 case CSSPropertyShapeOutside: |
1484 parsedValue = parseShapeProperty(propId); | 1484 parsedValue = parseShapeProperty(propId); |
1485 break; | 1485 break; |
1486 case CSSPropertyShapeMargin: | 1486 case CSSPropertyShapeMargin: |
1487 validPrimitive = (RuntimeEnabledFeatures::cssShapesEnabled() && !id && v
alidUnit(value, FLength | FPercent | FNonNeg)); | 1487 validPrimitive = (!id && validUnit(value, FLength | FPercent | FNonNeg))
; |
1488 break; | 1488 break; |
1489 case CSSPropertyShapeImageThreshold: | 1489 case CSSPropertyShapeImageThreshold: |
1490 validPrimitive = (RuntimeEnabledFeatures::cssShapesEnabled() && !id && v
alidUnit(value, FNumber)); | 1490 validPrimitive = (!id && validUnit(value, FNumber)); |
1491 break; | 1491 break; |
1492 | 1492 |
1493 case CSSPropertyTouchAction: | 1493 case CSSPropertyTouchAction: |
1494 // auto | none | [pan-x || pan-y] | manipulation | 1494 // auto | none | [pan-x || pan-y] | manipulation |
1495 return parseTouchAction(important); | 1495 return parseTouchAction(important); |
1496 | 1496 |
1497 case CSSPropertyAlignSelf: | 1497 case CSSPropertyAlignSelf: |
1498 ASSERT(RuntimeEnabledFeatures::cssGridLayoutEnabled()); | 1498 ASSERT(RuntimeEnabledFeatures::cssGridLayoutEnabled()); |
1499 return parseItemPositionOverflowPosition(propId, important); | 1499 return parseItemPositionOverflowPosition(propId, important); |
1500 | 1500 |
(...skipping 2858 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4359 return true; | 4359 return true; |
4360 default: | 4360 default: |
4361 break; | 4361 break; |
4362 } | 4362 } |
4363 | 4363 |
4364 return false; | 4364 return false; |
4365 } | 4365 } |
4366 | 4366 |
4367 PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseShapeProperty(CSSProper
tyID propId) | 4367 PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseShapeProperty(CSSProper
tyID propId) |
4368 { | 4368 { |
4369 if (!RuntimeEnabledFeatures::cssShapesEnabled()) | |
4370 return nullptr; | |
4371 | |
4372 CSSParserValue* value = m_valueList->current(); | 4369 CSSParserValue* value = m_valueList->current(); |
4373 CSSValueID valueId = value->id; | 4370 CSSValueID valueId = value->id; |
4374 | 4371 |
4375 if (valueId == CSSValueNone) { | 4372 if (valueId == CSSValueNone) { |
4376 RefPtrWillBeRawPtr<CSSPrimitiveValue> keywordValue = parseValidPrimitive
(valueId, value); | 4373 RefPtrWillBeRawPtr<CSSPrimitiveValue> keywordValue = parseValidPrimitive
(valueId, value); |
4377 m_valueList->next(); | 4374 m_valueList->next(); |
4378 return keywordValue.release(); | 4375 return keywordValue.release(); |
4379 } | 4376 } |
4380 | 4377 |
4381 RefPtrWillBeRawPtr<CSSValue> imageValue = nullptr; | 4378 RefPtrWillBeRawPtr<CSSValue> imageValue = nullptr; |
(...skipping 4045 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8427 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueFill)); | 8424 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueFill)); |
8428 if (!seenStroke) | 8425 if (!seenStroke) |
8429 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueStroke)
); | 8426 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueStroke)
); |
8430 if (!seenMarkers) | 8427 if (!seenMarkers) |
8431 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueMarkers
)); | 8428 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueMarkers
)); |
8432 | 8429 |
8433 return parsedValues.release(); | 8430 return parsedValues.release(); |
8434 } | 8431 } |
8435 | 8432 |
8436 } // namespace WebCore | 8433 } // namespace WebCore |
OLD | NEW |