| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 | 179 |
| 180 UniqueElementData::UniqueElementData() | 180 UniqueElementData::UniqueElementData() |
| 181 { | 181 { |
| 182 } | 182 } |
| 183 | 183 |
| 184 UniqueElementData::UniqueElementData(const UniqueElementData& other) | 184 UniqueElementData::UniqueElementData(const UniqueElementData& other) |
| 185 : ElementData(other, true) | 185 : ElementData(other, true) |
| 186 , m_presentationAttributeStyle(other.m_presentationAttributeStyle) | 186 , m_presentationAttributeStyle(other.m_presentationAttributeStyle) |
| 187 , m_attributeVector(other.m_attributeVector) | 187 , m_attributeVector(other.m_attributeVector) |
| 188 { | 188 { |
| 189 m_inlineStyle = other.m_inlineStyle ? other.m_inlineStyle->mutableCopy() : 0
; | 189 m_inlineStyle = other.m_inlineStyle ? other.m_inlineStyle->mutableCopy() : n
ullptr; |
| 190 } | 190 } |
| 191 | 191 |
| 192 UniqueElementData::UniqueElementData(const ShareableElementData& other) | 192 UniqueElementData::UniqueElementData(const ShareableElementData& other) |
| 193 : ElementData(other, true) | 193 : ElementData(other, true) |
| 194 { | 194 { |
| 195 // An ShareableElementData should never have a mutable inline StylePropertyS
et attached. | 195 // An ShareableElementData should never have a mutable inline StylePropertyS
et attached. |
| 196 ASSERT(!other.m_inlineStyle || !other.m_inlineStyle->isMutable()); | 196 ASSERT(!other.m_inlineStyle || !other.m_inlineStyle->isMutable()); |
| 197 m_inlineStyle = other.m_inlineStyle; | 197 m_inlineStyle = other.m_inlineStyle; |
| 198 | 198 |
| 199 m_attributeVector.reserveCapacity(other.length()); | 199 m_attributeVector.reserveCapacity(other.length()); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 215 Attribute* UniqueElementData::getAttributeItem(const QualifiedName& name) | 215 Attribute* UniqueElementData::getAttributeItem(const QualifiedName& name) |
| 216 { | 216 { |
| 217 for (unsigned i = 0; i < length(); ++i) { | 217 for (unsigned i = 0; i < length(); ++i) { |
| 218 if (m_attributeVector.at(i).name().matches(name)) | 218 if (m_attributeVector.at(i).name().matches(name)) |
| 219 return &m_attributeVector.at(i); | 219 return &m_attributeVector.at(i); |
| 220 } | 220 } |
| 221 return 0; | 221 return 0; |
| 222 } | 222 } |
| 223 | 223 |
| 224 } // namespace WebCore | 224 } // namespace WebCore |
| OLD | NEW |