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

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 2382 matching lines...) Expand 10 before | Expand all | Expand 10 after
2393 2393
2394 LayoutRect hitTestArea = renderer()->view()->documentRect(); 2394 LayoutRect hitTestArea = renderer()->view()->documentRect();
2395 if (!request.ignoreClipping()) 2395 if (!request.ignoreClipping())
2396 hitTestArea.intersect(frameVisibleRect(renderer())); 2396 hitTestArea.intersect(frameVisibleRect(renderer()));
2397 2397
2398 RenderLayer* insideLayer = hitTestLayer(this, 0, request, result, hitTestAre a, hitTestLocation, false); 2398 RenderLayer* insideLayer = hitTestLayer(this, 0, request, result, hitTestAre a, hitTestLocation, false);
2399 if (!insideLayer) { 2399 if (!insideLayer) {
2400 // We didn't hit any layer. If we are the root layer and the mouse is -- or just was -- down, 2400 // We didn't hit any layer. If we are the root layer and the mouse is -- or just was -- down,
2401 // return ourselves. We do this so mouse events continue getting deliver ed after a drag has 2401 // return ourselves. We do this so mouse events continue getting deliver ed after a drag has
2402 // exited the WebView, and so hit testing over a scrollbar hits the cont ent document. 2402 // exited the WebView, and so hit testing over a scrollbar hits the cont ent document.
2403 if (!request.isChildFrameHitTest() && (request.active() || request.relea se()) && isRootLayer()) { 2403 // In addtion, the mouse is possible to stay in document but there is no element.
Julien - ping for review 2014/09/23 14:15:05 I don't think we say "the mouse is possible to sta
Miyoung Shin(g) 2014/09/24 01:34:15 Thank you to disabuse.
2404 // At that time, the events of the mouse should be fired.
2405 LayoutPoint hitPoint = hitTestLocation.point();
2406 if (!request.isChildFrameHitTest() && ((request.active() || request.rele ase()) || (request.move() && hitTestArea.contains(hitPoint.x(), hitPoint.y()))) && isRootLayer()) {
2404 renderer()->updateHitTestResult(result, toRenderView(renderer())->fl ipForWritingMode(hitTestLocation.point())); 2407 renderer()->updateHitTestResult(result, toRenderView(renderer())->fl ipForWritingMode(hitTestLocation.point()));
2405 insideLayer = this; 2408 insideLayer = this;
2406 } 2409 }
2407 } 2410 }
2408 2411
2409 // Now determine if the result is inside an anchor - if the urlElement isn't already set. 2412 // Now determine if the result is inside an anchor - if the urlElement isn't already set.
2410 Node* node = result.innerNode(); 2413 Node* node = result.innerNode();
2411 if (node && !result.URLElement()) 2414 if (node && !result.URLElement())
2412 result.setURLElement(node->enclosingLinkEventParentOrSelf()); 2415 result.setURLElement(node->enclosingLinkEventParentOrSelf());
2413 2416
(...skipping 1265 matching lines...) Expand 10 before | Expand all | Expand 10 after
3679 } 3682 }
3680 } 3683 }
3681 3684
3682 void showLayerTree(const blink::RenderObject* renderer) 3685 void showLayerTree(const blink::RenderObject* renderer)
3683 { 3686 {
3684 if (!renderer) 3687 if (!renderer)
3685 return; 3688 return;
3686 showLayerTree(renderer->enclosingLayer()); 3689 showLayerTree(renderer->enclosingLayer());
3687 } 3690 }
3688 #endif 3691 #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