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

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

Issue 1184063002: Remove unused isValidNthToken function (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 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 | « no previous file | 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 7568 matching lines...) Expand 10 before | Expand all | Expand 10 after
7579 { 7579 {
7580 unsigned length = string.length(); 7580 unsigned length = string.length();
7581 if (!length) 7581 if (!length)
7582 return CSSValueInvalid; 7582 return CSSValueInvalid;
7583 if (length > maxCSSValueKeywordLength) 7583 if (length > maxCSSValueKeywordLength)
7584 return CSSValueInvalid; 7584 return CSSValueInvalid;
7585 7585
7586 return string.is8Bit() ? cssValueKeywordID(string.characters8(), length) : c ssValueKeywordID(string.characters16(), length); 7586 return string.is8Bit() ? cssValueKeywordID(string.characters8(), length) : c ssValueKeywordID(string.characters16(), length);
7587 } 7587 }
7588 7588
7589 // FIXME: This has nothing to do with parsing properties
7590 bool isValidNthToken(const CSSParserString& token)
7591 {
7592 // The tokenizer checks for the construct of an+b.
7593 // However, since the {ident} rule precedes the {nth} rule, some of those
7594 // tokens are identified as string literal. Furthermore we need to accept
7595 // "odd" and "even" which does not match to an+b.
7596 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even")
7597 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n");
7598 }
7599
7600 bool CSSPropertyParser::isSystemColor(int id) 7589 bool CSSPropertyParser::isSystemColor(int id)
7601 { 7590 {
7602 return (id >= CSSValueActiveborder && id <= CSSValueWindowtext) || id == CSS ValueMenu; 7591 return (id >= CSSValueActiveborder && id <= CSSValueWindowtext) || id == CSS ValueMenu;
7603 } 7592 }
7604 7593
7605 bool CSSPropertyParser::parseSVGValue(CSSPropertyID propId, bool important) 7594 bool CSSPropertyParser::parseSVGValue(CSSPropertyID propId, bool important)
7606 { 7595 {
7607 CSSParserValue* value = m_valueList->current(); 7596 CSSParserValue* value = m_valueList->current();
7608 ASSERT(value); 7597 ASSERT(value);
7609 7598
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after
8190 } 8179 }
8191 } 8180 }
8192 8181
8193 if (!list->length()) 8182 if (!list->length())
8194 return nullptr; 8183 return nullptr;
8195 8184
8196 return list.release(); 8185 return list.release();
8197 } 8186 }
8198 8187
8199 } // namespace blink 8188 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698