Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(299)

Side by Side Diff: third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp

Issue 1405793002: Move legacy webkit properties into CSSPropertyParser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Patch for landing Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1066 matching lines...) Expand 10 before | Expand all | Expand 10 after
1077 validPrimitive = validUnit(value, FLength | FNonNeg); 1077 validPrimitive = validUnit(value, FLength | FNonNeg);
1078 break; 1078 break;
1079 case CSSPropertyWebkitColumnSpan: // none | all | 1 (will be dropped in the unprefixed property) 1079 case CSSPropertyWebkitColumnSpan: // none | all | 1 (will be dropped in the unprefixed property)
1080 validPrimitive = id == CSSValueAll || id == CSSValueNone || (value->unit () == CSSPrimitiveValue::UnitType::Number && value->fValue == 1); 1080 validPrimitive = id == CSSValueAll || id == CSSValueNone || (value->unit () == CSSPrimitiveValue::UnitType::Number && value->fValue == 1);
1081 break; 1081 break;
1082 case CSSPropertyWebkitColumnWidth: // auto | <length> 1082 case CSSPropertyWebkitColumnWidth: // auto | <length>
1083 parsedValue = parseColumnWidth(); 1083 parsedValue = parseColumnWidth();
1084 break; 1084 break;
1085 // End of CSS3 properties 1085 // End of CSS3 properties
1086 1086
1087 // Apple specific properties. These will never be standardized and are pure ly to
1088 // support custom WebKit-based Apple applications.
1089 case CSSPropertyWebkitLineClamp:
1090 // When specifying number of lines, don't allow 0 as a valid value
1091 // When specifying either type of unit, require non-negative integers
1092 validPrimitive = (!id && !isCalculation(value) && validUnit(value, FInte ger | FPercent | FNonNeg) && (value->unit() == CSSPrimitiveValue::UnitType::Perc entage || value->fValue));
1093 break;
1094
1095 case CSSPropertyWebkitFontSizeDelta: // <length>
1096 validPrimitive = validUnit(value, FLength | FUnitlessQuirk);
1097 break;
1098
1099 case CSSPropertyWebkitHyphenateCharacter:
1100 case CSSPropertyWebkitLocale:
1101 if (id == CSSValueAuto) {
1102 validPrimitive = true;
1103 } else if (value->m_unit == CSSParserValue::String) {
1104 parsedValue = createPrimitiveStringValue(value);
1105 m_valueList->next();
1106 }
1107 break;
1108
1109 // End Apple-specific properties
1110
1111 case CSSPropertyWebkitAppRegion: 1087 case CSSPropertyWebkitAppRegion:
1112 if (id >= CSSValueDrag && id <= CSSValueNoDrag) 1088 if (id >= CSSValueDrag && id <= CSSValueNoDrag)
1113 validPrimitive = true; 1089 validPrimitive = true;
1114 break; 1090 break;
1115 1091
1116 case CSSPropertyWebkitTapHighlightColor: 1092 case CSSPropertyWebkitTapHighlightColor:
1117 parsedValue = parseColor(m_valueList->current()); 1093 parsedValue = parseColor(m_valueList->current());
1118 if (parsedValue) 1094 if (parsedValue)
1119 m_valueList->next(); 1095 m_valueList->next();
1120 break; 1096 break;
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
1292 case CSSPropertyMinWidth: 1268 case CSSPropertyMinWidth:
1293 case CSSPropertyMinHeight: 1269 case CSSPropertyMinHeight:
1294 case CSSPropertyWidth: 1270 case CSSPropertyWidth:
1295 case CSSPropertyHeight: 1271 case CSSPropertyHeight:
1296 case CSSPropertyWebkitMinLogicalWidth: 1272 case CSSPropertyWebkitMinLogicalWidth:
1297 case CSSPropertyWebkitMinLogicalHeight: 1273 case CSSPropertyWebkitMinLogicalHeight:
1298 case CSSPropertyWebkitLogicalWidth: 1274 case CSSPropertyWebkitLogicalWidth:
1299 case CSSPropertyWebkitLogicalHeight: 1275 case CSSPropertyWebkitLogicalHeight:
1300 case CSSPropertyClip: 1276 case CSSPropertyClip:
1301 case CSSPropertyTouchAction: 1277 case CSSPropertyTouchAction:
1278 case CSSPropertyWebkitLineClamp:
1279 case CSSPropertyWebkitFontSizeDelta:
1280 case CSSPropertyWebkitHyphenateCharacter:
1281 case CSSPropertyWebkitLocale:
1302 validPrimitive = false; 1282 validPrimitive = false;
1303 break; 1283 break;
1304 1284
1305 case CSSPropertyScrollSnapPointsX: 1285 case CSSPropertyScrollSnapPointsX:
1306 case CSSPropertyScrollSnapPointsY: 1286 case CSSPropertyScrollSnapPointsY:
1307 parsedValue = parseScrollSnapPoints(); 1287 parsedValue = parseScrollSnapPoints();
1308 break; 1288 break;
1309 case CSSPropertyScrollSnapCoordinate: 1289 case CSSPropertyScrollSnapCoordinate:
1310 parsedValue = parseScrollSnapCoordinate(); 1290 parsedValue = parseScrollSnapCoordinate();
1311 break; 1291 break;
(...skipping 5490 matching lines...) Expand 10 before | Expand all | Expand 10 after
6802 } 6782 }
6803 } 6783 }
6804 6784
6805 if (!list->length()) 6785 if (!list->length())
6806 return nullptr; 6786 return nullptr;
6807 6787
6808 return list.release(); 6788 return list.release();
6809 } 6789 }
6810 6790
6811 } // namespace blink 6791 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698