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

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

Issue 2769793002: Implement CSS: scroll-boundary-behavior (Closed)
Patch Set: update the tests Created 3 years, 5 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/css/parser/CSSParserFastPaths.h" 5 #include "core/css/parser/CSSParserFastPaths.h"
6 6
7 #include "core/StylePropertyShorthand.h" 7 #include "core/StylePropertyShorthand.h"
8 #include "core/css/CSSColorValue.h" 8 #include "core/css/CSSColorValue.h"
9 #include "core/css/CSSFunctionValue.h" 9 #include "core/css/CSSFunctionValue.h"
10 #include "core/css/CSSIdentifierValue.h" 10 #include "core/css/CSSIdentifierValue.h"
(...skipping 842 matching lines...) Expand 10 before | Expand all | Expand 10 after
853 case CSSPropertyWhiteSpace: 853 case CSSPropertyWhiteSpace:
854 return value_id == CSSValueNormal || value_id == CSSValuePre || 854 return value_id == CSSValueNormal || value_id == CSSValuePre ||
855 value_id == CSSValuePreWrap || value_id == CSSValuePreLine || 855 value_id == CSSValuePreWrap || value_id == CSSValuePreLine ||
856 value_id == CSSValueNowrap; 856 value_id == CSSValueNowrap;
857 case CSSPropertyWordBreak: 857 case CSSPropertyWordBreak:
858 return value_id == CSSValueNormal || value_id == CSSValueBreakAll || 858 return value_id == CSSValueNormal || value_id == CSSValueBreakAll ||
859 value_id == CSSValueKeepAll || value_id == CSSValueBreakWord; 859 value_id == CSSValueKeepAll || value_id == CSSValueBreakWord;
860 case CSSPropertyScrollSnapStop: 860 case CSSPropertyScrollSnapStop:
861 DCHECK(RuntimeEnabledFeatures::CSSScrollSnapPointsEnabled()); 861 DCHECK(RuntimeEnabledFeatures::CSSScrollSnapPointsEnabled());
862 return value_id == CSSValueNormal || value_id == CSSValueAlways; 862 return value_id == CSSValueNormal || value_id == CSSValueAlways;
863 case CSSPropertyScrollBoundaryBehaviorX:
864 return value_id == CSSValueAuto || value_id == CSSValueContain ||
865 value_id == CSSValueNone;
866 case CSSPropertyScrollBoundaryBehaviorY:
867 return value_id == CSSValueAuto || value_id == CSSValueContain ||
868 value_id == CSSValueNone;
863 default: 869 default:
864 NOTREACHED(); 870 NOTREACHED();
865 return false; 871 return false;
866 } 872 }
867 } 873 }
868 874
869 bool CSSParserFastPaths::IsKeywordPropertyID(CSSPropertyID property_id) { 875 bool CSSParserFastPaths::IsKeywordPropertyID(CSSPropertyID property_id) {
870 switch (property_id) { 876 switch (property_id) {
871 case CSSPropertyAlignmentBaseline: 877 case CSSPropertyAlignmentBaseline:
872 case CSSPropertyAll: 878 case CSSPropertyAll:
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
906 case CSSPropertyOverflowWrap: 912 case CSSPropertyOverflowWrap:
907 case CSSPropertyOverflowX: 913 case CSSPropertyOverflowX:
908 case CSSPropertyOverflowY: 914 case CSSPropertyOverflowY:
909 case CSSPropertyBreakAfter: 915 case CSSPropertyBreakAfter:
910 case CSSPropertyBreakBefore: 916 case CSSPropertyBreakBefore:
911 case CSSPropertyBreakInside: 917 case CSSPropertyBreakInside:
912 case CSSPropertyPointerEvents: 918 case CSSPropertyPointerEvents:
913 case CSSPropertyPosition: 919 case CSSPropertyPosition:
914 case CSSPropertyResize: 920 case CSSPropertyResize:
915 case CSSPropertyScrollBehavior: 921 case CSSPropertyScrollBehavior:
922 case CSSPropertyScrollBoundaryBehaviorX:
923 case CSSPropertyScrollBoundaryBehaviorY:
916 case CSSPropertyShapeRendering: 924 case CSSPropertyShapeRendering:
917 case CSSPropertySpeak: 925 case CSSPropertySpeak:
918 case CSSPropertyStrokeLinecap: 926 case CSSPropertyStrokeLinecap:
919 case CSSPropertyStrokeLinejoin: 927 case CSSPropertyStrokeLinejoin:
920 case CSSPropertyTableLayout: 928 case CSSPropertyTableLayout:
921 case CSSPropertyTextAlign: 929 case CSSPropertyTextAlign:
922 case CSSPropertyTextAlignLast: 930 case CSSPropertyTextAlignLast:
923 case CSSPropertyTextAnchor: 931 case CSSPropertyTextAnchor:
924 case CSSPropertyTextCombineUpright: 932 case CSSPropertyTextCombineUpright:
925 case CSSPropertyTextDecorationStyle: 933 case CSSPropertyTextDecorationStyle:
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
1238 if (IsColorPropertyID(property_id)) 1246 if (IsColorPropertyID(property_id))
1239 return ParseColor(string, parser_mode); 1247 return ParseColor(string, parser_mode);
1240 if (CSSValue* keyword = ParseKeywordValue(property_id, string, parser_mode)) 1248 if (CSSValue* keyword = ParseKeywordValue(property_id, string, parser_mode))
1241 return keyword; 1249 return keyword;
1242 if (CSSValue* transform = ParseSimpleTransform(property_id, string)) 1250 if (CSSValue* transform = ParseSimpleTransform(property_id, string))
1243 return transform; 1251 return transform;
1244 return nullptr; 1252 return nullptr;
1245 } 1253 }
1246 1254
1247 } // namespace blink 1255 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698