| 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 1162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1173 if ((property.id() == textDecorationPropertyForEditing() || property.id(
) == CSSPropertyWebkitTextDecorationsInEffect) && property.value()->isValueList(
) && value) { | 1173 if ((property.id() == textDecorationPropertyForEditing() || property.id(
) == CSSPropertyWebkitTextDecorationsInEffect) && property.value()->isValueList(
) && value) { |
| 1174 if (value->isValueList()) { | 1174 if (value->isValueList()) { |
| 1175 CSSValueList* result = mergeTextDecorationValues(toCSSValueList(
value), toCSSValueList(property.value())); | 1175 CSSValueList* result = mergeTextDecorationValues(toCSSValueList(
value), toCSSValueList(property.value())); |
| 1176 m_mutableStyle->setProperty(property.id(), result, property.isIm
portant()); | 1176 m_mutableStyle->setProperty(property.id(), result, property.isIm
portant()); |
| 1177 continue; | 1177 continue; |
| 1178 } | 1178 } |
| 1179 value = nullptr; // text-decoration: none is equivalent to not havin
g the property | 1179 value = nullptr; // text-decoration: none is equivalent to not havin
g the property |
| 1180 } | 1180 } |
| 1181 | 1181 |
| 1182 if (mode == OverrideValues || (mode == DoNotOverrideValues && !value)) | 1182 if (mode == OverrideValues || (mode == DoNotOverrideValues && !value)) |
| 1183 m_mutableStyle->setProperty(property.id(), property.value()->cssText
(), property.isImportant()); | 1183 m_mutableStyle->setProperty(property.toCSSProperty()); |
| 1184 } | 1184 } |
| 1185 } | 1185 } |
| 1186 | 1186 |
| 1187 static MutableStylePropertySet* styleFromMatchedRulesForElement(Element* element
, unsigned rulesToInclude) | 1187 static MutableStylePropertySet* styleFromMatchedRulesForElement(Element* element
, unsigned rulesToInclude) |
| 1188 { | 1188 { |
| 1189 MutableStylePropertySet* style = MutableStylePropertySet::create(HTMLQuirksM
ode); | 1189 MutableStylePropertySet* style = MutableStylePropertySet::create(HTMLQuirksM
ode); |
| 1190 StyleRuleList* matchedRules = element->document().ensureStyleResolver().styl
eRulesForElement(element, rulesToInclude); | 1190 StyleRuleList* matchedRules = element->document().ensureStyleResolver().styl
eRulesForElement(element, rulesToInclude); |
| 1191 if (matchedRules) { | 1191 if (matchedRules) { |
| 1192 for (unsigned i = 0; i < matchedRules->size(); ++i) | 1192 for (unsigned i = 0; i < matchedRules->size(); ++i) |
| 1193 style->mergeAndOverrideOnConflict(&matchedRules->at(i)->properties()
); | 1193 style->mergeAndOverrideOnConflict(&matchedRules->at(i)->properties()
); |
| (...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1753 { | 1753 { |
| 1754 for (Node* ancestor = node; ancestor; ancestor = ancestor->parentNode()) { | 1754 for (Node* ancestor = node; ancestor; ancestor = ancestor->parentNode()) { |
| 1755 CSSComputedStyleDeclaration* ancestorStyle = CSSComputedStyleDeclaration
::create(ancestor); | 1755 CSSComputedStyleDeclaration* ancestorStyle = CSSComputedStyleDeclaration
::create(ancestor); |
| 1756 if (!hasTransparentBackgroundColor(ancestorStyle)) | 1756 if (!hasTransparentBackgroundColor(ancestorStyle)) |
| 1757 return ancestorStyle->getPropertyCSSValue(CSSPropertyBackgroundColor
); | 1757 return ancestorStyle->getPropertyCSSValue(CSSPropertyBackgroundColor
); |
| 1758 } | 1758 } |
| 1759 return nullptr; | 1759 return nullptr; |
| 1760 } | 1760 } |
| 1761 | 1761 |
| 1762 } // namespace blink | 1762 } // namespace blink |
| OLD | NEW |