| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 4 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) | 4 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) |
| 5 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) | 5 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) |
| 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc.
All rights reserved. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc.
All rights reserved. |
| 7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
| 8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> | 8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> |
| 9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
| 10 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. | 10 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 { | 147 { |
| 148 Color color = state.parentStyle()->color(); | 148 Color color = state.parentStyle()->color(); |
| 149 if (state.applyPropertyToRegularStyle()) | 149 if (state.applyPropertyToRegularStyle()) |
| 150 state.style()->setColor(color); | 150 state.style()->setColor(color); |
| 151 if (state.applyPropertyToVisitedLinkStyle()) | 151 if (state.applyPropertyToVisitedLinkStyle()) |
| 152 state.style()->setVisitedLinkColor(color); | 152 state.style()->setVisitedLinkColor(color); |
| 153 } | 153 } |
| 154 | 154 |
| 155 void StyleBuilderFunctions::applyValueCSSPropertyColor(StyleResolverState& state
, CSSValue* value) | 155 void StyleBuilderFunctions::applyValueCSSPropertyColor(StyleResolverState& state
, CSSValue* value) |
| 156 { | 156 { |
| 157 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); | |
| 158 // As per the spec, 'color: currentColor' is treated as 'color: inherit' | 157 // As per the spec, 'color: currentColor' is treated as 'color: inherit' |
| 159 if (primitiveValue->getValueID() == CSSValueCurrentcolor) { | 158 if (value->isPrimitiveValue() && toCSSPrimitiveValue(value)->getValueID() ==
CSSValueCurrentcolor) { |
| 160 applyInheritCSSPropertyColor(state); | 159 applyInheritCSSPropertyColor(state); |
| 161 return; | 160 return; |
| 162 } | 161 } |
| 163 | 162 |
| 164 if (state.applyPropertyToRegularStyle()) | 163 if (state.applyPropertyToRegularStyle()) |
| 165 state.style()->setColor(StyleBuilderConverter::convertColor(state, *valu
e)); | 164 state.style()->setColor(StyleBuilderConverter::convertColor(state, *valu
e)); |
| 166 if (state.applyPropertyToVisitedLinkStyle()) | 165 if (state.applyPropertyToVisitedLinkStyle()) |
| 167 state.style()->setVisitedLinkColor(StyleBuilderConverter::convertColor(s
tate, *value, true)); | 166 state.style()->setVisitedLinkColor(StyleBuilderConverter::convertColor(s
tate, *value, true)); |
| 168 } | 167 } |
| 169 | 168 |
| (...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 851 return; | 850 return; |
| 852 case CSSValueSuper: | 851 case CSSValueSuper: |
| 853 svgStyle.setBaselineShift(BS_SUPER); | 852 svgStyle.setBaselineShift(BS_SUPER); |
| 854 return; | 853 return; |
| 855 default: | 854 default: |
| 856 ASSERT_NOT_REACHED(); | 855 ASSERT_NOT_REACHED(); |
| 857 } | 856 } |
| 858 } | 857 } |
| 859 | 858 |
| 860 } // namespace blink | 859 } // namespace blink |
| OLD | NEW |