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

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

Issue 212703003: [Oilpan]: Move StyleKeyFrame to the oilpan heap using transition types. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Review feedack 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/css/parser/BisonCSSParser.h ('k') | no next file » | 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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 172
173 PassRefPtrWillBeRawPtr<StyleRuleBase> BisonCSSParser::parseRule(StyleSheetConten ts* sheet, const String& string) 173 PassRefPtrWillBeRawPtr<StyleRuleBase> BisonCSSParser::parseRule(StyleSheetConten ts* sheet, const String& string)
174 { 174 {
175 setStyleSheet(sheet); 175 setStyleSheet(sheet);
176 m_allowNamespaceDeclarations = false; 176 m_allowNamespaceDeclarations = false;
177 setupParser("@-internal-rule ", string, ""); 177 setupParser("@-internal-rule ", string, "");
178 cssyyparse(this); 178 cssyyparse(this);
179 return m_rule.release(); 179 return m_rule.release();
180 } 180 }
181 181
182 PassRefPtr<StyleKeyframe> BisonCSSParser::parseKeyframeRule(StyleSheetContents* sheet, const String& string) 182 PassRefPtrWillBeRawPtr<StyleKeyframe> BisonCSSParser::parseKeyframeRule(StyleShe etContents* sheet, const String& string)
183 { 183 {
184 setStyleSheet(sheet); 184 setStyleSheet(sheet);
185 setupParser("@-internal-keyframe-rule ", string, ""); 185 setupParser("@-internal-keyframe-rule ", string, "");
186 cssyyparse(this); 186 cssyyparse(this);
187 return m_keyframe.release(); 187 return m_keyframe.release();
188 } 188 }
189 189
190 PassOwnPtr<Vector<double> > BisonCSSParser::parseKeyframeKeyList(const String& s tring) 190 PassOwnPtr<Vector<double> > BisonCSSParser::parseKeyframeKeyList(const String& s tring)
191 { 191 {
192 setupParser("@-internal-keyframe-key-list ", string, ""); 192 setupParser("@-internal-keyframe-key-list ", string, "");
(...skipping 1433 matching lines...) Expand 10 before | Expand all | Expand 10 after
1626 { 1626 {
1627 return createFloatingMediaQuery(MediaQuery::Not, AtomicString("all", AtomicS tring::ConstructFromLiteral), sinkFloatingMediaQueryExpList(createFloatingMediaQ ueryExpList())); 1627 return createFloatingMediaQuery(MediaQuery::Not, AtomicString("all", AtomicS tring::ConstructFromLiteral), sinkFloatingMediaQueryExpList(createFloatingMediaQ ueryExpList()));
1628 } 1628 }
1629 1629
1630 PassOwnPtrWillBeRawPtr<MediaQuery> BisonCSSParser::sinkFloatingMediaQuery(MediaQ uery* query) 1630 PassOwnPtrWillBeRawPtr<MediaQuery> BisonCSSParser::sinkFloatingMediaQuery(MediaQ uery* query)
1631 { 1631 {
1632 ASSERT_UNUSED(query, query == m_floatingMediaQuery); 1632 ASSERT_UNUSED(query, query == m_floatingMediaQuery);
1633 return m_floatingMediaQuery.release(); 1633 return m_floatingMediaQuery.release();
1634 } 1634 }
1635 1635
1636 Vector<RefPtr<StyleKeyframe> >* BisonCSSParser::createFloatingKeyframeVector() 1636 WillBeHeapVector<RefPtrWillBeMember<StyleKeyframe> >* BisonCSSParser::createFloa tingKeyframeVector()
1637 { 1637 {
1638 m_floatingKeyframeVector = adoptPtr(new Vector<RefPtr<StyleKeyframe> >()); 1638 m_floatingKeyframeVector = adoptPtrWillBeNoop(new WillBeHeapVector<RefPtrWil lBeMember<StyleKeyframe> >());
1639 return m_floatingKeyframeVector.get(); 1639 return m_floatingKeyframeVector.get();
1640 } 1640 }
1641 1641
1642 PassOwnPtr<Vector<RefPtr<StyleKeyframe> > > BisonCSSParser::sinkFloatingKeyframe Vector(Vector<RefPtr<StyleKeyframe> >* keyframeVector) 1642 PassOwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<StyleKeyframe> > > Bi sonCSSParser::sinkFloatingKeyframeVector(WillBeHeapVector<RefPtrWillBeMember<Sty leKeyframe> >* keyframeVector)
1643 { 1643 {
1644 ASSERT_UNUSED(keyframeVector, m_floatingKeyframeVector == keyframeVector); 1644 ASSERT_UNUSED(keyframeVector, m_floatingKeyframeVector == keyframeVector);
1645 return m_floatingKeyframeVector.release(); 1645 return m_floatingKeyframeVector.release();
1646 } 1646 }
1647 1647
1648 MediaQuerySet* BisonCSSParser::createMediaQuerySet() 1648 MediaQuerySet* BisonCSSParser::createMediaQuerySet()
1649 { 1649 {
1650 RefPtrWillBeRawPtr<MediaQuerySet> queries = MediaQuerySet::create(); 1650 RefPtrWillBeRawPtr<MediaQuerySet> queries = MediaQuerySet::create();
1651 MediaQuerySet* result = queries.get(); 1651 MediaQuerySet* result = queries.get();
1652 m_parsedMediaQuerySets.append(queries.release()); 1652 m_parsedMediaQuerySets.append(queries.release());
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
1820 TextPosition tokenPosition = TextPosition::fromOffsetAndLineEndings(loca tion.offset, *m_lineEndings); 1820 TextPosition tokenPosition = TextPosition::fromOffsetAndLineEndings(loca tion.offset, *m_lineEndings);
1821 lineNumberInStyleSheet = tokenPosition.m_line.zeroBasedInt(); 1821 lineNumberInStyleSheet = tokenPosition.m_line.zeroBasedInt();
1822 columnNumber = (lineNumberInStyleSheet ? 0 : m_startPosition.m_column.ze roBasedInt()) + tokenPosition.m_column.zeroBasedInt(); 1822 columnNumber = (lineNumberInStyleSheet ? 0 : m_startPosition.m_column.ze roBasedInt()) + tokenPosition.m_column.zeroBasedInt();
1823 } else { 1823 } else {
1824 lineNumberInStyleSheet = location.lineNumber; 1824 lineNumberInStyleSheet = location.lineNumber;
1825 } 1825 }
1826 PageConsole& console = m_styleSheet->singleOwnerDocument()->frameHost()->con sole(); 1826 PageConsole& console = m_styleSheet->singleOwnerDocument()->frameHost()->con sole();
1827 console.addMessage(CSSMessageSource, WarningMessageLevel, message, m_styleSh eet->baseURL().string(), lineNumberInStyleSheet + m_startPosition.m_line.zeroBas edInt() + 1, columnNumber + 1); 1827 console.addMessage(CSSMessageSource, WarningMessageLevel, message, m_styleSh eet->baseURL().string(), lineNumberInStyleSheet + m_startPosition.m_line.zeroBas edInt() + 1, columnNumber + 1);
1828 } 1828 }
1829 1829
1830 StyleRuleKeyframes* BisonCSSParser::createKeyframesRule(const String& name, Pass OwnPtr<Vector<RefPtr<StyleKeyframe> > > popKeyframes, bool isPrefixed) 1830 StyleRuleKeyframes* BisonCSSParser::createKeyframesRule(const String& name, Pass OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<StyleKeyframe> > > popKey frames, bool isPrefixed)
1831 { 1831 {
1832 OwnPtr<Vector<RefPtr<StyleKeyframe> > > keyframes = popKeyframes; 1832 OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<StyleKeyframe> > > ke yframes = popKeyframes;
1833 m_allowImportRules = m_allowNamespaceDeclarations = false; 1833 m_allowImportRules = m_allowNamespaceDeclarations = false;
1834 RefPtrWillBeRawPtr<StyleRuleKeyframes> rule = StyleRuleKeyframes::create(); 1834 RefPtrWillBeRawPtr<StyleRuleKeyframes> rule = StyleRuleKeyframes::create();
1835 for (size_t i = 0; i < keyframes->size(); ++i) 1835 for (size_t i = 0; i < keyframes->size(); ++i)
1836 rule->parserAppendKeyframe(keyframes->at(i)); 1836 rule->parserAppendKeyframe(keyframes->at(i));
1837 rule->setName(name); 1837 rule->setName(name);
1838 rule->setVendorPrefixed(isPrefixed); 1838 rule->setVendorPrefixed(isPrefixed);
1839 StyleRuleKeyframes* rulePtr = rule.get(); 1839 StyleRuleKeyframes* rulePtr = rule.get();
1840 m_parsedRules.append(rule.release()); 1840 m_parsedRules.append(rule.release());
1841 return rulePtr; 1841 return rulePtr;
1842 } 1842 }
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
2092 ++i; 2092 ++i;
2093 } 2093 }
2094 } 2094 }
2095 2095
2096 StyleKeyframe* BisonCSSParser::createKeyframe(CSSParserValueList* keys) 2096 StyleKeyframe* BisonCSSParser::createKeyframe(CSSParserValueList* keys)
2097 { 2097 {
2098 OwnPtr<Vector<double> > keyVector = StyleKeyframe::createKeyList(keys); 2098 OwnPtr<Vector<double> > keyVector = StyleKeyframe::createKeyList(keys);
2099 if (keyVector->isEmpty()) 2099 if (keyVector->isEmpty())
2100 return 0; 2100 return 0;
2101 2101
2102 RefPtr<StyleKeyframe> keyframe = StyleKeyframe::create(); 2102 RefPtrWillBeRawPtr<StyleKeyframe> keyframe = StyleKeyframe::create();
2103 keyframe->setKeys(keyVector.release()); 2103 keyframe->setKeys(keyVector.release());
2104 keyframe->setProperties(createStylePropertySet()); 2104 keyframe->setProperties(createStylePropertySet());
2105 2105
2106 clearProperties(); 2106 clearProperties();
2107 2107
2108 StyleKeyframe* keyframePtr = keyframe.get(); 2108 StyleKeyframe* keyframePtr = keyframe.get();
2109 m_parsedKeyframes.append(keyframe.release()); 2109 m_parsedKeyframes.append(keyframe.release());
2110 return keyframePtr; 2110 return keyframePtr;
2111 } 2111 }
2112 2112
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
2209 rule->setProperties(createStylePropertySet()); 2209 rule->setProperties(createStylePropertySet());
2210 clearProperties(); 2210 clearProperties();
2211 2211
2212 StyleRuleViewport* result = rule.get(); 2212 StyleRuleViewport* result = rule.get();
2213 m_parsedRules.append(rule.release()); 2213 m_parsedRules.append(rule.release());
2214 2214
2215 return result; 2215 return result;
2216 } 2216 }
2217 2217
2218 } 2218 }
OLDNEW
« no previous file with comments | « Source/core/css/parser/BisonCSSParser.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698