| 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 1058 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1069 return nullptr; | 1069 return nullptr; |
| 1070 | 1070 |
| 1071 switch (propertiesToInclude) { | 1071 switch (propertiesToInclude) { |
| 1072 case EditingStyle::AllProperties: | 1072 case EditingStyle::AllProperties: |
| 1073 case EditingStyle::EditingPropertiesInEffect: | 1073 case EditingStyle::EditingPropertiesInEffect: |
| 1074 return copyEditingProperties(style, AllEditingProperties); | 1074 return copyEditingProperties(style, AllEditingProperties); |
| 1075 case EditingStyle::OnlyEditingInheritableProperties: | 1075 case EditingStyle::OnlyEditingInheritableProperties: |
| 1076 return copyEditingProperties(style, OnlyInheritableEditingProperties); | 1076 return copyEditingProperties(style, OnlyInheritableEditingProperties); |
| 1077 } | 1077 } |
| 1078 | 1078 |
| 1079 ASSERT_NOT_REACHED(); | 1079 NOTREACHED(); |
| 1080 return nullptr; | 1080 return nullptr; |
| 1081 } | 1081 } |
| 1082 | 1082 |
| 1083 void EditingStyle::mergeInlineAndImplicitStyleOfElement(Element* element, CSSPro
pertyOverrideMode mode, PropertiesToInclude propertiesToInclude) | 1083 void EditingStyle::mergeInlineAndImplicitStyleOfElement(Element* element, CSSPro
pertyOverrideMode mode, PropertiesToInclude propertiesToInclude) |
| 1084 { | 1084 { |
| 1085 EditingStyle* styleFromRules = EditingStyle::create(); | 1085 EditingStyle* styleFromRules = EditingStyle::create(); |
| 1086 styleFromRules->mergeStyleFromRulesForSerialization(element); | 1086 styleFromRules->mergeStyleFromRulesForSerialization(element); |
| 1087 | 1087 |
| 1088 if (element->inlineStyle()) | 1088 if (element->inlineStyle()) |
| 1089 styleFromRules->m_mutableStyle->mergeAndOverrideOnConflict(element->inli
neStyle()); | 1089 styleFromRules->m_mutableStyle->mergeAndOverrideOnConflict(element->inli
neStyle()); |
| (...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1631 case CSSValueBold: | 1631 case CSSValueBold: |
| 1632 case CSSValue600: | 1632 case CSSValue600: |
| 1633 case CSSValue700: | 1633 case CSSValue700: |
| 1634 case CSSValue800: | 1634 case CSSValue800: |
| 1635 case CSSValue900: | 1635 case CSSValue900: |
| 1636 return true; | 1636 return true; |
| 1637 default: | 1637 default: |
| 1638 break; | 1638 break; |
| 1639 } | 1639 } |
| 1640 | 1640 |
| 1641 ASSERT_NOT_REACHED(); // For CSSValueBolder and CSSValueLighter | 1641 NOTREACHED(); // For CSSValueBolder and CSSValueLighter |
| 1642 return false; | 1642 return false; |
| 1643 } | 1643 } |
| 1644 | 1644 |
| 1645 static bool fontWeightNeedsResolving(const CSSValue* fontWeight) | 1645 static bool fontWeightNeedsResolving(const CSSValue* fontWeight) |
| 1646 { | 1646 { |
| 1647 if (!fontWeight->isPrimitiveValue()) | 1647 if (!fontWeight->isPrimitiveValue()) |
| 1648 return true; | 1648 return true; |
| 1649 | 1649 |
| 1650 const CSSValueID value = toCSSPrimitiveValue(fontWeight)->getValueID(); | 1650 const CSSValueID value = toCSSPrimitiveValue(fontWeight)->getValueID(); |
| 1651 return value == CSSValueLighter || value == CSSValueBolder; | 1651 return value == CSSValueLighter || value == CSSValueBolder; |
| (...skipping 101 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 |