| 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.
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 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 } | 301 } |
| 302 | 302 |
| 303 CSSParser::parseDeclarationList(context, this, styleDeclaration, 0, contextS
tyleSheet); | 303 CSSParser::parseDeclarationList(context, this, styleDeclaration, 0, contextS
tyleSheet); |
| 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 |= addParsedProperty(properties[i]); | 311 changed |= setProperty(properties[i]); |
| 312 return changed; | 312 return changed; |
| 313 } | 313 } |
| 314 | 314 |
| 315 bool MutableStylePropertySet::addParsedProperty(const CSSProperty& property) | 315 bool MutableStylePropertySet::addRespectingCascade(const CSSProperty& property) |
| 316 { | 316 { |
| 317 // Only add properties that have no !important counterpart present | 317 // Only add properties that have no !important counterpart present |
| 318 if (!propertyIsImportant(property.id()) || property.isImportant()) | 318 if (!propertyIsImportant(property.id()) || property.isImportant()) |
| 319 return setProperty(property); | 319 return setProperty(property); |
| 320 return false; | 320 return false; |
| 321 } | 321 } |
| 322 | 322 |
| 323 String StylePropertySet::asText() const | 323 String StylePropertySet::asText() const |
| 324 { | 324 { |
| 325 return StylePropertySerializer(*this).asText(); | 325 return StylePropertySerializer(*this).asText(); |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 566 result.appendLiteral(": "); | 566 result.appendLiteral(": "); |
| 567 result.append(propertyValue()->cssText()); | 567 result.append(propertyValue()->cssText()); |
| 568 if (isImportant()) | 568 if (isImportant()) |
| 569 result.appendLiteral(" !important"); | 569 result.appendLiteral(" !important"); |
| 570 result.append(';'); | 570 result.append(';'); |
| 571 return result.toString(); | 571 return result.toString(); |
| 572 } | 572 } |
| 573 | 573 |
| 574 | 574 |
| 575 } // namespace blink | 575 } // namespace blink |
| OLD | NEW |