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 1481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1492 StyleColor ComputedStyle::decorationColorIncludingFallback(bool visitedLink) con
st | 1492 StyleColor ComputedStyle::decorationColorIncludingFallback(bool visitedLink) con
st |
1493 { | 1493 { |
1494 StyleColor styleColor = visitedLink ? visitedLinkTextDecorationColor() : tex
tDecorationColor(); | 1494 StyleColor styleColor = visitedLink ? visitedLinkTextDecorationColor() : tex
tDecorationColor(); |
1495 | 1495 |
1496 if (!styleColor.isCurrentColor()) | 1496 if (!styleColor.isCurrentColor()) |
1497 return styleColor; | 1497 return styleColor; |
1498 | 1498 |
1499 if (textStrokeWidth()) { | 1499 if (textStrokeWidth()) { |
1500 // Prefer stroke color if possible, but not if it's fully transparent. | 1500 // Prefer stroke color if possible, but not if it's fully transparent. |
1501 StyleColor textStrokeStyleColor = visitedLink ? visitedLinkTextStrokeCol
or() : textStrokeColor(); | 1501 StyleColor textStrokeStyleColor = visitedLink ? visitedLinkTextStrokeCol
or() : textStrokeColor(); |
1502 if (!textStrokeStyleColor.isCurrentColor() && textStrokeStyleColor.color
().alpha()) | 1502 if (!textStrokeStyleColor.isCurrentColor() && textStrokeStyleColor.getCo
lor().alpha()) |
1503 return textStrokeStyleColor; | 1503 return textStrokeStyleColor; |
1504 } | 1504 } |
1505 | 1505 |
1506 return visitedLink ? visitedLinkTextFillColor() : textFillColor(); | 1506 return visitedLink ? visitedLinkTextFillColor() : textFillColor(); |
1507 } | 1507 } |
1508 | 1508 |
1509 Color ComputedStyle::colorIncludingFallback(int colorProperty, bool visitedLink)
const | 1509 Color ComputedStyle::colorIncludingFallback(int colorProperty, bool visitedLink)
const |
1510 { | 1510 { |
1511 StyleColor result(StyleColor::currentColor()); | 1511 StyleColor result(StyleColor::currentColor()); |
1512 EBorderStyle borderStyle = BNONE; | 1512 EBorderStyle borderStyle = BNONE; |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1562 break; | 1562 break; |
1563 case CSSPropertyTextDecorationColor: | 1563 case CSSPropertyTextDecorationColor: |
1564 result = decorationColorIncludingFallback(visitedLink); | 1564 result = decorationColorIncludingFallback(visitedLink); |
1565 break; | 1565 break; |
1566 default: | 1566 default: |
1567 ASSERT_NOT_REACHED(); | 1567 ASSERT_NOT_REACHED(); |
1568 break; | 1568 break; |
1569 } | 1569 } |
1570 | 1570 |
1571 if (!result.isCurrentColor()) | 1571 if (!result.isCurrentColor()) |
1572 return result.color(); | 1572 return result.getColor(); |
1573 | 1573 |
1574 // FIXME: Treating styled borders with initial color differently causes prob
lems | 1574 // FIXME: Treating styled borders with initial color differently causes prob
lems |
1575 // See crbug.com/316559, crbug.com/276231 | 1575 // See crbug.com/316559, crbug.com/276231 |
1576 if (!visitedLink && (borderStyle == INSET || borderStyle == OUTSET || border
Style == RIDGE || borderStyle == GROOVE)) | 1576 if (!visitedLink && (borderStyle == INSET || borderStyle == OUTSET || border
Style == RIDGE || borderStyle == GROOVE)) |
1577 return Color(238, 238, 238); | 1577 return Color(238, 238, 238); |
1578 return visitedLink ? visitedLinkColor() : color(); | 1578 return visitedLink ? visitedLinkColor() : color(); |
1579 } | 1579 } |
1580 | 1580 |
1581 Color ComputedStyle::visitedDependentColor(int colorProperty) const | 1581 Color ComputedStyle::visitedDependentColor(int colorProperty) const |
1582 { | 1582 { |
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1876 if (!shadowList) | 1876 if (!shadowList) |
1877 return false; | 1877 return false; |
1878 for (size_t i = shadowList->shadows().size(); i--; ) { | 1878 for (size_t i = shadowList->shadows().size(); i--; ) { |
1879 if (shadowList->shadows()[i].color().isCurrentColor()) | 1879 if (shadowList->shadows()[i].color().isCurrentColor()) |
1880 return true; | 1880 return true; |
1881 } | 1881 } |
1882 return false; | 1882 return false; |
1883 } | 1883 } |
1884 | 1884 |
1885 } // namespace blink | 1885 } // namespace blink |
OLD | NEW |