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

Side by Side Diff: Source/core/css/SVGCSSParser.cpp

Issue 16415007: Cleanup usage of CSSPropertyID and CSSValueID inside Blink. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/css/MediaQueryExp.cpp ('k') | Source/core/css/SVGCSSStyleSelector.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 /* 1 /*
2 Copyright (C) 2008 Eric Seidel <eric@webkit.org> 2 Copyright (C) 2008 Eric Seidel <eric@webkit.org>
3 Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> 3 Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
4 2004, 2005, 2007, 2010 Rob Buis <buis@kde.org> 4 2004, 2005, 2007, 2010 Rob Buis <buis@kde.org>
5 Copyright (C) 2005, 2006 Apple Computer, Inc. 5 Copyright (C) 2005, 2006 Apple Computer, Inc.
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 26 matching lines...) Expand all
37 { 37 {
38 return (id >= CSSValueActiveborder && id <= CSSValueWindowtext) || id == CSS ValueMenu; 38 return (id >= CSSValueActiveborder && id <= CSSValueWindowtext) || id == CSS ValueMenu;
39 } 39 }
40 40
41 bool CSSParser::parseSVGValue(CSSPropertyID propId, bool important) 41 bool CSSParser::parseSVGValue(CSSPropertyID propId, bool important)
42 { 42 {
43 CSSParserValue* value = m_valueList->current(); 43 CSSParserValue* value = m_valueList->current();
44 if (!value) 44 if (!value)
45 return false; 45 return false;
46 46
47 int id = value->id; 47 CSSValueID id = value->id;
48 48
49 bool valid_primitive = false; 49 bool valid_primitive = false;
50 RefPtr<CSSValue> parsedValue; 50 RefPtr<CSSValue> parsedValue;
51 51
52 switch (propId) { 52 switch (propId) {
53 /* The comment to the right defines all valid value of these 53 /* The comment to the right defines all valid value of these
54 * properties as defined in SVG 1.1, Appendix N. Property index */ 54 * properties as defined in SVG 1.1, Appendix N. Property index */
55 case CSSPropertyAlignmentBaseline: 55 case CSSPropertyAlignmentBaseline:
56 // auto | baseline | before-edge | text-before-edge | middle | 56 // auto | baseline | before-edge | text-before-edge | middle |
57 // central | after-edge | text-after-edge | ideographic | alphabetic | 57 // central | after-edge | text-after-edge | ideographic | alphabetic |
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 362
363 PassRefPtr<CSSValue> CSSParser::parseSVGColor() 363 PassRefPtr<CSSValue> CSSParser::parseSVGColor()
364 { 364 {
365 RGBA32 c = Color::transparent; 365 RGBA32 c = Color::transparent;
366 if (!parseColorFromValue(m_valueList->current(), c)) 366 if (!parseColorFromValue(m_valueList->current(), c))
367 return 0; 367 return 0;
368 return SVGColor::createFromColor(Color(c)); 368 return SVGColor::createFromColor(Color(c));
369 } 369 }
370 370
371 } 371 }
OLDNEW
« no previous file with comments | « Source/core/css/MediaQueryExp.cpp ('k') | Source/core/css/SVGCSSStyleSelector.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698