Bug 1230075 - Allow perspective items in hittest() for preserve-3d cases. r=mattwoodrow

This commit is contained in:
Thinker K.F. Li 2015-12-03 00:59:00 +01:00
Родитель 8701025836
Коммит 07d865de46
1 изменённых файлов: 4 добавлений и 2 удалений

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

@ -1889,9 +1889,11 @@ void nsDisplayList::HitTest(nsDisplayListBuilder* aBuilder, const nsRect& aRect,
if (aState->mInPreserves3D) {
// Collect leaves of the current 3D rendering context.
for (item = GetBottom(); item; item = item->GetAbove()) {
MOZ_ASSERT(item->GetType() == nsDisplayTransform::TYPE_TRANSFORM);
MOZ_ASSERT(item->GetType() == nsDisplayTransform::TYPE_TRANSFORM ||
item->GetType() == nsDisplayTransform::TYPE_PERSPECTIVE);
if (item->Frame()->Extend3DContext() &&
!static_cast<nsDisplayTransform*>(item)->IsTransformSeparator()) {
(item->GetType() == nsDisplayTransform::TYPE_PERSPECTIVE ||
!static_cast<nsDisplayTransform*>(item)->IsTransformSeparator())) {
item->HitTest(aBuilder, aRect, aState, aOutFrames);
} else {
// One of leaves in the current 3D rendering context.