| OLD | NEW |
| 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. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. |
| 4 * All rights reserved. | 4 * All rights reserved. |
| 5 * Copyright (C) 2011 Research In Motion Limited. All rights reserved. | 5 * Copyright (C) 2011 Research In Motion Limited. All rights reserved. |
| 6 * Copyright (C) 2013 Intel Corporation. All rights reserved. | 6 * Copyright (C) 2013 Intel Corporation. All rights reserved. |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 377 setProperty(CSSProperty(propertyID, *CSSIdentifierValue::create(identifier), | 377 setProperty(CSSProperty(propertyID, *CSSIdentifierValue::create(identifier), |
| 378 important)); | 378 important)); |
| 379 return true; | 379 return true; |
| 380 } | 380 } |
| 381 | 381 |
| 382 void MutableStylePropertySet::parseDeclarationList( | 382 void MutableStylePropertySet::parseDeclarationList( |
| 383 const String& styleDeclaration, | 383 const String& styleDeclaration, |
| 384 StyleSheetContents* contextStyleSheet) { | 384 StyleSheetContents* contextStyleSheet) { |
| 385 m_propertyVector.clear(); | 385 m_propertyVector.clear(); |
| 386 | 386 |
| 387 CSSParserContext context(cssParserMode(), | 387 CSSParserContext* context; |
| 388 UseCounter::getFrom(contextStyleSheet)); | |
| 389 if (contextStyleSheet) { | 388 if (contextStyleSheet) { |
| 390 context = contextStyleSheet->parserContext(); | 389 context = CSSParserContext::create(contextStyleSheet->parserContext(), |
| 391 context.setMode(cssParserMode()); | 390 contextStyleSheet); |
| 391 context->setMode(cssParserMode()); |
| 392 } else { |
| 393 context = new CSSParserContext(cssParserMode()); |
| 392 } | 394 } |
| 393 | 395 |
| 394 CSSParser::parseDeclarationList(context, this, styleDeclaration); | 396 CSSParser::parseDeclarationList(context, this, styleDeclaration); |
| 395 } | 397 } |
| 396 | 398 |
| 397 bool MutableStylePropertySet::addParsedProperties( | 399 bool MutableStylePropertySet::addParsedProperties( |
| 398 const HeapVector<CSSProperty, 256>& properties) { | 400 const HeapVector<CSSProperty, 256>& properties) { |
| 399 bool changed = false; | 401 bool changed = false; |
| 400 m_propertyVector.reserveCapacity(m_propertyVector.size() + properties.size()); | 402 m_propertyVector.reserveCapacity(m_propertyVector.size() + properties.size()); |
| 401 for (unsigned i = 0; i < properties.size(); ++i) | 403 for (unsigned i = 0; i < properties.size(); ++i) |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 610 | 612 |
| 611 MutableStylePropertySet* MutableStylePropertySet::create( | 613 MutableStylePropertySet* MutableStylePropertySet::create( |
| 612 const CSSProperty* properties, | 614 const CSSProperty* properties, |
| 613 unsigned count) { | 615 unsigned count) { |
| 614 return new MutableStylePropertySet(properties, count); | 616 return new MutableStylePropertySet(properties, count); |
| 615 } | 617 } |
| 616 | 618 |
| 617 DEFINE_TRACE(CSSLazyPropertyParser) {} | 619 DEFINE_TRACE(CSSLazyPropertyParser) {} |
| 618 | 620 |
| 619 } // namespace blink | 621 } // namespace blink |
| OLD | NEW |