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 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 void MutableStylePropertySet::addParsedProperties(const WillBeHeapVector<CSSProp
erty, 256>& properties) | 350 void MutableStylePropertySet::addParsedProperties(const WillBeHeapVector<CSSProp
erty, 256>& properties) |
351 { | 351 { |
352 m_propertyVector.reserveCapacity(m_propertyVector.size() + properties.size()
); | 352 m_propertyVector.reserveCapacity(m_propertyVector.size() + properties.size()
); |
353 for (unsigned i = 0; i < properties.size(); ++i) | 353 for (unsigned i = 0; i < properties.size(); ++i) |
354 addParsedProperty(properties[i]); | 354 addParsedProperty(properties[i]); |
355 } | 355 } |
356 | 356 |
357 void MutableStylePropertySet::addParsedProperty(const CSSProperty& property) | 357 void MutableStylePropertySet::addParsedProperty(const CSSProperty& property) |
358 { | 358 { |
359 // Only add properties that have no !important counterpart present | 359 // Only add properties that have no !important counterpart present |
360 if (!propertyIsImportant(property.id()) || property.isImportant()) | 360 if (!propertyIsImportant(property.id()) || property.isImportant() || forceOv
erride()) |
361 setProperty(property); | 361 setProperty(property); |
362 } | 362 } |
363 | 363 |
364 String StylePropertySet::asText() const | 364 String StylePropertySet::asText() const |
365 { | 365 { |
366 return StylePropertySerializer(*this).asText(); | 366 return StylePropertySerializer(*this).asText(); |
367 } | 367 } |
368 | 368 |
369 void MutableStylePropertySet::mergeAndOverrideOnConflict(const StylePropertySet*
other) | 369 void MutableStylePropertySet::mergeAndOverrideOnConflict(const StylePropertySet*
other) |
370 { | 370 { |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
607 result.appendLiteral(": "); | 607 result.appendLiteral(": "); |
608 result.append(propertyValue()->cssText()); | 608 result.append(propertyValue()->cssText()); |
609 if (isImportant()) | 609 if (isImportant()) |
610 result.appendLiteral(" !important"); | 610 result.appendLiteral(" !important"); |
611 result.append(';'); | 611 result.append(';'); |
612 return result.toString(); | 612 return result.toString(); |
613 } | 613 } |
614 | 614 |
615 | 615 |
616 } // namespace blink | 616 } // namespace blink |
OLD | NEW |