| 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 Member<const CSSValue>* value_array = | 90 Member<const CSSValue>* value_array = |
| 91 const_cast<Member<const CSSValue>*>(this->ValueArray()); | 91 const_cast<Member<const CSSValue>*>(this->ValueArray()); |
| 92 for (unsigned i = 0; i < array_size_; ++i) { | 92 for (unsigned i = 0; i < array_size_; ++i) { |
| 93 metadata_array[i] = properties[i].Metadata(); | 93 metadata_array[i] = properties[i].Metadata(); |
| 94 value_array[i] = properties[i].Value(); | 94 value_array[i] = properties[i].Value(); |
| 95 } | 95 } |
| 96 } | 96 } |
| 97 | 97 |
| 98 ImmutableStylePropertySet::~ImmutableStylePropertySet() {} | 98 ImmutableStylePropertySet::~ImmutableStylePropertySet() {} |
| 99 | 99 |
| 100 // Convert property into an uint16_t for comparison with metadata's m_propertyID | 100 // Convert property into an uint16_t for comparison with metadata's property_id_ |
| 101 // to avoid the compiler converting it to an int multiple times in a loop. | 101 // to avoid the compiler converting it to an int multiple times in a loop. |
| 102 static uint16_t GetConvertedCSSPropertyID(CSSPropertyID property_id) { | 102 static uint16_t GetConvertedCSSPropertyID(CSSPropertyID property_id) { |
| 103 return static_cast<uint16_t>(property_id); | 103 return static_cast<uint16_t>(property_id); |
| 104 } | 104 } |
| 105 | 105 |
| 106 static uint16_t GetConvertedCSSPropertyID(const AtomicString&) { | 106 static uint16_t GetConvertedCSSPropertyID(const AtomicString&) { |
| 107 return static_cast<uint16_t>(CSSPropertyVariable); | 107 return static_cast<uint16_t>(CSSPropertyVariable); |
| 108 } | 108 } |
| 109 | 109 |
| 110 static bool IsPropertyMatch(const StylePropertyMetadata& metadata, | 110 static bool IsPropertyMatch(const StylePropertyMetadata& metadata, |
| (...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 461 if (property_vector_.IsEmpty()) | 461 if (property_vector_.IsEmpty()) |
| 462 return false; | 462 return false; |
| 463 | 463 |
| 464 CSSProperty* properties = property_vector_.Data(); | 464 CSSProperty* properties = property_vector_.Data(); |
| 465 unsigned old_size = property_vector_.size(); | 465 unsigned old_size = property_vector_.size(); |
| 466 unsigned new_index = 0; | 466 unsigned new_index = 0; |
| 467 for (unsigned old_index = 0; old_index < old_size; ++old_index) { | 467 for (unsigned old_index = 0; old_index < old_size; ++old_index) { |
| 468 const CSSProperty& property = properties[old_index]; | 468 const CSSProperty& property = properties[old_index]; |
| 469 if (ContainsId(set, length, property.Id())) | 469 if (ContainsId(set, length, property.Id())) |
| 470 continue; | 470 continue; |
| 471 // Modify m_propertyVector in-place since this method is | 471 // Modify property_vector_ in-place since this method is |
| 472 // performance-sensitive. | 472 // performance-sensitive. |
| 473 properties[new_index++] = properties[old_index]; | 473 properties[new_index++] = properties[old_index]; |
| 474 } | 474 } |
| 475 if (new_index != old_size) { | 475 if (new_index != old_size) { |
| 476 property_vector_.Shrink(new_index); | 476 property_vector_.Shrink(new_index); |
| 477 return true; | 477 return true; |
| 478 } | 478 } |
| 479 return false; | 479 return false; |
| 480 } | 480 } |
| 481 | 481 |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 614 | 614 |
| 615 MutableStylePropertySet* MutableStylePropertySet::Create( | 615 MutableStylePropertySet* MutableStylePropertySet::Create( |
| 616 const CSSProperty* properties, | 616 const CSSProperty* properties, |
| 617 unsigned count) { | 617 unsigned count) { |
| 618 return new MutableStylePropertySet(properties, count); | 618 return new MutableStylePropertySet(properties, count); |
| 619 } | 619 } |
| 620 | 620 |
| 621 DEFINE_TRACE(CSSLazyPropertyParser) {} | 621 DEFINE_TRACE(CSSLazyPropertyParser) {} |
| 622 | 622 |
| 623 } // namespace blink | 623 } // namespace blink |
| OLD | NEW |