diff --git a/layout/mathml/nsMathMLChar.cpp b/layout/mathml/nsMathMLChar.cpp index a902ba50d863..a4568c87c453 100644 --- a/layout/mathml/nsMathMLChar.cpp +++ b/layout/mathml/nsMathMLChar.cpp @@ -2124,7 +2124,8 @@ nsMathMLChar::PaintForeground(nsPresContext* aPresContext, RefPtr thebesContext = aRenderingContext.ThebesContext(); // Set color ... - nscolor fgColor = styleContext->GetVisitedDependentColor(eCSSProperty_color); + nsCSSProperty colorProp = styleContext->GetTextFillColorProp(); + nscolor fgColor = styleContext->GetVisitedDependentColor(colorProp); if (aIsSelected) { // get color to use for selection from the look&feel object fgColor = LookAndFeel::GetColor(LookAndFeel::eColorID_TextSelectForeground, diff --git a/layout/mathml/nsMathMLFrame.cpp b/layout/mathml/nsMathMLFrame.cpp index b128acd454fa..eb1f7517594c 100644 --- a/layout/mathml/nsMathMLFrame.cpp +++ b/layout/mathml/nsMathMLFrame.cpp @@ -365,8 +365,9 @@ void nsDisplayMathMLBar::Paint(nsDisplayListBuilder* aBuilder, NSRectToNonEmptySnappedRect(mRect + ToReferenceFrame(), mFrame->PresContext()->AppUnitsPerDevPixel(), *drawTarget); + nsCSSProperty colorProp = mFrame->StyleContext()->GetTextFillColorProp(); ColorPattern color(ToDeviceColor( - mFrame->GetVisitedDependentColor(eCSSProperty_color))); + mFrame->GetVisitedDependentColor(colorProp))); drawTarget->FillRect(rect, color); } diff --git a/layout/mathml/nsMathMLmencloseFrame.cpp b/layout/mathml/nsMathMLmencloseFrame.cpp index 93176793a657..1ab2976e10ab 100644 --- a/layout/mathml/nsMathMLmencloseFrame.cpp +++ b/layout/mathml/nsMathMLmencloseFrame.cpp @@ -779,8 +779,9 @@ void nsDisplayNotation::Paint(nsDisplayListBuilder* aBuilder, presContext->AppUnitsPerDevPixel()); rect.Deflate(strokeWidth / 2.f); + nsCSSProperty colorProp = mFrame->StyleContext()->GetTextFillColorProp(); ColorPattern color(ToDeviceColor( - mFrame->GetVisitedDependentColor(eCSSProperty_color))); + mFrame->GetVisitedDependentColor(colorProp))); StrokeOptions strokeOptions(strokeWidth); diff --git a/layout/mathml/nsMathMLmfracFrame.cpp b/layout/mathml/nsMathMLmfracFrame.cpp index 75d600384a51..57017ad7cd28 100644 --- a/layout/mathml/nsMathMLmfracFrame.cpp +++ b/layout/mathml/nsMathMLmfracFrame.cpp @@ -629,8 +629,9 @@ void nsDisplayMathMLSlash::Paint(nsDisplayListBuilder* aBuilder, Rect rect = NSRectToRect(mRect + ToReferenceFrame(), presContext->AppUnitsPerDevPixel()); + nsCSSProperty colorProp = mFrame->StyleContext()->GetTextFillColorProp(); ColorPattern color(ToDeviceColor( - mFrame->GetVisitedDependentColor(eCSSProperty_color))); + mFrame->GetVisitedDependentColor(colorProp))); // draw the slash as a parallelogram Point delta = Point(presContext->AppUnitsToGfxUnits(mThickness), 0);