| 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 1650 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1661 DCHECK(baseStyle); | 1661 DCHECK(baseStyle); |
| 1662 MutableStylePropertySet* result = styleWithRedundantProperties->mutableCopy(
); | 1662 MutableStylePropertySet* result = styleWithRedundantProperties->mutableCopy(
); |
| 1663 | 1663 |
| 1664 result->removeEquivalentProperties(baseStyle); | 1664 result->removeEquivalentProperties(baseStyle); |
| 1665 | 1665 |
| 1666 const CSSValue* baseTextDecorationsInEffect = baseStyle->getPropertyCSSValue
Internal(CSSPropertyWebkitTextDecorationsInEffect); | 1666 const CSSValue* baseTextDecorationsInEffect = baseStyle->getPropertyCSSValue
Internal(CSSPropertyWebkitTextDecorationsInEffect); |
| 1667 diffTextDecorations(result, textDecorationPropertyForEditing(), baseTextDeco
rationsInEffect); | 1667 diffTextDecorations(result, textDecorationPropertyForEditing(), baseTextDeco
rationsInEffect); |
| 1668 diffTextDecorations(result, CSSPropertyWebkitTextDecorationsInEffect, baseTe
xtDecorationsInEffect); | 1668 diffTextDecorations(result, CSSPropertyWebkitTextDecorationsInEffect, baseTe
xtDecorationsInEffect); |
| 1669 | 1669 |
| 1670 if (const CSSValue* baseFontWeight = baseStyle->getPropertyCSSValueInternal(
CSSPropertyFontWeight)) { | 1670 if (const CSSValue* baseFontWeight = baseStyle->getPropertyCSSValueInternal(
CSSPropertyFontWeight)) { |
| 1671 if (CSSValue* fontWeight = result->getPropertyCSSValue(CSSPropertyFontWe
ight)) { | 1671 if (const CSSValue* fontWeight = result->getPropertyCSSValue(CSSProperty
FontWeight)) { |
| 1672 if (!fontWeightNeedsResolving(fontWeight) && !fontWeightNeedsResolvi
ng(baseFontWeight) | 1672 if (!fontWeightNeedsResolving(fontWeight) && !fontWeightNeedsResolvi
ng(baseFontWeight) |
| 1673 && (fontWeightIsBold(fontWeight) == fontWeightIsBold(baseFontWei
ght))) | 1673 && (fontWeightIsBold(fontWeight) == fontWeightIsBold(baseFontWei
ght))) |
| 1674 result->removeProperty(CSSPropertyFontWeight); | 1674 result->removeProperty(CSSPropertyFontWeight); |
| 1675 } | 1675 } |
| 1676 } | 1676 } |
| 1677 | 1677 |
| 1678 if (baseStyle->getPropertyCSSValueInternal(CSSPropertyColor) && getFontColor
(result) == getFontColor(baseStyle)) | 1678 if (baseStyle->getPropertyCSSValueInternal(CSSPropertyColor) && getFontColor
(result) == getFontColor(baseStyle)) |
| 1679 result->removeProperty(CSSPropertyColor); | 1679 result->removeProperty(CSSPropertyColor); |
| 1680 | 1680 |
| 1681 if (baseStyle->getPropertyCSSValueInternal(CSSPropertyTextAlign) | 1681 if (baseStyle->getPropertyCSSValueInternal(CSSPropertyTextAlign) |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1757 { | 1757 { |
| 1758 for (Node* ancestor = node; ancestor; ancestor = ancestor->parentNode()) { | 1758 for (Node* ancestor = node; ancestor; ancestor = ancestor->parentNode()) { |
| 1759 CSSComputedStyleDeclaration* ancestorStyle = CSSComputedStyleDeclaration
::create(ancestor); | 1759 CSSComputedStyleDeclaration* ancestorStyle = CSSComputedStyleDeclaration
::create(ancestor); |
| 1760 if (!hasTransparentBackgroundColor(ancestorStyle)) | 1760 if (!hasTransparentBackgroundColor(ancestorStyle)) |
| 1761 return ancestorStyle->getPropertyCSSValue(CSSPropertyBackgroundColor
); | 1761 return ancestorStyle->getPropertyCSSValue(CSSPropertyBackgroundColor
); |
| 1762 } | 1762 } |
| 1763 return nullptr; | 1763 return nullptr; |
| 1764 } | 1764 } |
| 1765 | 1765 |
| 1766 } // namespace blink | 1766 } // namespace blink |
| OLD | NEW |