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

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: add fixme 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 4310 matching lines...) Expand 10 before | Expand all | Expand 10 after
4321 4321
4322 bool RenderLayer::hitTest(const HitTestRequest& request, HitTestResult& result) 4322 bool RenderLayer::hitTest(const HitTestRequest& request, HitTestResult& result)
4323 { 4323 {
4324 return hitTest(request, result.hitTestLocation(), result); 4324 return hitTest(request, result.hitTestLocation(), result);
4325 } 4325 }
4326 4326
4327 bool RenderLayer::hitTest(const HitTestRequest& request, const HitTestLocation& hitTestLocation, HitTestResult& result) 4327 bool RenderLayer::hitTest(const HitTestRequest& request, const HitTestLocation& hitTestLocation, HitTestResult& result)
4328 { 4328 {
4329 ASSERT(isSelfPaintingLayer() || hasSelfPaintingLayerDescendant()); 4329 ASSERT(isSelfPaintingLayer() || hasSelfPaintingLayerDescendant());
4330 4330
4331 renderer()->document()->updateLayout(); 4331 // RenderView should make sure to update layout before entering hit testing
4332 4332 ASSERT(!renderer()->frame()->view()->layoutPending());
4333 ASSERT(!renderer()->document()->renderer()->needsLayout());
4334
4333 LayoutRect hitTestArea = isOutOfFlowRenderFlowThread() ? toRenderFlowThread( renderer())->borderBoxRect() : renderer()->view()->documentRect(); 4335 LayoutRect hitTestArea = isOutOfFlowRenderFlowThread() ? toRenderFlowThread( renderer())->borderBoxRect() : renderer()->view()->documentRect();
4334 if (!request.ignoreClipping()) 4336 if (!request.ignoreClipping())
4335 hitTestArea.intersect(frameVisibleRect(renderer())); 4337 hitTestArea.intersect(frameVisibleRect(renderer()));
4336 4338
4337 RenderLayer* insideLayer = hitTestLayer(this, 0, request, result, hitTestAre a, hitTestLocation, false); 4339 RenderLayer* insideLayer = hitTestLayer(this, 0, request, result, hitTestAre a, hitTestLocation, false);
4338 if (!insideLayer) { 4340 if (!insideLayer) {
4339 // We didn't hit any layer. If we are the root layer and the mouse is -- or just was -- down, 4341 // We didn't hit any layer. If we are the root layer and the mouse is -- or just was -- down,
4340 // return ourselves. We do this so mouse events continue getting deliver ed after a drag has 4342 // return ourselves. We do this so mouse events continue getting deliver ed after a drag has
4341 // exited the WebView, and so hit testing over a scrollbar hits the cont ent document. 4343 // exited the WebView, and so hit testing over a scrollbar hits the cont ent document.
4342 if (!request.isChildFrameHitTest() && (request.active() || request.relea se()) && isRootLayer()) { 4344 if (!request.isChildFrameHitTest() && (request.active() || request.relea se()) && isRootLayer()) {
(...skipping 2123 matching lines...) Expand 10 before | Expand all | Expand 10 after
6466 } 6468 }
6467 } 6469 }
6468 6470
6469 void showLayerTree(const WebCore::RenderObject* renderer) 6471 void showLayerTree(const WebCore::RenderObject* renderer)
6470 { 6472 {
6471 if (!renderer) 6473 if (!renderer)
6472 return; 6474 return;
6473 showLayerTree(renderer->enclosingLayer()); 6475 showLayerTree(renderer->enclosingLayer());
6474 } 6476 }
6475 #endif 6477 #endif
OLDNEW
« no previous file with comments | « LayoutTests/compositing/iframes/crash-mouse-event-expected.txt ('k') | Source/core/rendering/RenderView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698