| Index: Source/core/css/resolver/StyleAdjuster.cpp
|
| diff --git a/Source/core/css/resolver/StyleAdjuster.cpp b/Source/core/css/resolver/StyleAdjuster.cpp
|
| index cffe90e1a6a699f5bde5aa09d48f237edde15443..1cc1662e59089f0237f0da0d4024797a258a5d1d 100644
|
| --- a/Source/core/css/resolver/StyleAdjuster.cpp
|
| +++ b/Source/core/css/resolver/StyleAdjuster.cpp
|
| @@ -111,7 +111,14 @@ static bool doesNotInheritTextDecoration(const ComputedStyle& style, const Eleme
|
| {
|
| return style.display() == INLINE_TABLE
|
| || style.display() == INLINE_BLOCK || style.display() == INLINE_BOX || isAtShadowBoundary(e)
|
| - || style.isFloating() || style.hasOutOfFlowPosition() || isOutermostSVGElement(e);
|
| + || style.isFloating() || style.hasOutOfFlowPosition() || isOutermostSVGElement(e)
|
| + || isHTMLRTElement(e);
|
| +}
|
| +
|
| +// Certain elements (<a>, <font>) bind strongly to text decoration colors, for legacy reasons.
|
| +static bool overridesTextDecorationColors(const Element* e)
|
| +{
|
| + return e && (isHTMLFontElement(e) || isHTMLAnchorElement(e));
|
| }
|
|
|
| // FIXME: This helper is only needed because pseudoStyleForElement passes a null
|
| @@ -204,8 +211,7 @@ void StyleAdjuster::adjustComputedStyle(ComputedStyle& style, const ComputedStyl
|
|
|
| if (doesNotInheritTextDecoration(style, e))
|
| style.clearAppliedTextDecorations();
|
| -
|
| - style.applyTextDecorations();
|
| + style.applyTextDecorations(overridesTextDecorationColors(e));
|
|
|
| if (style.overflowX() != OVISIBLE || style.overflowY() != OVISIBLE)
|
| adjustOverflow(style);
|
|
|