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

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

Issue 15864004: Move create() methods from StylePropertySet to MutableStylePropertySet. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 7 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/CSSComputedStyleDeclaration.cpp ('k') | Source/core/css/DOMWindowCSS.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) 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 1130 matching lines...) Expand 10 before | Expand all | Expand 10 after
1141 RefPtr<CSSValueList> result = CSSValueList::createSpaceSeparated(); 1141 RefPtr<CSSValueList> result = CSSValueList::createSpaceSeparated();
1142 result->append(transformValue.release()); 1142 result->append(transformValue.release());
1143 properties->addParsedProperty(CSSProperty(CSSPropertyWebkitTransform, result .release(), important)); 1143 properties->addParsedProperty(CSSProperty(CSSPropertyWebkitTransform, result .release(), important));
1144 return true; 1144 return true;
1145 } 1145 }
1146 1146
1147 PassRefPtr<CSSValueList> CSSParser::parseFontFaceValue(const AtomicString& strin g) 1147 PassRefPtr<CSSValueList> CSSParser::parseFontFaceValue(const AtomicString& strin g)
1148 { 1148 {
1149 if (string.isEmpty()) 1149 if (string.isEmpty())
1150 return 0; 1150 return 0;
1151 RefPtr<StylePropertySet> dummyStyle = StylePropertySet::create(); 1151 RefPtr<MutableStylePropertySet> dummyStyle = MutableStylePropertySet::create ();
1152 if (!parseValue(dummyStyle.get(), CSSPropertyFontFamily, string, false, CSSQ uirksMode, 0)) 1152 if (!parseValue(dummyStyle.get(), CSSPropertyFontFamily, string, false, CSSQ uirksMode, 0))
1153 return 0; 1153 return 0;
1154 return static_pointer_cast<CSSValueList>(dummyStyle->getPropertyCSSValue(CSS PropertyFontFamily)); 1154 return static_pointer_cast<CSSValueList>(dummyStyle->getPropertyCSSValue(CSS PropertyFontFamily));
1155 } 1155 }
1156 1156
1157 bool CSSParser::parseValue(StylePropertySet* declaration, CSSPropertyID property ID, const String& string, bool important, Document* document) 1157 bool CSSParser::parseValue(StylePropertySet* declaration, CSSPropertyID property ID, const String& string, bool important, Document* document)
1158 { 1158 {
1159 ASSERT(!string.isEmpty()); 1159 ASSERT(!string.isEmpty());
1160 1160
1161 CSSParserContext context(document); 1161 CSSParserContext context(document);
(...skipping 10549 matching lines...) Expand 10 before | Expand all | Expand 10 after
11711 result.lineNumber = lineNumber; 11711 result.lineNumber = lineNumber;
11712 result.content = content; 11712 result.content = content;
11713 size_t newLength = content.length(); 11713 size_t newLength = content.length();
11714 while (newLength > 0 && isHTMLSpace(result.content[newLength - 1])) 11714 while (newLength > 0 && isHTMLSpace(result.content[newLength - 1]))
11715 --newLength; 11715 --newLength;
11716 result.content.setLength(newLength); 11716 result.content.setLength(newLength);
11717 return result; 11717 return result;
11718 } 11718 }
11719 11719
11720 } 11720 }
OLDNEW
« no previous file with comments | « Source/core/css/CSSComputedStyleDeclaration.cpp ('k') | Source/core/css/DOMWindowCSS.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698