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

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

Issue 48523009: Fix unused functions warnings on Linux. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 1 month 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 /* 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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 return a.is8Bit() ? WTF::equalIgnoringCase(b, a.characters8(), length) : WTF ::equalIgnoringCase(b, a.characters16(), length); 126 return a.is8Bit() ? WTF::equalIgnoringCase(b, a.characters8(), length) : WTF ::equalIgnoringCase(b, a.characters16(), length);
127 } 127 }
128 128
129 template <unsigned N> 129 template <unsigned N>
130 static bool equalIgnoringCase(CSSParserValue* value, const char (&b)[N]) 130 static bool equalIgnoringCase(CSSParserValue* value, const char (&b)[N])
131 { 131 {
132 ASSERT(value->unit == CSSPrimitiveValue::CSS_IDENT || value->unit == CSSPrim itiveValue::CSS_STRING); 132 ASSERT(value->unit == CSSPrimitiveValue::CSS_IDENT || value->unit == CSSPrim itiveValue::CSS_STRING);
133 return equalIgnoringCase(value->string, b); 133 return equalIgnoringCase(value->string, b);
134 } 134 }
135 135
136 static bool hasPrefix(const char* string, unsigned length, const char* prefix)
137 {
138 for (unsigned i = 0; i < length; ++i) {
139 if (!prefix[i])
140 return true;
141 if (string[i] != prefix[i])
142 return false;
143 }
144 return false;
145 }
146
147 static PassRefPtr<CSSPrimitiveValue> createPrimitiveValuePair(PassRefPtr<CSSPrim itiveValue> first, PassRefPtr<CSSPrimitiveValue> second, Pair::IdenticalValuesPo licy identicalValuesPolicy = Pair::DropIdenticalValues) 136 static PassRefPtr<CSSPrimitiveValue> createPrimitiveValuePair(PassRefPtr<CSSPrim itiveValue> first, PassRefPtr<CSSPrimitiveValue> second, Pair::IdenticalValuesPo licy identicalValuesPolicy = Pair::DropIdenticalValues)
148 { 137 {
149 return cssValuePool().createValue(Pair::create(first, second, identicalValue sPolicy)); 138 return cssValuePool().createValue(Pair::create(first, second, identicalValue sPolicy));
150 } 139 }
151 140
152 class AnimationParseContext { 141 class AnimationParseContext {
153 public: 142 public:
154 AnimationParseContext() 143 AnimationParseContext()
155 : m_animationPropertyKeywordAllowed(true) 144 : m_animationPropertyKeywordAllowed(true)
156 , m_firstAnimationCommitted(false) 145 , m_firstAnimationCommitted(false)
(...skipping 11881 matching lines...) Expand 10 before | Expand all | Expand 10 after
12038 { 12027 {
12039 // The tokenizer checks for the construct of an+b. 12028 // The tokenizer checks for the construct of an+b.
12040 // However, since the {ident} rule precedes the {nth} rule, some of those 12029 // However, since the {ident} rule precedes the {nth} rule, some of those
12041 // tokens are identified as string literal. Furthermore we need to accept 12030 // tokens are identified as string literal. Furthermore we need to accept
12042 // "odd" and "even" which does not match to an+b. 12031 // "odd" and "even" which does not match to an+b.
12043 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even") 12032 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even")
12044 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n"); 12033 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n");
12045 } 12034 }
12046 12035
12047 } 12036 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698