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 1585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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 should not use | |
Rick Byers
2015/06/30 20:14:49
nit: follow the wrapping of the rest of the commen
majidvp
2015/06/30 22:48:32
Done.
| |
1607 // RequestType for it. Perhaps best for it to be done at a higher level. See http://crbug.com/505825 | |
1606 LayoutPoint hitPoint = hitTestLocation.point(); | 1608 LayoutPoint hitPoint = hitTestLocation.point(); |
1607 if (!request.isChildFrameHitTest() && ((request.active() || request.rele ase()) || (request.move() && hitTestArea.contains(hitPoint.x(), hitPoint.y()))) && isRootLayer()) { | 1609 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())); | 1610 layoutObject()->updateHitTestResult(result, toLayoutView(layoutObjec t())->flipForWritingMode(hitTestLocation.point())); |
1609 insideLayer = this; | 1611 insideLayer = this; |
1610 } | 1612 } |
1611 } | 1613 } |
1612 | 1614 |
1613 // Now determine if the result is inside an anchor - if the urlElement isn't already set. | 1615 // Now determine if the result is inside an anchor - if the urlElement isn't already set. |
1614 Node* node = result.innerNode(); | 1616 Node* node = result.innerNode(); |
1615 if (node && !result.URLElement()) | 1617 if (node && !result.URLElement()) |
(...skipping 1147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2763 | 2765 |
2764 void showLayerTree(const blink::LayoutObject* layoutObject) | 2766 void showLayerTree(const blink::LayoutObject* layoutObject) |
2765 { | 2767 { |
2766 if (!layoutObject) { | 2768 if (!layoutObject) { |
2767 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); | 2769 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); |
2768 return; | 2770 return; |
2769 } | 2771 } |
2770 showLayerTree(layoutObject->enclosingLayer()); | 2772 showLayerTree(layoutObject->enclosingLayer()); |
2771 } | 2773 } |
2772 #endif | 2774 #endif |
OLD | NEW |