| 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 Apple Inc. All r
ights reserved. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r
ights 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 return; | 43 return; |
| 44 | 44 |
| 45 StylePropertySet::PropertyReference allProperty = m_propertySet->propertyAt(
m_allIndex); | 45 StylePropertySet::PropertyReference allProperty = m_propertySet->propertyAt(
m_allIndex); |
| 46 for (unsigned i = 0; i < m_propertySet->propertyCount(); ++i) { | 46 for (unsigned i = 0; i < m_propertySet->propertyCount(); ++i) { |
| 47 StylePropertySet::PropertyReference property = m_propertySet->propertyAt
(i); | 47 StylePropertySet::PropertyReference property = m_propertySet->propertyAt
(i); |
| 48 if (CSSProperty::isAffectedByAllProperty(property.id())) { | 48 if (CSSProperty::isAffectedByAllProperty(property.id())) { |
| 49 if (allProperty.isImportant() && !property.isImportant()) | 49 if (allProperty.isImportant() && !property.isImportant()) |
| 50 continue; | 50 continue; |
| 51 if (static_cast<unsigned>(m_allIndex) >= i) | 51 if (static_cast<unsigned>(m_allIndex) >= i) |
| 52 continue; | 52 continue; |
| 53 if (property.value()->equals(*allProperty.value()) | 53 if (property.value().equals(allProperty.value()) |
| 54 && property.isImportant() == allProperty.isImportant()) | 54 && property.isImportant() == allProperty.isImportant()) |
| 55 continue; | 55 continue; |
| 56 m_needToExpandAll = true; | 56 m_needToExpandAll = true; |
| 57 } | 57 } |
| 58 if (property.id() < firstCSSProperty || property.id() > lastCSSProperty) | 58 if (property.id() < firstCSSProperty || property.id() > lastCSSProperty) |
| 59 continue; | 59 continue; |
| 60 m_longhandPropertyUsed.set(property.id() - firstCSSProperty); | 60 m_longhandPropertyUsed.set(property.id() - firstCSSProperty); |
| 61 } | 61 } |
| 62 } | 62 } |
| 63 | 63 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 80 | 80 |
| 81 CSSPropertyID propertyID = static_cast<CSSPropertyID>(index + firstCSSProper
ty); | 81 CSSPropertyID propertyID = static_cast<CSSPropertyID>(index + firstCSSProper
ty); |
| 82 ASSERT(firstCSSProperty <= propertyID && propertyID <= lastCSSProperty); | 82 ASSERT(firstCSSProperty <= propertyID && propertyID <= lastCSSProperty); |
| 83 if (m_longhandPropertyUsed.test(index)) { | 83 if (m_longhandPropertyUsed.test(index)) { |
| 84 int index = m_propertySet->findPropertyIndex(propertyID); | 84 int index = m_propertySet->findPropertyIndex(propertyID); |
| 85 ASSERT(index != -1); | 85 ASSERT(index != -1); |
| 86 return StylePropertySerializer::PropertyValueForSerializer(m_propertySet
->propertyAt(index)); | 86 return StylePropertySerializer::PropertyValueForSerializer(m_propertySet
->propertyAt(index)); |
| 87 } | 87 } |
| 88 | 88 |
| 89 StylePropertySet::PropertyReference property = m_propertySet->propertyAt(m_a
llIndex); | 89 StylePropertySet::PropertyReference property = m_propertySet->propertyAt(m_a
llIndex); |
| 90 return StylePropertySerializer::PropertyValueForSerializer(propertyID, prope
rty.value(), property.isImportant()); | 90 return StylePropertySerializer::PropertyValueForSerializer(propertyID, &prop
erty.value(), property.isImportant()); |
| 91 } | 91 } |
| 92 | 92 |
| 93 bool StylePropertySerializer::StylePropertySetForSerializer::shouldProcessProper
tyAt(unsigned index) const | 93 bool StylePropertySerializer::StylePropertySetForSerializer::shouldProcessProper
tyAt(unsigned index) const |
| 94 { | 94 { |
| 95 // StylePropertySet has all valid longhands. We should process. | 95 // StylePropertySet has all valid longhands. We should process. |
| 96 if (!hasAllProperty()) | 96 if (!hasAllProperty()) |
| 97 return true; | 97 return true; |
| 98 | 98 |
| 99 // If all is not expanded, we need to process "all" and properties which | 99 // If all is not expanded, we need to process "all" and properties which |
| 100 // are not overwritten by "all". | 100 // are not overwritten by "all". |
| (...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 888 builder.append(", "); | 888 builder.append(", "); |
| 889 | 889 |
| 890 const CSSValue& xValue = repeatXList ? repeatXList->item(i % repeatXList
->length()) : repeatX; | 890 const CSSValue& xValue = repeatXList ? repeatXList->item(i % repeatXList
->length()) : repeatX; |
| 891 const CSSValue& yValue = repeatYList ? repeatYList->item(i % repeatYList
->length()) : repeatY; | 891 const CSSValue& yValue = repeatYList ? repeatYList->item(i % repeatYList
->length()) : repeatY; |
| 892 appendBackgroundRepeatValue(builder, xValue, yValue); | 892 appendBackgroundRepeatValue(builder, xValue, yValue); |
| 893 } | 893 } |
| 894 return builder.toString(); | 894 return builder.toString(); |
| 895 } | 895 } |
| 896 | 896 |
| 897 } // namespace blink | 897 } // namespace blink |
| OLD | NEW |