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 if (id == CSSValueNone) { | 1476 if (id == CSSValueNone) { |
1477 validPrimitive = true; | 1477 validPrimitive = true; |
1478 } else if (value->unit == CSSParserValue::Function) { | 1478 } else if (value->unit == CSSParserValue::Function) { |
1479 parsedValue = parseBasicShape(); | 1479 parsedValue = parseBasicShape(); |
1480 } else if (value->unit == CSSPrimitiveValue::CSS_URI) { | 1480 } else if (value->unit == CSSPrimitiveValue::CSS_URI) { |
1481 parsedValue = CSSPrimitiveValue::create(value->string, CSSPrimitiveV
alue::CSS_URI); | 1481 parsedValue = CSSPrimitiveValue::create(value->string, CSSPrimitiveV
alue::CSS_URI); |
1482 addProperty(propId, parsedValue.release(), important); | 1482 addProperty(propId, parsedValue.release(), important); |
1483 return true; | 1483 return true; |
1484 } | 1484 } |
1485 break; | 1485 break; |
1486 case CSSPropertyShapeInside: | |
1487 case CSSPropertyShapeOutside: | 1486 case CSSPropertyShapeOutside: |
1488 parsedValue = parseShapeProperty(propId); | 1487 parsedValue = parseShapeProperty(propId); |
1489 break; | 1488 break; |
1490 case CSSPropertyShapeMargin: | 1489 case CSSPropertyShapeMargin: |
1491 case CSSPropertyShapePadding: | 1490 case CSSPropertyShapePadding: |
1492 validPrimitive = (RuntimeEnabledFeatures::cssShapesEnabled() && !id && v
alidUnit(value, FLength | FNonNeg)); | 1491 validPrimitive = (RuntimeEnabledFeatures::cssShapesEnabled() && !id && v
alidUnit(value, FLength | FNonNeg)); |
1493 break; | 1492 break; |
1494 case CSSPropertyShapeImageThreshold: | 1493 case CSSPropertyShapeImageThreshold: |
1495 validPrimitive = (RuntimeEnabledFeatures::cssShapesEnabled() && !id && v
alidUnit(value, FNumber)); | 1494 validPrimitive = (RuntimeEnabledFeatures::cssShapesEnabled() && !id && v
alidUnit(value, FNumber)); |
1496 break; | 1495 break; |
(...skipping 2699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4196 PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseShapeProperty(CSSProper
tyID propId) | 4195 PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseShapeProperty(CSSProper
tyID propId) |
4197 { | 4196 { |
4198 if (!RuntimeEnabledFeatures::cssShapesEnabled()) | 4197 if (!RuntimeEnabledFeatures::cssShapesEnabled()) |
4199 return nullptr; | 4198 return nullptr; |
4200 | 4199 |
4201 CSSParserValue* value = m_valueList->current(); | 4200 CSSParserValue* value = m_valueList->current(); |
4202 CSSValueID valueId = value->id; | 4201 CSSValueID valueId = value->id; |
4203 RefPtrWillBeRawPtr<CSSPrimitiveValue> boxValue; | 4202 RefPtrWillBeRawPtr<CSSPrimitiveValue> boxValue; |
4204 RefPtrWillBeRawPtr<CSSPrimitiveValue> shapeValue; | 4203 RefPtrWillBeRawPtr<CSSPrimitiveValue> shapeValue; |
4205 | 4204 |
4206 if (valueId == CSSValueNone | 4205 if (valueId == CSSValueNone) { |
4207 || (valueId == CSSValueOutsideShape && propId == CSSPropertyShapeInside)
) { | |
4208 RefPtrWillBeRawPtr<CSSPrimitiveValue> keywordValue = parseValidPrimitive
(valueId, value); | 4206 RefPtrWillBeRawPtr<CSSPrimitiveValue> keywordValue = parseValidPrimitive
(valueId, value); |
4209 m_valueList->next(); | 4207 m_valueList->next(); |
4210 return keywordValue.release(); | 4208 return keywordValue.release(); |
4211 } | 4209 } |
4212 | 4210 |
4213 RefPtrWillBeRawPtr<CSSValue> imageValue; | 4211 RefPtrWillBeRawPtr<CSSValue> imageValue; |
4214 if (valueId != CSSValueNone && parseFillImage(m_valueList.get(), imageValue)
) { | 4212 if (valueId != CSSValueNone && parseFillImage(m_valueList.get(), imageValue)
) { |
4215 m_valueList->next(); | 4213 m_valueList->next(); |
4216 return imageValue.release(); | 4214 return imageValue.release(); |
4217 } | 4215 } |
(...skipping 3999 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8217 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueFill)); | 8215 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueFill)); |
8218 if (!seenStroke) | 8216 if (!seenStroke) |
8219 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueStroke)
); | 8217 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueStroke)
); |
8220 if (!seenMarkers) | 8218 if (!seenMarkers) |
8221 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueMarkers
)); | 8219 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueMarkers
)); |
8222 | 8220 |
8223 return parsedValues.release(); | 8221 return parsedValues.release(); |
8224 } | 8222 } |
8225 | 8223 |
8226 } // namespace WebCore | 8224 } // namespace WebCore |
OLD | NEW |