| 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 2396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2407 | 2407 |
| 2408 LayoutRect hitTestArea = renderer()->view()->documentRect(); | 2408 LayoutRect hitTestArea = renderer()->view()->documentRect(); |
| 2409 if (!request.ignoreClipping()) | 2409 if (!request.ignoreClipping()) |
| 2410 hitTestArea.intersect(frameVisibleRect(renderer())); | 2410 hitTestArea.intersect(frameVisibleRect(renderer())); |
| 2411 | 2411 |
| 2412 RenderLayer* insideLayer = hitTestLayer(this, 0, request, result, hitTestAre
a, hitTestLocation, false); | 2412 RenderLayer* insideLayer = hitTestLayer(this, 0, request, result, hitTestAre
a, hitTestLocation, false); |
| 2413 if (!insideLayer) { | 2413 if (!insideLayer) { |
| 2414 // We didn't hit any layer. If we are the root layer and the mouse is --
or just was -- down, | 2414 // We didn't hit any layer. If we are the root layer and the mouse is --
or just was -- down, |
| 2415 // return ourselves. We do this so mouse events continue getting deliver
ed after a drag has | 2415 // return ourselves. We do this so mouse events continue getting deliver
ed after a drag has |
| 2416 // exited the WebView, and so hit testing over a scrollbar hits the cont
ent document. | 2416 // exited the WebView, and so hit testing over a scrollbar hits the cont
ent document. |
| 2417 if (!request.isChildFrameHitTest() && (request.active() || request.relea
se()) && isRootLayer()) { | 2417 // In addtion, it is possible for the mouse to stay in the document but
there is no element. |
| 2418 // At that time, the events of the mouse should be fired. |
| 2419 LayoutPoint hitPoint = hitTestLocation.point(); |
| 2420 if (!request.isChildFrameHitTest() && ((request.active() || request.rele
ase()) || (request.move() && hitTestArea.contains(hitPoint.x(), hitPoint.y())))
&& isRootLayer()) { |
| 2418 renderer()->updateHitTestResult(result, toRenderView(renderer())->fl
ipForWritingMode(hitTestLocation.point())); | 2421 renderer()->updateHitTestResult(result, toRenderView(renderer())->fl
ipForWritingMode(hitTestLocation.point())); |
| 2419 insideLayer = this; | 2422 insideLayer = this; |
| 2420 } | 2423 } |
| 2421 } | 2424 } |
| 2422 | 2425 |
| 2423 // Now determine if the result is inside an anchor - if the urlElement isn't
already set. | 2426 // Now determine if the result is inside an anchor - if the urlElement isn't
already set. |
| 2424 Node* node = result.innerNode(); | 2427 Node* node = result.innerNode(); |
| 2425 if (node && !result.URLElement()) | 2428 if (node && !result.URLElement()) |
| 2426 result.setURLElement(node->enclosingLinkEventParentOrSelf()); | 2429 result.setURLElement(node->enclosingLinkEventParentOrSelf()); |
| 2427 | 2430 |
| (...skipping 1265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3693 } | 3696 } |
| 3694 } | 3697 } |
| 3695 | 3698 |
| 3696 void showLayerTree(const blink::RenderObject* renderer) | 3699 void showLayerTree(const blink::RenderObject* renderer) |
| 3697 { | 3700 { |
| 3698 if (!renderer) | 3701 if (!renderer) |
| 3699 return; | 3702 return; |
| 3700 showLayerTree(renderer->enclosingLayer()); | 3703 showLayerTree(renderer->enclosingLayer()); |
| 3701 } | 3704 } |
| 3702 #endif | 3705 #endif |
| OLD | NEW |