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

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

Issue 148523016: Move most of the [Pass]RefPtr's of CSSPrimitiveValue to our transition types. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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) 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 valueList.clear(); 82 valueList.clear();
83 } 83 }
84 84
85 PassRefPtr<CSSValue> CSSParserValue::createCSSValue() 85 PassRefPtr<CSSValue> CSSParserValue::createCSSValue()
86 { 86 {
87 RefPtr<CSSValue> parsedValue; 87 RefPtr<CSSValue> parsedValue;
88 if (id) 88 if (id)
89 return CSSPrimitiveValue::createIdentifier(id); 89 return CSSPrimitiveValue::createIdentifier(id);
90 90
91 if (unit == CSSParserValue::Operator) { 91 if (unit == CSSParserValue::Operator) {
92 RefPtr<CSSPrimitiveValue> primitiveValue = CSSPrimitiveValue::createPars erOperator(iValue); 92 RefPtrWillBeRawPtr<CSSPrimitiveValue> primitiveValue = CSSPrimitiveValue ::createParserOperator(iValue);
93 primitiveValue->setPrimitiveType(CSSPrimitiveValue::CSS_PARSER_OPERATOR) ; 93 primitiveValue->setPrimitiveType(CSSPrimitiveValue::CSS_PARSER_OPERATOR) ;
94 return primitiveValue; 94 return primitiveValue;
95 } 95 }
96 if (unit == CSSParserValue::Function) { 96 if (unit == CSSParserValue::Function) {
97 if (function->name.equalIgnoringCase("var(")) { 97 if (function->name.equalIgnoringCase("var(")) {
98 ASSERT(function->args->size() == 1); 98 ASSERT(function->args->size() == 1);
99 return CSSPrimitiveValue::create(function->args->valueAt(0)->string, CSSPrimitiveValue::CSS_VARIABLE_REFERENCE); 99 return CSSPrimitiveValue::create(function->args->valueAt(0)->string, CSSPrimitiveValue::CSS_VARIABLE_REFERENCE);
100 } 100 }
101 return CSSFunctionValue::create(function); 101 return CSSFunctionValue::create(function);
102 } 102 }
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 { 259 {
260 CSSParserSelector* selector = const_cast<CSSParserSelector*>(this); 260 CSSParserSelector* selector = const_cast<CSSParserSelector*>(this);
261 do { 261 do {
262 if (selector->isDistributedPseudoElement()) 262 if (selector->isDistributedPseudoElement())
263 return selector; 263 return selector;
264 } while ((selector = selector->tagHistory())); 264 } while ((selector = selector->tagHistory()));
265 return 0; 265 return 0;
266 } 266 }
267 267
268 } // namespace WebCore 268 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698