зеркало из https://github.com/mozilla/gecko-dev.git
hack around caret problem in thebes builds (bug 312106)
This commit is contained in:
Родитель
4c9c041177
Коммит
0b0b40118a
|
@ -657,15 +657,28 @@ nsThebesRenderingContext::FillRect(nscoord aX, nscoord aY, nscoord aWidth, nscoo
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* XXX awful invert rect hack
|
||||
* idea by mrbkap
|
||||
*/
|
||||
static unsigned int gInvertRect = 0;
|
||||
NS_IMETHODIMP
|
||||
nsThebesRenderingContext::InvertRect(const nsRect& aRect)
|
||||
{
|
||||
gfxContext::GraphicsOperator lastOp = mThebes->CurrentOperator();
|
||||
|
||||
mThebes->SetOperator(gfxContext::OPERATOR_XOR);
|
||||
gfxRGBA newColor(0,0,0,1);
|
||||
if (gInvertRect++ % 2)
|
||||
newColor = gfxRGBA(1,1,1,1);
|
||||
mThebes->Save();
|
||||
|
||||
mThebes->SetColor(newColor);
|
||||
mThebes->SetOperator(gfxContext::OPERATOR_OVER);
|
||||
nsresult rv = FillRect(aRect);
|
||||
mThebes->SetOperator(lastOp);
|
||||
|
||||
mThebes->Restore();
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче