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