| 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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 } | 143 } |
| 144 | 144 |
| 145 static PassRefPtr<MutableStylePropertySet> getPropertiesNotIn(StylePropertySet*
styleWithRedundantProperties, CSSStyleDeclaration* baseStyle); | 145 static PassRefPtr<MutableStylePropertySet> getPropertiesNotIn(StylePropertySet*
styleWithRedundantProperties, CSSStyleDeclaration* baseStyle); |
| 146 enum LegacyFontSizeMode { AlwaysUseLegacyFontSize, UseLegacyFontSizeOnlyIfPixelV
aluesMatch }; | 146 enum LegacyFontSizeMode { AlwaysUseLegacyFontSize, UseLegacyFontSizeOnlyIfPixelV
aluesMatch }; |
| 147 static int legacyFontSizeFromCSSValue(Document*, CSSPrimitiveValue*, FixedPitchF
ontType, LegacyFontSizeMode); | 147 static int legacyFontSizeFromCSSValue(Document*, CSSPrimitiveValue*, FixedPitchF
ontType, LegacyFontSizeMode); |
| 148 static bool isTransparentColorValue(CSSValue*); | 148 static bool isTransparentColorValue(CSSValue*); |
| 149 static bool hasTransparentBackgroundColor(CSSStyleDeclaration*); | 149 static bool hasTransparentBackgroundColor(CSSStyleDeclaration*); |
| 150 static bool hasTransparentBackgroundColor(StylePropertySet*); | 150 static bool hasTransparentBackgroundColor(StylePropertySet*); |
| 151 static PassRefPtr<CSSValue> backgroundColorInEffect(Node*); | 151 static PassRefPtr<CSSValue> backgroundColorInEffect(Node*); |
| 152 | 152 |
| 153 class HTMLElementEquivalent : public DummyBase<HTMLElementEquivalent> { | 153 class HTMLElementEquivalent { |
| 154 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED; | 154 WTF_MAKE_FAST_ALLOCATED; |
| 155 DECLARE_EMPTY_VIRTUAL_DESTRUCTOR_WILL_BE_REMOVED(HTMLElementEquivalent); | 155 DECLARE_EMPTY_VIRTUAL_DESTRUCTOR_WILL_BE_REMOVED(HTMLElementEquivalent); |
| 156 public: | 156 public: |
| 157 static PassOwnPtr<HTMLElementEquivalent> create(CSSPropertyID propertyID, CS
SValueID primitiveValue, const HTMLQualifiedName& tagName) | 157 static PassOwnPtr<HTMLElementEquivalent> create(CSSPropertyID propertyID, CS
SValueID primitiveValue, const HTMLQualifiedName& tagName) |
| 158 { | 158 { |
| 159 return adoptPtr(new HTMLElementEquivalent(propertyID, primitiveValue, ta
gName)); | 159 return adoptPtr(new HTMLElementEquivalent(propertyID, primitiveValue, ta
gName)); |
| 160 } | 160 } |
| 161 | 161 |
| 162 virtual bool matches(const Element* element) const { return !m_tagName || el
ement->hasTagName(*m_tagName); } | 162 virtual bool matches(const Element* element) const { return !m_tagName || el
ement->hasTagName(*m_tagName); } |
| 163 virtual bool hasAttribute() const { return false; } | 163 virtual bool hasAttribute() const { return false; } |
| 164 virtual bool propertyExistsInStyle(const StylePropertySet* style) const { re
turn style->getPropertyCSSValue(m_propertyID); } | 164 virtual bool propertyExistsInStyle(const StylePropertySet* style) const { re
turn style->getPropertyCSSValue(m_propertyID); } |
| (...skipping 1382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1547 { | 1547 { |
| 1548 for (Node* ancestor = node; ancestor; ancestor = ancestor->parentNode()) { | 1548 for (Node* ancestor = node; ancestor; ancestor = ancestor->parentNode()) { |
| 1549 RefPtr<CSSComputedStyleDeclaration> ancestorStyle = CSSComputedStyleDecl
aration::create(ancestor); | 1549 RefPtr<CSSComputedStyleDeclaration> ancestorStyle = CSSComputedStyleDecl
aration::create(ancestor); |
| 1550 if (!hasTransparentBackgroundColor(ancestorStyle.get())) | 1550 if (!hasTransparentBackgroundColor(ancestorStyle.get())) |
| 1551 return ancestorStyle->getPropertyCSSValue(CSSPropertyBackgroundColor
); | 1551 return ancestorStyle->getPropertyCSSValue(CSSPropertyBackgroundColor
); |
| 1552 } | 1552 } |
| 1553 return nullptr; | 1553 return nullptr; |
| 1554 } | 1554 } |
| 1555 | 1555 |
| 1556 } | 1556 } |
| OLD | NEW |