OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org) | 2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org) |
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights |
4 * reserved. | 4 * reserved. |
5 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. | 5 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 1112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1123 other.m_rareInheritedData->visitedLinkTextFillColor() || | 1123 other.m_rareInheritedData->visitedLinkTextFillColor() || |
1124 m_rareInheritedData->visitedLinkTextStrokeColor() != | 1124 m_rareInheritedData->visitedLinkTextStrokeColor() != |
1125 other.m_rareInheritedData->visitedLinkTextStrokeColor() || | 1125 other.m_rareInheritedData->visitedLinkTextStrokeColor() || |
1126 m_rareInheritedData->visitedLinkTextEmphasisColor() != | 1126 m_rareInheritedData->visitedLinkTextEmphasisColor() != |
1127 other.m_rareInheritedData->visitedLinkTextEmphasisColor() || | 1127 other.m_rareInheritedData->visitedLinkTextEmphasisColor() || |
1128 m_rareInheritedData->textEmphasisFill != | 1128 m_rareInheritedData->textEmphasisFill != |
1129 other.m_rareInheritedData->textEmphasisFill || | 1129 other.m_rareInheritedData->textEmphasisFill || |
1130 m_rareInheritedData->m_textDecorationSkip != | 1130 m_rareInheritedData->m_textDecorationSkip != |
1131 other.m_rareInheritedData->m_textDecorationSkip || | 1131 other.m_rareInheritedData->m_textDecorationSkip || |
1132 m_rareInheritedData->appliedTextDecorations != | 1132 m_rareInheritedData->appliedTextDecorations != |
1133 other.m_rareInheritedData->appliedTextDecorations)) { | 1133 other.m_rareInheritedData->appliedTextDecorations || |
| 1134 m_rareInheritedData->caretColor() != |
| 1135 other.m_rareInheritedData->caretColor() || |
| 1136 m_rareInheritedData->visitedLinkCaretColor() != |
| 1137 other.m_rareInheritedData->visitedLinkCaretColor())) { |
1134 diff.setTextDecorationOrColorChanged(); | 1138 diff.setTextDecorationOrColorChanged(); |
1135 } | 1139 } |
1136 } | 1140 } |
1137 } | 1141 } |
1138 | 1142 |
1139 void ComputedStyle::addPaintImage(StyleImage* image) { | 1143 void ComputedStyle::addPaintImage(StyleImage* image) { |
1140 if (!m_rareNonInheritedData.access()->m_paintImages) { | 1144 if (!m_rareNonInheritedData.access()->m_paintImages) { |
1141 m_rareNonInheritedData.access()->m_paintImages = | 1145 m_rareNonInheritedData.access()->m_paintImages = |
1142 makeUnique<Vector<Persistent<StyleImage>>>(); | 1146 makeUnique<Vector<Persistent<StyleImage>>>(); |
1143 } | 1147 } |
(...skipping 923 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2067 break; | 2071 break; |
2068 case CSSPropertyBorderTopColor: | 2072 case CSSPropertyBorderTopColor: |
2069 result = visitedLink ? visitedLinkBorderTopColor() : borderTopColor(); | 2073 result = visitedLink ? visitedLinkBorderTopColor() : borderTopColor(); |
2070 borderStyle = borderTopStyle(); | 2074 borderStyle = borderTopStyle(); |
2071 break; | 2075 break; |
2072 case CSSPropertyBorderBottomColor: | 2076 case CSSPropertyBorderBottomColor: |
2073 result = | 2077 result = |
2074 visitedLink ? visitedLinkBorderBottomColor() : borderBottomColor(); | 2078 visitedLink ? visitedLinkBorderBottomColor() : borderBottomColor(); |
2075 borderStyle = borderBottomStyle(); | 2079 borderStyle = borderBottomStyle(); |
2076 break; | 2080 break; |
| 2081 case CSSPropertyCaretColor: { |
| 2082 StyleAutoColor autoColor = |
| 2083 visitedLink ? visitedLinkCaretColor() : caretColor(); |
| 2084 // TODO(rego): We may want to adjust the caret color if it's the same than |
| 2085 // the background to ensure good visibility and contrast. |
| 2086 result = autoColor.toStyleColor(); |
| 2087 break; |
| 2088 } |
2077 case CSSPropertyColor: | 2089 case CSSPropertyColor: |
2078 result = visitedLink ? visitedLinkColor() : color(); | 2090 result = visitedLink ? visitedLinkColor() : color(); |
2079 break; | 2091 break; |
2080 case CSSPropertyOutlineColor: | 2092 case CSSPropertyOutlineColor: |
2081 result = visitedLink ? visitedLinkOutlineColor() : outlineColor(); | 2093 result = visitedLink ? visitedLinkOutlineColor() : outlineColor(); |
2082 break; | 2094 break; |
2083 case CSSPropertyColumnRuleColor: | 2095 case CSSPropertyColumnRuleColor: |
2084 result = visitedLink ? visitedLinkColumnRuleColor() : columnRuleColor(); | 2096 result = visitedLink ? visitedLinkColumnRuleColor() : columnRuleColor(); |
2085 break; | 2097 break; |
2086 case CSSPropertyWebkitTextEmphasisColor: | 2098 case CSSPropertyWebkitTextEmphasisColor: |
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2445 if (value < 0) | 2457 if (value < 0) |
2446 fvalue -= 0.5f; | 2458 fvalue -= 0.5f; |
2447 else | 2459 else |
2448 fvalue += 0.5f; | 2460 fvalue += 0.5f; |
2449 } | 2461 } |
2450 | 2462 |
2451 return roundForImpreciseConversion<int>(fvalue / zoomFactor); | 2463 return roundForImpreciseConversion<int>(fvalue / zoomFactor); |
2452 } | 2464 } |
2453 | 2465 |
2454 } // namespace blink | 2466 } // namespace blink |
OLD | NEW |