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

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 6 years, 5 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
« no previous file with comments | « LayoutTests/transforms/3d/hit-testing/overlapping-layers-hit-test-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2650 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « LayoutTests/transforms/3d/hit-testing/overlapping-layers-hit-test-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698