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

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: Sorry for the late delay. Here is an updated patch. I've put the description under the tested eleme… Created 6 years, 11 months 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 2840 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698