OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights
reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights
reserved. |
3 * | 3 * |
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. | 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. |
5 * | 5 * |
6 * Other contributors: | 6 * Other contributors: |
7 * Robert O'Callahan <roc+@cs.cmu.edu> | 7 * Robert O'Callahan <roc+@cs.cmu.edu> |
8 * David Baron <dbaron@fas.harvard.edu> | 8 * David Baron <dbaron@fas.harvard.edu> |
9 * Christian Biesinger <cbiesinger@web.de> | 9 * Christian Biesinger <cbiesinger@web.de> |
10 * Randall Jesup <rjesup@wgate.com> | 10 * Randall Jesup <rjesup@wgate.com> |
(...skipping 2650 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2661 double localZOffset = -std::numeric_limits<double>::infinity(); | 2661 double localZOffset = -std::numeric_limits<double>::infinity(); |
2662 double* zOffsetForDescendantsPtr = 0; | 2662 double* zOffsetForDescendantsPtr = 0; |
2663 double* zOffsetForContentsPtr = 0; | 2663 double* zOffsetForContentsPtr = 0; |
2664 | 2664 |
2665 bool depthSortDescendants = false; | 2665 bool depthSortDescendants = false; |
2666 if (preserves3D()) { | 2666 if (preserves3D()) { |
2667 depthSortDescendants = true; | 2667 depthSortDescendants = true; |
2668 // Our layers can depth-test with our container, so share the z depth po
inter with the container, if it passed one down. | 2668 // Our layers can depth-test with our container, so share the z depth po
inter with the container, if it passed one down. |
2669 zOffsetForDescendantsPtr = zOffset ? zOffset : &localZOffset; | 2669 zOffsetForDescendantsPtr = zOffset ? zOffset : &localZOffset; |
2670 zOffsetForContentsPtr = zOffset ? zOffset : &localZOffset; | 2670 zOffsetForContentsPtr = zOffset ? zOffset : &localZOffset; |
2671 } else if (m_has3DTransformedDescendant) { | |
2672 // Flattening layer with 3d children; use a local zOffset pointer to dep
th-test children and foreground. | |
2673 depthSortDescendants = true; | |
2674 zOffsetForDescendantsPtr = zOffset ? zOffset : &localZOffset; | |
2675 zOffsetForContentsPtr = zOffset ? zOffset : &localZOffset; | |
2676 } else if (zOffset) { | 2671 } else if (zOffset) { |
2677 zOffsetForDescendantsPtr = 0; | 2672 zOffsetForDescendantsPtr = 0; |
2678 // Container needs us to give back a z offset for the hit layer. | 2673 // Container needs us to give back a z offset for the hit layer. |
2679 zOffsetForContentsPtr = zOffset; | 2674 zOffsetForContentsPtr = zOffset; |
2680 } | 2675 } |
2681 | 2676 |
2682 // This variable tracks which layer the mouse ends up being inside. | 2677 // This variable tracks which layer the mouse ends up being inside. |
2683 RenderLayer* candidateLayer = 0; | 2678 RenderLayer* candidateLayer = 0; |
2684 | 2679 |
2685 // Begin by walking our list of positive layers from highest z-index down to
the lowest z-index. | 2680 // Begin by walking our list of positive layers from highest z-index down to
the lowest z-index. |
(...skipping 1062 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3748 } | 3743 } |
3749 } | 3744 } |
3750 | 3745 |
3751 void showLayerTree(const WebCore::RenderObject* renderer) | 3746 void showLayerTree(const WebCore::RenderObject* renderer) |
3752 { | 3747 { |
3753 if (!renderer) | 3748 if (!renderer) |
3754 return; | 3749 return; |
3755 showLayerTree(renderer->enclosingLayer()); | 3750 showLayerTree(renderer->enclosingLayer()); |
3756 } | 3751 } |
3757 #endif | 3752 #endif |
OLD | NEW |