Bug 1276897 - r=tlee
authorMatt Woodrow <mwoodrow@mozilla.com>
Wed, 01 Jun 2016 13:23:20 +1200
changeset 303330 c9fa564222899eabcfd5e2c00e520359650fb6d1
parent 303329 3fc0469634a5a315b38144169d9cc8243120805a
child 303331 4e492b8253d4fd9db6d180910cb3463f19551f7c
push id30386
push usercbook@mozilla.com
push dateFri, 01 Jul 2016 09:17:55 +0000
treeherdermozilla-central@fdcee57b4e4f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstlee
bugs1276897
milestone50.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1276897 - r=tlee
layout/base/nsDisplayList.cpp
--- a/layout/base/nsDisplayList.cpp
+++ b/layout/base/nsDisplayList.cpp
@@ -2083,19 +2083,20 @@ void nsDisplayList::HitTest(nsDisplayLis
     bool snap;
     nsRect r = item->GetBounds(aBuilder, &snap).Intersect(aRect);
     auto itemType = item->GetType();
     bool same3DContext =
       (itemType == nsDisplayItem::TYPE_TRANSFORM &&
        static_cast<nsDisplayTransform*>(item)->IsParticipating3DContext()) ||
       ((itemType == nsDisplayItem::TYPE_PERSPECTIVE ||
         itemType == nsDisplayItem::TYPE_OPACITY) &&
-       static_cast<nsDisplayPerspective*>(item)->Frame()->Extend3DContext());
+       item->Frame()->Extend3DContext());
     if (same3DContext &&
-        !static_cast<nsDisplayTransform*>(item)->IsLeafOf3DContext()) {
+        (itemType != nsDisplayItem::TYPE_TRANSFORM ||
+         !static_cast<nsDisplayTransform*>(item)->IsLeafOf3DContext())) {
       if (!item->GetClip().MayIntersect(aRect)) {
         continue;
       }
       AutoTArray<nsIFrame*, 1> neverUsed;
       // Start gethering leaves of the 3D rendering context, and
       // append leaves at the end of mItemBuffer.  Leaves are
       // processed at following iterations.
       aState->mInPreserves3D = true;