| 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 1460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1471 if (id == CSSValueNone) { | 1471 if (id == CSSValueNone) { |
| 1472 validPrimitive = true; | 1472 validPrimitive = true; |
| 1473 } else if (value->unit == CSSParserValue::Function) { | 1473 } else if (value->unit == CSSParserValue::Function) { |
| 1474 parsedValue = parseBasicShape(); | 1474 parsedValue = parseBasicShape(); |
| 1475 } else if (value->unit == CSSPrimitiveValue::CSS_URI) { | 1475 } else if (value->unit == CSSPrimitiveValue::CSS_URI) { |
| 1476 parsedValue = CSSPrimitiveValue::create(value->string, CSSPrimitiveV
alue::CSS_URI); | 1476 parsedValue = CSSPrimitiveValue::create(value->string, CSSPrimitiveV
alue::CSS_URI); |
| 1477 addProperty(propId, parsedValue.release(), important); | 1477 addProperty(propId, parsedValue.release(), important); |
| 1478 return true; | 1478 return true; |
| 1479 } | 1479 } |
| 1480 break; | 1480 break; |
| 1481 case CSSPropertyShapeInside: | |
| 1482 case CSSPropertyShapeOutside: | 1481 case CSSPropertyShapeOutside: |
| 1483 parsedValue = parseShapeProperty(propId); | 1482 parsedValue = parseShapeProperty(propId); |
| 1484 break; | 1483 break; |
| 1485 case CSSPropertyShapeMargin: | 1484 case CSSPropertyShapeMargin: |
| 1486 case CSSPropertyShapePadding: | 1485 case CSSPropertyShapePadding: |
| 1487 validPrimitive = (RuntimeEnabledFeatures::cssShapesEnabled() && !id && v
alidUnit(value, FLength | FNonNeg)); | 1486 validPrimitive = (RuntimeEnabledFeatures::cssShapesEnabled() && !id && v
alidUnit(value, FLength | FNonNeg)); |
| 1488 break; | 1487 break; |
| 1489 case CSSPropertyShapeImageThreshold: | 1488 case CSSPropertyShapeImageThreshold: |
| 1490 validPrimitive = (RuntimeEnabledFeatures::cssShapesEnabled() && !id && v
alidUnit(value, FNumber)); | 1489 validPrimitive = (RuntimeEnabledFeatures::cssShapesEnabled() && !id && v
alidUnit(value, FNumber)); |
| 1491 break; | 1490 break; |
| (...skipping 2713 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4205 } | 4204 } |
| 4206 | 4205 |
| 4207 PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseShapeProperty(CSSProper
tyID propId) | 4206 PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseShapeProperty(CSSProper
tyID propId) |
| 4208 { | 4207 { |
| 4209 if (!RuntimeEnabledFeatures::cssShapesEnabled()) | 4208 if (!RuntimeEnabledFeatures::cssShapesEnabled()) |
| 4210 return nullptr; | 4209 return nullptr; |
| 4211 | 4210 |
| 4212 CSSParserValue* value = m_valueList->current(); | 4211 CSSParserValue* value = m_valueList->current(); |
| 4213 CSSValueID valueId = value->id; | 4212 CSSValueID valueId = value->id; |
| 4214 | 4213 |
| 4215 if (valueId == CSSValueNone | 4214 if (valueId == CSSValueNone) { |
| 4216 || (valueId == CSSValueOutsideShape && propId == CSSPropertyShapeInside)
) { | |
| 4217 RefPtrWillBeRawPtr<CSSPrimitiveValue> keywordValue = parseValidPrimitive
(valueId, value); | 4215 RefPtrWillBeRawPtr<CSSPrimitiveValue> keywordValue = parseValidPrimitive
(valueId, value); |
| 4218 m_valueList->next(); | 4216 m_valueList->next(); |
| 4219 return keywordValue.release(); | 4217 return keywordValue.release(); |
| 4220 } | 4218 } |
| 4221 | 4219 |
| 4222 RefPtrWillBeRawPtr<CSSValue> imageValue = nullptr; | 4220 RefPtrWillBeRawPtr<CSSValue> imageValue = nullptr; |
| 4223 if (valueId != CSSValueNone && parseFillImage(m_valueList.get(), imageValue)
) { | 4221 if (valueId != CSSValueNone && parseFillImage(m_valueList.get(), imageValue)
) { |
| 4224 m_valueList->next(); | 4222 m_valueList->next(); |
| 4225 return imageValue.release(); | 4223 return imageValue.release(); |
| 4226 } | 4224 } |
| (...skipping 4005 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8232 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueFill)); | 8230 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueFill)); |
| 8233 if (!seenStroke) | 8231 if (!seenStroke) |
| 8234 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueStroke)
); | 8232 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueStroke)
); |
| 8235 if (!seenMarkers) | 8233 if (!seenMarkers) |
| 8236 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueMarkers
)); | 8234 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueMarkers
)); |
| 8237 | 8235 |
| 8238 return parsedValues.release(); | 8236 return parsedValues.release(); |
| 8239 } | 8237 } |
| 8240 | 8238 |
| 8241 } // namespace WebCore | 8239 } // namespace WebCore |
| OLD | NEW |