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

Unified 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, 4 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/rendering/RenderLayer.cpp
diff --git a/Source/core/rendering/RenderLayer.cpp b/Source/core/rendering/RenderLayer.cpp
index 7387c163b2cee440c9f12ad25e9cf0133bc86707..6ae6fb18c1559d7092ee9cebe7aa294d0478d295 100644
--- a/Source/core/rendering/RenderLayer.cpp
+++ b/Source/core/rendering/RenderLayer.cpp
@@ -2404,7 +2404,10 @@ bool RenderLayer::hitTest(const HitTestRequest& request, const HitTestLocation&
// We didn't hit any layer. If we are the root layer and the mouse is -- or just was -- down,
// return ourselves. We do this so mouse events continue getting delivered after a drag has
// exited the WebView, and so hit testing over a scrollbar hits the content document.
- if (!request.isChildFrameHitTest() && (request.active() || request.release()) && isRootLayer()) {
+ // In addtion, the mouse is possible to stay in document but there is no element.
+ // At that time, the events of the mouse should be fired.
+ LayoutPoint hitPoint = hitTestLocation.point();
+ if (!request.isChildFrameHitTest() && ((request.active() || request.release()) || (request.move() && hitTestArea.contains(hitPoint.x(), hitPoint.y()))) && isRootLayer()) {
renderer()->updateHitTestResult(result, toRenderView(renderer())->flipForWritingMode(hitTestLocation.point()));
insideLayer = this;
}

Powered by Google App Engine
This is Rietveld 408576698