зеркало из https://github.com/mozilla/pjs.git
Clamp -moz-opacity to the range [0.0,1.0]. b=224478 r+sr=roc
This commit is contained in:
Родитель
f9931a4665
Коммит
a498e320e4
|
@ -2512,6 +2512,10 @@ nsRuleNode::ComputeDisplayData(nsStyleStruct* aStartStruct,
|
|||
// opacity: factor, inherit
|
||||
if (eCSSUnit_Number == displayData.mOpacity.GetUnit()) {
|
||||
display->mOpacity = displayData.mOpacity.GetFloatValue();
|
||||
if (display->mOpacity > 1.0f)
|
||||
display->mOpacity = 1.0f;
|
||||
if (display->mOpacity < 0.0f)
|
||||
display->mOpacity = 0.0f;
|
||||
}
|
||||
else if (eCSSUnit_Inherit == displayData.mOpacity.GetUnit()) {
|
||||
inherited = PR_TRUE;
|
||||
|
|
|
@ -2512,6 +2512,10 @@ nsRuleNode::ComputeDisplayData(nsStyleStruct* aStartStruct,
|
|||
// opacity: factor, inherit
|
||||
if (eCSSUnit_Number == displayData.mOpacity.GetUnit()) {
|
||||
display->mOpacity = displayData.mOpacity.GetFloatValue();
|
||||
if (display->mOpacity > 1.0f)
|
||||
display->mOpacity = 1.0f;
|
||||
if (display->mOpacity < 0.0f)
|
||||
display->mOpacity = 0.0f;
|
||||
}
|
||||
else if (eCSSUnit_Inherit == displayData.mOpacity.GetUnit()) {
|
||||
inherited = PR_TRUE;
|
||||
|
|
Загрузка…
Ссылка в новой задаче