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 2144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2155 // problems, see crbug.com/316559, crbug.com/276231 | 2155 // problems, see crbug.com/316559, crbug.com/276231 |
2156 if (!visitedLink && | 2156 if (!visitedLink && |
2157 (borderStyle == BorderStyleInset || borderStyle == BorderStyleOutset || | 2157 (borderStyle == BorderStyleInset || borderStyle == BorderStyleOutset || |
2158 borderStyle == BorderStyleRidge || borderStyle == BorderStyleGroove)) | 2158 borderStyle == BorderStyleRidge || borderStyle == BorderStyleGroove)) |
2159 return Color(238, 238, 238); | 2159 return Color(238, 238, 238); |
2160 return visitedLink ? visitedLinkColor() : color(); | 2160 return visitedLink ? visitedLinkColor() : color(); |
2161 } | 2161 } |
2162 | 2162 |
2163 Color ComputedStyle::visitedDependentColor(int colorProperty) const { | 2163 Color ComputedStyle::visitedDependentColor(int colorProperty) const { |
2164 Color unvisitedColor = colorIncludingFallback(colorProperty, false); | 2164 Color unvisitedColor = colorIncludingFallback(colorProperty, false); |
2165 if (insideLink() != InsideVisitedLink) | 2165 if (insideLink() != EInsideLink::kInsideVisitedLink) |
2166 return unvisitedColor; | 2166 return unvisitedColor; |
2167 | 2167 |
2168 Color visitedColor = colorIncludingFallback(colorProperty, true); | 2168 Color visitedColor = colorIncludingFallback(colorProperty, true); |
2169 | 2169 |
2170 // FIXME: Technically someone could explicitly specify the color transparent, | 2170 // FIXME: Technically someone could explicitly specify the color transparent, |
2171 // but for now we'll just assume that if the background color is transparent | 2171 // but for now we'll just assume that if the background color is transparent |
2172 // that it wasn't set. Note that it's weird that we're returning unvisited | 2172 // that it wasn't set. Note that it's weird that we're returning unvisited |
2173 // info for a visited link, but given our restriction that the alpha values | 2173 // info for a visited link, but given our restriction that the alpha values |
2174 // have to match, it makes more sense to return the unvisited background color | 2174 // have to match, it makes more sense to return the unvisited background color |
2175 // if specified than it does to return black. This behavior matches what | 2175 // if specified than it does to return black. This behavior matches what |
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2480 if (value < 0) | 2480 if (value < 0) |
2481 fvalue -= 0.5f; | 2481 fvalue -= 0.5f; |
2482 else | 2482 else |
2483 fvalue += 0.5f; | 2483 fvalue += 0.5f; |
2484 } | 2484 } |
2485 | 2485 |
2486 return roundForImpreciseConversion<int>(fvalue / zoomFactor); | 2486 return roundForImpreciseConversion<int>(fvalue / zoomFactor); |
2487 } | 2487 } |
2488 | 2488 |
2489 } // namespace blink | 2489 } // namespace blink |
OLD | NEW |