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

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

Issue 1182933004: Split up inspector interfaces to CSSParser::parse(Sheet/DeclarationList) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « no previous file | Source/core/css/StyleSheetContents.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 * (C) 1999-2003 Lars Knoll (knoll@kde.org) 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved.
4 * Copyright (C) 2011 Research In Motion Limited. All rights reserved. 4 * Copyright (C) 2011 Research In Motion Limited. All rights reserved.
5 * Copyright (C) 2013 Intel Corporation. All rights reserved. 5 * Copyright (C) 2013 Intel Corporation. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 void MutableStylePropertySet::parseDeclarationList(const String& styleDeclaratio n, StyleSheetContents* contextStyleSheet) 293 void MutableStylePropertySet::parseDeclarationList(const String& styleDeclaratio n, StyleSheetContents* contextStyleSheet)
294 { 294 {
295 m_propertyVector.clear(); 295 m_propertyVector.clear();
296 296
297 CSSParserContext context(cssParserMode(), UseCounter::getFrom(contextStyleSh eet)); 297 CSSParserContext context(cssParserMode(), UseCounter::getFrom(contextStyleSh eet));
298 if (contextStyleSheet) { 298 if (contextStyleSheet) {
299 context = contextStyleSheet->parserContext(); 299 context = contextStyleSheet->parserContext();
300 context.setMode(cssParserMode()); 300 context.setMode(cssParserMode());
301 } 301 }
302 302
303 CSSParser::parseDeclarationList(context, this, styleDeclaration, nullptr); 303 CSSParser::parseDeclarationList(context, this, styleDeclaration);
304 } 304 }
305 305
306 bool MutableStylePropertySet::addParsedProperties(const WillBeHeapVector<CSSProp erty, 256>& properties) 306 bool MutableStylePropertySet::addParsedProperties(const WillBeHeapVector<CSSProp erty, 256>& properties)
307 { 307 {
308 bool changed = false; 308 bool changed = false;
309 m_propertyVector.reserveCapacity(m_propertyVector.size() + properties.size() ); 309 m_propertyVector.reserveCapacity(m_propertyVector.size() + properties.size() );
310 for (unsigned i = 0; i < properties.size(); ++i) 310 for (unsigned i = 0; i < properties.size(); ++i)
311 changed |= setProperty(properties[i]); 311 changed |= setProperty(properties[i]);
312 return changed; 312 return changed;
313 } 313 }
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 { 555 {
556 return adoptRefWillBeNoop(new MutableStylePropertySet(cssParserMode)); 556 return adoptRefWillBeNoop(new MutableStylePropertySet(cssParserMode));
557 } 557 }
558 558
559 PassRefPtrWillBeRawPtr<MutableStylePropertySet> MutableStylePropertySet::create( const CSSProperty* properties, unsigned count) 559 PassRefPtrWillBeRawPtr<MutableStylePropertySet> MutableStylePropertySet::create( const CSSProperty* properties, unsigned count)
560 { 560 {
561 return adoptRefWillBeNoop(new MutableStylePropertySet(properties, count)); 561 return adoptRefWillBeNoop(new MutableStylePropertySet(properties, count));
562 } 562 }
563 563
564 } // namespace blink 564 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/core/css/StyleSheetContents.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698