Changeset 83087 in webkit


Ignore:
Timestamp:
Apr 6, 2011 1:06:45 PM (13 years ago)
Author:
hyatt@apple.com
Message:

https://bugs.webkit.org/show_bug.cgi?id=41445

Reviewed by Dan Bernstein.

Visited links painting with black background. Make sure that if the visited style has
the initial background color (transparent) set that we just use the unvisited color.

Source/WebCore:

Added fast/history/visited-link-background-color.html

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::visitedDependentColor):

LayoutTests:

Added fast/history/visited-link-background-color.html

  • fast/history/visited-link-background-color.html: Added.
  • platform/mac/fast/history/visited-link-background-color-expected.checksum: Added.
  • platform/mac/fast/history/visited-link-background-color-expected.png: Added.
  • platform/mac/fast/history/visited-link-background-color-expected.txt: Added.
Location:
trunk
Files:
4 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r83084 r83087  
     12011-04-06  David Hyatt  <hyatt@apple.com>
     2
     3        Reviewed by Dan Bernstein.
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=41445
     6       
     7        Visited links painting with black background. Make sure that if the visited style has
     8        the initial background color (transparent) set that we just use the unvisited color.
     9
     10        Added fast/history/visited-link-background-color.html
     11        * fast/history/visited-link-background-color.html: Added.
     12        * platform/mac/fast/history/visited-link-background-color-expected.checksum: Added.
     13        * platform/mac/fast/history/visited-link-background-color-expected.png: Added.
     14        * platform/mac/fast/history/visited-link-background-color-expected.txt: Added.
     15
    1162011-04-06  Adrienne Walker  <enne@google.com>
    217
  • trunk/Source/WebCore/ChangeLog

    r83086 r83087  
     12011-04-06  David Hyatt  <hyatt@apple.com>
     2
     3        Reviewed by Dan Bernstein.
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=41445
     6       
     7        Visited links painting with black background. Make sure that if the visited style has
     8        the initial background color (transparent) set that we just use the unvisited color.
     9
     10        Added fast/history/visited-link-background-color.html
     11
     12        * rendering/style/RenderStyle.cpp:
     13        (WebCore::RenderStyle::visitedDependentColor):
     14
    1152011-04-06  Csaba Osztrogonác  <ossy@webkit.org>
    216
  • trunk/Source/WebCore/rendering/style/RenderStyle.cpp

    r81992 r83087  
    11471147    Color visitedColor = visitedStyle->colorIncludingFallback(colorProperty, borderStyle);
    11481148
     1149    // FIXME: Technically someone could explicitly specify the color transparent, but for now we'll just
     1150    // assume that if the background color is transparent that it wasn't set. Note that it's weird that
     1151    // we're returning unvisited info for a visited link, but given our restriction that the alpha values
     1152    // have to match, it makes more sense to return the unvisited background color if specified than it
     1153    // does to return black. This behavior matches what Firefox 4 does as well.
     1154    if (colorProperty == CSSPropertyBackgroundColor && visitedColor == Color::transparent)
     1155        return unvisitedColor;
     1156
    11491157    // Take the alpha from the unvisited color, but get the RGB values from the visited color.
    11501158    return Color(visitedColor.red(), visitedColor.green(), visitedColor.blue(), unvisitedColor.alpha());
Note: See TracChangeset for help on using the changeset viewer.