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

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

Issue 23903041: Make the Vector copy constructor for mismatched inline sizes explicit. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Review feedback. Created 7 years, 3 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/StylePropertySet.h ('k') | Source/core/html/track/WebVTTTokenizer.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 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 CSSParserContext context(cssParserMode()); 335 CSSParserContext context(cssParserMode());
336 if (contextStyleSheet) { 336 if (contextStyleSheet) {
337 context = contextStyleSheet->parserContext(); 337 context = contextStyleSheet->parserContext();
338 context.mode = cssParserMode(); 338 context.mode = cssParserMode();
339 } 339 }
340 340
341 CSSParser parser(context, UseCounter::getFrom(contextStyleSheet)); 341 CSSParser parser(context, UseCounter::getFrom(contextStyleSheet));
342 parser.parseDeclaration(this, styleDeclaration, 0, contextStyleSheet); 342 parser.parseDeclaration(this, styleDeclaration, 0, contextStyleSheet);
343 } 343 }
344 344
345 void MutableStylePropertySet::addParsedProperties(const Vector<CSSProperty>& pro perties) 345 void MutableStylePropertySet::addParsedProperties(const Vector<CSSProperty, 256> & properties)
346 { 346 {
347 m_propertyVector.reserveCapacity(m_propertyVector.size() + properties.size() ); 347 m_propertyVector.reserveCapacity(m_propertyVector.size() + properties.size() );
348 for (unsigned i = 0; i < properties.size(); ++i) 348 for (unsigned i = 0; i < properties.size(); ++i)
349 addParsedProperty(properties[i]); 349 addParsedProperty(properties[i]);
350 } 350 }
351 351
352 void MutableStylePropertySet::addParsedProperty(const CSSProperty& property) 352 void MutableStylePropertySet::addParsedProperty(const CSSProperty& property)
353 { 353 {
354 // Only add properties that have no !important counterpart present 354 // Only add properties that have no !important counterpart present
355 if (!propertyIsImportant(property.id()) || property.isImportant()) 355 if (!propertyIsImportant(property.id()) || property.isImportant())
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
651 result.appendLiteral(": "); 651 result.appendLiteral(": ");
652 result.append(propertyValue()->cssText()); 652 result.append(propertyValue()->cssText());
653 if (isImportant()) 653 if (isImportant())
654 result.appendLiteral(" !important"); 654 result.appendLiteral(" !important");
655 result.append(';'); 655 result.append(';');
656 return result.toString(); 656 return result.toString();
657 } 657 }
658 658
659 659
660 } // namespace WebCore 660 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/css/StylePropertySet.h ('k') | Source/core/html/track/WebVTTTokenizer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698