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

Side by Side Diff: Source/core/paint/DeprecatedPaintLayer.cpp

Issue 1210253003: Fix wheel event dispatch logic to fallback to document when hit-test fails (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Address nits Created 5 years, 5 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 | « Source/core/input/EventHandler.cpp ('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 1585 matching lines...) Expand 10 before | Expand all | Expand 10 after
1596 if (request.ignoreClipping()) 1596 if (request.ignoreClipping())
1597 hitTestArea.unite(LayoutRect(layoutObject()->view()->documentRect())); 1597 hitTestArea.unite(LayoutRect(layoutObject()->view()->documentRect()));
1598 1598
1599 DeprecatedPaintLayer* insideLayer = hitTestLayer(this, 0, result, hitTestAre a, hitTestLocation, false); 1599 DeprecatedPaintLayer* insideLayer = hitTestLayer(this, 0, result, hitTestAre a, hitTestLocation, false);
1600 if (!insideLayer) { 1600 if (!insideLayer) {
1601 // We didn't hit any layer. If we are the root layer and the mouse is -- or just was -- down, 1601 // We didn't hit any layer. If we are the root layer and the mouse is -- or just was -- down,
1602 // return ourselves. We do this so mouse events continue getting deliver ed after a drag has 1602 // return ourselves. We do this so mouse events continue getting deliver ed after a drag has
1603 // exited the WebView, and so hit testing over a scrollbar hits the cont ent document. 1603 // exited the WebView, and so hit testing over a scrollbar hits the cont ent document.
1604 // In addtion, it is possible for the mouse to stay in the document but there is no element. 1604 // In addtion, it is possible for the mouse to stay in the document but there is no element.
1605 // At that time, the events of the mouse should be fired. 1605 // At that time, the events of the mouse should be fired.
1606 // TODO(majidvp): This should apply more consistently across different e vent types and we
1607 // should not use RequestType for it. Perhaps best for it to be done at a higher level. See
1608 // http://crbug.com/505825
1606 LayoutPoint hitPoint = hitTestLocation.point(); 1609 LayoutPoint hitPoint = hitTestLocation.point();
1607 if (!request.isChildFrameHitTest() && ((request.active() || request.rele ase()) || (request.move() && hitTestArea.contains(hitPoint.x(), hitPoint.y()))) && isRootLayer()) { 1610 if (!request.isChildFrameHitTest() && ((request.active() || request.rele ase()) || (request.move() && hitTestArea.contains(hitPoint.x(), hitPoint.y()))) && isRootLayer()) {
1608 layoutObject()->updateHitTestResult(result, toLayoutView(layoutObjec t())->flipForWritingMode(hitTestLocation.point())); 1611 layoutObject()->updateHitTestResult(result, toLayoutView(layoutObjec t())->flipForWritingMode(hitTestLocation.point()));
1609 insideLayer = this; 1612 insideLayer = this;
1610 } 1613 }
1611 } 1614 }
1612 1615
1613 // Now determine if the result is inside an anchor - if the urlElement isn't already set. 1616 // Now determine if the result is inside an anchor - if the urlElement isn't already set.
1614 Node* node = result.innerNode(); 1617 Node* node = result.innerNode();
1615 if (node && !result.URLElement()) 1618 if (node && !result.URLElement())
(...skipping 1147 matching lines...) Expand 10 before | Expand all | Expand 10 after
2763 2766
2764 void showLayerTree(const blink::LayoutObject* layoutObject) 2767 void showLayerTree(const blink::LayoutObject* layoutObject)
2765 { 2768 {
2766 if (!layoutObject) { 2769 if (!layoutObject) {
2767 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); 2770 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n");
2768 return; 2771 return;
2769 } 2772 }
2770 showLayerTree(layoutObject->enclosingLayer()); 2773 showLayerTree(layoutObject->enclosingLayer());
2771 } 2774 }
2772 #endif 2775 #endif
OLDNEW
« no previous file with comments | « Source/core/input/EventHandler.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698