| 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 1120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1131 if (parseTransformOrigin(propId, propId1, propId2, propId3, val1, val2,
val3)) { | 1131 if (parseTransformOrigin(propId, propId1, propId2, propId3, val1, val2,
val3)) { |
| 1132 addProperty(propId1, val1.release(), important); | 1132 addProperty(propId1, val1.release(), important); |
| 1133 if (val2) | 1133 if (val2) |
| 1134 addProperty(propId2, val2.release(), important); | 1134 addProperty(propId2, val2.release(), important); |
| 1135 if (val3) | 1135 if (val3) |
| 1136 addProperty(propId3, val3.release(), important); | 1136 addProperty(propId3, val3.release(), important); |
| 1137 return true; | 1137 return true; |
| 1138 } | 1138 } |
| 1139 return false; | 1139 return false; |
| 1140 } | 1140 } |
| 1141 case CSSPropertyPerspective: |
| 1142 if (id == CSSValueNone) { |
| 1143 validPrimitive = true; |
| 1144 } else if (validUnit(value, FLength | FNonNeg)) { |
| 1145 addProperty(propId, createPrimitiveNumericValue(value), important); |
| 1146 return true; |
| 1147 } |
| 1148 break; |
| 1141 case CSSPropertyWebkitPerspective: | 1149 case CSSPropertyWebkitPerspective: |
| 1142 if (id == CSSValueNone) | 1150 if (id == CSSValueNone) { |
| 1143 validPrimitive = true; | 1151 validPrimitive = true; |
| 1144 else { | 1152 } else if (validUnit(value, FNumber | FLength | FNonNeg)) { |
| 1145 // Accepting valueless numbers is a quirk of the -webkit prefixed ve
rsion of the property. | 1153 // Accepting valueless numbers is a quirk of the -webkit prefixed ve
rsion of the property. |
| 1146 if (validUnit(value, FNumber | FLength | FNonNeg)) { | 1154 addProperty(propId, createPrimitiveNumericValue(value), important); |
| 1147 RefPtrWillBeRawPtr<CSSValue> val = createPrimitiveNumericValue(v
alue); | 1155 return true; |
| 1148 if (val) { | |
| 1149 addProperty(propId, val.release(), important); | |
| 1150 return true; | |
| 1151 } | |
| 1152 return false; | |
| 1153 } | |
| 1154 } | 1156 } |
| 1155 break; | 1157 break; |
| 1156 case CSSPropertyWebkitPerspectiveOrigin: | 1158 case CSSPropertyWebkitPerspectiveOrigin: |
| 1157 case CSSPropertyWebkitPerspectiveOriginX: | 1159 case CSSPropertyWebkitPerspectiveOriginX: |
| 1158 case CSSPropertyWebkitPerspectiveOriginY: { | 1160 case CSSPropertyWebkitPerspectiveOriginY: { |
| 1159 RefPtrWillBeRawPtr<CSSValue> val1 = nullptr; | 1161 RefPtrWillBeRawPtr<CSSValue> val1 = nullptr; |
| 1160 RefPtrWillBeRawPtr<CSSValue> val2 = nullptr; | 1162 RefPtrWillBeRawPtr<CSSValue> val2 = nullptr; |
| 1161 CSSPropertyID propId1, propId2; | 1163 CSSPropertyID propId1, propId2; |
| 1162 if (parsePerspectiveOrigin(propId, propId1, propId2, val1, val2)) { | 1164 if (parsePerspectiveOrigin(propId, propId1, propId2, val1, val2)) { |
| 1163 addProperty(propId1, val1.release(), important); | 1165 addProperty(propId1, val1.release(), important); |
| (...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1603 // Properties below are validated inside parseViewportProperty, because we | 1605 // Properties below are validated inside parseViewportProperty, because we |
| 1604 // check for parser state. We need to invalidate if someone adds them outsid
e | 1606 // check for parser state. We need to invalidate if someone adds them outsid
e |
| 1605 // a @viewport rule. | 1607 // a @viewport rule. |
| 1606 case CSSPropertyMaxZoom: | 1608 case CSSPropertyMaxZoom: |
| 1607 case CSSPropertyMinZoom: | 1609 case CSSPropertyMinZoom: |
| 1608 case CSSPropertyOrientation: | 1610 case CSSPropertyOrientation: |
| 1609 case CSSPropertyUserZoom: | 1611 case CSSPropertyUserZoom: |
| 1610 validPrimitive = false; | 1612 validPrimitive = false; |
| 1611 break; | 1613 break; |
| 1612 // FIXME: crbug.com/154772 Unimplemented css-transforms properties | 1614 // FIXME: crbug.com/154772 Unimplemented css-transforms properties |
| 1613 case CSSPropertyPerspective: | |
| 1614 case CSSPropertyPerspectiveOrigin: | 1615 case CSSPropertyPerspectiveOrigin: |
| 1615 case CSSPropertyTransform: | 1616 case CSSPropertyTransform: |
| 1616 case CSSPropertyTransformOrigin: | 1617 case CSSPropertyTransformOrigin: |
| 1617 return false; | 1618 return false; |
| 1618 default: | 1619 default: |
| 1619 return parseSVGValue(propId, important); | 1620 return parseSVGValue(propId, important); |
| 1620 } | 1621 } |
| 1621 | 1622 |
| 1622 if (validPrimitive) { | 1623 if (validPrimitive) { |
| 1623 parsedValue = parseValidPrimitive(id, value); | 1624 parsedValue = parseValidPrimitive(id, value); |
| (...skipping 6616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8240 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueFill)); | 8241 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueFill)); |
| 8241 if (!seenStroke) | 8242 if (!seenStroke) |
| 8242 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueStroke)
); | 8243 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueStroke)
); |
| 8243 if (!seenMarkers) | 8244 if (!seenMarkers) |
| 8244 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueMarkers
)); | 8245 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueMarkers
)); |
| 8245 | 8246 |
| 8246 return parsedValues.release(); | 8247 return parsedValues.release(); |
| 8247 } | 8248 } |
| 8248 | 8249 |
| 8249 } // namespace WebCore | 8250 } // namespace WebCore |
| OLD | NEW |