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

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

Issue 973623002: Fix serialization of content property to always quote (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix charset test Created 5 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) 2004, 2005, 2006, 2008 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2008 Apple Inc. All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 case StringToken: 170 case StringToken:
171 case UnicodeRangeToken: 171 case UnicodeRangeToken:
172 case UrlToken: { 172 case UrlToken: {
173 CSSParserString string; 173 CSSParserString string;
174 string.init(token.value()); 174 string.init(token.value());
175 value.id = CSSValueInvalid; 175 value.id = CSSValueInvalid;
176 value.isInt = false; 176 value.isInt = false;
177 if (token.type() == HashToken) 177 if (token.type() == HashToken)
178 value.unit = CSSParserValue::HexColor; 178 value.unit = CSSParserValue::HexColor;
179 else if (token.type() == StringToken) 179 else if (token.type() == StringToken)
180 value.unit = CSSPrimitiveValue::CSS_STRING; 180 value.unit = CSSPrimitiveValue::CSS_CUSTOM_IDENT;
Timothy Loh 2015/03/03 23:20:15 These should also stay as <string>
181 else if (token.type() == UnicodeRangeToken) 181 else if (token.type() == UnicodeRangeToken)
182 value.unit = CSSPrimitiveValue::CSS_UNICODE_RANGE; 182 value.unit = CSSPrimitiveValue::CSS_UNICODE_RANGE;
183 else 183 else
184 value.unit = CSSPrimitiveValue::CSS_URI; 184 value.unit = CSSPrimitiveValue::CSS_URI;
185 value.string = string; 185 value.string = string;
186 break; 186 break;
187 } 187 }
188 case DelimiterToken: 188 case DelimiterToken:
189 value.setFromOperator(token.delimiter()); 189 value.setFromOperator(token.delimiter());
190 if (calcDepth && token.delimiter() == '+' && (&token - 1)->type() != WhitespaceToken) { 190 if (calcDepth && token.delimiter() == '+' && (&token - 1)->type() != WhitespaceToken) {
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 bool CSSParserSelector::hasHostPseudoSelector() const 370 bool CSSParserSelector::hasHostPseudoSelector() const
371 { 371 {
372 for (CSSParserSelector* selector = const_cast<CSSParserSelector*>(this); sel ector; selector = selector->tagHistory()) { 372 for (CSSParserSelector* selector = const_cast<CSSParserSelector*>(this); sel ector; selector = selector->tagHistory()) {
373 if (selector->pseudoType() == CSSSelector::PseudoHost || selector->pseud oType() == CSSSelector::PseudoHostContext) 373 if (selector->pseudoType() == CSSSelector::PseudoHost || selector->pseud oType() == CSSSelector::PseudoHostContext)
374 return true; 374 return true;
375 } 375 }
376 return false; 376 return false;
377 } 377 }
378 378
379 } // namespace blink 379 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698