| 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 1218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1229 else | 1229 else |
| 1230 parsedValue = parseShapeProperty(propId); | 1230 parsedValue = parseShapeProperty(propId); |
| 1231 break; | 1231 break; |
| 1232 case CSSPropertyShapeMargin: | 1232 case CSSPropertyShapeMargin: |
| 1233 validPrimitive = validUnit(value, FLength | FPercent | FNonNeg); | 1233 validPrimitive = validUnit(value, FLength | FPercent | FNonNeg); |
| 1234 break; | 1234 break; |
| 1235 case CSSPropertyShapeImageThreshold: | 1235 case CSSPropertyShapeImageThreshold: |
| 1236 validPrimitive = validUnit(value, FNumber); | 1236 validPrimitive = validUnit(value, FNumber); |
| 1237 break; | 1237 break; |
| 1238 | 1238 |
| 1239 case CSSPropertyTouchAction: | |
| 1240 parsedValue = parseTouchAction(); | |
| 1241 break; | |
| 1242 | |
| 1243 case CSSPropertyAlignContent: | 1239 case CSSPropertyAlignContent: |
| 1244 ASSERT(RuntimeEnabledFeatures::cssGridLayoutEnabled()); | 1240 ASSERT(RuntimeEnabledFeatures::cssGridLayoutEnabled()); |
| 1245 parsedValue = parseContentDistributionOverflowPosition(); | 1241 parsedValue = parseContentDistributionOverflowPosition(); |
| 1246 break; | 1242 break; |
| 1247 | 1243 |
| 1248 case CSSPropertyAlignSelf: | 1244 case CSSPropertyAlignSelf: |
| 1249 ASSERT(RuntimeEnabledFeatures::cssGridLayoutEnabled()); | 1245 ASSERT(RuntimeEnabledFeatures::cssGridLayoutEnabled()); |
| 1250 return parseItemPositionOverflowPosition(propId, important); | 1246 return parseItemPositionOverflowPosition(propId, important); |
| 1251 | 1247 |
| 1252 case CSSPropertyAlignItems: | 1248 case CSSPropertyAlignItems: |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1295 case CSSPropertyWebkitMaxLogicalHeight: | 1291 case CSSPropertyWebkitMaxLogicalHeight: |
| 1296 case CSSPropertyMinWidth: | 1292 case CSSPropertyMinWidth: |
| 1297 case CSSPropertyMinHeight: | 1293 case CSSPropertyMinHeight: |
| 1298 case CSSPropertyWidth: | 1294 case CSSPropertyWidth: |
| 1299 case CSSPropertyHeight: | 1295 case CSSPropertyHeight: |
| 1300 case CSSPropertyWebkitMinLogicalWidth: | 1296 case CSSPropertyWebkitMinLogicalWidth: |
| 1301 case CSSPropertyWebkitMinLogicalHeight: | 1297 case CSSPropertyWebkitMinLogicalHeight: |
| 1302 case CSSPropertyWebkitLogicalWidth: | 1298 case CSSPropertyWebkitLogicalWidth: |
| 1303 case CSSPropertyWebkitLogicalHeight: | 1299 case CSSPropertyWebkitLogicalHeight: |
| 1304 case CSSPropertyClip: | 1300 case CSSPropertyClip: |
| 1301 case CSSPropertyTouchAction: |
| 1305 validPrimitive = false; | 1302 validPrimitive = false; |
| 1306 break; | 1303 break; |
| 1307 | 1304 |
| 1308 case CSSPropertyScrollSnapPointsX: | 1305 case CSSPropertyScrollSnapPointsX: |
| 1309 case CSSPropertyScrollSnapPointsY: | 1306 case CSSPropertyScrollSnapPointsY: |
| 1310 parsedValue = parseScrollSnapPoints(); | 1307 parsedValue = parseScrollSnapPoints(); |
| 1311 break; | 1308 break; |
| 1312 case CSSPropertyScrollSnapCoordinate: | 1309 case CSSPropertyScrollSnapCoordinate: |
| 1313 parsedValue = parseScrollSnapCoordinate(); | 1310 parsedValue = parseScrollSnapCoordinate(); |
| 1314 break; | 1311 break; |
| (...skipping 4816 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6131 | 6128 |
| 6132 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated()
; | 6129 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated()
; |
| 6133 list->append(xValue.release()); | 6130 list->append(xValue.release()); |
| 6134 if (yValue) | 6131 if (yValue) |
| 6135 list->append(yValue.release()); | 6132 list->append(yValue.release()); |
| 6136 if (zValue) | 6133 if (zValue) |
| 6137 list->append(zValue.release()); | 6134 list->append(zValue.release()); |
| 6138 return list.release(); | 6135 return list.release(); |
| 6139 } | 6136 } |
| 6140 | 6137 |
| 6141 PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseTouchAction() | |
| 6142 { | |
| 6143 CSSParserValue* value = m_valueList->current(); | |
| 6144 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated()
; | |
| 6145 if (m_valueList->size() == 1 && value && (value->id == CSSValueAuto || value
->id == CSSValueNone || value->id == CSSValueManipulation)) { | |
| 6146 list->append(cssValuePool().createIdentifierValue(value->id)); | |
| 6147 m_valueList->next(); | |
| 6148 return list.release(); | |
| 6149 } | |
| 6150 | |
| 6151 bool xSet = false; | |
| 6152 bool ySet = false; | |
| 6153 while (value) { | |
| 6154 switch (value->id) { | |
| 6155 case CSSValuePanX: | |
| 6156 case CSSValuePanRight: | |
| 6157 case CSSValuePanLeft: { | |
| 6158 if (xSet) | |
| 6159 return nullptr; | |
| 6160 xSet = true; | |
| 6161 if (value->id != CSSValuePanX && !RuntimeEnabledFeatures::cssTouchAc
tionPanDirectionsEnabled()) | |
| 6162 return nullptr; | |
| 6163 | |
| 6164 RefPtrWillBeRawPtr<CSSValue> panValue = cssValuePool().createIdentif
ierValue(value->id); | |
| 6165 list->append(panValue.release()); | |
| 6166 break; | |
| 6167 } | |
| 6168 case CSSValuePanY: | |
| 6169 case CSSValuePanDown: | |
| 6170 case CSSValuePanUp: { | |
| 6171 if (ySet) | |
| 6172 return nullptr; | |
| 6173 ySet = true; | |
| 6174 if (value->id != CSSValuePanY && !RuntimeEnabledFeatures::cssTouchAc
tionPanDirectionsEnabled()) | |
| 6175 return nullptr; | |
| 6176 RefPtrWillBeRawPtr<CSSValue> panValue = cssValuePool().createIdentif
ierValue(value->id); | |
| 6177 list->append(panValue.release()); | |
| 6178 break; | |
| 6179 } | |
| 6180 default: | |
| 6181 return nullptr; | |
| 6182 } | |
| 6183 value = m_valueList->next(); | |
| 6184 } | |
| 6185 | |
| 6186 if (list->length()) | |
| 6187 return list.release(); | |
| 6188 | |
| 6189 return nullptr; | |
| 6190 } | |
| 6191 | |
| 6192 PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseTextDecoration() | 6138 PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseTextDecoration() |
| 6193 { | 6139 { |
| 6194 CSSParserValue* value = m_valueList->current(); | 6140 CSSParserValue* value = m_valueList->current(); |
| 6195 if (value && value->id == CSSValueNone) { | 6141 if (value && value->id == CSSValueNone) { |
| 6196 m_valueList->next(); | 6142 m_valueList->next(); |
| 6197 return cssValuePool().createIdentifierValue(CSSValueNone); | 6143 return cssValuePool().createIdentifierValue(CSSValueNone); |
| 6198 } | 6144 } |
| 6199 | 6145 |
| 6200 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated()
; | 6146 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated()
; |
| 6201 bool isValid = true; | 6147 bool isValid = true; |
| (...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6856 } | 6802 } |
| 6857 } | 6803 } |
| 6858 | 6804 |
| 6859 if (!list->length()) | 6805 if (!list->length()) |
| 6860 return nullptr; | 6806 return nullptr; |
| 6861 | 6807 |
| 6862 return list.release(); | 6808 return list.release(); |
| 6863 } | 6809 } |
| 6864 | 6810 |
| 6865 } // namespace blink | 6811 } // namespace blink |
| OLD | NEW |