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

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

Issue 1232593004: Don't resolve extended color keywords during parsing (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Test expectations fixups. Created 5 years, 5 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
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 2289 matching lines...) Expand 10 before | Expand all | Expand 10 after
2300 // 'ActiveBorder', ..., 'WindowText' 2300 // 'ActiveBorder', ..., 'WindowText'
2301 // 2301 //
2302 // WebKit proprietary/internal: 2302 // WebKit proprietary/internal:
2303 // '-webkit-link' 2303 // '-webkit-link'
2304 // '-webkit-activelink' 2304 // '-webkit-activelink'
2305 // '-internal-active-list-box-selection' 2305 // '-internal-active-list-box-selection'
2306 // '-internal-active-list-box-selection-text' 2306 // '-internal-active-list-box-selection-text'
2307 // '-internal-inactive-list-box-selection' 2307 // '-internal-inactive-list-box-selection'
2308 // '-internal-inactive-list-box-selection-text' 2308 // '-internal-inactive-list-box-selection-text'
2309 // '-webkit-focus-ring-color' 2309 // '-webkit-focus-ring-color'
2310 // '-webkit-text'
2310 // 2311 //
2311 // TODO(fs): The "extended color keywords" are not included. 2312 return (id >= CSSValueAqua && id <= CSSValueWebkitText)
2312 return (id >= CSSValueAqua && id <= CSSValueWebkitText) || id == CSSValueMen u; 2313 || (id >= CSSValueAliceblue && id <= CSSValueYellowgreen)
2314 || id == CSSValueMenu;
2313 } 2315 }
2314 2316
2315 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> CSSPropertyParser::parseColor(const CS SParserValue* value, bool acceptQuirkyColors) 2317 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> CSSPropertyParser::parseColor(const CS SParserValue* value, bool acceptQuirkyColors)
2316 { 2318 {
2317 CSSValueID id = value->id; 2319 CSSValueID id = value->id;
2318 if (isColorKeyword(id)) { 2320 if (isColorKeyword(id)) {
2319 if (!isValueAllowedInMode(id, m_context.mode())) 2321 if (!isValueAllowedInMode(id, m_context.mode()))
2320 return nullptr; 2322 return nullptr;
2321 return cssValuePool().createIdentifierValue(id); 2323 return cssValuePool().createIdentifierValue(id);
2322 } 2324 }
(...skipping 5829 matching lines...) Expand 10 before | Expand all | Expand 10 after
8152 } 8154 }
8153 } 8155 }
8154 8156
8155 if (!list->length()) 8157 if (!list->length())
8156 return nullptr; 8158 return nullptr;
8157 8159
8158 return list.release(); 8160 return list.release();
8159 } 8161 }
8160 8162
8161 } // namespace blink 8163 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698