Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Side by Side Diff: Source/core/rendering/RenderLayer.cpp

Issue 79943002: Only not take zOffset into account during hit-testing when child layers are in the same 3d renderin… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 2818 matching lines...) Expand 10 before | Expand all | Expand 10 after
2829 double localZOffset = -numeric_limits<double>::infinity(); 2829 double localZOffset = -numeric_limits<double>::infinity();
2830 double* zOffsetForDescendantsPtr = 0; 2830 double* zOffsetForDescendantsPtr = 0;
2831 double* zOffsetForContentsPtr = 0; 2831 double* zOffsetForContentsPtr = 0;
2832 2832
2833 bool depthSortDescendants = false; 2833 bool depthSortDescendants = false;
2834 if (preserves3D()) { 2834 if (preserves3D()) {
2835 depthSortDescendants = true; 2835 depthSortDescendants = true;
2836 // Our layers can depth-test with our container, so share the z depth po inter with the container, if it passed one down. 2836 // Our layers can depth-test with our container, so share the z depth po inter with the container, if it passed one down.
2837 zOffsetForDescendantsPtr = zOffset ? zOffset : &localZOffset; 2837 zOffsetForDescendantsPtr = zOffset ? zOffset : &localZOffset;
2838 zOffsetForContentsPtr = zOffset ? zOffset : &localZOffset; 2838 zOffsetForContentsPtr = zOffset ? zOffset : &localZOffset;
2839 } else if (m_has3DTransformedDescendant) {
2840 // Flattening layer with 3d children; use a local zOffset pointer to dep th-test children and foreground.
2841 depthSortDescendants = true;
2842 zOffsetForDescendantsPtr = zOffset ? zOffset : &localZOffset;
2843 zOffsetForContentsPtr = zOffset ? zOffset : &localZOffset;
2844 } else if (zOffset) { 2839 } else if (zOffset) {
2845 zOffsetForDescendantsPtr = 0; 2840 zOffsetForDescendantsPtr = 0;
2846 // Container needs us to give back a z offset for the hit layer. 2841 // Container needs us to give back a z offset for the hit layer.
2847 zOffsetForContentsPtr = zOffset; 2842 zOffsetForContentsPtr = zOffset;
2848 } 2843 }
2849 2844
2850 // This variable tracks which layer the mouse ends up being inside. 2845 // This variable tracks which layer the mouse ends up being inside.
2851 RenderLayer* candidateLayer = 0; 2846 RenderLayer* candidateLayer = 0;
2852 2847
2853 // Begin by walking our list of positive layers from highest z-index down to the lowest z-index. 2848 // Begin by walking our list of positive layers from highest z-index down to the lowest z-index.
(...skipping 1280 matching lines...) Expand 10 before | Expand all | Expand 10 after
4134 } 4129 }
4135 } 4130 }
4136 4131
4137 void showLayerTree(const WebCore::RenderObject* renderer) 4132 void showLayerTree(const WebCore::RenderObject* renderer)
4138 { 4133 {
4139 if (!renderer) 4134 if (!renderer)
4140 return; 4135 return;
4141 showLayerTree(renderer->enclosingLayer()); 4136 showLayerTree(renderer->enclosingLayer());
4142 } 4137 }
4143 #endif 4138 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698