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

Unified 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: move compositor()->updateIfNeededRecursive down to layer->hitTest() Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/paint/DeprecatedPaintLayer.cpp
diff --git a/Source/core/paint/DeprecatedPaintLayer.cpp b/Source/core/paint/DeprecatedPaintLayer.cpp
index 3cf4a7d1e25a955f3196bd01fe519c62f73a8d07..1ee0afaad18572564a90cd7fb1d9ac3705722173 100644
--- a/Source/core/paint/DeprecatedPaintLayer.cpp
+++ b/Source/core/paint/DeprecatedPaintLayer.cpp
@@ -1667,6 +1667,8 @@ bool DeprecatedPaintLayer::hitTest(const HitTestRequest& request, const HitTestL
if (request.ignoreClipping())
hitTestArea.unite(LayoutRect(layoutObject()->view()->documentRect()));
+ // Make sure advance document lifecycle to CompositingClean prior to hit testing.
+ compositor()->updateIfNeededRecursive();
DeprecatedPaintLayer* insideLayer = hitTestLayer(this, 0, result, hitTestArea, hitTestLocation, false);
if (!insideLayer) {
// We didn't hit any layer. If we are the root layer and the mouse is -- or just was -- down,
@@ -1792,6 +1794,8 @@ DeprecatedPaintLayer* DeprecatedPaintLayer::hitTestLayer(DeprecatedPaintLayer* r
const LayoutRect& hitTestRect, const HitTestLocation& hitTestLocation, bool appliedTransform,
const HitTestingTransformState* transformState, double* zOffset)
{
+ ASSERT(layoutObject()->document().lifecycle().state() >= DocumentLifecycle::CompositingClean);
+
if (!isSelfPaintingLayer() && !hasSelfPaintingLayerDescendant())
return 0;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698