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) 2005 Allan Sandfeld Jensen (kde@carewolf.com) | 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) |
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) | 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) |
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. |
7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. | 7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. |
8 * | 8 * |
9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
(...skipping 1046 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1057 return max<LayoutUnit>(0, height); | 1057 return max<LayoutUnit>(0, height); |
1058 } | 1058 } |
1059 | 1059 |
1060 // Hit Testing | 1060 // Hit Testing |
1061 bool RenderBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& result
, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffs
et, HitTestAction action) | 1061 bool RenderBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& result
, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffs
et, HitTestAction action) |
1062 { | 1062 { |
1063 LayoutPoint adjustedLocation = accumulatedOffset + location(); | 1063 LayoutPoint adjustedLocation = accumulatedOffset + location(); |
1064 | 1064 |
1065 // Check kids first. | 1065 // Check kids first. |
1066 for (RenderObject* child = slowLastChild(); child; child = child->previousSi
bling()) { | 1066 for (RenderObject* child = slowLastChild(); child; child = child->previousSi
bling()) { |
1067 if (!child->hasLayer() && child->nodeAtPoint(request, result, locationIn
Container, adjustedLocation, action)) { | 1067 if ((!child->hasLayer() || !toRenderLayerModelObject(child)->layer()->is
SelfPaintingLayer()) && child->nodeAtPoint(request, result, locationInContainer,
adjustedLocation, action)) { |
1068 updateHitTestResult(result, locationInContainer.point() - toLayoutSi
ze(adjustedLocation)); | 1068 updateHitTestResult(result, locationInContainer.point() - toLayoutSi
ze(adjustedLocation)); |
1069 return true; | 1069 return true; |
1070 } | 1070 } |
1071 } | 1071 } |
1072 | 1072 |
1073 // Check our bounds next. For this purpose always assume that we can only be
hit in the | 1073 // Check our bounds next. For this purpose always assume that we can only be
hit in the |
1074 // foreground phase (which is true for replaced elements like images). | 1074 // foreground phase (which is true for replaced elements like images). |
1075 LayoutRect boundsRect = borderBoxRect(); | 1075 LayoutRect boundsRect = borderBoxRect(); |
1076 boundsRect.moveBy(adjustedLocation); | 1076 boundsRect.moveBy(adjustedLocation); |
1077 if (visibleToHitTestRequest(request) && action == HitTestForeground && locat
ionInContainer.intersects(boundsRect)) { | 1077 if (visibleToHitTestRequest(request) && action == HitTestForeground && locat
ionInContainer.intersects(boundsRect)) { |
(...skipping 3610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4688 return 0; | 4688 return 0; |
4689 | 4689 |
4690 if (!layoutState && !flowThreadContainingBlock()) | 4690 if (!layoutState && !flowThreadContainingBlock()) |
4691 return 0; | 4691 return 0; |
4692 | 4692 |
4693 RenderBlock* containerBlock = containingBlock(); | 4693 RenderBlock* containerBlock = containingBlock(); |
4694 return containerBlock->offsetFromLogicalTopOfFirstPage() + logicalTop(); | 4694 return containerBlock->offsetFromLogicalTopOfFirstPage() + logicalTop(); |
4695 } | 4695 } |
4696 | 4696 |
4697 } // namespace WebCore | 4697 } // namespace WebCore |
OLD | NEW |