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

Side by Side Diff: Source/core/rendering/RenderLayer.cpp

Issue 494913003: Mousemove event should be fired when the mouse stays in the document but there is no element. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « LayoutTests/fast/events/resources/mouse-events-within-no-element-iframe.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2396 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « LayoutTests/fast/events/resources/mouse-events-within-no-element-iframe.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698