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 1048 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1059 validPrimitive = true; | 1059 validPrimitive = true; |
1060 else { | 1060 else { |
1061 RefPtrWillBeRawPtr<CSSValue> val = parseFilter(); | 1061 RefPtrWillBeRawPtr<CSSValue> val = parseFilter(); |
1062 if (val) { | 1062 if (val) { |
1063 addProperty(propId, val, important); | 1063 addProperty(propId, val, important); |
1064 return true; | 1064 return true; |
1065 } | 1065 } |
1066 return false; | 1066 return false; |
1067 } | 1067 } |
1068 break; | 1068 break; |
1069 case CSSPropertyNavDown: // auto | <id> targetframe | inherit | |
1070 case CSSPropertyNavLeft: | |
1071 case CSSPropertyNavRight: | |
1072 case CSSPropertyNavUp: | |
1073 if (id == CSSValueAuto) { | |
1074 validPrimitive = true; | |
1075 } else if (num == 1 && (value->unit == CSSPrimitiveValue::CSS_STRING || value->unit == CSSPrimitiveValue::CSS_PARSER_HEXCOLOR)) { | |
fs
2014/04/14 12:32:01
This would accept "foo" (a literal string) as well
Krzysztof Olczyk
2014/04/17 13:48:40
Done.
| |
1076 value->unit = CSSPrimitiveValue::CSS_STRING; | |
fs
2014/04/14 12:32:01
Probably better to avoid mutating |value| and just
Krzysztof Olczyk
2014/04/17 13:48:40
This is basically what CSS_PARSER_* primitive valu
fs
2014/04/17 15:33:48
Sure, it's needed for disambiguation, but that doe
| |
1077 validPrimitive = true; | |
1078 } else if (num == 2) { | |
1079 RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated(); | |
fs
2014/04/14 12:32:01
...WillBeRawPtr
Krzysztof Olczyk
2014/04/17 13:48:40
Done.
| |
1080 while (value) { | |
1081 list->append(cssValuePool().createValue(value->string, CSSPrimit iveValue::CSS_STRING)); | |
fs
2014/04/14 12:32:01
This looks a bit lenient.
Krzysztof Olczyk
2014/04/17 13:48:40
Done.
| |
1082 value = m_valueList->next(); | |
1083 } | |
1084 parsedValue = list.release(); | |
1085 } else { | |
1086 return false; | |
1087 } | |
1088 break; | |
1069 case CSSPropertyFlex: { | 1089 case CSSPropertyFlex: { |
1070 ShorthandScope scope(this, propId); | 1090 ShorthandScope scope(this, propId); |
1071 if (id == CSSValueNone) { | 1091 if (id == CSSValueNone) { |
1072 addProperty(CSSPropertyFlexGrow, cssValuePool().createValue(0, CSSPr imitiveValue::CSS_NUMBER), important); | 1092 addProperty(CSSPropertyFlexGrow, cssValuePool().createValue(0, CSSPr imitiveValue::CSS_NUMBER), important); |
1073 addProperty(CSSPropertyFlexShrink, cssValuePool().createValue(0, CSS PrimitiveValue::CSS_NUMBER), important); | 1093 addProperty(CSSPropertyFlexShrink, cssValuePool().createValue(0, CSS PrimitiveValue::CSS_NUMBER), important); |
1074 addProperty(CSSPropertyFlexBasis, cssValuePool().createIdentifierVal ue(CSSValueAuto), important); | 1094 addProperty(CSSPropertyFlexBasis, cssValuePool().createIdentifierVal ue(CSSValueAuto), important); |
1075 return true; | 1095 return true; |
1076 } | 1096 } |
1077 return parseFlex(m_valueList.get(), important); | 1097 return parseFlex(m_valueList.get(), important); |
1078 } | 1098 } |
(...skipping 7376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
8455 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueFill)); | 8475 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueFill)); |
8456 if (!seenStroke) | 8476 if (!seenStroke) |
8457 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueStroke) ); | 8477 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueStroke) ); |
8458 if (!seenMarkers) | 8478 if (!seenMarkers) |
8459 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueMarkers )); | 8479 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueMarkers )); |
8460 | 8480 |
8461 return parsedValues.release(); | 8481 return parsedValues.release(); |
8462 } | 8482 } |
8463 | 8483 |
8464 } // namespace WebCore | 8484 } // namespace WebCore |
OLD | NEW |