| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008, 2009 Apple Computer, Inc. | 2 * Copyright (C) 2007, 2008, 2009 Apple Computer, Inc. |
| 3 * Copyright (C) 2010, 2011 Google Inc. All rights reserved. | 3 * Copyright (C) 2010, 2011 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 1155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1166 RefPtrWillBeRawPtr<MutableStylePropertySet> fromComputedStyle = MutableStyle
PropertySet::create(); | 1166 RefPtrWillBeRawPtr<MutableStylePropertySet> fromComputedStyle = MutableStyle
PropertySet::create(); |
| 1167 { | 1167 { |
| 1168 unsigned propertyCount = m_mutableStyle->propertyCount(); | 1168 unsigned propertyCount = m_mutableStyle->propertyCount(); |
| 1169 for (unsigned i = 0; i < propertyCount; ++i) { | 1169 for (unsigned i = 0; i < propertyCount; ++i) { |
| 1170 StylePropertySet::PropertyReference property = m_mutableStyle->prope
rtyAt(i); | 1170 StylePropertySet::PropertyReference property = m_mutableStyle->prope
rtyAt(i); |
| 1171 CSSValue* value = property.value(); | 1171 CSSValue* value = property.value(); |
| 1172 if (!value->isPrimitiveValue()) | 1172 if (!value->isPrimitiveValue()) |
| 1173 continue; | 1173 continue; |
| 1174 if (toCSSPrimitiveValue(value)->isPercentage()) { | 1174 if (toCSSPrimitiveValue(value)->isPercentage()) { |
| 1175 if (RefPtrWillBeRawPtr<CSSValue> computedPropertyValue = compute
dStyleForElement->getPropertyCSSValue(property.id())) | 1175 if (RefPtrWillBeRawPtr<CSSValue> computedPropertyValue = compute
dStyleForElement->getPropertyCSSValue(property.id())) |
| 1176 fromComputedStyle->addParsedProperty(CSSProperty(property.id
(), computedPropertyValue)); | 1176 fromComputedStyle->addRespectingCascade(CSSProperty(property
.id(), computedPropertyValue)); |
| 1177 } | 1177 } |
| 1178 } | 1178 } |
| 1179 } | 1179 } |
| 1180 m_mutableStyle->mergeAndOverrideOnConflict(fromComputedStyle.get()); | 1180 m_mutableStyle->mergeAndOverrideOnConflict(fromComputedStyle.get()); |
| 1181 } | 1181 } |
| 1182 | 1182 |
| 1183 static void removePropertiesInStyle(MutableStylePropertySet* styleToRemoveProper
tiesFrom, StylePropertySet* style) | 1183 static void removePropertiesInStyle(MutableStylePropertySet* styleToRemoveProper
tiesFrom, StylePropertySet* style) |
| 1184 { | 1184 { |
| 1185 unsigned propertyCount = style->propertyCount(); | 1185 unsigned propertyCount = style->propertyCount(); |
| 1186 Vector<CSSPropertyID> propertiesToRemove(propertyCount); | 1186 Vector<CSSPropertyID> propertiesToRemove(propertyCount); |
| (...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1679 { | 1679 { |
| 1680 for (Node* ancestor = node; ancestor; ancestor = ancestor->parentNode()) { | 1680 for (Node* ancestor = node; ancestor; ancestor = ancestor->parentNode()) { |
| 1681 RefPtrWillBeRawPtr<CSSComputedStyleDeclaration> ancestorStyle = CSSCompu
tedStyleDeclaration::create(ancestor); | 1681 RefPtrWillBeRawPtr<CSSComputedStyleDeclaration> ancestorStyle = CSSCompu
tedStyleDeclaration::create(ancestor); |
| 1682 if (!hasTransparentBackgroundColor(ancestorStyle.get())) | 1682 if (!hasTransparentBackgroundColor(ancestorStyle.get())) |
| 1683 return ancestorStyle->getPropertyCSSValue(CSSPropertyBackgroundColor
); | 1683 return ancestorStyle->getPropertyCSSValue(CSSPropertyBackgroundColor
); |
| 1684 } | 1684 } |
| 1685 return nullptr; | 1685 return nullptr; |
| 1686 } | 1686 } |
| 1687 | 1687 |
| 1688 } | 1688 } |
| OLD | NEW |