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

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

Issue 15219003: Move updateLayout() call from RenderLayer to RenderView (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 7 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 | Annotate | Revision Log
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 4326 matching lines...) Expand 10 before | Expand all | Expand 10 after
4337 4337
4338 bool RenderLayer::hitTest(const HitTestRequest& request, HitTestResult& result) 4338 bool RenderLayer::hitTest(const HitTestRequest& request, HitTestResult& result)
4339 { 4339 {
4340 return hitTest(request, result.hitTestLocation(), result); 4340 return hitTest(request, result.hitTestLocation(), result);
4341 } 4341 }
4342 4342
4343 bool RenderLayer::hitTest(const HitTestRequest& request, const HitTestLocation& hitTestLocation, HitTestResult& result) 4343 bool RenderLayer::hitTest(const HitTestRequest& request, const HitTestLocation& hitTestLocation, HitTestResult& result)
4344 { 4344 {
4345 ASSERT(isSelfPaintingLayer() || hasSelfPaintingLayerDescendant()); 4345 ASSERT(isSelfPaintingLayer() || hasSelfPaintingLayerDescendant());
4346 4346
4347 renderer()->document()->updateLayout(); 4347 // RenderView should make sure to update layout before entering hit testing
4348 4348 ASSERT(!renderer()->frame()->view()->layoutPending());
4349 ASSERT(!renderer()->document()->renderer()->needsLayout());
4350
4349 LayoutRect hitTestArea = isOutOfFlowRenderFlowThread() ? toRenderFlowThread( renderer())->borderBoxRect() : renderer()->view()->documentRect(); 4351 LayoutRect hitTestArea = isOutOfFlowRenderFlowThread() ? toRenderFlowThread( renderer())->borderBoxRect() : renderer()->view()->documentRect();
4350 if (!request.ignoreClipping()) 4352 if (!request.ignoreClipping())
4351 hitTestArea.intersect(frameVisibleRect(renderer())); 4353 hitTestArea.intersect(frameVisibleRect(renderer()));
4352 4354
4353 RenderLayer* insideLayer = hitTestLayer(this, 0, request, result, hitTestAre a, hitTestLocation, false); 4355 RenderLayer* insideLayer = hitTestLayer(this, 0, request, result, hitTestAre a, hitTestLocation, false);
4354 if (!insideLayer) { 4356 if (!insideLayer) {
4355 // We didn't hit any layer. If we are the root layer and the mouse is -- or just was -- down, 4357 // We didn't hit any layer. If we are the root layer and the mouse is -- or just was -- down,
4356 // return ourselves. We do this so mouse events continue getting deliver ed after a drag has 4358 // return ourselves. We do this so mouse events continue getting deliver ed after a drag has
4357 // exited the WebView, and so hit testing over a scrollbar hits the cont ent document. 4359 // exited the WebView, and so hit testing over a scrollbar hits the cont ent document.
4358 if (!request.isChildFrameHitTest() && (request.active() || request.relea se()) && isRootLayer()) { 4360 if (!request.isChildFrameHitTest() && (request.active() || request.relea se()) && isRootLayer()) {
(...skipping 2123 matching lines...) Expand 10 before | Expand all | Expand 10 after
6482 } 6484 }
6483 } 6485 }
6484 6486
6485 void showLayerTree(const WebCore::RenderObject* renderer) 6487 void showLayerTree(const WebCore::RenderObject* renderer)
6486 { 6488 {
6487 if (!renderer) 6489 if (!renderer)
6488 return; 6490 return;
6489 showLayerTree(renderer->enclosingLayer()); 6491 showLayerTree(renderer->enclosingLayer());
6490 } 6492 }
6491 #endif 6493 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698