Bug 649583 Panning regression on google reader in 2011-04-12 nightly r=roc

This commit is contained in:
Benjamin Stover 2011-04-13 14:12:22 -07:00
Родитель be80ac1469
Коммит 5dbc4242ca
1 изменённых файлов: 9 добавлений и 1 удалений

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

@ -1314,15 +1314,23 @@ ContainerState::ProcessDisplayItems(const nsDisplayList& aList,
// Assign the item to a layer
if (layerState == LAYER_ACTIVE_FORCE ||
layerState == LAYER_ACTIVE_EMPTY ||
layerState == LAYER_ACTIVE && (aClip.mRoundedClipRects.IsEmpty() ||
// We can use the visible rect here only because the item has its own
// layer, like the comment below.
!aClip.IsRectClippedByRoundedCorner(item->GetVisibleRect()))) {
// LAYER_ACTIVE_EMPTY means the layer is created just for its metadata.
// We should never see an empty layer with any visible content!
NS_ASSERTION(layerState != LAYER_ACTIVE_EMPTY ||
itemVisibleRect.IsEmpty(),
"State is LAYER_ACTIVE_EMPTY but visible rect is not.");
// If the item would have its own layer but is invisible, just hide it.
// Note that items without their own layers can't be skipped this
// way, since their ThebesLayer may decide it wants to draw them
// into its buffer even if they're currently covered.
if (itemVisibleRect.IsEmpty()) {
if (itemVisibleRect.IsEmpty() && layerState != LAYER_ACTIVE_EMPTY) {
InvalidateForLayerChange(item, nsnull);
continue;
}