OLD | NEW |
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 4210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4221 bool RenderLayer::hitTest(const HitTestRequest& request, HitTestResult& result) | 4221 bool RenderLayer::hitTest(const HitTestRequest& request, HitTestResult& result) |
4222 { | 4222 { |
4223 return hitTest(request, result.hitTestLocation(), result); | 4223 return hitTest(request, result.hitTestLocation(), result); |
4224 } | 4224 } |
4225 | 4225 |
4226 bool RenderLayer::hitTest(const HitTestRequest& request, const HitTestLocation&
hitTestLocation, HitTestResult& result) | 4226 bool RenderLayer::hitTest(const HitTestRequest& request, const HitTestLocation&
hitTestLocation, HitTestResult& result) |
4227 { | 4227 { |
4228 ASSERT(isSelfPaintingLayer() || hasSelfPaintingLayerDescendant()); | 4228 ASSERT(isSelfPaintingLayer() || hasSelfPaintingLayerDescendant()); |
4229 | 4229 |
4230 // RenderView should make sure to update layout before entering hit testing | 4230 // RenderView should make sure to update layout before entering hit testing |
4231 ASSERT(!renderer()->frame()->view()->layoutPending()); | 4231 ASSERT(!renderer()->frame()->view()->layoutIsScheduledWithEmbedder()); |
4232 ASSERT(!renderer()->document()->renderer()->needsLayout()); | 4232 ASSERT(!renderer()->document()->renderer()->needsLayout()); |
4233 | 4233 |
4234 LayoutRect hitTestArea = isOutOfFlowRenderFlowThread() ? toRenderFlowThread(
renderer())->borderBoxRect() : renderer()->view()->documentRect(); | 4234 LayoutRect hitTestArea = isOutOfFlowRenderFlowThread() ? toRenderFlowThread(
renderer())->borderBoxRect() : renderer()->view()->documentRect(); |
4235 if (!request.ignoreClipping()) | 4235 if (!request.ignoreClipping()) |
4236 hitTestArea.intersect(frameVisibleRect(renderer())); | 4236 hitTestArea.intersect(frameVisibleRect(renderer())); |
4237 | 4237 |
4238 RenderLayer* insideLayer = hitTestLayer(this, 0, request, result, hitTestAre
a, hitTestLocation, false); | 4238 RenderLayer* insideLayer = hitTestLayer(this, 0, request, result, hitTestAre
a, hitTestLocation, false); |
4239 if (!insideLayer) { | 4239 if (!insideLayer) { |
4240 // We didn't hit any layer. If we are the root layer and the mouse is --
or just was -- down, | 4240 // We didn't hit any layer. If we are the root layer and the mouse is --
or just was -- down, |
4241 // return ourselves. We do this so mouse events continue getting deliver
ed after a drag has | 4241 // return ourselves. We do this so mouse events continue getting deliver
ed after a drag has |
(...skipping 2124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6366 } | 6366 } |
6367 } | 6367 } |
6368 | 6368 |
6369 void showLayerTree(const WebCore::RenderObject* renderer) | 6369 void showLayerTree(const WebCore::RenderObject* renderer) |
6370 { | 6370 { |
6371 if (!renderer) | 6371 if (!renderer) |
6372 return; | 6372 return; |
6373 showLayerTree(renderer->enclosingLayer()); | 6373 showLayerTree(renderer->enclosingLayer()); |
6374 } | 6374 } |
6375 #endif | 6375 #endif |
OLD | NEW |