зеркало из https://github.com/mozilla/pjs.git
Bug 584494. Avoid creating opacity/transform wrappers for empty lists. r=tnikkel a2.0=blocking2.0:betaN
This commit is contained in:
Родитель
526db14d17
Коммит
a64e116f6b
|
@ -1527,8 +1527,10 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
|
|||
} else
|
||||
#endif
|
||||
|
||||
/* If there is any opacity, wrap it up in an opacity list. */
|
||||
if (disp->mOpacity < 1.0f) {
|
||||
/* If there is any opacity, wrap it up in an opacity list.
|
||||
* If there's nothing in the list, don't add anything.
|
||||
*/
|
||||
if (disp->mOpacity < 1.0f && !resultList.IsEmpty()) {
|
||||
rv = resultList.AppendNewToTop(
|
||||
new (aBuilder) nsDisplayOpacity(aBuilder, this, &resultList));
|
||||
if (NS_FAILED(rv))
|
||||
|
@ -1536,10 +1538,10 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
|
|||
}
|
||||
|
||||
/* If we're going to apply a transformation, wrap everything in an
|
||||
* nsDisplayTransform.
|
||||
* nsDisplayTransform. If there's nothing in the list, don't add anything.
|
||||
*/
|
||||
if ((mState & NS_FRAME_MAY_BE_TRANSFORMED) &&
|
||||
disp->HasTransform()) {
|
||||
disp->HasTransform() && !resultList.IsEmpty()) {
|
||||
rv = resultList.AppendNewToTop(
|
||||
new (aBuilder) nsDisplayTransform(aBuilder, this, &resultList));
|
||||
if (NS_FAILED(rv))
|
||||
|
|
Загрузка…
Ссылка в новой задаче