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 2840 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2851 double localZOffset = -numeric_limits<double>::infinity(); | 2851 double localZOffset = -numeric_limits<double>::infinity(); |
2852 double* zOffsetForDescendantsPtr = 0; | 2852 double* zOffsetForDescendantsPtr = 0; |
2853 double* zOffsetForContentsPtr = 0; | 2853 double* zOffsetForContentsPtr = 0; |
2854 | 2854 |
2855 bool depthSortDescendants = false; | 2855 bool depthSortDescendants = false; |
2856 if (preserves3D()) { | 2856 if (preserves3D()) { |
2857 depthSortDescendants = true; | 2857 depthSortDescendants = true; |
2858 // Our layers can depth-test with our container, so share the z depth po
inter with the container, if it passed one down. | 2858 // Our layers can depth-test with our container, so share the z depth po
inter with the container, if it passed one down. |
2859 zOffsetForDescendantsPtr = zOffset ? zOffset : &localZOffset; | 2859 zOffsetForDescendantsPtr = zOffset ? zOffset : &localZOffset; |
2860 zOffsetForContentsPtr = zOffset ? zOffset : &localZOffset; | 2860 zOffsetForContentsPtr = zOffset ? zOffset : &localZOffset; |
2861 } else if (m_has3DTransformedDescendant) { | |
2862 // Flattening layer with 3d children; use a local zOffset pointer to dep
th-test children and foreground. | |
2863 depthSortDescendants = true; | |
2864 zOffsetForDescendantsPtr = zOffset ? zOffset : &localZOffset; | |
2865 zOffsetForContentsPtr = zOffset ? zOffset : &localZOffset; | |
2866 } else if (zOffset) { | 2861 } else if (zOffset) { |
2867 zOffsetForDescendantsPtr = 0; | 2862 zOffsetForDescendantsPtr = 0; |
2868 // Container needs us to give back a z offset for the hit layer. | 2863 // Container needs us to give back a z offset for the hit layer. |
2869 zOffsetForContentsPtr = zOffset; | 2864 zOffsetForContentsPtr = zOffset; |
2870 } | 2865 } |
2871 | 2866 |
2872 // This variable tracks which layer the mouse ends up being inside. | 2867 // This variable tracks which layer the mouse ends up being inside. |
2873 RenderLayer* candidateLayer = 0; | 2868 RenderLayer* candidateLayer = 0; |
2874 | 2869 |
2875 // Begin by walking our list of positive layers from highest z-index down to
the lowest z-index. | 2870 // Begin by walking our list of positive layers from highest z-index down to
the lowest z-index. |
(...skipping 1210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4086 } | 4081 } |
4087 } | 4082 } |
4088 | 4083 |
4089 void showLayerTree(const WebCore::RenderObject* renderer) | 4084 void showLayerTree(const WebCore::RenderObject* renderer) |
4090 { | 4085 { |
4091 if (!renderer) | 4086 if (!renderer) |
4092 return; | 4087 return; |
4093 showLayerTree(renderer->enclosingLayer()); | 4088 showLayerTree(renderer->enclosingLayer()); |
4094 } | 4089 } |
4095 #endif | 4090 #endif |
OLD | NEW |