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

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

Issue 1169983004: Move fast-path color parsing from CSSPropertyParser to CSSParserFastPaths (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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2003 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2003 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2008, 2009, 2010 Apple Inc. All rights reserv ed. 3 * Copyright (C) 2004, 2005, 2006, 2008, 2009, 2010 Apple Inc. All rights reserv ed.
4 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> 4 * Copyright (C) 2008 Eric Seidel <eric@webkit.org>
5 * Copyright (C) 2009 - 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserve d. 5 * Copyright (C) 2009 - 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserve d.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 FRelative = 0x0100, 67 FRelative = 0x0100,
68 FResolution = 0x0200, 68 FResolution = 0x0200,
69 FNonNeg = 0x0400, 69 FNonNeg = 0x0400,
70 FUnitlessQuirk = 0x0800 70 FUnitlessQuirk = 0x0800
71 }; 71 };
72 72
73 static bool parseValue(CSSPropertyID, bool important, 73 static bool parseValue(CSSPropertyID, bool important,
74 CSSParserValueList*, const CSSParserContext&, 74 CSSParserValueList*, const CSSParserContext&,
75 WillBeHeapVector<CSSProperty, 256>&, StyleRule::Type); 75 WillBeHeapVector<CSSProperty, 256>&, StyleRule::Type);
76 76
77 // FIXME: This should probably move to CSSParserFastPaths
78 template<typename StringType>
79 static bool fastParseColor(RGBA32&, const StringType&, bool strict);
80
81 static bool isSystemColor(int id); 77 static bool isSystemColor(int id);
82 78
83 private: 79 private:
84 CSSPropertyParser(CSSParserValueList*, const CSSParserContext&, 80 CSSPropertyParser(CSSParserValueList*, const CSSParserContext&,
85 WillBeHeapVector<CSSProperty, 256>&, StyleRule::Type); 81 WillBeHeapVector<CSSProperty, 256>&, StyleRule::Type);
86 82
87 bool parseValue(CSSPropertyID, bool important); 83 bool parseValue(CSSPropertyID, bool important);
88 84
89 bool inShorthand() const { return m_inParseShorthand; } 85 bool inShorthand() const { return m_inParseShorthand; }
90 bool inQuirksMode() const { return isQuirksModeBehavior(m_context.mode()); } 86 bool inQuirksMode() const { return isQuirksModeBehavior(m_context.mode()); }
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 RefPtrWillBeMember<CSSCalcValue> m_parsedCalculation; 379 RefPtrWillBeMember<CSSCalcValue> m_parsedCalculation;
384 }; 380 };
385 381
386 CSSPropertyID unresolvedCSSPropertyID(const CSSParserString&); 382 CSSPropertyID unresolvedCSSPropertyID(const CSSParserString&);
387 CSSPropertyID cssPropertyID(const String&); 383 CSSPropertyID cssPropertyID(const String&);
388 CSSValueID cssValueKeywordID(const CSSParserString&); 384 CSSValueID cssValueKeywordID(const CSSParserString&);
389 385
390 } // namespace blink 386 } // namespace blink
391 387
392 #endif // CSSPropertyParser_h 388 #endif // CSSPropertyParser_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698