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 1155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1166 case CSSPropertyWebkitTextStroke: | 1166 case CSSPropertyWebkitTextStroke: |
1167 case CSSPropertyWebkitTextStrokeColor: | 1167 case CSSPropertyWebkitTextStrokeColor: |
1168 case CSSPropertyWebkitTextStrokeWidth: | 1168 case CSSPropertyWebkitTextStrokeWidth: |
1169 case CSSPropertyTransform: | 1169 case CSSPropertyTransform: |
1170 case CSSPropertyFill: | 1170 case CSSPropertyFill: |
1171 case CSSPropertyStroke: | 1171 case CSSPropertyStroke: |
1172 case CSSPropertyStopColor: | 1172 case CSSPropertyStopColor: |
1173 case CSSPropertyFloodColor: | 1173 case CSSPropertyFloodColor: |
1174 case CSSPropertyLightingColor: | 1174 case CSSPropertyLightingColor: |
1175 case CSSPropertyPaintOrder: | 1175 case CSSPropertyPaintOrder: |
| 1176 case CSSPropertyMarker: |
| 1177 case CSSPropertyMarkerStart: |
| 1178 case CSSPropertyMarkerMid: |
| 1179 case CSSPropertyMarkerEnd: |
1176 validPrimitive = false; | 1180 validPrimitive = false; |
1177 break; | 1181 break; |
1178 | 1182 |
1179 case CSSPropertyScrollSnapPointsX: | 1183 case CSSPropertyScrollSnapPointsX: |
1180 case CSSPropertyScrollSnapPointsY: | 1184 case CSSPropertyScrollSnapPointsY: |
1181 parsedValue = parseScrollSnapPoints(); | 1185 parsedValue = parseScrollSnapPoints(); |
1182 break; | 1186 break; |
1183 case CSSPropertyScrollSnapCoordinate: | 1187 case CSSPropertyScrollSnapCoordinate: |
1184 parsedValue = parseScrollSnapCoordinate(); | 1188 parsedValue = parseScrollSnapCoordinate(); |
1185 break; | 1189 break; |
(...skipping 4281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5467 case CSSPropertyBaselineShift: | 5471 case CSSPropertyBaselineShift: |
5468 // baseline | super | sub | <percentage> | <length> | inherit | 5472 // baseline | super | sub | <percentage> | <length> | inherit |
5469 if (id == CSSValueBaseline || id == CSSValueSub || id == CSSValueSuper) | 5473 if (id == CSSValueBaseline || id == CSSValueSub || id == CSSValueSuper) |
5470 validPrimitive = true; | 5474 validPrimitive = true; |
5471 else | 5475 else |
5472 validPrimitive = validUnit(value, FLength | FPercent, SVGAttributeMo
de); | 5476 validPrimitive = validUnit(value, FLength | FPercent, SVGAttributeMo
de); |
5473 break; | 5477 break; |
5474 | 5478 |
5475 case CSSPropertyClipPath: | 5479 case CSSPropertyClipPath: |
5476 case CSSPropertyFilter: | 5480 case CSSPropertyFilter: |
5477 case CSSPropertyMarkerStart: | |
5478 case CSSPropertyMarkerMid: | |
5479 case CSSPropertyMarkerEnd: | |
5480 case CSSPropertyMask: | 5481 case CSSPropertyMask: |
5481 if (id == CSSValueNone) { | 5482 if (id == CSSValueNone) { |
5482 validPrimitive = true; | 5483 validPrimitive = true; |
5483 } else if (value->m_unit == CSSParserValue::URI) { | 5484 } else if (value->m_unit == CSSParserValue::URI) { |
5484 parsedValue = CSSURIValue::create(value->string); | 5485 parsedValue = CSSURIValue::create(value->string); |
5485 if (parsedValue) | 5486 if (parsedValue) |
5486 m_valueList->next(); | 5487 m_valueList->next(); |
5487 } | 5488 } |
5488 break; | 5489 break; |
5489 | 5490 |
(...skipping 23 matching lines...) Expand all Loading... |
5513 case CSSPropertyRy: | 5514 case CSSPropertyRy: |
5514 validPrimitive = validUnit(value, FLength | FPercent, SVGAttributeMode); | 5515 validPrimitive = validUnit(value, FLength | FPercent, SVGAttributeMode); |
5515 break; | 5516 break; |
5516 case CSSPropertyStrokeDasharray: // none | <dasharray> | inherit | 5517 case CSSPropertyStrokeDasharray: // none | <dasharray> | inherit |
5517 if (id == CSSValueNone) | 5518 if (id == CSSValueNone) |
5518 validPrimitive = true; | 5519 validPrimitive = true; |
5519 else | 5520 else |
5520 parsedValue = parseSVGStrokeDasharray(); | 5521 parsedValue = parseSVGStrokeDasharray(); |
5521 break; | 5522 break; |
5522 | 5523 |
5523 /* shorthand properties */ | |
5524 case CSSPropertyMarker: { | |
5525 ShorthandScope scope(this, propId); | |
5526 CSSPropertyParser::ImplicitScope implicitScope(this); | |
5527 if (!parseValue(CSSPropertyMarkerStart, important)) | |
5528 return false; | |
5529 if (m_valueList->current()) { | |
5530 rollbackLastProperties(1); | |
5531 return false; | |
5532 } | |
5533 CSSValue* value = m_parsedProperties.last().value(); | |
5534 addProperty(CSSPropertyMarkerMid, value, important); | |
5535 addProperty(CSSPropertyMarkerEnd, value, important); | |
5536 return true; | |
5537 } | |
5538 default: | 5524 default: |
5539 // If you crash here, it's because you added a css property and are not
handling it | 5525 // If you crash here, it's because you added a css property and are not
handling it |
5540 // in either this switch statement or the one in CSSPropertyParser::pars
eValue | 5526 // in either this switch statement or the one in CSSPropertyParser::pars
eValue |
5541 ASSERT_WITH_MESSAGE(0, "unimplemented propertyID: %d", propId); | 5527 ASSERT_WITH_MESSAGE(0, "unimplemented propertyID: %d", propId); |
5542 return false; | 5528 return false; |
5543 } | 5529 } |
5544 | 5530 |
5545 if (validPrimitive) { | 5531 if (validPrimitive) { |
5546 if (id) | 5532 if (id) |
5547 parsedValue = CSSPrimitiveValue::createIdentifier(id); | 5533 parsedValue = CSSPrimitiveValue::createIdentifier(id); |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5588 value = m_valueList->current(); | 5574 value = m_valueList->current(); |
5589 if (commaConsumed && !value) | 5575 if (commaConsumed && !value) |
5590 return nullptr; | 5576 return nullptr; |
5591 } | 5577 } |
5592 if (!validPrimitive) | 5578 if (!validPrimitive) |
5593 return nullptr; | 5579 return nullptr; |
5594 return ret.release(); | 5580 return ret.release(); |
5595 } | 5581 } |
5596 | 5582 |
5597 } // namespace blink | 5583 } // namespace blink |
OLD | NEW |