Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
| 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) | 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) |
| 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed. |
| 7 * Copyright (C) 2009 Google Inc. All rights reserved. | 7 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) | 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) |
| 9 * | 9 * |
| 10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
| (...skipping 1662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1673 { | 1673 { |
| 1674 return createPositionWithAffinity(caretMinOffset(), DOWNSTREAM); | 1674 return createPositionWithAffinity(caretMinOffset(), DOWNSTREAM); |
| 1675 } | 1675 } |
| 1676 | 1676 |
| 1677 bool RenderObject::hitTest(const HitTestRequest& request, HitTestResult& result, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffse t, HitTestFilter hitTestFilter) | 1677 bool RenderObject::hitTest(const HitTestRequest& request, HitTestResult& result, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffse t, HitTestFilter hitTestFilter) |
| 1678 { | 1678 { |
| 1679 bool inside = false; | 1679 bool inside = false; |
| 1680 if (hitTestFilter != HitTestSelf) { | 1680 if (hitTestFilter != HitTestSelf) { |
| 1681 // First test the foreground layer (lines and inlines). | 1681 // First test the foreground layer (lines and inlines). |
| 1682 inside = nodeAtPoint(request, result, locationInContainer, accumulatedOf fset, HitTestForeground); | 1682 inside = nodeAtPoint(request, result, locationInContainer, accumulatedOf fset, HitTestForeground); |
| 1683 | |
| 1684 // Finally test to see if the mouse is in the background (within a child block's background). | |
| 1685 if (!inside) | |
| 1686 inside = nodeAtPoint(request, result, locationInContainer, accumulat edOffset, HitTestChildBlockBackgrounds); | |
|
ojan
2015/02/14 03:25:49
If the hitTest is in a child block's background it
| |
| 1687 } | 1683 } |
| 1688 | 1684 |
| 1689 // See if the mouse is inside us but not any of our descendants | 1685 // See if the mouse is inside us but not any of our descendants |
| 1690 if (hitTestFilter != HitTestDescendants && !inside) | 1686 if (hitTestFilter != HitTestDescendants && !inside) |
| 1691 inside = nodeAtPoint(request, result, locationInContainer, accumulatedOf fset, HitTestBlockBackground); | 1687 inside = nodeAtPoint(request, result, locationInContainer, accumulatedOf fset, HitTestBlockBackground); |
| 1692 | 1688 |
| 1693 return inside; | 1689 return inside; |
| 1694 } | 1690 } |
| 1695 | 1691 |
| 1696 void RenderObject::updateHitTestResult(HitTestResult& result, const LayoutPoint& point) | 1692 void RenderObject::updateHitTestResult(HitTestResult& result, const LayoutPoint& point) |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1987 { | 1983 { |
| 1988 if (object1) { | 1984 if (object1) { |
| 1989 const blink::RenderObject* root = object1; | 1985 const blink::RenderObject* root = object1; |
| 1990 while (root->parent()) | 1986 while (root->parent()) |
| 1991 root = root->parent(); | 1987 root = root->parent(); |
| 1992 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); | 1988 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); |
| 1993 } | 1989 } |
| 1994 } | 1990 } |
| 1995 | 1991 |
| 1996 #endif | 1992 #endif |
| OLD | NEW |