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

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

Issue 196093002: Remove document param from parseSystemColor (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 9 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) 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 1106 matching lines...) Expand 10 before | Expand all | Expand 10 after
1117 1117
1118 bool BisonCSSParser::parseColor(const String& string) 1118 bool BisonCSSParser::parseColor(const String& string)
1119 { 1119 {
1120 setupParser("@-internal-decls color:", string, ""); 1120 setupParser("@-internal-decls color:", string, "");
1121 cssyyparse(this); 1121 cssyyparse(this);
1122 m_rule = nullptr; 1122 m_rule = nullptr;
1123 1123
1124 return !m_parsedProperties.isEmpty() && m_parsedProperties.first().id() == C SSPropertyColor; 1124 return !m_parsedProperties.isEmpty() && m_parsedProperties.first().id() == C SSPropertyColor;
1125 } 1125 }
1126 1126
1127 bool BisonCSSParser::parseSystemColor(RGBA32& color, const String& string, Docum ent* document) 1127 bool BisonCSSParser::parseSystemColor(RGBA32& color, const String& string)
1128 { 1128 {
1129 if (!document)
1130 return false;
1131
1132 CSSParserString cssColor; 1129 CSSParserString cssColor;
1133 cssColor.init(string); 1130 cssColor.init(string);
1134 CSSValueID id = cssValueKeywordID(cssColor); 1131 CSSValueID id = cssValueKeywordID(cssColor);
1135 if (!CSSPropertyParser::isSystemColor(id)) 1132 if (!CSSPropertyParser::isSystemColor(id))
1136 return false; 1133 return false;
1137 1134
1138 Color parsedColor = RenderTheme::theme().systemColor(id); 1135 Color parsedColor = RenderTheme::theme().systemColor(id);
1139 color = parsedColor.rgb(); 1136 color = parsedColor.rgb();
1140 return true; 1137 return true;
1141 } 1138 }
(...skipping 1077 matching lines...) Expand 10 before | Expand all | Expand 10 after
2219 rule->setProperties(createStylePropertySet()); 2216 rule->setProperties(createStylePropertySet());
2220 clearProperties(); 2217 clearProperties();
2221 2218
2222 StyleRuleViewport* result = rule.get(); 2219 StyleRuleViewport* result = rule.get();
2223 m_parsedRules.append(rule.release()); 2220 m_parsedRules.append(rule.release());
2224 2221
2225 return result; 2222 return result;
2226 } 2223 }
2227 2224
2228 } 2225 }
OLDNEW
« no previous file with comments | « Source/core/css/parser/BisonCSSParser.h ('k') | Source/core/html/canvas/CanvasRenderingContext2D.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698