mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 667576. Handle visited colors correctly in MathML. r=dbaron
This commit is contained in:
parent
23c2e8cf88
commit
dcc04dfdae
@ -2053,7 +2053,7 @@ nsMathMLChar::PaintForeground(nsPresContext* aPresContext,
|
||||
}
|
||||
|
||||
// Set color ...
|
||||
nscolor fgColor = styleContext->GetStyleColor()->mColor;
|
||||
nscolor fgColor = styleContext->GetVisitedDependentColor(eCSSProperty_color);
|
||||
if (aIsSelected) {
|
||||
// get color to use for selection from the look&feel object
|
||||
fgColor = LookAndFeel::GetColor(LookAndFeel::eColorID_TextSelectForeground,
|
||||
|
@ -516,7 +516,7 @@ void nsDisplayMathMLBar::Paint(nsDisplayListBuilder* aBuilder,
|
||||
nsRenderingContext* aCtx)
|
||||
{
|
||||
// paint the bar with the current text color
|
||||
aCtx->SetColor(mFrame->GetStyleColor()->mColor);
|
||||
aCtx->SetColor(mFrame->GetVisitedDependentColor(eCSSProperty_color));
|
||||
aCtx->FillRect(mRect + ToReferenceFrame());
|
||||
}
|
||||
|
||||
|
@ -759,7 +759,7 @@ void nsDisplayNotation::Paint(nsDisplayListBuilder* aBuilder,
|
||||
gfxRect rect = presContext->AppUnitsToGfxUnits(mRect + ToReferenceFrame());
|
||||
|
||||
// paint the frame with the current text color
|
||||
aCtx->SetColor(mFrame->GetStyleColor()->mColor);
|
||||
aCtx->SetColor(mFrame->GetVisitedDependentColor(eCSSProperty_color));
|
||||
|
||||
// change line width to mThickness
|
||||
gfxContext *gfxCtx = aCtx->ThebesContext();
|
||||
|
@ -575,7 +575,7 @@ void nsDisplayMathMLSlash::Paint(nsDisplayListBuilder* aBuilder,
|
||||
gfxRect rect = presContext->AppUnitsToGfxUnits(mRect + ToReferenceFrame());
|
||||
|
||||
// paint with the current text color
|
||||
aCtx->SetColor(mFrame->GetStyleColor()->mColor);
|
||||
aCtx->SetColor(mFrame->GetVisitedDependentColor(eCSSProperty_color));
|
||||
|
||||
// draw the slash as a parallelogram
|
||||
gfxContext *gfxCtx = aCtx->ThebesContext();
|
||||
|
32
layout/reftests/css-visited/mathml-links-ref.html
Normal file
32
layout/reftests/css-visited/mathml-links-ref.html
Normal file
@ -0,0 +1,32 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<style>
|
||||
* { color: green; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<math href="" display="block">
|
||||
<mi>x</mi>
|
||||
<mo>=</mo>
|
||||
<mfrac>
|
||||
<mrow>
|
||||
<msqrt>
|
||||
<mn>5</mn>
|
||||
</msqrt>
|
||||
</mrow>
|
||||
<mrow>
|
||||
<menclose
|
||||
notation="radical circle roundedbox updiagonalstrike downdiagonalstrike">
|
||||
<mn>2</mn>
|
||||
</menclose>
|
||||
</mrow>
|
||||
</mfrac>
|
||||
<mo>+</mo>
|
||||
<mfrac bevelled="true">
|
||||
<mn>2</mn>
|
||||
<mn>3</mn>
|
||||
</mfrac>
|
||||
</math>
|
||||
</body>
|
||||
</html>
|
33
layout/reftests/css-visited/mathml-links.html
Normal file
33
layout/reftests/css-visited/mathml-links.html
Normal file
@ -0,0 +1,33 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<style>
|
||||
:link { color: red; }
|
||||
:visited { color: green; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<math href="" display="block">
|
||||
<mi>x</mi>
|
||||
<mo>=</mo>
|
||||
<mfrac>
|
||||
<mrow>
|
||||
<msqrt>
|
||||
<mn>5</mn>
|
||||
</msqrt>
|
||||
</mrow>
|
||||
<mrow>
|
||||
<menclose
|
||||
notation="radical circle roundedbox updiagonalstrike downdiagonalstrike">
|
||||
<mn>2</mn>
|
||||
</menclose>
|
||||
</mrow>
|
||||
</mfrac>
|
||||
<mo>+</mo>
|
||||
<mfrac bevelled="true">
|
||||
<mn>2</mn>
|
||||
<mn>3</mn>
|
||||
</mfrac>
|
||||
</math>
|
||||
</body>
|
||||
</html>
|
@ -80,6 +80,7 @@ var gTests = [
|
||||
//"== first-line-1.html first-line-1-ref.html",
|
||||
"== white-to-transparent-1.html white-to-transparent-1-ref.html",
|
||||
"== link-root-1.xhtml link-root-1-ref.xhtml",
|
||||
"== mathml-links.html mathml-links-ref.html",
|
||||
];
|
||||
|
||||
// Maintain a reference count of how many things we're waiting for until
|
||||
|
Loading…
Reference in New Issue
Block a user