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

Side by Side Diff: Source/core/css/CSSParser-in.cpp

Issue 108663009: orphans and widows should be positive integer. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed animations/interpolation/orphans-interpolation.html Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « LayoutTests/virtual/legacy-animations-engine/animations/interpolation/orphans-interpolation-expected.txt ('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 2018 matching lines...) Expand 10 before | Expand all | Expand 10 after
2029 case CSSPropertyWebkitMarginStart: 2029 case CSSPropertyWebkitMarginStart:
2030 case CSSPropertyWebkitMarginEnd: 2030 case CSSPropertyWebkitMarginEnd:
2031 case CSSPropertyWebkitMarginBefore: 2031 case CSSPropertyWebkitMarginBefore:
2032 case CSSPropertyWebkitMarginAfter: 2032 case CSSPropertyWebkitMarginAfter:
2033 if (id == CSSValueAuto) 2033 if (id == CSSValueAuto)
2034 validPrimitive = true; 2034 validPrimitive = true;
2035 else 2035 else
2036 validPrimitive = (!id && validUnit(value, FLength | FPercent)); 2036 validPrimitive = (!id && validUnit(value, FLength | FPercent));
2037 break; 2037 break;
2038 2038
2039 case CSSPropertyZIndex: // auto | <integer> | inherit
2040 if (id == CSSValueAuto) {
2041 validPrimitive = true;
2042 break;
2043 }
2044 /* nobreak */
2045 case CSSPropertyOrphans: // <integer> | inherit | auto (We've added support for auto for backwards compatibility) 2039 case CSSPropertyOrphans: // <integer> | inherit | auto (We've added support for auto for backwards compatibility)
2046 case CSSPropertyWidows: // <integer> | inherit | auto (Ditto) 2040 case CSSPropertyWidows: // <integer> | inherit | auto (Ditto)
2047 if (id == CSSValueAuto) 2041 if (id == CSSValueAuto)
2048 validPrimitive = true; 2042 validPrimitive = true;
2049 else 2043 else
2044 validPrimitive = (!id && validUnit(value, FPositiveInteger, HTMLQuir ksMode));
2045 break;
2046
2047 case CSSPropertyZIndex: // auto | <integer> | inherit
2048 if (id == CSSValueAuto)
2049 validPrimitive = true;
2050 else
2050 validPrimitive = (!id && validUnit(value, FInteger, HTMLQuirksMode)) ; 2051 validPrimitive = (!id && validUnit(value, FInteger, HTMLQuirksMode)) ;
2051 break; 2052 break;
2052 2053
2053 case CSSPropertyLineHeight: 2054 case CSSPropertyLineHeight:
2054 return parseLineHeight(important); 2055 return parseLineHeight(important);
2055 case CSSPropertyCounterIncrement: // [ <identifier> <integer>? ]+ | none | inherit 2056 case CSSPropertyCounterIncrement: // [ <identifier> <integer>? ]+ | none | inherit
2056 if (id != CSSValueNone) 2057 if (id != CSSValueNone)
2057 return parseCounter(propId, 1, important); 2058 return parseCounter(propId, 1, important);
2058 validPrimitive = true; 2059 validPrimitive = true;
2059 break; 2060 break;
(...skipping 8396 matching lines...) Expand 10 before | Expand all | Expand 10 after
10456 { 10457 {
10457 // The tokenizer checks for the construct of an+b. 10458 // The tokenizer checks for the construct of an+b.
10458 // However, since the {ident} rule precedes the {nth} rule, some of those 10459 // However, since the {ident} rule precedes the {nth} rule, some of those
10459 // tokens are identified as string literal. Furthermore we need to accept 10460 // tokens are identified as string literal. Furthermore we need to accept
10460 // "odd" and "even" which does not match to an+b. 10461 // "odd" and "even" which does not match to an+b.
10461 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even") 10462 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even")
10462 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n"); 10463 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n");
10463 } 10464 }
10464 10465
10465 } 10466 }
OLDNEW
« no previous file with comments | « LayoutTests/virtual/legacy-animations-engine/animations/interpolation/orphans-interpolation-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698