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 2829 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2840 double localZOffset = -numeric_limits<double>::infinity(); | 2840 double localZOffset = -numeric_limits<double>::infinity(); |
2841 double* zOffsetForDescendantsPtr = 0; | 2841 double* zOffsetForDescendantsPtr = 0; |
2842 double* zOffsetForContentsPtr = 0; | 2842 double* zOffsetForContentsPtr = 0; |
2843 | 2843 |
2844 bool depthSortDescendants = false; | 2844 bool depthSortDescendants = false; |
2845 if (preserves3D()) { | 2845 if (preserves3D()) { |
2846 depthSortDescendants = true; | 2846 depthSortDescendants = true; |
2847 // Our layers can depth-test with our container, so share the z depth po
inter with the container, if it passed one down. | 2847 // Our layers can depth-test with our container, so share the z depth po
inter with the container, if it passed one down. |
2848 zOffsetForDescendantsPtr = zOffset ? zOffset : &localZOffset; | 2848 zOffsetForDescendantsPtr = zOffset ? zOffset : &localZOffset; |
2849 zOffsetForContentsPtr = zOffset ? zOffset : &localZOffset; | 2849 zOffsetForContentsPtr = zOffset ? zOffset : &localZOffset; |
2850 } else if (m_has3DTransformedDescendant) { | |
2851 // Flattening layer with 3d children; use a local zOffset pointer to dep
th-test children and foreground. | |
2852 depthSortDescendants = true; | |
2853 zOffsetForDescendantsPtr = zOffset ? zOffset : &localZOffset; | |
2854 zOffsetForContentsPtr = zOffset ? zOffset : &localZOffset; | |
2855 } else if (zOffset) { | 2850 } else if (zOffset) { |
2856 zOffsetForDescendantsPtr = 0; | 2851 zOffsetForDescendantsPtr = 0; |
2857 // Container needs us to give back a z offset for the hit layer. | 2852 // Container needs us to give back a z offset for the hit layer. |
2858 zOffsetForContentsPtr = zOffset; | 2853 zOffsetForContentsPtr = zOffset; |
2859 } | 2854 } |
2860 | 2855 |
2861 // This variable tracks which layer the mouse ends up being inside. | 2856 // This variable tracks which layer the mouse ends up being inside. |
2862 RenderLayer* candidateLayer = 0; | 2857 RenderLayer* candidateLayer = 0; |
2863 | 2858 |
2864 // Begin by walking our list of positive layers from highest z-index down to
the lowest z-index. | 2859 // Begin by walking our list of positive layers from highest z-index down to
the lowest z-index. |
(...skipping 1302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4167 } | 4162 } |
4168 } | 4163 } |
4169 | 4164 |
4170 void showLayerTree(const WebCore::RenderObject* renderer) | 4165 void showLayerTree(const WebCore::RenderObject* renderer) |
4171 { | 4166 { |
4172 if (!renderer) | 4167 if (!renderer) |
4173 return; | 4168 return; |
4174 showLayerTree(renderer->enclosingLayer()); | 4169 showLayerTree(renderer->enclosingLayer()); |
4175 } | 4170 } |
4176 #endif | 4171 #endif |
OLD | NEW |