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

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

Issue 1212893005: Add position: sticky as supported position value when CSSStickyPosition is enabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Merge, convert pixel to ref tests, and address comments. Created 5 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
« no previous file with comments | « Source/core/css/CSSValueKeywords.in ('k') | Source/core/layout/LayoutBlock.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "config.h" 5 #include "config.h"
6 #include "core/css/parser/CSSParserFastPaths.h" 6 #include "core/css/parser/CSSParserFastPaths.h"
7 7
8 #include "core/StylePropertyShorthand.h" 8 #include "core/StylePropertyShorthand.h"
9 #include "core/css/CSSFunctionValue.h" 9 #include "core/css/CSSFunctionValue.h"
10 #include "core/css/CSSValuePool.h" 10 #include "core/css/CSSValuePool.h"
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 case CSSPropertyWebkitColumnBreakAfter: 529 case CSSPropertyWebkitColumnBreakAfter:
530 case CSSPropertyWebkitColumnBreakBefore: 530 case CSSPropertyWebkitColumnBreakBefore:
531 return valueID == CSSValueAuto || valueID == CSSValueAlways || valueID = = CSSValueAvoid || valueID == CSSValueLeft || valueID == CSSValueRight; 531 return valueID == CSSValueAuto || valueID == CSSValueAlways || valueID = = CSSValueAvoid || valueID == CSSValueLeft || valueID == CSSValueRight;
532 case CSSPropertyPageBreakInside: // avoid | auto 532 case CSSPropertyPageBreakInside: // avoid | auto
533 case CSSPropertyWebkitColumnBreakInside: 533 case CSSPropertyWebkitColumnBreakInside:
534 return valueID == CSSValueAuto || valueID == CSSValueAvoid; 534 return valueID == CSSValueAuto || valueID == CSSValueAvoid;
535 case CSSPropertyPointerEvents: 535 case CSSPropertyPointerEvents:
536 // none | visiblePainted | visibleFill | visibleStroke | visible | 536 // none | visiblePainted | visibleFill | visibleStroke | visible |
537 // painted | fill | stroke | auto | all | bounding-box 537 // painted | fill | stroke | auto | all | bounding-box
538 return valueID == CSSValueVisible || valueID == CSSValueNone || valueID == CSSValueAll || valueID == CSSValueAuto || (valueID >= CSSValueVisiblePainted && valueID <= CSSValueBoundingBox); 538 return valueID == CSSValueVisible || valueID == CSSValueNone || valueID == CSSValueAll || valueID == CSSValueAuto || (valueID >= CSSValueVisiblePainted && valueID <= CSSValueBoundingBox);
539 case CSSPropertyPosition: // static | relative | absolute | fixed 539 case CSSPropertyPosition: // static | relative | absolute | fixed | sticky
540 return valueID == CSSValueStatic || valueID == CSSValueRelative || value ID == CSSValueAbsolute || valueID == CSSValueFixed; 540 return valueID == CSSValueStatic || valueID == CSSValueRelative || value ID == CSSValueAbsolute || valueID == CSSValueFixed || (RuntimeEnabledFeatures::c ssStickyPositionEnabled() && valueID == CSSValueSticky);
541 case CSSPropertyResize: // none | both | horizontal | vertical | auto 541 case CSSPropertyResize: // none | both | horizontal | vertical | auto
542 return valueID == CSSValueNone || valueID == CSSValueBoth || valueID == CSSValueHorizontal || valueID == CSSValueVertical || valueID == CSSValueAuto; 542 return valueID == CSSValueNone || valueID == CSSValueBoth || valueID == CSSValueHorizontal || valueID == CSSValueVertical || valueID == CSSValueAuto;
543 case CSSPropertyScrollBehavior: // auto | smooth 543 case CSSPropertyScrollBehavior: // auto | smooth
544 ASSERT(RuntimeEnabledFeatures::cssomSmoothScrollEnabled()); 544 ASSERT(RuntimeEnabledFeatures::cssomSmoothScrollEnabled());
545 return valueID == CSSValueAuto || valueID == CSSValueSmooth; 545 return valueID == CSSValueAuto || valueID == CSSValueSmooth;
546 case CSSPropertySpeak: // none | normal | spell-out | digits | literal-punct uation | no-punctuation 546 case CSSPropertySpeak: // none | normal | spell-out | digits | literal-punct uation | no-punctuation
547 return valueID == CSSValueNone || valueID == CSSValueNormal || valueID = = CSSValueSpellOut || valueID == CSSValueDigits || valueID == CSSValueLiteralPun ctuation || valueID == CSSValueNoPunctuation; 547 return valueID == CSSValueNone || valueID == CSSValueNormal || valueID = = CSSValueSpellOut || valueID == CSSValueDigits || valueID == CSSValueLiteralPun ctuation || valueID == CSSValueNoPunctuation;
548 case CSSPropertyTableLayout: // auto | fixed 548 case CSSPropertyTableLayout: // auto | fixed
549 return valueID == CSSValueAuto || valueID == CSSValueFixed; 549 return valueID == CSSValueAuto || valueID == CSSValueFixed;
550 case CSSPropertyTextAlignLast: 550 case CSSPropertyTextAlignLast:
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
949 if (isColorPropertyID(propertyID)) 949 if (isColorPropertyID(propertyID))
950 return parseColor(string, isQuirksModeBehavior(parserMode)); 950 return parseColor(string, isQuirksModeBehavior(parserMode));
951 if (RefPtrWillBeRawPtr<CSSValue> keyword = parseKeywordValue(propertyID, str ing)) 951 if (RefPtrWillBeRawPtr<CSSValue> keyword = parseKeywordValue(propertyID, str ing))
952 return keyword.release(); 952 return keyword.release();
953 if (RefPtrWillBeRawPtr<CSSValue> transform = parseSimpleTransform(propertyID , string)) 953 if (RefPtrWillBeRawPtr<CSSValue> transform = parseSimpleTransform(propertyID , string))
954 return transform.release(); 954 return transform.release();
955 return nullptr; 955 return nullptr;
956 } 956 }
957 957
958 } // namespace blink 958 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/css/CSSValueKeywords.in ('k') | Source/core/layout/LayoutBlock.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698