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 1611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1622 RefPtrWillBeRawPtr<MutableStylePropertySet> result = styleWithRedundantPrope
rties->mutableCopy(); | 1622 RefPtrWillBeRawPtr<MutableStylePropertySet> result = styleWithRedundantPrope
rties->mutableCopy(); |
1623 | 1623 |
1624 result->removeEquivalentProperties(baseStyle); | 1624 result->removeEquivalentProperties(baseStyle); |
1625 | 1625 |
1626 RefPtrWillBeRawPtr<CSSValue> baseTextDecorationsInEffect = baseStyle->getPro
pertyCSSValueInternal(CSSPropertyWebkitTextDecorationsInEffect); | 1626 RefPtrWillBeRawPtr<CSSValue> baseTextDecorationsInEffect = baseStyle->getPro
pertyCSSValueInternal(CSSPropertyWebkitTextDecorationsInEffect); |
1627 diffTextDecorations(result.get(), textDecorationPropertyForEditing(), baseTe
xtDecorationsInEffect.get()); | 1627 diffTextDecorations(result.get(), textDecorationPropertyForEditing(), baseTe
xtDecorationsInEffect.get()); |
1628 diffTextDecorations(result.get(), CSSPropertyWebkitTextDecorationsInEffect,
baseTextDecorationsInEffect.get()); | 1628 diffTextDecorations(result.get(), CSSPropertyWebkitTextDecorationsInEffect,
baseTextDecorationsInEffect.get()); |
1629 | 1629 |
1630 if (RefPtrWillBeRawPtr<CSSValue> baseFontWeight = baseStyle->getPropertyCSSV
alueInternal(CSSPropertyFontWeight)) { | 1630 if (RefPtrWillBeRawPtr<CSSValue> baseFontWeight = baseStyle->getPropertyCSSV
alueInternal(CSSPropertyFontWeight)) { |
1631 if (RefPtrWillBeRawPtr<CSSValue> fontWeight = result->getPropertyCSSValu
e(CSSPropertyFontWeight)) { | 1631 if (RefPtrWillBeRawPtr<CSSValue> fontWeight = result->getPropertyCSSValu
e(CSSPropertyFontWeight)) { |
1632 if (!fontWeightNeedsResolving(fontWeight.get()) && (fontWeightIsBold
(fontWeight.get()) == fontWeightIsBold(baseFontWeight.get()))) | 1632 if (!fontWeightNeedsResolving(fontWeight.get()) && !fontWeightNeedsR
esolving(baseFontWeight.get()) |
| 1633 && (fontWeightIsBold(fontWeight.get()) == fontWeightIsBold(baseF
ontWeight.get()))) |
1633 result->removeProperty(CSSPropertyFontWeight); | 1634 result->removeProperty(CSSPropertyFontWeight); |
1634 } | 1635 } |
1635 } | 1636 } |
1636 | 1637 |
1637 if (baseStyle->getPropertyCSSValueInternal(CSSPropertyColor) && getRGBAFontC
olor(result.get()) == getRGBAFontColor(baseStyle)) | 1638 if (baseStyle->getPropertyCSSValueInternal(CSSPropertyColor) && getRGBAFontC
olor(result.get()) == getRGBAFontColor(baseStyle)) |
1638 result->removeProperty(CSSPropertyColor); | 1639 result->removeProperty(CSSPropertyColor); |
1639 | 1640 |
1640 if (baseStyle->getPropertyCSSValueInternal(CSSPropertyTextAlign) | 1641 if (baseStyle->getPropertyCSSValueInternal(CSSPropertyTextAlign) |
1641 && textAlignResolvingStartAndEnd(result.get()) == textAlignResolvingStar
tAndEnd(baseStyle)) | 1642 && textAlignResolvingStartAndEnd(result.get()) == textAlignResolvingStar
tAndEnd(baseStyle)) |
1642 result->removeProperty(CSSPropertyTextAlign); | 1643 result->removeProperty(CSSPropertyTextAlign); |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1716 { | 1717 { |
1717 for (Node* ancestor = node; ancestor; ancestor = ancestor->parentNode()) { | 1718 for (Node* ancestor = node; ancestor; ancestor = ancestor->parentNode()) { |
1718 RefPtrWillBeRawPtr<CSSComputedStyleDeclaration> ancestorStyle = CSSCompu
tedStyleDeclaration::create(ancestor); | 1719 RefPtrWillBeRawPtr<CSSComputedStyleDeclaration> ancestorStyle = CSSCompu
tedStyleDeclaration::create(ancestor); |
1719 if (!hasTransparentBackgroundColor(ancestorStyle.get())) | 1720 if (!hasTransparentBackgroundColor(ancestorStyle.get())) |
1720 return ancestorStyle->getPropertyCSSValue(CSSPropertyBackgroundColor
); | 1721 return ancestorStyle->getPropertyCSSValue(CSSPropertyBackgroundColor
); |
1721 } | 1722 } |
1722 return nullptr; | 1723 return nullptr; |
1723 } | 1724 } |
1724 | 1725 |
1725 } | 1726 } |
OLD | NEW |