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
reserved. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights
reserved. |
4 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. | 4 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 1406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1417 result = decorationColorIncludingFallback(visitedLink); | 1417 result = decorationColorIncludingFallback(visitedLink); |
1418 break; | 1418 break; |
1419 default: | 1419 default: |
1420 ASSERT_NOT_REACHED(); | 1420 ASSERT_NOT_REACHED(); |
1421 break; | 1421 break; |
1422 } | 1422 } |
1423 | 1423 |
1424 if (!result.isCurrentColor()) | 1424 if (!result.isCurrentColor()) |
1425 return result.color(); | 1425 return result.color(); |
1426 | 1426 |
1427 // FIXME: Treating styled borders with initial color differently causes prob
lems | |
1428 // See crbug.com/316559, crbug.com/276231 | |
1429 if (!visitedLink && (borderStyle == INSET || borderStyle == OUTSET || border
Style == RIDGE || borderStyle == GROOVE)) | |
1430 return Color(238, 238, 238); | |
1431 return visitedLink ? visitedLinkColor() : color(); | 1427 return visitedLink ? visitedLinkColor() : color(); |
1432 } | 1428 } |
1433 | 1429 |
1434 Color RenderStyle::visitedDependentColor(int colorProperty) const | 1430 Color RenderStyle::visitedDependentColor(int colorProperty) const |
1435 { | 1431 { |
1436 Color unvisitedColor = colorIncludingFallback(colorProperty, false); | 1432 Color unvisitedColor = colorIncludingFallback(colorProperty, false); |
1437 if (insideLink() != InsideVisitedLink) | 1433 if (insideLink() != InsideVisitedLink) |
1438 return unvisitedColor; | 1434 return unvisitedColor; |
1439 | 1435 |
1440 Color visitedColor = colorIncludingFallback(colorProperty, true); | 1436 Color visitedColor = colorIncludingFallback(colorProperty, true); |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1710 horizontal || includeLogicalRightEdge); | 1706 horizontal || includeLogicalRightEdge); |
1711 | 1707 |
1712 edges[BSLeft] = BorderEdge(borderLeftWidth(), | 1708 edges[BSLeft] = BorderEdge(borderLeftWidth(), |
1713 visitedDependentColor(CSSPropertyBorderLeftColor), | 1709 visitedDependentColor(CSSPropertyBorderLeftColor), |
1714 borderLeftStyle(), | 1710 borderLeftStyle(), |
1715 borderLeftIsTransparent(), | 1711 borderLeftIsTransparent(), |
1716 !horizontal || includeLogicalLeftEdge); | 1712 !horizontal || includeLogicalLeftEdge); |
1717 } | 1713 } |
1718 | 1714 |
1719 } // namespace blink | 1715 } // namespace blink |
OLD | NEW |