| 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 1475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1486 ASSERT(styleWithRedundantProperties); | 1486 ASSERT(styleWithRedundantProperties); |
| 1487 ASSERT(baseStyle); | 1487 ASSERT(baseStyle); |
| 1488 RefPtr<StylePropertySet> result = styleWithRedundantProperties->copy(); | 1488 RefPtr<StylePropertySet> result = styleWithRedundantProperties->copy(); |
| 1489 | 1489 |
| 1490 result->removeEquivalentProperties(baseStyle); | 1490 result->removeEquivalentProperties(baseStyle); |
| 1491 | 1491 |
| 1492 RefPtr<CSSValue> baseTextDecorationsInEffect = baseStyle->getPropertyCSSValu
eInternal(CSSPropertyWebkitTextDecorationsInEffect); | 1492 RefPtr<CSSValue> baseTextDecorationsInEffect = baseStyle->getPropertyCSSValu
eInternal(CSSPropertyWebkitTextDecorationsInEffect); |
| 1493 diffTextDecorations(result.get(), CSSPropertyTextDecoration, baseTextDecorat
ionsInEffect.get()); | 1493 diffTextDecorations(result.get(), CSSPropertyTextDecoration, baseTextDecorat
ionsInEffect.get()); |
| 1494 diffTextDecorations(result.get(), CSSPropertyWebkitTextDecorationsInEffect,
baseTextDecorationsInEffect.get()); | 1494 diffTextDecorations(result.get(), CSSPropertyWebkitTextDecorationsInEffect,
baseTextDecorationsInEffect.get()); |
| 1495 | 1495 |
| 1496 if (baseStyle->getPropertyCSSValueInternal(CSSPropertyFontSize) && fontWeigh
tIsBold(result.get()) == fontWeightIsBold(baseStyle)) | 1496 if (baseStyle->getPropertyCSSValueInternal(CSSPropertyFontWeight) && fontWei
ghtIsBold(result.get()) == fontWeightIsBold(baseStyle)) |
| 1497 result->removeProperty(CSSPropertyFontWeight); | 1497 result->removeProperty(CSSPropertyFontWeight); |
| 1498 | 1498 |
| 1499 if (baseStyle->getPropertyCSSValueInternal(CSSPropertyColor) && getRGBAFontC
olor(result.get()) == getRGBAFontColor(baseStyle)) | 1499 if (baseStyle->getPropertyCSSValueInternal(CSSPropertyColor) && getRGBAFontC
olor(result.get()) == getRGBAFontColor(baseStyle)) |
| 1500 result->removeProperty(CSSPropertyColor); | 1500 result->removeProperty(CSSPropertyColor); |
| 1501 | 1501 |
| 1502 if (baseStyle->getPropertyCSSValueInternal(CSSPropertyTextAlign) && getTextA
lignment(result.get()) == getTextAlignment(baseStyle)) | 1502 if (baseStyle->getPropertyCSSValueInternal(CSSPropertyTextAlign) && getTextA
lignment(result.get()) == getTextAlignment(baseStyle)) |
| 1503 result->removeProperty(CSSPropertyTextAlign); | 1503 result->removeProperty(CSSPropertyTextAlign); |
| 1504 | 1504 |
| 1505 return result; | 1505 return result; |
| 1506 } | 1506 } |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1577 { | 1577 { |
| 1578 for (Node* ancestor = node; ancestor; ancestor = ancestor->parentNode()) { | 1578 for (Node* ancestor = node; ancestor; ancestor = ancestor->parentNode()) { |
| 1579 RefPtr<CSSComputedStyleDeclaration> ancestorStyle = CSSComputedStyleDecl
aration::create(ancestor); | 1579 RefPtr<CSSComputedStyleDeclaration> ancestorStyle = CSSComputedStyleDecl
aration::create(ancestor); |
| 1580 if (!hasTransparentBackgroundColor(ancestorStyle.get())) | 1580 if (!hasTransparentBackgroundColor(ancestorStyle.get())) |
| 1581 return ancestorStyle->getPropertyCSSValue(CSSPropertyBackgroundColor
); | 1581 return ancestorStyle->getPropertyCSSValue(CSSPropertyBackgroundColor
); |
| 1582 } | 1582 } |
| 1583 return 0; | 1583 return 0; |
| 1584 } | 1584 } |
| 1585 | 1585 |
| 1586 } | 1586 } |
| OLD | NEW |