| 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 1133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1144 case CSSPropertyWebkitPerspectiveOriginY: | 1144 case CSSPropertyWebkitPerspectiveOriginY: |
| 1145 case CSSPropertyWebkitTransformOriginY: | 1145 case CSSPropertyWebkitTransformOriginY: |
| 1146 parsedValue = parseFillPositionY(m_valueList); | 1146 parsedValue = parseFillPositionY(m_valueList); |
| 1147 if (parsedValue) | 1147 if (parsedValue) |
| 1148 m_valueList->next(); | 1148 m_valueList->next(); |
| 1149 break; | 1149 break; |
| 1150 case CSSPropertyWebkitTransformOriginZ: | 1150 case CSSPropertyWebkitTransformOriginZ: |
| 1151 validPrimitive = validUnit(value, FLength); | 1151 validPrimitive = validUnit(value, FLength); |
| 1152 break; | 1152 break; |
| 1153 case CSSPropertyPerspective: | 1153 case CSSPropertyPerspective: |
| 1154 if (id == CSSValueNone) { | 1154 if (id == CSSValueNone) |
| 1155 validPrimitive = true; | 1155 validPrimitive = true; |
| 1156 } else if (validUnit(value, FLength | FNonNeg)) { | 1156 else if (validUnit(value, FLength) && (m_parsedCalculation || value->fVa
lue > 0)) |
| 1157 addProperty(propId, createPrimitiveNumericValue(value), important); | 1157 validPrimitive = true; |
| 1158 return true; | 1158 else |
| 1159 } | 1159 return false; |
| 1160 break; | 1160 break; |
| 1161 case CSSPropertyWebkitPerspective: | 1161 case CSSPropertyWebkitPerspective: |
| 1162 if (id == CSSValueNone) { | 1162 if (id == CSSValueNone) |
| 1163 validPrimitive = true; | 1163 validPrimitive = true; |
| 1164 } else if (validUnit(value, FNumber | FLength | FNonNeg)) { | 1164 else if (validUnit(value, FNumber | FLength) && (m_parsedCalculation ||
value->fValue > 0)) |
| 1165 // Accepting valueless numbers is a quirk of the -webkit prefixed ve
rsion of the property. | 1165 validPrimitive = true; |
| 1166 addProperty(propId, createPrimitiveNumericValue(value), important); | 1166 else |
| 1167 return true; | 1167 return false; |
| 1168 } | |
| 1169 break; | 1168 break; |
| 1170 case CSSPropertyPerspectiveOrigin: | 1169 case CSSPropertyPerspectiveOrigin: |
| 1171 case CSSPropertyWebkitPerspectiveOrigin: { | 1170 case CSSPropertyWebkitPerspectiveOrigin: { |
| 1172 RefPtrWillBeRawPtr<CSSValueList> list = parseTransformOrigin(); | 1171 RefPtrWillBeRawPtr<CSSValueList> list = parseTransformOrigin(); |
| 1173 if (!list || list->length() == 3) | 1172 if (!list || list->length() == 3) |
| 1174 return false; | 1173 return false; |
| 1175 // This values are added to match gecko serialization. | 1174 // This values are added to match gecko serialization. |
| 1176 if (list->length() == 1) | 1175 if (list->length() == 1) |
| 1177 list->append(cssValuePool().createValue(50, CSSPrimitiveValue::CSS_P
ERCENTAGE)); | 1176 list->append(cssValuePool().createValue(50, CSSPrimitiveValue::CSS_P
ERCENTAGE)); |
| 1178 addProperty(propId, list.release(), important); | 1177 addProperty(propId, list.release(), important); |
| (...skipping 7312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8491 } | 8490 } |
| 8492 } | 8491 } |
| 8493 | 8492 |
| 8494 if (!list->length()) | 8493 if (!list->length()) |
| 8495 return nullptr; | 8494 return nullptr; |
| 8496 | 8495 |
| 8497 return list.release(); | 8496 return list.release(); |
| 8498 } | 8497 } |
| 8499 | 8498 |
| 8500 } // namespace blink | 8499 } // namespace blink |
| OLD | NEW |