зеркало из https://github.com/mozilla/gecko-dev.git
Bug 579663. Part 9. Simplify ProcessDisplayItems because all items in a container layer have the same app units per dev pixel. r=roc
This commit is contained in:
Родитель
3b953e9755
Коммит
987f68275e
|
@ -906,6 +906,9 @@ void
|
||||||
ContainerState::ProcessDisplayItems(const nsDisplayList& aList,
|
ContainerState::ProcessDisplayItems(const nsDisplayList& aList,
|
||||||
const nsRect* aClipRect)
|
const nsRect* aClipRect)
|
||||||
{
|
{
|
||||||
|
PRInt32 appUnitsPerDevPixel =
|
||||||
|
mContainerFrame->PresContext()->AppUnitsPerDevPixel();
|
||||||
|
|
||||||
for (nsDisplayItem* item = aList.GetBottom(); item; item = item->GetAbove()) {
|
for (nsDisplayItem* item = aList.GetBottom(); item; item = item->GetAbove()) {
|
||||||
if (item->GetType() == nsDisplayItem::TYPE_CLIP) {
|
if (item->GetType() == nsDisplayItem::TYPE_CLIP) {
|
||||||
nsDisplayClip* clipItem = static_cast<nsDisplayClip*>(item);
|
nsDisplayClip* clipItem = static_cast<nsDisplayClip*>(item);
|
||||||
|
@ -917,7 +920,9 @@ ContainerState::ProcessDisplayItems(const nsDisplayList& aList,
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
PRInt32 appUnitsPerDevPixel = AppUnitsPerDevPixel(item);
|
NS_ASSERTION(appUnitsPerDevPixel == AppUnitsPerDevPixel(item),
|
||||||
|
"items in a container layer should all have the same app units per dev pixel");
|
||||||
|
|
||||||
nsIntRect itemVisibleRect =
|
nsIntRect itemVisibleRect =
|
||||||
item->GetVisibleRect().ToNearestPixels(appUnitsPerDevPixel);
|
item->GetVisibleRect().ToNearestPixels(appUnitsPerDevPixel);
|
||||||
nsRect itemContent = item->GetBounds(mBuilder);
|
nsRect itemContent = item->GetBounds(mBuilder);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче