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

Side by Side Diff: Source/core/paint/DeprecatedPaintLayer.cpp

Issue 999033002: Advance document lifecycle to CompositingClean prior to hit testing (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 5 years, 9 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 1790 matching lines...) Expand 10 before | Expand all | Expand 10 after
1801 // transformState.m_accumulatedTransform holds the transform from the containing flattening layer. 1801 // transformState.m_accumulatedTransform holds the transform from the containing flattening layer.
1802 // transformState.m_lastPlanarPoint is the hitTestLocation in the plane of the c ontaining flattening layer. 1802 // transformState.m_lastPlanarPoint is the hitTestLocation in the plane of the c ontaining flattening layer.
1803 // transformState.m_lastPlanarQuad is the hitTestRect as a quad in the plane of the containing flattening layer. 1803 // transformState.m_lastPlanarQuad is the hitTestRect as a quad in the plane of the containing flattening layer.
1804 // 1804 //
1805 // If zOffset is non-null (which indicates that the caller wants z offset inform ation), 1805 // If zOffset is non-null (which indicates that the caller wants z offset inform ation),
1806 // *zOffset on return is the z offset of the hit point relative to the containi ng flattening layer. 1806 // *zOffset on return is the z offset of the hit point relative to the containi ng flattening layer.
1807 DeprecatedPaintLayer* DeprecatedPaintLayer::hitTestLayer(DeprecatedPaintLayer* r ootLayer, DeprecatedPaintLayer* containerLayer, const HitTestRequest& request, H itTestResult& result, 1807 DeprecatedPaintLayer* DeprecatedPaintLayer::hitTestLayer(DeprecatedPaintLayer* r ootLayer, DeprecatedPaintLayer* containerLayer, const HitTestRequest& request, H itTestResult& result,
1808 const LayoutRect& hitTestRect, const HitTestLocation& hitTestLocation, bool appliedTransform, 1808 const LayoutRect& hitTestRect, const HitTestLocation& hitTestLocation, bool appliedTransform,
1809 const HitTestingTransformState* transformState, double* zOffset) 1809 const HitTestingTransformState* transformState, double* zOffset)
1810 { 1810 {
1811 ASSERT(layoutObject()->document().lifecycle().state() >= DocumentLifecycle:: CompositingClean);
1812
1811 if (!isSelfPaintingLayer() && !hasSelfPaintingLayerDescendant()) 1813 if (!isSelfPaintingLayer() && !hasSelfPaintingLayerDescendant())
1812 return 0; 1814 return 0;
1813 1815
1814 // The natural thing would be to keep HitTestingTransformState on the stack, but it's big, so we heap-allocate. 1816 // The natural thing would be to keep HitTestingTransformState on the stack, but it's big, so we heap-allocate.
1815 1817
1816 // Apply a transform if we have one. 1818 // Apply a transform if we have one.
1817 if (transform() && !appliedTransform) { 1819 if (transform() && !appliedTransform) {
1818 if (enclosingPaginationLayer()) 1820 if (enclosingPaginationLayer())
1819 return hitTestTransformedLayerInFragments(rootLayer, containerLayer, request, result, hitTestRect, hitTestLocation, transformState, zOffset); 1821 return hitTestTransformedLayerInFragments(rootLayer, containerLayer, request, result, hitTestRect, hitTestLocation, transformState, zOffset);
1820 1822
(...skipping 1152 matching lines...) Expand 10 before | Expand all | Expand 10 after
2973 } 2975 }
2974 } 2976 }
2975 2977
2976 void showLayerTree(const blink::LayoutObject* renderer) 2978 void showLayerTree(const blink::LayoutObject* renderer)
2977 { 2979 {
2978 if (!renderer) 2980 if (!renderer)
2979 return; 2981 return;
2980 showLayerTree(renderer->enclosingLayer()); 2982 showLayerTree(renderer->enclosingLayer());
2981 } 2983 }
2982 #endif 2984 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698