| Index: Source/core/rendering/style/RenderStyle.cpp
|
| diff --git a/Source/core/rendering/style/RenderStyle.cpp b/Source/core/rendering/style/RenderStyle.cpp
|
| index 69c874b311eea4129c343aad1435fdb45f81e7a0..9f27b9493f669c9b685ee26b10fbf93770bb1648 100644
|
| --- a/Source/core/rendering/style/RenderStyle.cpp
|
| +++ b/Source/core/rendering/style/RenderStyle.cpp
|
| @@ -186,6 +186,7 @@ void RenderStyle::copyNonInheritedFrom(const RenderStyle* other)
|
| noninherited_flags._page_break_after = other->noninherited_flags._page_break_after;
|
| noninherited_flags._page_break_inside = other->noninherited_flags._page_break_inside;
|
| noninherited_flags.explicitInheritance = other->noninherited_flags.explicitInheritance;
|
| + noninherited_flags.currentColor = other->noninherited_flags.currentColor;
|
| if (m_svgStyle != other->m_svgStyle)
|
| m_svgStyle.access()->copyNonInheritedFrom(other->m_svgStyle.get());
|
| ASSERT(zoom() == initialZoom());
|
| @@ -916,10 +917,10 @@ void RenderStyle::setListStyleImage(PassRefPtr<StyleImage> v)
|
| rareInheritedData.access()->listStyleImage = v;
|
| }
|
|
|
| -StyleColor RenderStyle::color() const { return inherited->color; }
|
| -StyleColor RenderStyle::visitedLinkColor() const { return inherited->visitedLinkColor; }
|
| -void RenderStyle::setColor(const StyleColor& v) { SET_VAR(inherited, color, v); }
|
| -void RenderStyle::setVisitedLinkColor(const StyleColor& v) { SET_VAR(inherited, visitedLinkColor, v); }
|
| +Color RenderStyle::color() const { return inherited->color; }
|
| +Color RenderStyle::visitedLinkColor() const { return inherited->visitedLinkColor; }
|
| +void RenderStyle::setColor(const Color& v) { SET_VAR(inherited, color, v); }
|
| +void RenderStyle::setVisitedLinkColor(const Color& v) { SET_VAR(inherited, visitedLinkColor, v); }
|
|
|
| short RenderStyle::horizontalBorderSpacing() const { return inherited->horizontal_border_spacing; }
|
| short RenderStyle::verticalBorderSpacing() const { return inherited->vertical_border_spacing; }
|
| @@ -1291,9 +1292,9 @@ void RenderStyle::getShadowVerticalExtent(const ShadowData* shadow, LayoutUnit &
|
| }
|
| }
|
|
|
| -StyleColor RenderStyle::colorIncludingFallback(int colorProperty, bool visitedLink) const
|
| +Color RenderStyle::colorIncludingFallback(int colorProperty, bool visitedLink) const
|
| {
|
| - StyleColor result;
|
| + Color result;
|
| EBorderStyle borderStyle = BNONE;
|
| switch (colorProperty) {
|
| case CSSPropertyBackgroundColor:
|
| @@ -1352,7 +1353,7 @@ StyleColor RenderStyle::colorIncludingFallback(int colorProperty, bool visitedLi
|
| break;
|
| }
|
|
|
| - if (!result.isValid() && !result.isCurrentColor()) {
|
| + if (!result.isValid()) {
|
| if (!visitedLink && (borderStyle == INSET || borderStyle == OUTSET || borderStyle == RIDGE || borderStyle == GROOVE))
|
| result.setRGB(238, 238, 238);
|
| else
|
| @@ -1361,13 +1362,13 @@ StyleColor RenderStyle::colorIncludingFallback(int colorProperty, bool visitedLi
|
| return result;
|
| }
|
|
|
| -StyleColor RenderStyle::visitedDependentColor(int colorProperty) const
|
| +Color RenderStyle::visitedDependentColor(int colorProperty) const
|
| {
|
| - StyleColor unvisitedColor = colorIncludingFallback(colorProperty, false);
|
| + Color unvisitedColor = colorIncludingFallback(colorProperty, false);
|
| if (insideLink() != InsideVisitedLink)
|
| return unvisitedColor;
|
|
|
| - StyleColor visitedColor = colorIncludingFallback(colorProperty, true);
|
| + Color visitedColor = colorIncludingFallback(colorProperty, true);
|
|
|
| // Text decoration color validity is preserved (checked in RenderObject::decorationColor).
|
| if (colorProperty == CSSPropertyTextDecorationColor)
|
| @@ -1381,12 +1382,8 @@ StyleColor RenderStyle::visitedDependentColor(int colorProperty) const
|
| if (colorProperty == CSSPropertyBackgroundColor && visitedColor == Color::transparent)
|
| return unvisitedColor;
|
|
|
| - // Unless the visitied color is 'currentColor'; take the alpha from the unvisited color,
|
| - // but get the RGB values from the visited color.
|
| - if (visitedColor.isCurrentColor())
|
| - return visitedColor;
|
| -
|
| - return StyleColor(visitedColor.red(), visitedColor.green(), visitedColor.blue(), unvisitedColor.alpha());
|
| + // Take the alpha from the unvisited color, but get the RGB values from the visited color.
|
| + return Color(visitedColor.red(), visitedColor.green(), visitedColor.blue(), unvisitedColor.alpha());
|
| }
|
|
|
| const BorderValue& RenderStyle::borderBefore() const
|
|
|