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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 m_propertyVector.reserveInitialCapacity(length); | 73 m_propertyVector.reserveInitialCapacity(length); |
74 for (unsigned i = 0; i < length; ++i) | 74 for (unsigned i = 0; i < length; ++i) |
75 m_propertyVector.uncheckedAppend(properties[i]); | 75 m_propertyVector.uncheckedAppend(properties[i]); |
76 } | 76 } |
77 | 77 |
78 ImmutableStylePropertySet::ImmutableStylePropertySet(const CSSProperty* properti
es, unsigned length, CSSParserMode cssParserMode) | 78 ImmutableStylePropertySet::ImmutableStylePropertySet(const CSSProperty* properti
es, unsigned length, CSSParserMode cssParserMode) |
79 : StylePropertySet(cssParserMode, length) | 79 : StylePropertySet(cssParserMode, length) |
80 { | 80 { |
81 StylePropertyMetadata* metadataArray = const_cast<StylePropertyMetadata*>(th
is->metadataArray()); | 81 StylePropertyMetadata* metadataArray = const_cast<StylePropertyMetadata*>(th
is->metadataArray()); |
82 CSSValue** valueArray = const_cast<CSSValue**>(this->valueArray()); | 82 CSSValue** valueArray = const_cast<CSSValue**>(this->valueArray()); |
83 for (unsigned i = 0; i < length; ++i) { | 83 for (unsigned i = 0; i < m_arraySize; ++i) { |
84 metadataArray[i] = properties[i].metadata(); | 84 metadataArray[i] = properties[i].metadata(); |
85 valueArray[i] = properties[i].value(); | 85 valueArray[i] = properties[i].value(); |
86 valueArray[i]->ref(); | 86 valueArray[i]->ref(); |
87 } | 87 } |
88 } | 88 } |
89 | 89 |
90 ImmutableStylePropertySet::~ImmutableStylePropertySet() | 90 ImmutableStylePropertySet::~ImmutableStylePropertySet() |
91 { | 91 { |
92 CSSValue** valueArray = const_cast<CSSValue**>(this->valueArray()); | 92 CSSValue** valueArray = const_cast<CSSValue**>(this->valueArray()); |
93 for (unsigned i = 0; i < m_arraySize; ++i) | 93 for (unsigned i = 0; i < m_arraySize; ++i) |
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 |
OLD | NEW |