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

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

Issue 2769793002: Implement CSS: scroll-boundary-behavior (Closed)
Patch Set: Add documentation 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 "build/build_config.h" 7 #include "build/build_config.h"
8 #include "core/StylePropertyShorthand.h" 8 #include "core/StylePropertyShorthand.h"
9 #include "core/css/CSSColorValue.h" 9 #include "core/css/CSSColorValue.h"
10 #include "core/css/CSSFunctionValue.h" 10 #include "core/css/CSSFunctionValue.h"
(...skipping 846 matching lines...) Expand 10 before | Expand all | Expand 10 after
857 case CSSPropertyWhiteSpace: 857 case CSSPropertyWhiteSpace:
858 return value_id == CSSValueNormal || value_id == CSSValuePre || 858 return value_id == CSSValueNormal || value_id == CSSValuePre ||
859 value_id == CSSValuePreWrap || value_id == CSSValuePreLine || 859 value_id == CSSValuePreWrap || value_id == CSSValuePreLine ||
860 value_id == CSSValueNowrap; 860 value_id == CSSValueNowrap;
861 case CSSPropertyWordBreak: 861 case CSSPropertyWordBreak:
862 return value_id == CSSValueNormal || value_id == CSSValueBreakAll || 862 return value_id == CSSValueNormal || value_id == CSSValueBreakAll ||
863 value_id == CSSValueKeepAll || value_id == CSSValueBreakWord; 863 value_id == CSSValueKeepAll || value_id == CSSValueBreakWord;
864 case CSSPropertyScrollSnapStop: 864 case CSSPropertyScrollSnapStop:
865 DCHECK(RuntimeEnabledFeatures::CSSScrollSnapPointsEnabled()); 865 DCHECK(RuntimeEnabledFeatures::CSSScrollSnapPointsEnabled());
866 return value_id == CSSValueNormal || value_id == CSSValueAlways; 866 return value_id == CSSValueNormal || value_id == CSSValueAlways;
867 case CSSPropertyScrollBoundaryBehaviorX:
868 return value_id == CSSValueAuto || value_id == CSSValueContain ||
869 value_id == CSSValueNone;
870 case CSSPropertyScrollBoundaryBehaviorY:
871 return value_id == CSSValueAuto || value_id == CSSValueContain ||
872 value_id == CSSValueNone;
867 default: 873 default:
868 NOTREACHED(); 874 NOTREACHED();
869 return false; 875 return false;
870 } 876 }
871 } 877 }
872 878
873 bool CSSParserFastPaths::IsKeywordPropertyID(CSSPropertyID property_id) { 879 bool CSSParserFastPaths::IsKeywordPropertyID(CSSPropertyID property_id) {
874 switch (property_id) { 880 switch (property_id) {
875 case CSSPropertyAlignmentBaseline: 881 case CSSPropertyAlignmentBaseline:
876 case CSSPropertyAll: 882 case CSSPropertyAll:
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
910 case CSSPropertyOverflowWrap: 916 case CSSPropertyOverflowWrap:
911 case CSSPropertyOverflowX: 917 case CSSPropertyOverflowX:
912 case CSSPropertyOverflowY: 918 case CSSPropertyOverflowY:
913 case CSSPropertyBreakAfter: 919 case CSSPropertyBreakAfter:
914 case CSSPropertyBreakBefore: 920 case CSSPropertyBreakBefore:
915 case CSSPropertyBreakInside: 921 case CSSPropertyBreakInside:
916 case CSSPropertyPointerEvents: 922 case CSSPropertyPointerEvents:
917 case CSSPropertyPosition: 923 case CSSPropertyPosition:
918 case CSSPropertyResize: 924 case CSSPropertyResize:
919 case CSSPropertyScrollBehavior: 925 case CSSPropertyScrollBehavior:
926 case CSSPropertyScrollBoundaryBehaviorX:
927 case CSSPropertyScrollBoundaryBehaviorY:
920 case CSSPropertyShapeRendering: 928 case CSSPropertyShapeRendering:
921 case CSSPropertySpeak: 929 case CSSPropertySpeak:
922 case CSSPropertyStrokeLinecap: 930 case CSSPropertyStrokeLinecap:
923 case CSSPropertyStrokeLinejoin: 931 case CSSPropertyStrokeLinejoin:
924 case CSSPropertyTableLayout: 932 case CSSPropertyTableLayout:
925 case CSSPropertyTextAlign: 933 case CSSPropertyTextAlign:
926 case CSSPropertyTextAlignLast: 934 case CSSPropertyTextAlignLast:
927 case CSSPropertyTextAnchor: 935 case CSSPropertyTextAnchor:
928 case CSSPropertyTextCombineUpright: 936 case CSSPropertyTextCombineUpright:
929 case CSSPropertyTextDecorationStyle: 937 case CSSPropertyTextDecorationStyle:
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
1243 if (IsColorPropertyID(property_id)) 1251 if (IsColorPropertyID(property_id))
1244 return ParseColor(string, parser_mode); 1252 return ParseColor(string, parser_mode);
1245 if (CSSValue* keyword = ParseKeywordValue(property_id, string, parser_mode)) 1253 if (CSSValue* keyword = ParseKeywordValue(property_id, string, parser_mode))
1246 return keyword; 1254 return keyword;
1247 if (CSSValue* transform = ParseSimpleTransform(property_id, string)) 1255 if (CSSValue* transform = ParseSimpleTransform(property_id, string))
1248 return transform; 1256 return transform;
1249 return nullptr; 1257 return nullptr;
1250 } 1258 }
1251 1259
1252 } // namespace blink 1260 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698