OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r
ights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r
ights reserved. |
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
9 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. | 9 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. |
10 * Copyright (C) 2013 Google Inc. All rights reserved. | 10 * Copyright (C) 2013 Google Inc. All rights reserved. |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 m_activeLinkColor = Color(255, 0, 0); | 58 m_activeLinkColor = Color(255, 0, 0); |
59 } | 59 } |
60 | 60 |
61 Color TextLinkColors::colorFromCSSValue(const CSSValue& value, Color currentColo
r, bool forVisitedLink) const | 61 Color TextLinkColors::colorFromCSSValue(const CSSValue& value, Color currentColo
r, bool forVisitedLink) const |
62 { | 62 { |
63 if (value.isColorValue()) | 63 if (value.isColorValue()) |
64 return toCSSColorValue(value).value(); | 64 return toCSSColorValue(value).value(); |
65 | 65 |
66 CSSValueID valueID = toCSSPrimitiveValue(value).getValueID(); | 66 CSSValueID valueID = toCSSPrimitiveValue(value).getValueID(); |
67 switch (valueID) { | 67 switch (valueID) { |
68 case 0: | 68 case CSSValueInvalid: |
| 69 NOTREACHED(); |
69 return Color(); | 70 return Color(); |
70 case CSSValueInternalQuirkInherit: | 71 case CSSValueInternalQuirkInherit: |
71 return textColor(); | 72 return textColor(); |
72 case CSSValueWebkitLink: | 73 case CSSValueWebkitLink: |
73 return forVisitedLink ? visitedLinkColor() : linkColor(); | 74 return forVisitedLink ? visitedLinkColor() : linkColor(); |
74 case CSSValueWebkitActivelink: | 75 case CSSValueWebkitActivelink: |
75 return activeLinkColor(); | 76 return activeLinkColor(); |
76 case CSSValueWebkitFocusRingColor: | 77 case CSSValueWebkitFocusRingColor: |
77 return LayoutTheme::theme().focusRingColor(); | 78 return LayoutTheme::theme().focusRingColor(); |
78 case CSSValueInvert: // We don't support outline-color: invert | |
79 case CSSValueCurrentcolor: | 79 case CSSValueCurrentcolor: |
80 return currentColor; | 80 return currentColor; |
81 default: | 81 default: |
82 return StyleColor::colorFromKeyword(valueID); | 82 return StyleColor::colorFromKeyword(valueID); |
83 } | 83 } |
84 } | 84 } |
85 | 85 |
86 } // namespace blink | 86 } // namespace blink |
OLD | NEW |