Chromium Code Reviews| 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 2390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2401 | 2401 |
| 2402 LayoutRect hitTestArea = renderer()->view()->documentRect(); | 2402 LayoutRect hitTestArea = renderer()->view()->documentRect(); |
| 2403 if (!request.ignoreClipping()) | 2403 if (!request.ignoreClipping()) |
| 2404 hitTestArea.intersect(frameVisibleRect(renderer())); | 2404 hitTestArea.intersect(frameVisibleRect(renderer())); |
| 2405 | 2405 |
| 2406 RenderLayer* insideLayer = hitTestLayer(this, 0, request, result, hitTestAre a, hitTestLocation, false); | 2406 RenderLayer* insideLayer = hitTestLayer(this, 0, request, result, hitTestAre a, hitTestLocation, false); |
| 2407 if (!insideLayer) { | 2407 if (!insideLayer) { |
| 2408 // We didn't hit any layer. If we are the root layer and the mouse is -- or just was -- down, | 2408 // We didn't hit any layer. If we are the root layer and the mouse is -- or just was -- down, |
| 2409 // return ourselves. We do this so mouse events continue getting deliver ed after a drag has | 2409 // return ourselves. We do this so mouse events continue getting deliver ed after a drag has |
| 2410 // exited the WebView, and so hit testing over a scrollbar hits the cont ent document. | 2410 // exited the WebView, and so hit testing over a scrollbar hits the cont ent document. |
| 2411 if (!request.isChildFrameHitTest() && (request.active() || request.relea se()) && isRootLayer()) { | 2411 // In addtion, the mouse is possible to stay in document but there is no element. |
| 2412 // At that time, the events of the mouse should be fired. | |
| 2413 LayoutPoint hitPoint = hitTestLocation.point(); | |
| 2414 if (!request.isChildFrameHitTest() && ((request.active() || request.rele ase()) || (request.move() && hitTestArea.contains(hitPoint.x(), hitPoint.y()))) && isRootLayer()) { | |
|
Julien - ping for review
2014/09/19 16:56:41
Why do we special case mouse move here? Wouldn't m
Miyoung Shin(g)
2014/09/20 03:59:43
Mouse click is working well because there is alrea
| |
| 2412 renderer()->updateHitTestResult(result, toRenderView(renderer())->fl ipForWritingMode(hitTestLocation.point())); | 2415 renderer()->updateHitTestResult(result, toRenderView(renderer())->fl ipForWritingMode(hitTestLocation.point())); |
| 2413 insideLayer = this; | 2416 insideLayer = this; |
| 2414 } | 2417 } |
| 2415 } | 2418 } |
| 2416 | 2419 |
| 2417 // Now determine if the result is inside an anchor - if the urlElement isn't already set. | 2420 // Now determine if the result is inside an anchor - if the urlElement isn't already set. |
| 2418 Node* node = result.innerNode(); | 2421 Node* node = result.innerNode(); |
| 2419 if (node && !result.URLElement()) | 2422 if (node && !result.URLElement()) |
| 2420 result.setURLElement(node->enclosingLinkEventParentOrSelf()); | 2423 result.setURLElement(node->enclosingLinkEventParentOrSelf()); |
| 2421 | 2424 |
| (...skipping 1265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3687 } | 3690 } |
| 3688 } | 3691 } |
| 3689 | 3692 |
| 3690 void showLayerTree(const blink::RenderObject* renderer) | 3693 void showLayerTree(const blink::RenderObject* renderer) |
| 3691 { | 3694 { |
| 3692 if (!renderer) | 3695 if (!renderer) |
| 3693 return; | 3696 return; |
| 3694 showLayerTree(renderer->enclosingLayer()); | 3697 showLayerTree(renderer->enclosingLayer()); |
| 3695 } | 3698 } |
| 3696 #endif | 3699 #endif |
| OLD | NEW |