Bug 289652 [regression] -moz-selection fails to work r+sr=bzbarsky, a=asa

This commit is contained in:
masayuki%d-toybox.com 2005-05-22 17:17:46 +00:00
Родитель a6da33c80d
Коммит b36fbc23ff
1 изменённых файлов: 4 добавлений и 6 удалений

Просмотреть файл

@ -1306,12 +1306,7 @@ DrawSelectionIterator::GetSelectionColors(nscolor *aForeColor,
return PR_FALSE;
}
PRBool dontChangeTextColor = mOldStyle.mSelectionTextColor == NS_DONT_CHANGE_COLOR;
// If the selection text color is NS_DONT_CHANGE_COLOR,
// we don't accept the ::selection pseudo element.
if (!dontChangeTextColor &&
mSelectionPseudoStyle &&
if (mSelectionPseudoStyle &&
mSelectionStatus == nsISelectionController::SELECTION_ON) {
*aForeColor = mSelectionPseudoFGcolor;
*aBackColor = mSelectionPseudoBGcolor;
@ -1319,6 +1314,9 @@ DrawSelectionIterator::GetSelectionColors(nscolor *aForeColor,
return PR_TRUE;
}
PRBool dontChangeTextColor =
mOldStyle.mSelectionTextColor == NS_DONT_CHANGE_COLOR;
if (dontChangeTextColor)
*aForeColor = mOldStyle.mColor->mColor;
else